The bigg's test shows why mods that want correctly self-referential materials building a conversational flow (Jastey's Ajantis, especially, in both the
BG2 mod and the
BG1NPC materials) have had to resort to all sorts of bouncing, or do exactly what you are saying - . It would be great to have the same logic that applies with .bcs (var evaluates in block 1 and is seen by block 2) apply to dialog.
Stuff that can be worked around by spamming lots of extra dialog state blocks? Yep - spamming solves the problem, in a way - it takes the "loop" out in favor of discrete branches of conversation, at the cost of added blocks - and the need to keep any materials you want to reference within the same dialog away from the first by at least three states. Solving this lets a modder do something like this much more efficiently, with decent flow (off the top of my head, stinky but illustrative:
[ARAN] Was killin' those deep gnomes all that important? It seems they were doin' naught in th' way o' harm.
[PC] They were harmless. But they had to be destroyed. DO SetGlobal("gnomesclobbered","LOCALS",1)
[PC] There is no denizen of Underdark that can be described as 'harmless', Aran. The most they can aspire to is 'mostly harmless'.
[ARAN] You should have told me this were to be a bloodbath.
[PC]
!Global("gnomesclobbered","LOCALS",1) [PC] It was a bloodbath because they deserved it. After all, deep gnomes are dangerous. + continue_conversation
Global("gnomesclobbered","LOCALS",1) [PC] It was a bloodbath because they deserved it. After all, deep gnomes are dangerous. + mostly_harmless_minus_babelfish
mostly_harmless_minus_babelfish
[ARAN] But you just said they were harmless...
[PC] Look, I make the decisions. Shut up and get back in formation.
[PC] etc.
Using a few variables can allow a single track of conversation to allow multiple branches, tailored to the conversational choices itself. It makes dialog much more flexible, and closely mimics regular speech.
How are you doing today?
Fine.
Anything going particularly well?
No.
So why did you say fine?
etc.
In the best of all possible world, an even better (sets after each dialog state)
[
NPC] How are you doing today?
[PC] Fine. <<setglobal=1>>
[PC] Not so good. <<setglobal=2>>
[PC] Lousy. <<setglobal=3>>
[
NPC] Me too. But I could do with a little less combat.
[PC] <<if global=1>> I'm darned glad you are doing fine. Me, I am not so happy about going to faculty meeting.Give me a dragon to slay any day.
[PC] <<if global=2>> So we are both a little frustrated. That is fine... we can always stop at the next inn for a drink.
[PC] <<if global=3>> So we are both in a bad mood. You may hate the combat, but I need some heads to knock together in order to improve mine.
Edited by cmorgan, 09 March 2011 - 12:23 PM.