Zyraen Posted April 7, 2005 Share Posted April 7, 2005 Valen/Solaufein-Style Interjections... This component will interactively replace these faulty triggers with a simple in-party check, similar to the Valen or Solaufein mods... If party members are in another area, this component could cause some dialogues to exit early... This component was one of the components I loved the idea of most from the G3 Tweak packs, but aftera while I quickly realised some dialogues broke and couldn't be replayed, causing troublesome Load Games and replaying some parts of the game or resetting of triggers to get the game to resume. As a result, in my recent reinstall of Bg2 followed by loading Mods, I didn't install this component. However, while working on Beyond the Law and Solo With a Party, had some experiments and I have reason to believe that the trigger InMyArea("xxx") should work reasonably well with this and prevent the Dialogues from Exiting prematurely. So instead of replacing the triggers with an InParty("xxx") only, perhaps replacing them with InParty("xxx") InMyArea("xxx") should lead to most of the problems being resolved, I think. Link to comment
the bigg Posted April 7, 2005 Share Posted April 7, 2005 While you're at it, maybe also !Dead("xxx"). Problem is, you'll make all the affair even longer to install (with all the DECOMPILE, COMPILE and REPLACE_EVALUATE it'd need). Link to comment
SimDing0 Posted April 7, 2005 Share Posted April 7, 2005 InParty doesn't pick up dead creatures. No replace techniques will work with OR blocks. Link to comment
CamDawg Posted April 7, 2005 Share Posted April 7, 2005 Yes, OR() blocks remain the bane of using better trigger replacements. Well, that and WeiDU's lack of support for \n. Link to comment
the bigg Posted April 7, 2005 Share Posted April 7, 2005 Yes, OR() blocks remain the bane of using better trigger replacements. Well, that and WeiDU's lack of support for \n. <{POST_SNAPBACK}> If you don't have a life, and want to spend some days on that, you can write a tp2 to parse and edit any text file, following any given rule. I was almost succesful in tweaking WeiDU to parse the result of a c:\music> tree /s /a > list.txt dos command, to make all files get the following renaming and moving: c:\music\author\album\song.mp3 --> c:\music\author - album - song.mp3 Problem was, my folder music was too much messy, so I gave up, deciding ny music folder was fine the way it was, and deleted the tp2 Still, it's achievable, if you really want to Link to comment
Zyraen Posted April 7, 2005 Author Share Posted April 7, 2005 The replacement does not involve an OR block. It is extending a single condition to a double condition. Link to comment
SimDing0 Posted April 7, 2005 Share Posted April 7, 2005 But if you've got: OR(2) IsValidForPartyDialog("blah") Blah() (which does appear in the game files) Then the replacement gives you: OR(2) InParty("blah") InMyArea("blah") Blah() Which is then wrong because we have the wrong number of conditions in the OR(). Link to comment
CamDawg Posted April 7, 2005 Share Posted April 7, 2005 An example: OR(5) IsValidForPartyDialogue("foo") {trigger1} {trigger2} {trigger3} {trigger4} Any one of these conditions make the expression true. Now try the substitution: OR(5) InParty("foo") InMyArea("foo") {trigger1} {trigger2} {trigger3} {trigger4} Trigger4 now becomes a required condition for this to evaluate to true. edit: Sim types faster. Link to comment
Zyraen Posted April 8, 2005 Author Share Posted April 8, 2005 Hmm true. Let's see if there's some way to do it right *grins and looks around for SConrad or some such expert* Link to comment
NiGHTMARE Posted April 8, 2005 Share Posted April 8, 2005 Time to request a WeiDU function that can detect if a condition is part of an OR block? Link to comment
SimDing0 Posted April 8, 2005 Share Posted April 8, 2005 It'd probaby be possible with regexp \n, but (in the same breath as breaking everybody's ALLOW_MISSING mods) Weimer decided that'd be too bad for backward compatibility. Actually, hmm. I'm not so sure \n would work. In compiled DLGs, sets of triggers are all stored on one line, I think. Link to comment
the bigg Posted April 8, 2005 Share Posted April 8, 2005 This is a part of bnalia.dlg after going through a DECOMPILE_DLG_TO_D. BEGIN ~BNALIA.DLG~ IF ~InParty("Mazzy") See("Mazzy") AreaType(CITY) !StateCheck("Mazzy",STATE_SLEEPING) Global("BNalia1","LOCALS",0)~ THEN BEGIN 0 SAY #24578 IF ~~ THEN DO ~SetGlobal("BNalia1","LOCALS",1)~ EXTERN ~BMAZZY~ 3 END IF ~~ THEN BEGIN 18 SAY #2626 IF ~~ THEN EXTERN ~BAERIE~ 16 IF ~Global("azucarCR1","GLOBAL",0) See("Chloe") !Dead("Chloe") IfValidForPartyDialogue("Chloe") ~ THEN DO ~SetGlobal("azucarCR1","GLOBAL",1)~ EXTERN ~CHLOEJ~ 961 END IF ~InParty("Aerie") See("Aerie") HPPercentLT("Aerie",50) CombatCounter(0) !StateCheck("Aerie",STATE_SLEEPING) Global("BNalia4","LOCALS",0)~ THEN BEGIN 13 SAY #2597 IF ~ ~ THEN DO ~SetGlobal("BNalia4","LOCALS",1) MoveToObject("Aerie")~ EXTERN ~BAERIE~ 11 END the text appears to be using DOS encoding (new line = 0x0d0a) on my winXP. Dunno about other OS. Both actions and triggers are in a different line; this is good, since it's easier to manually parse DLG's and do all our stuff with OR(). Well, as easy as parsing a file in tp2 tasks could be, in any event Manually = using READ/WRITE_FOO. Link to comment
CamDawg Posted April 8, 2005 Share Posted April 8, 2005 Even with \n, we'd still need support for {x}. Even more difficult, we'd need to be able to sub the value from OR as x. Link to comment
SimDing0 Posted April 8, 2005 Share Posted April 8, 2005 It gets harder. OR(5) IsValidForPartyDialogue("foo") {trigger1} {trigger2} {trigger3} {trigger4} Let's say we replace this correctly, to give: OR(6) InParty("foo") InMyArea("foo") {trigger1} {trigger2} {trigger3} {trigger4} There's now a logical error here. The correct replacement SHOULD be: OR(5) InParty("foo") {trigger1} {trigger2} {trigger3} {trigger4} OR(5) InMyArea("foo") {trigger1} {trigger2} {trigger3} {trigger4} Link to comment
SimDing0 Posted April 8, 2005 Share Posted April 8, 2005 Actually, that might make it easier, since we don't need to manipulate the number in the OR. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.