jastey Posted October 3, 2022 Share Posted October 3, 2022 In the old engine, to prevent NPCs to leave angry would be done by patching the BreakingPoint() entry in dplayer2.bcs, something like ACTION_IF GAME_IS ~tob bg2ee bgt~ THEN BEGIN COPY_EXISTING ~dplayer2.bcs~ ~override~ DECOMPILE_AND_PATCH REPLACE_TEXTUALLY ~BreakingPoint()~ ~BreakingPoint() !Name("NPCname",Myself)~ END BUT_ONLY_IF_IT_CHANGES And then just don't bother with it in the NPC's kickout dialogue. As far as I understood, this is not suffucient for the EE, where some opcode(?) is used for this? I have no idea what would be needed to prevent a specific NPC to leave angry in the EE and would be grateful for help, also a pointer to a mod NPC that already implemented this would be appreciated. Quote Link to comment
argent77 Posted October 3, 2022 Share Posted October 3, 2022 Imoen in BG2EE uses opcode 360 to prevent her from leaving the party at low reputation. The effect is applied directly to her CRE file. Quote Link to comment
jmerry Posted October 3, 2022 Share Posted October 3, 2022 That old model is still used, actually; Wilson has an exception in BG2EE's version of dplayer2.BCS. Also, in ToB, NPCs generally don't leave due to reputation. All but Dorn lack the traditional "leave when unhappy" dialogue, though I'm not sure what else is going on there. Quote Link to comment
jastey Posted October 4, 2022 Author Share Posted October 4, 2022 Thank you for your answers. I am asking for the Edwin romance mod; Edwin should not leave when in active romance. If the script based approach works, then I'll prefer using this. I had the impression it might not suffice in the EEs. Quote Link to comment
jastey Posted October 6, 2022 Author Share Posted October 6, 2022 A quick test with Edwin (Romance) confirmed that tweaking the dplayer2.bcs is not sufficient for BGII:EE. Upon reaching 20 rep, edwin leaves the party and this seems to be triggered by the engine /hardcoded, because it's not a script doing that. After that, he initiates his normal kickout dialogue etc. (because there is no angry leave line) triggered by dplayer2.bcs as if he was kicked out of party by "reform party" button. It seems I need the opcode360 to prevent this. I will create a spell that gives this effect and will add it via ADD_SECTYPE so I can remove it again if the romance breaks. I wouldn't know how to do it otherwise. Quote Link to comment
Austin Posted October 7, 2022 Share Posted October 7, 2022 In the Smiling Imp's mod, most NPCs do not have a dialogue when leaving due to a change in reputation, and on the EE version, they also tried to speak many times when their reputation fell, so I solved this problem there by adding an opcode to such NPCs 360 on the EE version. The code turned out like this: Spoiler COPY ~BG1NPCSoA/Cre/7XCRE76.cre~ ~override/7XCRE76.cre~ SAY NAME1 @1567 SAY NAME2 @1567 ... BLAHBLAHBLAH ... SAY INTERACTION3 ~~ SAY COMPLIMENT1 ~~PATCH_IF GAME_IS ~bg2ee eet~ BEGIN LPF ADD_CRE_EFFECT INT_VAR opcode = 360 //Ignore reputation timing = 9 //Permanent target = 1 //Self resist_dispel = 0 //Not dispellable + bypass resistance END END Quote Link to comment
jastey Posted October 7, 2022 Author Share Posted October 7, 2022 @Austin thanks! I will write up what I did for Edwin Romance soon, too. He is only supposed to stay while he is in an active romance, so I made an effect that can be granted and lifted by script. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.