Jump to content

Home

Another question lol


darth-me

Recommended Posts

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 :)

Link to comment
Share on other sites

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:

 

void main() {

   int nStarmap=GetGlobalNumber("[color=yellow]StarMapQuestBooleanName[/color]");
   if nStarmap==[color=yellow]n[/color] {
           ExecuteScript "[color=yellow]spawnyournpc[/color]";
   }
}

 

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!

Link to comment
Share on other sites

Still stuck :p. 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?

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...