Mod info: conversation.txt

Users who are viewing this thread

Effidian

Recruit
FYI: Just in case anyone thinks I figured all these things out, please check the Attackable Peasants thread. Several people have been key in interpreting this stuff.

Code:
93 24 2 1 33554719 0 2 33554720 0 You_..._job.  25 3 10064 100 0 10281 12 0 20029 33554720 1

93 = speaker id (see below)
24 = conversation id
2 = number of operations before the conversations
1 33554719 0 = operation 1
2 33554720 0 = operation 2
You_..._job. = conversation text
25 = next conversation id

3 = number of oeprations after the item is spoken
10064 100 0 = operation 1
10281 12 0 = operation 2
20029 33554720 1 = operation 3

speaker id has the following bits:
0-15: speaker id
16: player conversation
17: party

If the party bit is set, then the speaker id is the index in party_templates.txt, otherwise the speaker id is the index in troops.txt.

If the "player conversation" bit is set, the item is for the player to say.

Additionally, a speaker id of 0xFFFF is special in that it will display for everyone that goes to that conversation id. (I think)

For more info on operations see the Mod info: Operations thread.

The operations before the text are usually used to determine if the text will show up as an option. For example, it might check to see if you've completed a certain task. The operations after the text are executed when that particular line is spoken. So it does things like start a battle, or show the unit's stat screen, etc.

You can have a number of entries with the same conversation id. These will show up as the options you can select for the player. If the dialog is not for the player, I believe that the operations before hand would need to narrow it down to a specific item. Not sure what would happen if there were multiple NPC text items on a single id.
 
Thanks armagan.

I had posted the following in a different thread, but to try to keep the relavent info in the appropriate threads, I'm copying it here..

This description isn't how it works internally (obviously I don't know that), but I think it will help illustrate the mechanics.

When you talk to a person (or a party), conversation.txt is scanned from top to bottom looking for a match of that person's speaker id and a conversation id of 0. The special id of 0xFFFF is also included. So, if you are talking to Baron Rolf, whose id is 115, then it will scan the file looking for "115 0" or "65535 0". The first one it finds that isn't negated by the operations before the text will be used. For Baron Rolf, since there is no "115 0", it hits the catch all

Code:
65535 0 0 Hello._What_can_I_do_for_you?  447 0

If you put your lines below this one, they won't be seen. So

Code:
65535 0 0 Hello._What_can_I_do_for_you?  447 0
115 0 0 What_do_you_want? 1 0

Will still pickup the "Hello." line because it is in the file first.
 
Does conversation.txt control what troops are available to be hired from a specific tavernkeeper? I found this in it:

131071 278 0 I_need_to_hire_some_soldiers._Can_you_help_me? 283 0
65535 283 0
I_know_a_few_fellows_who_would_follow_you_if_you_paid_for_their_equipment.
284 1 10315 0 0
 
Not that I can tell. 10315 launches the "hire" screen, but the units that are available seem to be configured somewhere else.

Actually, I just had an idea. Since units are available at a certain rate, that would mean that something is adding those units to the shopkeeper. I can't confirm this now, but I'll bet there are triggers that add the units to specific shopkeepers. I'll confirm this when I get a chance unless someone else does it first...

Edit: Nope, has nothing to do with triggers.txt...

Edit: And for the solution check troops.txt.
 
Ive just been using dialogue to recruit people but then I saw something in your editor.

Theres some entry called "hire unit". Do you know what this is? I thought maybe if set it was the unit that this unit would provide on a hire screen if it was activated. Maybe that unit and a few that are one upgrade higher...

Im not in the mood to play with it now though, the system I have is fine for now.
 
And make sure you have 0.06 of the editor. It also has a "Hire Party" combo which I think works in conjunction with the "Hire Unit" one. Take a look at those NPCs that are already setup to see what they are using. Pre 0.06 I had the "Hire Party" translated wrong and it would end up being strange.
 
Back
Top Bottom