Page 1 of 1
The connection between *.ssl and *.msg
Posted: Thu Oct 14, 2004 8:07 pm
by Foot Soldier
I have a script written for some dialog. I attach it to a character, go to talk to them, and get:
Error
Error
Error
Error
Error being where the text should be. This is obviosly caused by the script not being able to find the .msg file with the text in it.
How are these two files connected? At first I thought it was the name, and the .msg had to have the same name, but I don't think thats right. Any help?
Posted: Thu Oct 14, 2004 8:51 pm
by Corpse
This usually happens when your dialog parameters point to the wrong script ID or the text parameter points to an invalid line number.
If the script is new, you need to find the ID number which corresponds to the script. Second in the dialog, you have to change the script ID parameter to it's corresponding ID. For example:
op_gsay_reply(50, 192);
op_giq_option(4, 50, 193, @Node994, 50);
Here 50 corresponds to the script ID, if you look at script.lst under data/scripts you'll find this corresponds to Vic.int.
I have a complete list of all the scripts with their corresponding IDs somewhere, I'll see if I can dig it up and post it when I find it.
Posted: Thu Oct 14, 2004 8:51 pm
by Corpse
EDIT: Sorry, accidentally double posted.
Posted: Thu Oct 14, 2004 8:59 pm
by Foot Soldier
I am using macros for conversation. In the Reply() macro, it uses NAME as the line number for the msg file, which is defined as SCRIPT_BLAH, which in turn is defined in SCRIPTS.H as 1304.
Now looking at the .lst file, the msg file is actually on line number 1309, but neither defining the script in SCRIPTS.H as 1304 or 1309 changes it. I still get error where the text should be.
Edit: Also, I see no .msg files mentioned anywhere is the script or headers. How does it know what msg file to load?
Edit2: With some tinkering, I got it to work. I am not sure WHY it worked, so some insight on my origional problem would still be good.
What I did, was in the macro NOption(x, y, z) I had the last varible set as 004. In the definition, this is IQ level or something. When I change this to 001, it worked. Why is this?
Posted: Thu Oct 14, 2004 9:40 pm
by Corpse
Foot Soldier wrote:I am using macros for conversation. In the Reply() macro, it uses NAME as the line number for the msg file, which is defined as SCRIPT_BLAH, which in turn is defined in SCRIPTS.H as 1304.
Now looking at the .lst file, the msg file is actually on line number 1309, but neither defining the script in SCRIPTS.H as 1304 or 1309 changes it. I still get error where the text should be.
Edit: Also, I see no .msg files mentioned anywhere is the script or headers. How does it know what msg file to load?
Edit2: With some tinkering, I got it to work. I am not sure WHY it worked, so some insight on my origional problem would still be good.
What I did, was in the macro NOption(x, y, z) I had the last varible set as 004. In the definition, this is IQ level or something. When I change this to 001, it worked. Why is this?
I've never used macros for conversation so I can't really help you there, I find the giq dialog command more useful.
As to how it knows what msg file to load; you were right about msg files being named after the script files, what you didn't know is that the script ID is used as the identifier for the msg file as well. So in the example I provided earlier: 50 corresponds to Vic.int, this means it will use Vic.msg as the text file.
Posted: Thu Oct 14, 2004 9:54 pm
by Foot Soldier
It is all so clear now... thank you.
I think I got this train rolling, lets just hope it isn't rolling off a cliff.
Posted: Fri Oct 15, 2004 3:35 pm
by Corpse
No worries and good luck.
Posted: Fri Oct 15, 2004 6:32 pm
by Red
The "IQ" is the minimum intelligence required to view an option.
Using a negative value (-4) means that you require an intelligence lower than that.
Setting it to 1 should have made it available for everyone, so I dunno.