Guard Skill Command




This script changes your guard command depending on a variety of conditions.


The guard command can be based on what states are applied, what your actor


has currently equipped, or what their class is.


By default, the guard command uses the guard skill, which is the second skill.


However, by adding a few simple tags and some priorities, you can customize


what the guard command is.


Get it at Hime Works!
That's reeaally cool!!

Thanks again, Hime!
You can now define dynamic guard skills using formulas.

<guard skill>id: a.hp < a.mhp * 0.2 ? 10 : 20priority: 10</guard skill>This means that if HP is less than 20%, then the guard skill will be skill 10, otherwise it will be skill 20.Only one-liner formulas are supported unfortunately.
What can't you do?
You can now define dynamic guard skills using formulas.

This means that if HP is less than 20%, then the guard skill will be skill 10, otherwise it will be skill 20.Only one-liner formulas are supported unfortunately.
Very usefull

One question:

Does that assignment override skill availability or does it switch to another default when a skill is not usable?

For example, if the skill 10 is not learned or if the actor has not enough MP to pay the skill cost, will it still be executed or will the game switch to skill 20 if skill 10 is impossible to use?

If it overrides the checks you could make a skill that is only usable at the given condition but not at other times without adding more conditional/tagging scripts: Simply have that conditioned skill not available anywhere to the actor, but it will switch in for guard if the condition is fullfilled...
Very usefull


One question:


Does that assignment override skill availability or does it switch to another default when a skill is not usable?


For example, if the skill 10 is not learned or if the actor has not enough MP to pay the skill cost, will it still be executed or will the game switch to skill 20 if skill 10 is impossible to use?


If it overrides the checks you could make a skill that is only usable at the given condition but not at other times without adding more conditional/tagging scripts: Simply have that conditioned skill not available anywhere to the actor, but it will switch in for guard if the condition is fullfilled...
The command obeys skill use conditions. If it is not usable, then it will be grayed out and unselectable.


The script is currently set up so that it picks the highest priority guard skill as the guard command, however I guess an option would be to tag it so that it will NOT be selected if it is not usable.

Original thread: https://forums.rpgmakerweb.com/threads/guard-skill-command.20132/