While I was alpha-testing another mod, I found that Anomen periodically forgot movement commands and stopped attacking in combat. It wasn't continuous, but it repeated often enough to be noticeable. I was able to narrow it down to this script block.
IF
RealGlobalTimerExpired("FWAnomenFlirtTOB","LOCALS")
ActuallyInCombat()
THEN
RESPONSE #100
ActionOverride(Player1,DisplayString(Myself,105596)) // ~Running block 6 of anom25.BCS~
SetGlobal("FWAnomenStartFlirtTOB","GLOBAL",0)
RealSetGlobalTimer("FWAnomenFlirtTOB","LOCALS",125)
END
Which explains why Anomen periodically stopped attacking in combat. Since this block contains no check for an active romance, there was nothing to prevent the timer from restarting when AnomenRomanceActive=3. Since this block also contains no check for an active romance, it would continue to reset the timer.
IF
RealGlobalTimerExpired("FWAnomenFlirtTOB","LOCALS")
Global("FWAnomenStartFlirtTOB","GLOBAL",1)
THEN
RESPONSE #100
ActionOverride(Player1,DisplayString(Myself,105595)) // ~Running block 5 of anom25.BCS~
SetGlobal("FWAnomenStartFlirtTOB","GLOBAL",0)
RealSetGlobalTimer("FWAnomenFlirtTOB","LOCALS",2000)
END
This isn't a stutter, by any stretch of the imagination. Each block executes once and it's over until the timer comes up again. But it does make the NPC forget attack commands and stand there getting pummeled by Draconis, which is kind of a bit of a drag.
I want to point out that when the NPC Flirt Pack was written, this wasn't a problem. There weren't any romance mods that began in ToB, so Anomen would enter ToB with his RA variable=3, and "FWAnomenStartFlirtTOB" would never set. Now, there are a few romance mods that begin in ToB, so the variable does set. Yay, progress?
Disabling these two script blocks corrected the problem.
Looking through the NPC Flirt Pack, I see that the formula for these two script blocks is repeated for each NPC in both SoA and ToB. I propose adding a check for an active romance as a definitive fix. Again, there is nothing game-breaking about this mini micro-bug. It's so trivial, I'm reluctant to even mention it. But it does cause momentary annoyance from time to time, so if somebody gets around to it, it might be worth addressing. I'm posting the original script block and the proposed fix for Aerie in SoA, but it should be repeated for every other NPC covered by the Flirt Pack.
// original script blocks -- aeriesoainiflirt.baf
IF
RealGlobalTimerExpired("FWAerieFlirt","LOCALS")
Global("FWAerieStartFlirtSOA","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("FWAerieStartFlirtSOA","GLOBAL",0)
RealSetGlobalTimer("FWAerieFlirt","LOCALS",2700)
END
IF
RealGlobalTimerExpired("FWAerieFlirt","LOCALS")
!CombatCounter(0)
THEN
RESPONSE #100
RealSetGlobalTimer("FWAerieFlirt","LOCALS",150)
END
// proposed script blocks -- aeriesoainiflirt.baf
IF
RealGlobalTimerExpired("FWAerieFlirt","LOCALS")
Global("FWAerieStartFlirtSOA","GLOBAL",1)
!Global("AerieRomanceActive","GLOBAL",0)
!Global("AerieRomanceActive","GLOBAL",3)
THEN
RESPONSE #100
SetGlobal("FWAerieStartFlirtSOA","GLOBAL",0)
RealSetGlobalTimer("FWAerieFlirt","LOCALS",2700)
END
IF
RealGlobalTimerExpired("FWAerieFlirt","LOCALS")
!CombatCounter(0)
!Global("AerieRomanceActive","GLOBAL",0)
!Global("AerieRomanceActive","GLOBAL",3)
THEN
RESPONSE #100
RealSetGlobalTimer("FWAerieFlirt","LOCALS",150)
END
Thanks for looking!