Question on NPC buff logic: how does it know what buffs/debuffs a player has?

Discussion in 'General Discussion' started by showstring, Jul 12, 2022.

  1. showstring

    showstring I Feel Loved

    Messages:
    3,339
    I'm wondering about NPC spell logic, and how it can possibly know what buffs / debuffs I have on.

    Specifically: how does it know to keep debuffing me when I cure specific debuffs.
    When I get slowed, and cured, how does the NPC know to re-slow me?
    When it tashes me, and I cure it, how does it know to keep re-tashing me?
    When I have buffs on, how does it know to dispell me?

    Just curious what part of code makes NPCs omnipotent when it comes to knowing what spells to cast.
    And also, is this intended?
     
  2. solar

    solar Administrator Staff Member

    Messages:
    1,197
    I'm not an expert on this, but a lot of it is just random and the omnipotent part is an illusion when they get lucky, like when they manage to dispel your cleric buff in the 5th slot or whatever. They do test if a buff will land before casting it, otherwise they would continue to cast ineffective buffs/debuffs and they're already pretty easy to outsmart. When this logic malfunctions you see NPCs spamming the same buff over and over, it happens on live EQ even. The game cheats, the NPCs always find you even if they can't see you, but in this case you can imagine that they got a 'worn off' message for their debuff and so they recast it. Similarly for their buffs like when they SoW each other, just imagine they kept track of the timer and knew when to recast.
     
  3. Mokli

    Mokli I Feel Loved

    Messages:
    2,458
    That's interesting, so if it doesn't have any spells that it knows will land, it may just keep defaulting to something like dispel. That would actually track with lower level mobs constantly trying to dispel me that I've seen.
     
  4. Lenas

    Lenas I Feel Loved

    Messages:
    2,968
    Pretty sure every NPC in the game could access any information it wants about you and you don't even get to consent.
     
    Mechaike likes this.
  5. Tuluvien

    Tuluvien I Feel Loved

    Messages:
    1,093
    LiS knows your secrets, and is always watching his text windows.
     
  6. showstring

    showstring I Feel Loved

    Messages:
    3,339
    I've tested this fairly extensively to ensure it's not random. It's most noticable with Shaman mobs and Enchanter mobs, and now in PoP with Radiant Cure ability.

    When hunting shaman mobs in PoTactics:
    1. If I let a mob debuff me with Malicious Decay and Malo, and leave those buffs on me, the diaku Oracles don't try to debuff me again.
    1a. If I Radiant Cure these spells away, the mob will debuff me again with same debuffs.

    2. Similar with Tash debuff with enchanter mobs. If I just keep the tash debuff on me, they don't recast it at all. Subsequent ench mobs will not try to tash me for 10+ mins if I just leave the debuff on.
    2a. However, if I Cure Poison and Radiant Cure the Tash debuff, the same mob will keep re-casting it on my chars. This can happen happens 4-5 times on the same mob.

    So it definitely knows I have certain debuffs on me, and this persists through other mobs. That is, the same mob isn't getting a worn off message, but rather his friend 10 mins later knows that I got tashed and won't recast it on me.

    Seems fishy?
     
    Last edited: Jul 12, 2022