YEP.175 – Actor Auto Battle AI – RPG Maker MV

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

You can grab the plugin here:

English Mirror

Support Team Yanfly on Patreon

This plugin requires YEP_BattleAICore. Make sure this plugin is located under YEP_BattleAICore in the plugin list.

By default, if an actor has the auto battle trait, it will cycle through each one of its learned skills (whether or not it has access to the skill type doesn’t matter) and selects the hardest hitting skill of them all. This setup may work for some auto-battlers but not all of them. What this plugin does is it incorporates the A.I. Priority system from the YEP Library’s Battle A.I. Core for actor auto-battlers.

If you don’t have YEP_BattleAICore yet, please download it from here.


Introduction


Please wait while you are redirected...or Click Here if you do not want to wait.

This plugin requires YEP_BattleAICore. Make sure this plugin is located under YEP_BattleAICore in the plugin list.

By default, if an actor has the auto battle trait, it will cycle through each one of its learned skills (whether or not it has access to the skill type doesn’t matter) and selects the hardest hitting skill of them all. This setup may work for some auto-battlers but not all of them. What this plugin does is it incorporates the A.I. Priority system from the YEP Library’s Battle A.I. Core for actor auto-battlers.

If you don’t have YEP_BattleAICore yet, please download it from here.


Plugin Parameters


Default AI Level:
– See ‘Actor AI Level’ in the Notetags section below.

Bypass Requirement:
– This is a list of the skills that bypass that requirement to have learned the skill in order to use it. This is namely for skills like ‘Attack’ and/or ‘Guard’ that aren’t normally learned by actors, but are available to them through the command window.

Curate Skill List:
– Skills used for Auto Battle can only be skills accessible through available skill types. This is a selectable option because sometimes, skills that are learned by actors can be used through auto battle despite not having access to that skill type. An example of this would be an actor that has learned skills in the Knight class, but upon switching to the Mage class the actor loses the Knight skill type. Yet, despite that, auto battle would let the Mage class use skills from the Knight skill type if it’s a part of the setup. Turning this on to curate the skill list will remove the ability use skills outside of available skill types.

Undecided AI:
– If no skill is determined through the A.I. Priority list, the actor will use the default Auto Battle AI to determine which skill to use. Otherwise, the actor perform only a basic attack if the setting is false.


Notetags


The notetags to setup the auto battle A.I. will go into the class noteboxes.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Actor AI Level
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Actor AI levels do not determine how smart they are. Instead, they determine how strictly they will follow the <AI Priority> lists. An AI Level of 80 means it has an 80% chance of following the prioritized action on the AI Priority list before moving onto the next one where there will be another 80% chance and so on. If the AI level is lower, the chance is lower, making the AI to be more random.

Class Notetag:

<AI Level: x>
Sets the actor’s AI level to x. The lower x, the more random the actor. The higher for x, the more strict the actor is about following the AI Priority list found in its notebox, too.

– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Actor AI Priority
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

If a class has an AI Priority list, the actor will go down that list from top to bottom (giving the actions at the top more priority than the ones at the bottom) looking for any actions whose conditions are fulfilled. If that condition is fulfilled, then that action will be the action the actor will partake in.

To set up a Priority List for the actor, you must place inside the class’s notebox notetags that match the following format:

<AI Priority>
condition: SKILL x, target
condition: SKILL x, target
</AI Priority>

or

<AI Priority>
condition: skill name, target
condition: skill name, target
</AI Priority>

Any number of conditions and skills can be placed in between the two <AI Priority> tags. You can choose to use skill ID’s or the skill names. However, if you use the skill names, keep in mind that it is not case sensitive and if any skills in your database have matching names, the skill with the larger skill ID will be the action used.


Conditions


The conditions to be used for the <AI Priority> notetag are the same as the ones from the YEP_BattleAICore plugin. Please refer to the YEP_BattleAICore help file for which conditions can be used with the A.I. setups.


Happy RPG Making!