Jump to content

Questions about DLGs


Aliya

Recommended Posts

I have s distinct feeling that I need to post this a PPG, but I can't register there at the moment. ^^ Maybe G3 will help?

 

I have two innocent questions as I wannabe IE modder and coder.

 

1. When using a CHAIN command (to code 3 people interactions) NPC don't need a SAY command? I was coding today, and it feels kinda unfinished to me, although that's the way WeiDU documentation says...

 

2. While typing triggers via dialog tildes are used only to open-close the block? Example of my work:

CHAIN

IF ~See(“Er#Vamp2â€)

Global("EdwinVampire","GLOBAL",1)

Global("Er#BodhiLeave","GLOBAL",0)

!InParty("Er#Vamp2")~ THEN C6Bodhi introvamp

~No doubt you have some interesting questions about it, but I’m completely sure that your dear little wizard will be capable of answering them himself.~

DO ~SetGlobal("EdwinVampire","GLOBAL",2)~

 

++ ~What do you mean by that, bloodsucker?~ + GOTO intro

 

And what to do with that introvamp?

 

3. Where exactly END needs to be put? I've read at Kyluok's solution that after EACh block. I don't really get it - dialog is knitted together with a '='.

Link to comment
1. When using a CHAIN command (to code 3 people interactions) NPC don't need a SAY command?
They don't

 

2. While typing triggers via dialog tildes are used only to open-close the block?
If I understand the question correctly, then yes - the trigger block should wrapped in tildas, not each line separately. Correct me if that's not what you've been asking.

 

Example of my work:

Actions must be executed from transitions.

 

CHAIN ~ChainTrigger()~ THEN dialog_filename state_label

~First line of text.~

= ~Another text by the same actor.~

== new_dialog_filename ~New speaker's line.~

= ~New spearker's another line.~

== dialog_filename ~Old speaker is back.~

END

++ ~PC's response 1.~ DO ~SomeAction()~ + somewhere_else

++ ~PC's response 2.~ DO ~SomeAction()~ + somewhere_else

 

And what to do with that introvamp?
State's name. That's what you link transitions to via GOTO.

 

3. Where exactly END needs to be put? I've read at Kyluok's solution that after EACh block. I don't really get it - dialog is knitted together with a '='.
See the sample above.
Link to comment
Actions must be executed from transitions.

 

Actually, in CHAINs you can have them floating between lines. Because CHAINs are just a shorthand for a series of states that point from one to the next, like... a chain. So in theory there *is* a transition between each line of dialogue.

 

So you could write:

 

CHAIN ~ChainTrigger()~ THEN dialog_filename state_label
~First line of text.~
= ~Another text by the same actor.~
DO ~SomeAction()~
== new_dialog_filename ~New speaker's line.~
DO ~SomeOtherAction()~
= ~New spearker's another line.~
DO ~YetAnotherAction()~
== dialog_filename ~Old speaker is back.~
END
++ ~PC's response 1.~ DO ~ActionyGoodness()~ + somewhere_else
++ ~PC's response 2.~ DO ~LoveMeImAnAction()~ + somewhere_else

Link to comment

True, but keeping the actions in the final transition (rather than in the middle of the CHAIN) massively reduces the spaghettification that CHAIN introduces in the dialogue. Not relevant in 99% of cases, but it makes the dialogue lag more and be harder to read in InfExp.

Link to comment
True, but keeping the actions in the final transition (rather than in the middle of the CHAIN) massively reduces the spaghettification that CHAIN introduces in the dialogue. Not relevant in 99% of cases, but it makes the dialogue lag more and be harder to read in InfExp.

 

Absolutely true. The only reason I really use it to set the "check variable" that triggered the dialogue.

 

  CHAIN IF ~InParty("G#Tyris")
		See("G#Tyris")
		!StateCheck("Aerie",CD_STATE_NOTVALID)
		!StateCheck("G#Tyris",CD_STATE_NOTVALID)
		CombatCounter(0)
		Global("G#TF.AerieBanters","GLOBAL",0)~ THEN BAERIE AerieBanter#1
~Tyris, do you think that someday you'll return home?~
DO ~SetGlobal("G#TF.AerieBanters","GLOBAL",1)~
== BG#TYRIS ~I certainly hope so, Aerie.  Though right this minute I have no idea how to even begin to go about it.  I guess I'll just have to pray that an opportunity presents itself.~ [G#TYRS38]
== BAERIE ~I really hope you make it back.~
== BG#TYRIS ~That eager to get rid of me, eh?~
== BAERIE ~N-no that's not what I-~
== BG#TYRIS ~Relax, Aerie.  Try not to take everything so seriously.~
 EXIT

 

Not the best example in the world, but if I'd had player options at the end of the banter it would have saved me attaching that DO ~SetGlobal("G#TF.AerieBanters","GLOBAL",1)~ to every response.

Link to comment

So, technically speaking, my example is nearly correct? Judging from Grim's example of Tyris and Aerie bantering. :D

 

I don't really like to spoil the whole writing (because is really-really-pre-alpha version and that I'm not native english speaker ???) but I'll post this excerpt:

 

== C6Bodhi 
~So, without further ado, let me introduce you to a new addition to my, slightly torn, thanks to you, family. I’m sure he’ll be happy to see you.~ 


== Er#Vamp2 
~Greetings, <CHARNAME>. It’s a pleasure to meet you, in these, not so surprising, circumstances.~

 

1. When typing is CHAIN with PC replies, should I include GOTO blocks? Pointing out, that it's the only reply PC has.

 

++ ~What do you mean by that, bloodsucker?~ + GOTO intro 

IF ~~intro
== C6Bodhi

Link to comment

It's either "+" or "GOTO", not both.

 

If transition after reply option goes to the same dialogue as the one that started the CHAIN: GOTO / +

If the reply option transition goes to another dialogue (other NPC ) then use EXTERN dlgname statename.

 

Your example would look like (I don't have to point out that more reply options would be cool in poin tof role-playing):

CHAIN
IF ~(your conditions)~ THEN C6Bodhi bodispeaks
~So, without further ado, let me introduce you to a new addition to my, slightly torn, thanks to you, family. I’m sure he’ll be happy to see you.~
== Er#Vamp2
~Greetings, <CHARNAME>. It’s a pleasure to meet you, in these, not so surprising, circumstances.~
END 
++ ~What do you mean by that, bloodsucker?~ + GOTO intro

APPEND C6Bodhi
IF ~~intro
SAY ~(Bodhi speaks some more).
IF ~~ THEN DO ~(whatever)~ EXIT
END

END //APPEND C6Bodhi

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...