Originally posted by Xavier2
I have a few questions.
1. If i need a certain NPC to give evasive responses (or the ones without cutscene) to the PC untill some specific event happens, will i need two different dlg files or this can be done in the same dialog tree;
Ok if you want to make a plot that will use different modules and keep track of what is going on, you can use global variables ( if it's for a single dialogue in a module that will not afffect the events in the other modules, use local numbers instead of globals because there will be no need to edit globalcat.2da)
1. If you are using globals, create a new line in globalcat.2da and use the SetGlobalNumber function to keep track of your plot as explained in this old tutorial concerning journal entries and plot tracking with globals:
http://www.lucasforums.com/showthread.php?s=&threadid=129333)
Example: add the line MY_PLOT to globalcat.2da (in type , put Number)
Then when the event happen attach this script somewhere. It can be to a dialogue, when you pc enters an area, when your pc kills a specific npc (then you would have to use the OnDamage flag in the user define script of that .utc file), etc... of course easiest way it to put it in a dialogue. Note, the number 1 number is a random number that is used as a marker, you could use a random serie of numbers to keep track of your plot like 87, 34, 22, 45 to keep track of your plot if you want it doesn't matter but logically it makes things much easier if you use 1, 2, 3, 4, etc.
{
SetGlobalNumber("MY_PLOT", 1);
}
then at another stage of your plot you could use:
[code]{
SetGlobalNumber("MY_PLOT", 2);
}
This will make the game remeber where you are.
2. If you want to make some replies/entries available only if a certain event has occured, then attach a conditional script in the active field of the 'RepliesList' in the EntryList that checks where your global is and, depending on the result, make those replies/entries available or not:
int StartingConditional()
{
int nResult = GetGlobalNumber("MY_PLOT");
if nResult == 1
{
return TRUE;
}
return FALSE;
}
In short, what this script says is that IF the global Number MY_PLOT is at 1, then make the reply/entry available.
You could also check for charisma, alignment, the presence of another party member instead of globals. This can be used various ways.
2. If this NPC is placed in a different area. But still in the same plot. Do i need another .utc and another .dlg? Yes and no:
- if you pack your .utc files in your module folder then yes, they will be considered as different objects by the game.
- If you put the .utc files in the override folder, then no, just use a spawn script and it will be considered as the same object.
I suggest you pack them in the module if the dialogue is going to be different between the two modules. It keeps the override folder cleaner.
Hope this helps :)