I'm trying to use the nifty new refactor commands with WeiDU v226 to make More Interjections more robust. The script one works dandy (OK, but it only actually modifies one script valyorb), but the dialogue one is having some issues. This:
COPY_EXISTING_REGEXP GLOB ~^.+\.dlg$~ ~override~
DECOMPILE_DLG_TO_D
REFACTOR_D_TRIGGER ~I[fs]ValidForPartyDialog\(ue\)?(\([^()]*\))~
~InParty(\2) InMyArea(\2)~
COMPILE_D_TO_DLG
IF ~I[fs]ValidForPartyDialog\(ue\)?(\([^()]*\))~
BUT_ONLY_IF_IT_CHANGES
..spits out some errors. This is all on a patched ToB game, both with and w/o the Fixpack (non-Fixpack will net you a quadrillion warnings but the WeiDU errors, AFAICT, are the same). I'm focusing on custom.dlg, because it's a nice, simple 2-state dialogue--if you want something more complex, it also chokes on cernd, cerndj, and crend25j.
[CUSTOM.DLG.DLG] loaded
[CUSTOM.DLG] created from [CUSTOM.DLG.DLG]
[] PARSE ERROR at line 1 column 0--1
Near Text:
Unfinished OR()
[] ERROR at line 1 column 0--1
Near Text:
Parsing.Parse_error
ERROR: parsing []: Parsing.Parse_error
[CUSTOM.DLG] ERROR at line 18 column 1-0
Near Text:
Parsing.Parse_error
ERROR: parsing [CUSTOM.DLG]: Parsing.Parse_error
WARNING: REFACTOR_D_TRIGGER CUSTOM.DLG failed (Parsing.Parse_error)
[CUSTOM.DLG] parsed
Adding CUSTOM.DLG to internal list of available DLGs
[CUSTOM.DLG.DLG] saved 2 states, 4 trans, 1 strig, 3 ttrig, 2 actions
Copied [CUSTOM.DLG] to [override/CUSTOM.DLG]
custom.dlg is copied but not updated. Now, the fun part is that if you run the same code with just a C_E, or a C_E_R GLOB targeting just custom.dlg, the patch will work fine. I've been experimenting with cutting down C_E_R GLOB to try and see if it's a matter of a previous decompile/compile interfering with custom.dlg:
The regex ~^cu.+\.dlg$~ examines 12 files, only updates custom.dlg (and does so correctly).
The regex ~^c.+\.dlg$~ examines 178 files, copes 17, has errors on 7 of them (cernd, cernd25j, cerndj, circg1, clone1, copgreet, and custom).
Any ideas?