to anyone with exp. working with the dialogs

Users who are viewing this thread

Fujiwara

Sergeant at Arms
I've been testing some class-specific dialogs, in an effort to hand out class-specific missions, items, etc. My code for the module_dialogs.py file is below:
[trp_zithael,"start",[(eq,"$zithael_conversation_start",0),],
"Greetings, {playername}.","zithael_conversation_2",[(assign,"$zithael_conversation_start",1)]],

[trp_zithael,"zithael_conversation_2",[],"I seek the Chosen One. Dost thou think\
thou art whom which I seek?","zithael_conversation_3",[]],

[trp_zithael|plyr,"zithael_conversation_2",[],"Yes, I am the Chosen One.",
"zithael_conversation_3",[(assign,"$chosen_one",1)]],

[trp_zithael|plyr,"zithael_conversation_2",[],"No, you have the wrong person.",
"zithael_conversation_3",[(assign,"$chosen_one",0)]],

[trp_zithael,"zithael_conversation_3",[(eq,"$character_class",0),(eq,"$chosen_one",1)],
"Thou hast great insight into thy character, {playername}.\
My search hath ended.","zithael_conversation_4",[(assign,"$chosen_one",2)]],

[trp_zithael,"zithael_conversation_3",[(eq,"$character_class",0),(eq,"$chosen_one",0)],
"Doubt clouds thy spirit, {playername}.\
Perhaps thou art not the Chosen One.","zithael_conversation_5",[]],

[trp_zithael,"zithael_conversation_3",[(neq,"$character_class",0),(eq,"$chosen_one",1)],
"Thou boasteth much, {playername}.\
However, thou art not the Chosen One.","zithael_conversation_5",[]],

[trp_zithael,"zithael_conversation_3",[(neq,"$character_class",0),(eq,"$chosen_one",0)],
"Thy humility is pleasing to me, {playername}.\
Thou art not the Chosen One.","zithael_conversation_5",[]],

[trp_zithael,"zithael_conversation_4",[(eq,"$chosen_one",2),(neq,"$chosen_one",3)],"I bestow upon thee this\
Sacred Gear, {playername} the Chosen. Use it well to bring\
peace and justice to Calradia.","zithael_conversation_5",[(troop_add_item, "trp_player","itm_mearas"),
(troop_add_item, "trp_player","itm_arrows_of_hope"),
(troop_add_item, "trp_player","itm_erdricks_gauntlets"),
(troop_add_item, "trp_player","itm_boots_of_athena"),
(troop_add_item, "trp_player","itm_erdricks_armor"),
(troop_add_item, "trp_player","itm_helm_of_athena"),
(troop_add_item, "trp_player","itm_hammer_of_peace"),
(troop_add_item, "trp_player","itm_sword_of_justice"),
(troop_add_item, "trp_player","itm_shield_of_victory"),
(troop_add_item, "trp_player","itm_arc_of_serenity"),
(assign,"$chosen_one",3)]],

[trp_zithael,"zithael_conversation_5",[],
"Good-bye, {playername}.","close_window",[]],

You will have to forgive the formatting; that came from a text file. Here is the output: You see Zithael in the Zendar merchant house:
http://www.geocities.com/mattfmcti/dialogbug01.jpg

You see me getting ready to talk to her:
http://www.geocities.com/mattfmcti/dialogbug02.jpg

But instead of the above dialog, I get this:
http://www.geocities.com/mattfmcti/dialogbug03.jpg

Any ideas as to what's going on here would be GREATLY appreciated. Thanks.

PS: bonus points to anyone who gets the hidden reference :smile:
 
Fujiwara said:
Code:
[trp_zithael,"start",[(eq,"$zithael_conversation_start",0),],
   "Greetings, {playername}.","zithael_conversation_2",[(assign,"$zithael_conversation_start",1)]],

This will only be shown if zithael_conversation_start is 0. And it sets the variable to 1. There is no entry point to the conversation if zithael_conversation_start is 1, so I *believe* that it will hit the 'anyone' dialogs after that, which is what you are seeing.

Add another "start" dialog to handle the case where zithael_conversation_start is 1.
 
Thanks, Effidian :smile:

I saw that, too, as I was rereading the post, AFTER I posted it... I feel kinda silly :roll:
 
-GandalfTheGrey said:
So do I, but I'm using Effidian's Editor, and I don't know how to fix that.

What do you mean? You should just be able to add a new dialog option for the unit. Specify "start" as its DialogState and then add away. Or am I missing something?

I do need to make that dialog editor more intuitive though. Maybe associate it with the unit/party rather than all together. Hmmm....
 
Effidian said:
What do you mean? You should just be able to add a new dialog option for the unit. Specify "start" as its DialogState and then add away. Or am I missing something?

That's exactly what I did, but I'm still getting that '-What can I do for you? -Tell me about yourself' dialog.
 
-GandalfTheGrey said:
[That's exactly what I did, but I'm still getting that '-What can I do for you? -Tell me about yourself' dialog.

Hm...Then it could be where the editor pastes the new dialogue. It has got to be above the default "What can I do for you?" exchange in the file.

(Same way that party enounters on the map have to be pasted above the default "surrender or die" stuff)
 
Khalid ibn Walid said:
-GandalfTheGrey said:
[That's exactly what I did, but I'm still getting that '-What can I do for you? -Tell me about yourself' dialog.

Hm...Then it could be where the editor pastes the new dialogue. It has got to be above the default "What can I do for you?" exchange in the file.

(Same way that party enounters on the map have to be pasted above the default "surrender or die" stuff)

That's probably it. I'll need to fix that...
 
I discovered location IS important. Half my problem from above was that the dialog was located at the very end of the file, and for some reason the "view_character"requested" state was still active from the generic "look at your troops" menu. I inserted my dialog above that dialog, and everything works GREAT! :smile:
 
Funny I just thought of that before reading the posts. :eek:
The only problem is that you can't create a dialog before the default dialog...

Thanks for the help, I'm trying that.
 
i cant see how its fixed because all of my dialog is still below it and i can't move it to the end.
 
roborob said:
i cant see how its fixed because all of my dialog is still below it and i can't move it to the end.

This is referring to the "anyone" dialogs. Not order within dialog choices.
 
While your here Effidian.. or for anybody modding for that matter. I had a tricky bug to solve with troop upgrades. If you put all your troops after the governers and npc heroes everything will seem fine at first. At some point though the troops in that list wont be able to upgrade properly.

Using the mod tools, the upgrades are listed at the bottom of the troops file and they seem to have their own range of troops that they are willing to read. So put your troops before the governors or whatnot.

I dont know if that matters to the editor or not, just thought Id throw it out. It was a ***** to solve.
 
Yeah, I think this is the old issue that was talked about in the troops.txt thread.

I should ask Armagan what the deal is with that. I don't understand why that limitation exists.

The editor should probably handle it (it doesn't currently). I was hoping Armagan would just fix it...
 
I don't know if there's anything to fix. The triggers (incl. the ones we don't see, e.g. the upgrades) use constants to visit the troops file. So types of things have to be kept appropriately clustered to make the triggers work. If you paste them in the wrong place, the constants will be off.

It shouldn't be terribly difficult to figure out where to paste stuff. Constants seem to be defined from the first item in a cluster, to the next item after the cluster. So you have to paste new stuff of that type in between.
 
There are no constants defined for the allowable upgrade range. And my point is why should there be? Just let the mod set upgrade paths from any unit to any other unit. The ranges defined for the current triggers are just so there doesn't need to be a bunch of duplicate triggers. It is a convienience, not a requirement.

When scripts work (scripts.txt), I'd even advocate removing the current ranges and having a trigger that updates each element using the script. That would be cleaner since you can just associate a trigger with an element and you don't have to work out specific ranges.

Additionally, there is no good way for the unofficial editor to pick this stuff up and allow you to add a merchant in the "merchant" range or whatever other range ends up being defined.
 
Effidian said:
Additionally, there is no good way for the unofficial editor to pick this stuff up and allow you to add a merchant in the "merchant" range or whatever other range ends up being defined.

Forgive my ignorance (I haven't played with the editor yet; I work through the python files), but how hard is it to adjust to editor to post the trp lines in the right place? Can't a menu be added in the editor where the user can define the troop by class:

(1) regular troop*
(2) governor
(3) armor_merchant
(4) weapons merchant
(5) goods merchant
(6) chest
(7) Special NPC

(with the * calling upon another menu for the definition of the upgrade tree?)

and then just have the editor paste it in the right place?
 
Khalid ibn Walid said:
Forgive my ignorance (I haven't played with the editor yet; I work through the python files), but how hard is it to adjust to editor to post the trp lines in the right place? Can't a menu be added in the editor where the user can define the troop by class:

(1) regular troop*
(2) governor
(3) armor_merchant
(4) weapons merchant
(5) goods merchant
(6) chest
(7) Special NPC

(with the * calling upon another menu for the definition of the upgrade tree?)

and then just have the editor paste it in the right place?

How do I know what an armor_merchant is (for example)? The only way for the editor to be able to do that would be to be able to tell that information when reading the text files. The constants in the python scripts are not dumped anywhere in the .txt files (not that I think that is the way to make this work right).

I'd much rather have the old occupation field back that designated what each troop was. Then we could have script commands to iterate over all troops of a specific type.
 
Back
Top Bottom