Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Question about Dialog Making

Page: 1 of 1
 ulimatejedi
04-21-2010, 2:23 AM
#1
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"?
 harIII
04-22-2010, 4:01 PM
#2
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.
 GeorgNihilus
04-22-2010, 7:06 PM
#3
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 :)
 ulimatejedi
04-22-2010, 10:29 PM
#4
Ah,I see. Thank you very much. But what about the stat checks? Like Awareness?
Is the script also in KotorTool?
 Star Admiral
04-22-2010, 10:41 PM
#5
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
 ulimatejedi
04-22-2010, 11:30 PM
#6
Great! Thank you all very much. :)
 ulimatejedi
04-26-2010, 6:10 AM
#7
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)
 deathdisco
04-26-2010, 5:06 PM
#8
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.
 ulimatejedi
04-26-2010, 7:51 PM
#9
Alright. Thanks for everything.
Page: 1 of 1