lfnetwork.com mark read register faq members calendar

Thread: Another question lol
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 04-28-2009, 12:47 PM   #1
darth-me
Rookie
 
darth-me's Avatar
 
Join Date: Nov 2008
Location: UK
Posts: 125
Current Game: Dragon Age: Origins
Another question lol

Hi all!
In my next mod I will need a certain NPC to spawn in a landing pad area only after you have found 2 Star Maps. How would I go about making this work? I don't mind having to talk to someone else to make him Spawn.
Thanks!
darth-me is offline   you may: quote & reply,
Old 04-28-2009, 02:04 PM   #2
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,465
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
You will need to script a conditional that checks the numeric boolean that monitors the Star Map quest.

I would like to be more helpful, but I cannot recall the boolean in question. There may be a look-up sheet for you on that...

Essentially, you need a very simple conditional -

"If my PC has completed 2 Star Maps, 'X' NPC spawns into the landing area."

However, you will either need to copy this script and add it to every landing pad, since you have no clue where your PC is when this script returns TRUE, or edit each script to call this script as a separate function. The code is small, so that is up to you - I am not sure which would be more elegant.

It will be inserted into the area's "on enter" script, and should be a fairly simple cut & paste affair after you get your code working successfully.

I would write the code for you, but I am unsure of the boolean in question - and the script to spawn an NPC is in the tut's and is simple, so you can simply add that as the outcome of your conditional returning TRUE.

happy modding, and wish i could be more helpful. good news - what you are trying to do is possible and not horribly difficult
Qui-Gon Glenn is offline   you may: quote & reply,
Old 04-28-2009, 03:07 PM   #3
darth-me
Rookie
 
darth-me's Avatar
 
Join Date: Nov 2008
Location: UK
Posts: 125
Current Game: Dragon Age: Origins
Cheers.
Scripting isn't really my thing lol - too much to remember.
darth-me is offline   you may: quote & reply,
Old 04-29-2009, 12:44 PM   #4
darth-me
Rookie
 
darth-me's Avatar
 
Join Date: Nov 2008
Location: UK
Posts: 125
Current Game: Dragon Age: Origins
I'm not sure exactly what I'm doing, but I found in Globalcat.2da the 2nd entry is: MAIN_PLOT . Do you reckon this is it? If so, how do I check it?
darth-me is offline   you may: quote & reply,
Old 04-29-2009, 05:17 PM   #5
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,465
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
Thumbs up

Quote:
Originally Posted by darth-me View Post
I'm not sure exactly what I'm doing, but I found in Globalcat.2da the 2nd entry is: MAIN_PLOT . Do you reckon this is it? If so, how do I check it?
I would start at KSE. Look in a savegame and look at the star map quest, and the values of the numeric boolean for different advances of the quest should be there.

You will then declare an integer that represents that global, and that will be placed in the premise of your if statement, checked against the value you are looking for, specifically the value that corresponds to the 2nd planet finished in the star map quest.

then your code will be roughly this:

Code:
void main() {

    int nStarmap=GetGlobalNumber("StarMapQuestBooleanName");
    if nStarmap==n {
            ExecuteScript "spawnyournpc";
    }
}
Remember though, this script doesn't do much on it's own.... needs to be inserted into your landing pad on-enter scripts.

You do not need to declare the integer, and could condense this code by placing nStarmap inside the conditional... I wanted it to be easy to read and still functional. It may be neither :|

You will need to determine from KSE the value you want for "n"

Something along these lines will do it. As for spawning your custom npc with that "spawnyournpc", see this thread. Mighty helpful stuff there!

Last edited by Qui-Gon Glenn; 04-30-2009 at 05:42 AM. Reason: Learned a little, trying to be more helpful
Qui-Gon Glenn is offline   you may: quote & reply,
Old 05-03-2009, 10:01 AM   #6
darth-me
Rookie
 
darth-me's Avatar
 
Join Date: Nov 2008
Location: UK
Posts: 125
Current Game: Dragon Age: Origins
Still stuck . How do i work out which script is the enter script for the Dantooine landing area? It doesn't seem to have a Dan13_enter.ncs or anything similar.

Edit: Nevermind, i've got it

Edit2: To test it can I load a savegame where I've already got 2 of the Star maps?

Last edited by RedHawke; 05-04-2009 at 02:14 AM. Reason: Combining needless triple post...
darth-me is offline   you may: quote & reply,
Old 05-03-2009, 08:45 PM   #7
Exile007
Junior Member
 
Exile007's Avatar
 
Join Date: Dec 2007
Location: Imprisoned by the GenoHaradan
Posts: 498
Current Game: Zelda Majora's Mask
Actually, you'll need to get a save before you ever got to the landing area of Dantooine. The reason being that the on-enter script has already been fired for that area, so you'll need to get a savegame before that area (end of Taris) and then get two Star Maps.
Exile007 is offline   you may: quote & reply,
Old 05-04-2009, 09:53 AM   #8
R2-X2
Junior Member
 
R2-X2's Avatar
 
Join Date: Dec 2008
Location: Above Lehon
Posts: 352
Current Game: KotOR again. F*** yeah.
I would test it on a savegame where you've already found one map (for example tatooine), then insert the script to another planet (for examle Manaan, but only for testing if you want it on Dantooine) and then go to Manaan and find the map. You don't have to find two maps now.
R2-X2 is offline   you may: quote & reply,
Old 05-06-2009, 12:28 PM   #9
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,465
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
Let me know how your progress is going.. The advice of these folks is sound on testing procedures.

1. You want to test the mod and make sure it does NOT fire when your conditional has not returned TRUE (not having finished two maps).
2. You want to test that it fires when the conditions have been met (2 maps done).
3. Tatootine - k_ptat17_enter.ncs in the on-enter (I am a little familiar with it ) - that is one spot you will need to add your script. To identify your other planet area on-enters, there is a list somewhere (I would give it to you but I have lost it, again, aargh) that tells you all of the module names and their corresponding location. Cut and paste to each landing pad area's on-enter.
Qui-Gon Glenn is offline   you may: quote & reply,
Old 05-06-2009, 01:04 PM   #10
darth-me
Rookie
 
darth-me's Avatar
 
Join Date: Nov 2008
Location: UK
Posts: 125
Current Game: Dragon Age: Origins
By a landing pad, I mean 1 specific planet
darth-me is offline   you may: quote & reply,
Old 05-07-2009, 09:58 PM   #11
Qui-Gon Glenn
Necessary Roughneck
 
Qui-Gon Glenn's Avatar
 
Join Date: May 2007
Location: Thessia
Posts: 1,465
Current Game: ME3MP, Arkham Origins
Folder extraordinaire Helpful! Forum Veteran Veteran Modder 
Quote:
Originally Posted by darth-me View Post
By a landing pad, I mean 1 specific planet
Ok, that is easier - which planet?
Qui-Gon Glenn is offline   you may: quote & reply,
Old 05-08-2009, 01:19 PM   #12
darth-me
Rookie
 
darth-me's Avatar
 
Join Date: Nov 2008
Location: UK
Posts: 125
Current Game: Dragon Age: Origins
Doesn't matter, i think i've got it working now
darth-me is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > Another question lol

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:44 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.