Mostly, though, we'd be doing reactions rather than actually interjecting, but as far as I can tell we'd need to extend the RE dialogue to set a "Faren Should React After This" variable during the encounter so he'd have something to react to.
Ah, but RE was coded with the intention of making it easier for modders to have their NPCs react to its encounters. It sets global variables any time something significant happens, with regards to the encounter. Using Laran as an example, if the PC flirts with Laran, RE sets the global RE_LaranFlirt to 1. Any mod
NPC can check for that variable, without any need for ADD_TRANS_ACTION. If she spends the night with him, RE sets the global RE_LaranSex to 1. If she does it again in
ToB, there's another variable.
So, you don't need to do anything complicated to have Faren react to RE encounters... apart from writing the reactions, that is. The RE readme has all the info on the variable naming conventions, so you won't have to comb through the code for it. I think it also gives the specific variable names for each encounter.
Anyway, here's a sample script to illustrate what I'm talking about. This would be enough to have a RE reaction play.
IF
Global("FarenReactsToBjornin","LOCALS",0)
Global("RE_BjorninSex","GLOBAL",1)
InParty(Myself)
!StateCheck(Myself,CD_STATE_NOTVALID)
!StateCheck(Player1,CD_STATE_NOTVALID)
See(Player1)
!See([ENEMY])
CombatCounter(0)
THEN
RESPONSE #100
SetGlobal("FarenReactsToBjornin","LOCALS",1)
StartDialogueNoSet(Player1)
END
Edited by berelinde, 10 May 2009 - 06:29 PM.