*Atris* Posted April 5, 2005 Share Posted April 5, 2005 I want to set up I piece of dialog so that you talk to a character and find something out and then next time you come to talk to the character there will be an extra dialog option refering to the other conversation. This happens in game but how would I go about setting up a custom one? Link to comment Share on other sites More sharing options...
coaxmetal Posted April 5, 2005 Share Posted April 5, 2005 try exploring your dialogue editor's features. there should be a text box somewhere in one of the dialogue editors which is labeled something like 'script that determines if this node (or line of dialogue, if you prefer) is available,' i believe you can even find it in the dialogue editor in kotor tool. you type the name of the script in there if you can make the dialog line's avalability depend on scripting, write the script, and you're set. otherwise, there might be other features to make nodes available or not. suggestion on how to make the dialogue scripting-dependant: -create a script that sets an variable (say, an integer) to a certain value (like 1) -attatch this script to the first line of dialogue (the one that the player must speak/hear to unlock the second line of dialogue) by using the 'script to run on this node' slot in the Kotor Tool dialogue editor or whatever editor you're using (i'm assuming you've got something better than the old KT editor) -create a script that checks the value of the variable in the first script (the integer) and does something(say, returns a command to use the dialogue line, or returns 'true') if the variable equals a certain value (like 1, which you specified in the first script) -attatch the second script to the line of dialogue you want to unlock in the 'script that determines if this node is avialable' slot ...should work? if that doesn't cut it, you could create two different dialogue files, one for the first conversation(without 'locked' dialogue line) and one for the second(with the new line)? and then link toem to twin NPCs? but that'd be a real pain... good luck, hope i helped Link to comment Share on other sites More sharing options...
stoffe Posted April 5, 2005 Share Posted April 5, 2005 The game usually uses Global number variables to keep track of the state of plots and events. There is a number of ready-made generic scripts coming with the game for using global variables in a dialog. Global variables are identified by a unique name text string. To use the scripts below you type in that identifier name in the "String Param" fields of the dialog node using the script. To add new Global variables to the game you'll need to modify the globalcat.2da file to add them. Here's some of the most common scripts to use. I assume you are using the DLG Editor when referring to field labels. KotorTool doesn't handle editing K2:TSL dialog files too well yet. Conditional scripts: c_global_eq --> Check if global in "String Param" is equal to P1. c_global_gt --> Check if global in "String Param" is greater than P1. c_global_lt --> Check if global in "String Param" is less than P1. c_global_bet --> Check if global in "String Param" is bigger than P1 and smaller than P2. Action scripts: a_global_set --> Set global in "String Param" to value P1. a_global_dec --> Subtract value in P1 from the global in "String Param". a_global_inc --> Add value in P1 to global in "String Param". Link to comment Share on other sites More sharing options...
coaxmetal Posted April 6, 2005 Share Posted April 6, 2005 thanks for setting me straight there, my scripting skills are still weak as tinfoil. i guess i'll take some notes and go back to the drawing board... Link to comment Share on other sites More sharing options...
*Atris* Posted April 6, 2005 Author Share Posted April 6, 2005 How do i get it to modify a specific new global? Link to comment Share on other sites More sharing options...
tk102 Posted April 6, 2005 Share Posted April 6, 2005 New globals require a new entry in globalcat.2da. If you don't want to have to distribute this .2da with your mod, you could either reuse existing globals that you know won't make a difference or you can use Local variables. Link to comment Share on other sites More sharing options...
*Atris* Posted April 6, 2005 Author Share Posted April 6, 2005 Id be willing to do .2da but i just need more explanation on what to do im and what are local variables? Link to comment Share on other sites More sharing options...
tk102 Posted April 6, 2005 Share Posted April 6, 2005 In that case don't worry about local variables... instead open up globalcat.2da in KotOR Tool. You'll see that the structure is about as simple as you can get. Just add a new row, specify your new global variable name and make it a Number (for maximum flexibility). Save this in your override folder. Now you can use this new variable as described by stoffe -mkb- above. Link to comment Share on other sites More sharing options...
*Atris* Posted April 6, 2005 Author Share Posted April 6, 2005 THank you so much both of you!!!!! It worked now my mod can have good dialog!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.