Hello.
I've been having this thing in my head while playing TSL.
How do I make Influence/Stat Checks in the dialog? Am I supposed
to use a script?
Also,I have heard that TSL has a built-in script "something"?
Yes you do need to use a script, unfortunately you need to look at the source code available yourself because I'm not familiar with how the influence system works.
This particular type of script is a conditional and needs to be placed in the "script that determines if node is available" field.
Sorry I couldn't be any more help to you.
Yes you do need scripts, for almost every thing I'd say ... :)
this one it's already in the game (TSL) and checks if your influence on a companion is higher than certain value (param2).
// c_influence_gt
/* Parameter Count: 2
Checks to see if an NPC's influence > Param2
Param1 - The NPC value of the player whose influence is increased.
Param2 - influence value to test against.
NPC numbers, as specified in NPC.2da
0 Atton
1 BaoDur
2 Mand
3 g0t0
4 Handmaiden
5 hk47
6 Kreia
7 Mira
8 T3m4
9 VisasMarr
10 Hanharr
11 Disciple
*/
//
// KDS 06/28/04
int StartingConditional()
{
int nNPC = GetScriptParameter(1);
int nInfluence = GetScriptParameter(2);
if(GetInfluence(nNPC) > nInfluence) return 1;
else return 0;
}
just type in your Conditional#1 dialog node the P1 and P2 fields with NPC number and the value of influence to check against respectively and you're done.
to extract other similar scripts open the KotorTool and go to:
BIFs/scripts.bif/Script, Source/ ... and there look for c_influence_eq.nss and like that.
good luck :)
Ah,I see. Thank you very much. But what about the stat checks? Like Awareness?
Is the script also in KotorTool?
Unfortunately, it seems that there isn't one convenient function for all your stat checks. You'll need to look at the set of scripts starting with c_sc_*.nss and pick the one that you need. Each skill has four scripts, one to check for greater, one for less, one for equal, and one for in between two values.
For example, to check if Awareness is greater than 10, use the c_sc_awa_gt.nss script.
Hope that helps. :)
- Star Admiral
Great! Thank you all very much. :)
The Original KotOR doesn't seem to have files similar to those.
Does that mean I'll have to make my own? (I suck at scripting)
Check all of K1's k_con_*.nss scripts. These are all the conditional scripts that have an available source file. You should be able to adapt them to your needs.
Alright. Thanks for everything.