Jump to content

Suggestions


the bigg

Recommended Posts

'NPCs don't fight': it'd be nice to have that component set an in-game variable (via the obvious EXTEND_BOTTOM to baldur.bcs). This way, a third-party NPC can detect the variable and use it to remove conflicts it otherwise would add (rather than having to add a conflict killer to Crossmod).

 

More interjections: using REFACTOR_*_TRIGGER can add InMyArea() to avoid killing dialogues when the target NPC is in the party but in another area (at least for the currently installed dialogues):

 

COPY_EXISTING_REGEXP GLOB ~^.+\.bcs$~ ~override~
 DECOMPILE_BCS_TO_BAF
REFACTOR_BAF_TRIGGER ~I[fs]ValidForPartyDialog\(ue\)?(\([^()]*\))~
				  ~InParty(\1) InMyArea(\1)~
 COMPILE_BAF_TO_BCS
 IF ~16552~
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.dlg$~ ~override~
 DECOMPILE_DLG_TO_D
REFACTOR_D_TRIGGER ~I[fs]ValidForPartyDialog\(ue\)?(\([^()]*\))~
				  ~InParty(\1) InMyArea(\1)~
 COMPILE_D_TO_DLG
 IF ~I[fs]ValidForPartyDialog\(ue\)?(\([^()]*\))~
 BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~trigger.ids~ ~override~
 REPLACE_TEXTUALLY ~0x40A8~ ~0x4043~
 BUT_ONLY_IF_IT_CHANGES

 

This will print out a ton of warnings for some malformed DLG/BCS files (and flat-out fail on WeiDU 220), so I don't know if you'd consider it worthy or not.

Link to comment

Any chance of pre-checking for malformed files (like MONK 08) and such, and then only running this on ones that are valid?

 

Second question - is there any mod out there that relies on *not* having the InMyArea() check - perhaps cutscenes or other oddities where the dialog is supposed to play offscreen? I know of none, but a check with the BWP folks might be useful.

 

why not

~InParty(\1) InMyArea(\1) !StateCheck(\1,CD_STATE_NOTVALID)~

?

Link to comment
Any chance of pre-checking for malformed files (like MONK 08) and such, and then only running this on ones that are valid?

Actually, a lot of existing files have this type of problem (E.G. OR(3) when there are just two triggers left). Can't recall if it's just BG1 leftovers or also BG2/mod files in use.

 

Second question - is there any mod out there that relies on *not* having the InMyArea() check - perhaps cutscenes or other oddities where the dialog is supposed to play offscreen? I know of none, but a check with the BWP folks might be useful.

IVFPD() includes InMyArea(), actually; also, the current method means that if you talk to somebody, and a party NPC is scripted to interject but is in another area, the dialogue will stop in its tracks (without a NVROL or other explicit error).

 

Imoen Romance does contain a dialogue that uses IVFPD() to make the dialogue trigger only if the rest of the party is away, and this component does contain ad-hoc code for handling that problem.

 

why not

~InParty(\1) InMyArea(\1) !StateCheck(\1,CD_STATE_NOTVALID)~

?

Well, it's because (IIRC) the dialogue will continue correctly if it is passed off to a held/charmed/silenced CRE, but will fail as above it's passed off to a cre that is in another game area (of course, more testing should validate my assumption).

 

How will this affect mods that use !IsValidForPartyDialogue() as a trigger? I'm thinking of instances where OR() might be broken by substituting multiple triggers for a single one.

As Ardanis said, REFACTOR_*_TRIGGER applies boolean logic to preserve the structure of the trigger - !IVFPD() becomes !InParty() !InMyArea() StateCheck(), etc.

OR (and more complex triggers) are correctly fixed as well, but the code is spaghettified a lot (exponentially, in some cases).

Link to comment

Archived

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

×
×
  • Create New...