View Full Version : Dialogue question [TSL]

07-29-2008, 07:43 AM
what do i do if i want to put inside the Dialogue a line that i want to it to be shown only once in one module and after i chose it, it won't be shown again?

07-29-2008, 08:13 AM
Attach the following script as the conditional script, change GLOBAL to the name of the global you want to track, 0 to whatever state it needs to be at and 711KOR to whatever module the player has to be in.

int StartingConditional() {
if ( ( GetModuleName() == "711KOR") && (GetGlobalBoolean("GLOBAL")==0)) {
return 1;
return 0;

Don't forget that if you're using globals you'll have to add them to globalcat.2da or the game won't be able to track them.


07-29-2008, 08:19 AM
sorry...i didn't get it...can you elaborate more?

07-29-2008, 08:29 AM
Which part didn't you get? The adding the script to the dialog part of editing globalcat.2da?


07-29-2008, 08:48 AM
the editing globalcat.2da

07-29-2008, 09:07 AM
I hope it'll be clear...
You need open globalcat.2da in KotOR Tool 2da editor. Go to BIFs\2da.bif\2da array\find and open globalcat.2da. Now scroll down of file. In "(Row label)" column add some number, in column name write any name for your global (next you'll need put name in script), and a type must be "Number" or "Boolean". In this script it's Global Boolean. Now you can save globalcat.2da in your override folder.

07-29-2008, 09:16 AM
ok...now if you can explain to me what Stream said:
0 to whatever state it needs to be at
what did Stream mean by state?

07-29-2008, 10:17 AM
He means that you need to change it to return either TRUE or FALSE.
There was an error in the script however, where GetGlobalBoolean was being compared with TRUE or FALSE.

This should work:
int StartingConditional() {
return (GetModuleName() == "module_resref" &&

07-29-2008, 10:57 AM
so in:
module_resref - i put the resref of the module
global_boolean_identifier - i put 1 or 0?

07-29-2008, 11:01 AM
Well, actually now I think about it you don't really need to have a check on the module unless you intend to have the dialogue called from different modules.
And global_boolean_identifier is the identifier for your new line in globalcat.2da
int StartingConditional() {
return (GetGlobalBoolean("global_boolean_identifier"));
That script will probably be just as effective.

07-29-2008, 12:52 PM
so in global_boolean_identifier i put the line of the globalcat.2da and the effect would be that, once i chose the line it won't appear again?

07-29-2008, 05:41 PM
Sort of, but for that to occur a script must be fired when the Player selected the node that will set the GlobalBoolean to true.
void main()
SetGlobalBoolean("global_boolean_identifier", TRUE);

And so in globalcat.2da you will add a new line like so:
RowLabel name type
(High) 555_spokento Boolean

Therefore, global_boolean_identifier will become 555_spokento

07-29-2008, 06:04 PM
thanks!i love you!thank you!lol

07-30-2008, 06:41 AM
does the name has to be matching to the module?because it won't work for some reason...