Note: You are not logged in.
AGGRO - Smart Targeting for NPCs

by Alanrockid

500
5.00 Avg. rating

Forum Thread
Total Subscribers:


Description

Introducing Aggro – Smart Targeting for NPCs in Fantasy Grounds

Are your players constantly shouting, "Why is he attacking me instead of the barbarian?"
Are you a DM who wants to enjoy impartial targeting while battling it out in an arena with your players?
Or are you simply looking for a way to streamline combat decisions without overthinking?

Well… this is for you!

Aggro is a new extension designed to bring intelligent, automated targeting to your games. By using customizable variables with adjustable weights, it calculates targeting priorities for NPCs. At the start of an NPC's turn, Aggro determines targets based on probability—higher Aggro values mean a greater chance of being selected.


Key Features

Two Targeting Systems

  • Logical Chance: Target selection remains random, but higher threat levels significantly increase the chances of being targeted. This maintains a balance of consistency and unpredictability.
  • Pure Logical: The actor with the highest threat level is always selected as the target.

You can also choose whether to display full threat calculations in the chat or only the final target selection message.


Customizable Threat Variables

Aggro's targeting system is powered by the following variables, all adjustable via the Options menu:

  • Base Value: A default Aggro value assigned to all actors at the start of a turn. Think of it as a "random motive" factor.
  • Proximity Threat: Closer targets receive higher Aggro values. The nearest target gets 100%, the second-closest gets 50%, the third 25%, and so on.
  • Damage Threat: Targets that deal the most damage to the NPC are prioritized. The top-ranked actor receives 100% of the damage Aggro, with subsequent ranks halving the previous value.
  • Persistence Threat: Actors already targeted in previous turns gain this Aggro value, ensuring consistent NPC behavior.
  • Critical Hit Threat: Actors who land a critical hit on the NPC gain increased Threat until the NPC's next turn.
  • Miss Penalty: Each time an NPC misses a target, that target's Aggro decreases. This penalty is cumulative and resets upon a successful hit, making difficult-to-hit targets less attractive.
  • Out of Reach Penalty: Targets outside the NPC’s base movement range (or effective attack range) have their Aggro reduced by 100%. Targets beyond dashing range (or maximum range) receive triple this penalty, making faraway targets less appealing.
  • Injured Opponent Penalty: Bloodied actors (50% HP or less) have their Aggro reduced by 100%, while wounded actors (more than 50% HP but not full) receive half the penalty.
  • Minimum Target Value: Prevents an actor’s Aggro from dropping to 0 or below, ensuring they remain a potential target.
  • NPC Cruelty: Determines if dying actors (0 HP) are valid targets. When turned off, NPCs will ignore actors with 0 HP.

Don’t like a variable? Set its value to 0, and it will no longer affect targeting.


New Effect Code: AGGRO

Aggro introduces a new effect code to modify Aggro values dynamically during gameplay.

  • Usage: AGGRO: [n]
    Where [n] is a number (positive or negative) that adjusts the target’s Aggro value.

Examples:

  • Taunt: AGGRO: 300 – Increase a target's Aggro by 300.
  • Innocent Face: AGGRO: -200 – Decrease a target's Aggro by 200.

Important Notes

  • Always drag tokens from the Combat Tracker to the map. Dragging tokens directly from a PC sheet or NPC list will prevent the extension from functioning properly.
  • This extension extension is not compatible with language translations, as it depends on capturing certain messages from the ruleset to work properly.

Changelog
1.1.2
       Fixes:

  • Fixed a bug related to tied actors with the same threat modifiers resulting in a console error and no target selected when in "Pure Logical" mode.

1.1.1

       New Features:

  • NPCs now have the option to target any actor in Combat Tracker. (Select between "PC Only", "Any Friendly" or "All But Hostile").
  • Added a option to choose the target message's display mode for players.
  • Included a message feedback in Verbose mode to show the current NPC effective and maximum range. (If the NPC has no ranged attack, effective range is NPC speed + reach. Maximum range is NPC speed x 2 + reach. For ranged attacks, it takes the effective and maximum range from the weapon or ranged spell attack. If there is only a single value for range, maximum range = effective range.)

       Fixes:

  • Fixed "Injured" threat bonus displayed as a penalty.
  • Fixed console error when NPC ranged attack have only one range value.

1.0

Initial Release


Coming Next

Exciting future updates include:

  • [CRUEL] Effect: Allow specific NPCs to bypass the "NPC Cruelty: off" setting.
  • Status Effects Threat: Assign custom threat values to statuses like Invisible, Dash, Prone, Paralyzed, etc.
  • Improved Range Calculation: Incorporate save-based spells and powers, like dragon's breath, into the "Out of Reach" penalty.
  • Spell Level Threat: The higher the level of the spell cast, the bigger the threat.
  • NPCs Quirks: A chance to randomly assign an effect to a NPC representing some personal beef or soft spot, like: "HATES: Dwarves" (Dwarves get threat +200 against him), "LOVES: TINY" (Tiny sized actors receive -200 threat against him).
  • Healer Threat: "Yeah...we need to take out this bastard that keep bringing the Barbarian back to combat."

Have Suggestions or Found a Bug?

I’d love to hear your feedback! Send me a message with your thoughts or report any issues you encounter.



UUID a71cfcd6-c4cb-11ef-af21-0050562be458