
Assigning different synonyms from IDS
#1
-jcompton-
Posted 11 March 2003 - 03:24 PM
== J#KLS25J IF ~IsValidForPartyDialog("J#Kelsey") !Global("J#KelseyRomanceActive","GLOBAL",2)~ THEN @110
generated a trigger with
IfValidForPartyDialogue
which I noticed is the bottom-most synonym for IsValidForPartyDialog in the TRIGGER.IDS. Is that WeiDU's expected behavior now with trigger/action validation, to pick the last synonym?
#2
Posted 11 March 2003 - 11:15 PM
In our d file we have
IF ~~ THEN BEGIN P7J2 SAY @995 IF ~~ THEN REPLY @996 GOTO P7N IF ~OR(2) Class(Player1,PALADIN_ALL) Class(Player1,CLERIC_ALL) !Kit(Player1,16389)~ THEN REPLY @997 GOTO P7O ...
Iīve used a number instead of 'INQUISITOR' because on most BG2 installations the KIT.IDS is wrong. When WeiDU compiles the dialogue it exchanges the 16389 with something it finds in the KIT.IDS. No problem but what happens if the player replaces the KIT.IDS without uninstalling/reinstalling our mod? Most likely our transition trigger is wrong then... (and it took me hours to find the proper value for the inquisitor kit

I would prefer that WeiDU donīt replace numbers with entries of IDS files. Thereīs no advantage doing this but it could cause some problems.
#3
Posted 12 March 2003 - 03:41 PM
#4
Posted 13 March 2003 - 02:37 AM
Some other ideas:
A) a switch that tells WeiDU to keep the actions/triggers as they are in the d file,
or
B) a keyword that can be used inside a d file or a global switch that tells WeiDU to use allways numbers for a specific argument and a specific trigger.
Example:
USE_ALLWAYS_NUMBER Kit 2
would tell WeiDU to use allways numbers for the second argument of Kit(..).
C) Something that tells WeiDU to keep a specific trigger/action. Example:
IF ~~ THEN BEGIN P7J2
SAY @995
IF ~~ THEN REPLY @996 GOTO P7N
IF DONT_CHANGE_THAT ~OR(2)
Class(Player1,PALADIN_ALL)
Class(Player1,CLERIC_ALL)
!Kit(Player1,16389)~ THEN REPLY @997 GOTO P7O
...
or
IF ~~ THEN BEGIN P7J2
SAY @995
IF ~~ THEN REPLY @996 GOTO P7N
IF ~OR(2)
Class(Player1,PALADIN_ALL)
Class(Player1,CLERIC_ALL)
!Kit(Player1,KEEP_THE_NUMBER:16389)~ THEN REPLY @997 GOTO P7O
...
D) I guess the problem occurs only with the second argument of the trigger Kit(...) since the KIT.IDS is the only wrong IDS file (in BG2). Most likely a keyword or a switch
DONT_USE_SYMBOLS_IN_SECOND_ARGUMENT_OF_TRIGGER_KIT
would suffice.
E) Donīt use symbols for the second argument of Kit(...) at all.
However, itīs not very urgent (Iīm sure we wonīt release in the next weeks

#5
-Guest-
Posted 13 March 2003 - 07:34 AM
#6
Posted 13 March 2003 - 07:34 AM
D) I guess the problem occurs only with the second argument of the trigger Kit(...) since the KIT.IDS is the only wrong IDS file (in BG2).
Astyle.ids might be another one. At least the only one that ever seems to work is DEFAULT
Just an observation.
Thanks,
Cirerrek
#7
-Devon-
Posted 14 March 2003 - 12:12 AM
Use a no expansion option like:
NO_EXPAND 16389
Then when the decompiler sees the number 16389 used, it doesn't expand it to its IDS reference. It is certainly not the best solution to the problem, though it might be easier to implement and comprehend.
Cheers,
Devon Smith
#8
Posted 14 March 2003 - 12:50 PM
Since this problem only comes up when you write a mod (baf/d) on machine A with IDS files IDS-A and then ship it to someone with machine B and IDS files IDS-B, I will allow you to specify a set of IDS files in a TP2 file and then WeiDU will merge all of those IDS file entries into the files that are already present (effectively taking the union of the user's settings and yours). This ensures that their old stuff and the new mod both work.
What do you think?
#9
-jcompton-
Posted 14 March 2003 - 01:00 PM

#10
Posted 14 March 2003 - 01:37 PM
I guess the problem is this:
Going from BAF to BCS and back to BAF usually doesnīt result in the same BAF file ('BCS' -> 'BAF' -> 'BCS' is save!). So imho the only really good solution is... keep the original 'baf'.
In a dialogue we have now ('BAF'/'BCS' means uncompiled/compiled actions/triggers):
Writing the Mod: 'BAF' (checked & tested)
Installing the Mod: 'BAF' -> 'BCS' -> 'BAF' (created by WeiDU, depends on players environment during installation)
Playing the Mod: 'BAF' -> 'BCS' (depends on the *current* environment)
Problems occur when the environment on the playerīs machine changes between installation and playing the Mod.
And thereīs also another problem: What happens if thereīs a bug in the dialogue that needs fixing? But I donīt want to make a new version, I just want to write a patch? But how can I do that? Iīve 'no idea' what WeiDU has really written in the action/trigger lists (and it could be different on different machines). And since the environment on the players machine might have changed itīs impossible to remake the steps that were made during first installation.
I donīt see the advantage in doing this 'BAF' -> 'BCS' -> 'BAF' step. I guess you do the 'BAF' -> 'BCS' step to check the actions/triggers, but why donīt you keep the original actions/triggers? Checking the actions/triggers and giving warnings/error messages is a very good feature but inmy opinion itīs not in WeiDUīs responsibility to fix actions/triggers. Thatīs the job of the writer of the Mod (imho).
Maybe itīs possible to make this replacement (or that 'not replacing') a feature?
Of course what I describe is really the worst case but Iīm very sure that these problems will occur... not often but sometimes.
#11
-jcompton-
Posted 14 March 2003 - 01:48 PM
Oh, wow, Dyara makes a great point. I KNEW there was a legitimate reason I was weirded out by WeiDU changing my IsValid to IfValid, and this is it.And thereīs also another problem: What happens if thereīs a bug in the dialogue that needs fixing? But I donīt want to make a new version, I just want to write a patch? But how can I do that? Iīve 'no idea' what WeiDU has really written in the action/trigger lists (and it could be different on different machines).
#12
Posted 18 March 2003 - 02:47 AM
REPLACE_ACTION_TEXT_PROCESS should do the job. :-DOh, wow, Dyara makes a great point. I KNEW there was a legitimate reason I was weirded out by WeiDU changing my IsValid to IfValid, and this is it.And thereīs also another problem: What happens if thereīs a bug in the dialogue that needs fixing? But I donīt want to make a new version, I just want to write a patch? But how can I do that? Iīve 'no idea' what WeiDU has really written in the action/trigger lists (and it could be different on different machines).
Of course, that doesn't work for trigger lists, and it replaces things globally.
I'm going to go out on a limb here and propose to always compile scripts under the hood, and deprecate simple textual replacement altogether. This works only as long as the BAF -> BCS conversion is invertible, and as we've seen, situations where this is not true are too easy to imagine.
This still doesn't solve the "WeiDU doesn't give me *my* BAF back" problem, nor the "what if the IDS files get changed" problem. The only sure-fire way to solve those is to never *decompile* on *your* system (and work on BAFs only) and never to *compile* on *someone else's* system (and work with BCSs only).
OTOH, such draconic measures may be overdoing it in most situations. If only Baldurdash could be retrofitted with all the relevant IDS fixes...