I did some playing with the --transitive flag last night and noticed it has some bugs in the '// from:' readout. Specifically, it seems to get confused as to who externed to the current state after going through certain chains, and several times it duplicates or even triplicates extern references. You can get an idea of what I mean by decompiling GORODR1.DLG in ToB with --transitive (with comments enabled) and examining the resulting .D file. This bug also sometimes shows up outside the comment in the form of the wrong resref for a BEGIN dlgfile state# sequence. It's not serious because these states aren't being recompiled, but it is a bit misleading when being read/studied.
Also, I found that a quick way to use this and still have a compilable dialog is to place multi-line comment symbols prior to the first externed state and after the last externed state, or prior to the returning point in the master dialog. I also had to comment-out the warning message at the top of the file, but once that was done, I had a compilable file. So could you have WeiDU comment-out these externed states since they are just for reference?
Example of commenting out externed states that worked for me:
IF ~InPartySlot(LastTalkedToBy,0)
Global("zGarOdr1Job","GLOBAL",0)
Global("TalkedTozGarOdr1","GLOBAL",0)
Global("OdrenRitualDone","GLOBAL",0)~ THEN BEGIN 3 // from:
SAY #62356 /* ~Ah! The Child of Bhaal has come! We had hoped that our call for aid would draw you here...praise to the Watcher for hearing our prayers!~ [ODREN10] */
IF ~~ THEN DO ~SetGlobal("TalkedTozGarOdr1","GLOBAL",1)~ EXTERN ~GORPOL1~ 0
END
/* comment begins here; externed dialogs begin
IF ~~ THEN BEGIN GORPOL1 0 // from:
SAY #62357 /* ~Praise be to Helm!~ */
IF ~~ THEN EXTERN ~GORGAR1~ 0
END
IF ~~ THEN BEGIN GORGAR1 0 // from:
SAY #62358 /* ~Does this mean we have a chance, Odren? Does this mean our duty is not lost to us?~ */
IF ~~ THEN GOTO 4
END
*/ // comment ends here; Odren's dialog continues
IF ~~ THEN BEGIN 4 // from: GORGAR1:0.0
SAY #62360 /* ~Be at peace, Sister Garlena. <CHARNAME> has yet to hear our story, let alone agreed to aid us. We get ahead of ourselves, here.~ */
IF ~~ THEN GOTO 5
END
Also notice that GORGAR1's state didn't display GORPOL1's externing transition info in the 'from' list. and GORPOL1 doesn't show the link from GORODR1 3.0. Not critical perhaps, but it would be nice for completeness.
I like this feature because it makes it easier to follow the flow of conversation when fixing dialog bugs. It's also a decent alternative to looking through a tree for interjection points. (The fewer tools I have to use, the better.)
Thanks.