Jump to content

How do I prevent specific NPC to leave angry in EE?


jastey

Recommended Posts

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.

Link to comment

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.

Link to comment

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.

Link to comment

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

 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...