Jump to content

Recommended Posts

Threat System v1.0


By SeeM_Villain


 


RpcShg.png


 


 


What does the script do?


 


The threat system adds a "smart" way for enemies to decide who to attack in battle.


How it works:


As actors deal damage and heal they build up a "threat" value. Whoever has the highest threat becomes the target of enemy attacks. (Normally "random" attacks.)


In battle, a small window is displayed to show how much threat each actor has accumulated to let the player plan accordingly.


 


The tactical part of the system is in the threat modifiers.


Some skills can cause more threat than normal attacks, actors/classes can have different threat modifiers,


specific elements can deal more or less threat than others etc etc.


 


Using this system you can effectively create "Tank" characters who are supposed to take the majority of the damage


in battles and also give skills to weaker characters to reduce the amount of threat they produce.


 


 


Extended Features List


(Details of usage explained better in the plugin help section)


 


Threat Modifiers


Threat modifiers are split up into different categories to give you more ways to control threat.


Modifiers are added together, 1.0 is 100%   0.1 = 10%


 


<agg_mod: x>


This note tag will increase or decrease all threat caused by healing or damage.


 


<damage_agg_mod: x>


This note tag will increase or decrease threat caused by damage.


 


<heal_agg_mod: x>


This note tag will increase or decrease threat caused by healing.


 


Different elements can have different threat modifiers.


<element_agg_mod: x,y>


<element_damage_agg_mod: x,y>


<element_heal_agg_mod: x,y>


 


x = the element ID      y = the modifier


 


 


Skill Note Tags


 


<taunt>


A skill with this tag automatically puts the user at the top of the threat table by 1 point.


Example:


Marsha has 150 threat. Harold uses a <taunt> skill. Harold now has 151 threat.


If a <taunt> skill ALSO has damage, the taunt is applied first then the extra threat from the damage is added afterwards.


 


<usage_reverse_threat>


This reverses the final threat done by the skill.


With this you can create a skill that deals 350 damage, and removes 350 threat.


 


<usage_agg_mod: x>


A skill with this increases or decreases the threat modifier by x for this attack only.


 


 


State Note Tags


 


<nullify_threat>


An actor with this state will appear to have 0 threat.


Note: Threat still continues to increase/decrease like normal.


 


<provoke>


An actor with this state will always be attacked regardless of threat.


Note: If there is more than 1 actor with a provoke state, the enemy will choose one at random.


 


<no_threat>


<damage_no_threat>


<heal_no_threat>


An actor with this state will generate no threat.


(The damage_no_threat tag means damage causes no threat.)


(The heal_no_threat tag means healing causes no threat.)


 


 


Code


Rename the file extension to .js


 


SeeM_ThreatSystem.txt


 


 


Compatibility Issues


I have tested this plugin in a project with many Yanfly plugins and there were a lot of problems.


I will be writing fixes for these issues for use in my own projects,


so once those are complete I'll update this topic with download links.


 


 


Future Features I'd Like To Implement


A "misdirect" skill which allows an actor to target an ally party member. While the effect is active,


all threat dealt by party member A is added to party member B's total instead.


 


 


Credit


For use in Commercial or Non-Commercial games free with credit.


SeeM_Villain


 


 


Closing Note


If there are any errors or bugs, please let me know and I'll do my best to fix them.


If your problem is a compatibility issue with another script I can't guarantee I'll make a fix for it,


but it's something I may look into.


 


 


 


 


 


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×