Grim Squeaker Posted August 11, 2005 Share Posted August 11, 2005 We have a slight problem with mods being installed after the tweakpack when it comes to InParty() triggers. If you install a mod after the IsValidForPartyDialogue() tweak that involves decompiling, R_Ting and recompiling you hit problems. Some triggers that have always been InParty() triggers are decompiling as IsValidForPartyDialogue(), so your R_Ts could be wrong. An example of this is ar1400.bcs that has !InParty("Mazzy") (I checked that's what the original reads by using an install without the tweakpack) which decompiles to !IsValidForPartyDialogue("Mazzy") (if the tweakpack is installed). Now, a while ago Cam gave me some regexp R_T code to match the variations of !IsValidForPartyDialogue("Mazzy") but now because I don't know whether they'll have the tweak pack installed or not I need a modifcation of it so it matches !IsValidForPartyDialogue("Mazzy") or !InParty("Mazzy"). The original was: !I[fs]ValidForPartyDialog\(ue\)?("Mazzy") So do I want: ![\(I[fs]ValidForPartyDialog\(ue\)?\)\(InParty\)]("Mazzy") Link to comment
devSin Posted August 11, 2005 Share Posted August 11, 2005 I would honestly just check to see if Cam's *ValidForPartyDialogue() triggers are in the IDS, use REPLACE_TEXTUALLY to change them to some garbage if they are, and then restore them after the decompilation. WeiDU parses IDS files bottom-up (vs. NearInfinity, which parses top-down), so the last symbol always wins. You could just pad the changes by APPENDing the IDS with another InParty() symbol (first making sure the tweak pack changes to the IDS are present), just to make sure WeiDU uses it when it goes to decompile the script (although this shouldn't really affect the *ValidPartyForDialogue() changes, I imagine there could be some edge-cases where it will). This is a lot harder to undo when the process is finished, however. Link to comment
Grim Squeaker Posted August 11, 2005 Author Share Posted August 11, 2005 Sounds like quite a bit work. Could someone tell me if my regexp is correct, and if not, correct it? Link to comment
devSin Posted August 11, 2005 Share Posted August 11, 2005 If it decompiles to *ValidForPartyDialog(ue)(), then I'd do: REPLACE_TEXTUALLY ~\(!\)?I[fs]ValidForPartyDialog\(ue\)?\(("Mazzy")\)~ ~\1InParty\3~ You'll have to test it (it's quite possible that you may need to modify the regexp, depending on how poorly OCaml handles this). Link to comment
Grim Squeaker Posted August 11, 2005 Author Share Posted August 11, 2005 That's not what I'm trying to do. I'm trying to make it match !<I[fs]ValidForPartyDialog\(ue\)? or InParty>("Mazzy"). My guess was: ![\(I[fs]ValidForPartyDialog\(ue\)?\)\(InParty\)]("Mazzy") Link to comment
devSin Posted August 11, 2005 Share Posted August 11, 2005 Ah, it appears I wasn't paying attention. If you're positive the "!" will be there, then you could try something like ~!\(I[fs]ValidForPartyDialog\(ue\)?\|InParty\)("Mazzy")~ Link to comment
Grim Squeaker Posted August 11, 2005 Author Share Posted August 11, 2005 Cheers! That seems to work fine. Link to comment
Grim Squeaker Posted August 24, 2005 Author Share Posted August 24, 2005 Okay this is a dangerous idea but there is still an issue that if a mod is installed after this tweak, their InParty() checks in the first half of an R_T won't work anymore because they'll decompile to some kind of IsValidForPartyDialogue() instead. The only solution I have so far is when you install this tweak it C_Es tp2s and replaces R_T ~( stuff|InParty() )*~ ~stuff~ with R_T ~( stuff|\(I[fs]ValidForPartyDialog\(ue\)?\|InParty\)() )*~ ~stuff~. Obviously its not that simple as we'd need to make sure the stuff that wasn't InParty() triggers gets left where it is but also I'm not convinced its a great idea to go editing other people's tp2s with quite an open R_T command. Any better suggestions? Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.