I agree, the one flag is too simplistic. Let's say I have a Redoran type player that visits Vos once in a blue (should that be red?) moon. Why would some smith there remember me because I once asked them to repair my sword over a month ago? Generally I would want an NPC to 'forget' my character unless I interact with them regularly, I think this is best dealt with by mods rather then MCP.
I also put in my 2 cents that this is not necessary for a MCP fix. Seems like it could be remedied with MWSE scripting without too much of a problem. I mean, if you want to run a script on a target without necessarily knowing the object ID of the target it would have to be MWSE, cuz regular vanilla scripting doesn't allow targeted scripts on a variable ID. BUT I don't think you would have to do much and I don't think it would result in a huge FPS hit, either. I'm sure someone can correct this for optimizations, but Something like this running on player:
Begin conversation_keeprlong lookreflong checkrefshort ST_cntl ; control variable for this scriptSetx lookref to xGetPCTargetSetx checkref to lookref->xRefTypeif ( menumode == 1 ) returnendif; check various situations to see if this script should continue processif ( lookref == 0 ) if ( ST_cntl = 2 ) ; this part indicates that you looked away, so reset the ability to run NPC keepr script set ST_cntl to 1 return endif set ST_cntl to 0 ;looking at nothing/no target returnendifset ST_cntl to 1if ( checkref != 1598246990) ; 1598246990 -> is NPC set ST_cntl to 0 returnendif; verified you are looking at NPC if you got this far in scriptIf ( OnActivate == 0 ) ; to check to make sure you actually TALK to the NPC return ; this way if you don't it doesn't go on to the remainder of the scriptelse Activate ; must include to be able to talk to NPCendififx ( ST_cntl ) xSetRef lookref StartScript, "NPC_keepr"endifend conversation_keepr
and then this should run ONCE and ONCE ONLY on any NPC when you talk to them
Begin NPC_keeprshort has_talkedset has_talked to 1set conversation_keepr.ST_cntl to 2stopscript NPC_keepr; changes control code in other script to 2, so this runs once ; sets the varialbe has_talked on the NPC to 1; then ends and doesn't run again until you look at an NPCEnd NPC_Keepr
ST
ps, since I'm still new at this, I obviously HEAVILY comment my code. Anything this the semicolon in front can be cut out. Also since I'm new at this, there are bound to be ways to change this for even more optimization. go ahead and correct me, cuz I want to learn how to make the code actually run smoother.