by Alanrockid
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.
Choose between Auto Target or Target Advisor
- Auto Target will do the calculations and auto select the target for you.
- Target Advisor will calculate the aggro values, but will not select target, instead, it will advise you of the best option (better with "Pure Logical")
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.
- Spellcasting Threat: Spells generate aggro with an additional bonus relative to spell level.
- Healing Threat: Like spellcasting aggro, it will add a bonus relative to the healing spell level.
- Neglected Target Threat: Actors that are not being targeted by anyone receive this bonus to aggro.
- 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 EffectS: AGGRO, INDEPENDENT, NOTHREAT and CRUEL
AGGRO: Increase or decrease the threat value of the actor with this effect.
- 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.
INDEPENDENT: Skip threat calculation and auto targeting. Use it for manual targeting.
NOTHREAT: Excludes the actor from the valid targets list.
CRUEL: Bypass the check for "NPCs Cruelty: off" for this particular NPC.
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.3.0
New Features:
- Spellcasting Aggro: Caster receive the base spell threat value + additional level bonus (both customizable).
- Healing Aggro: Healer also receive additional aggro based on healing level.
- Intelligence based aggro: Define the minimum intelligence to be considered 'intelligent' and 'rational'. Intelligent actors will calculate all variables plus spell and healing aggro. Rational actors will calculate everything but those two and irrational actor will only consider basic aggro modifiers.
- Neglected target aggro: Actors that are not being targeted by anyone will receive this bonus to threat.
1.2.1
New Features:
- 3 New Effects: INDEPENDENT, NOTHREAT and CRUEL.
- New feature to decide if attacked neutral NPCs engage in battle.
- New target advisor mode to show aggro calculations without actually targeting.
Fixes and small changes:
- Fixed effective and max range calculations for melee combatants.
- Renamed options.
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:
- 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.
- 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).
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