YEP.3 – Battle Engine Core

 

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 Dropbox
English Mirror

Portuguese Dropbox
Portuguese Mirror

Spanish Translation

The default battle system for RPG Maker MV now allows for the ever so popular side-view! However, we can beef it up a little bit more using the Battle Engine Core to add more features and capabilities to the battle system!


Introduction


This plugin alters the various aspects of the default battle system, allowing it to be more streamlined like most modern RPG’s and less clunky like older RPG’s. This ranges from choosing what text will appear in the battle log window at the top and how it will be displayed.


Battle Messages


When changing “Terms” and the “Messages” that appear in battle, inserting the following tag anywhere in the message will cause the message to center itself in the battle log.

<CENTER>
This tag must be all caps in order for the battle log window to recognize it as an instruction to center the displayed battle text message.


Battle Windows


There’s various options to adjust the window settings found in the battle system to make navigating the battle system more intuitive. Such options include starting the turns with the Actor Command Window instead of the Party Command Window (the Fight/Escape Window). The Party Command Window is still accessible but only by pressing cancel on the first actor’s window.


Battle Order


The battle turn order is also fixed, too. This way, any battlers that have their AGI value changed over the course of battle will reflect those changes during the current turn rather than the following turn. The action speed calculation can also be adjusted and finetuned to have the random factor of its speed calculation formula removed, too, making AGI actually worthwhile as a tactical parameter.


Multiple Hits


Multi-hit action will no longer end prematurely if the target dies midway through the action. This is done through toggling immortal states. To make use of feature, make sure your database has an Immortal State somewhere. If you do not wish to use this feature, set the Parameter for Immortal State ID to 0 instead.


Popup Revamp


Although the damage popups may still look the same as the default ones from MV, the process in which they’re created is now different to streamline the damage popup process. Before, popups would only appear one a time with a frame’s different at minimum in order for them to show. Now, any actions that occur at the same frame will now all show popups at the same frame, making for smoother and less clunky damage popups.


Common Events


Common Events will now occur at the end of each action regardless of whether or not the enemy party is still alive. With proper placing of the action sequence tags, you can make the skill’s common event occur in the middle of an action, too. However, keep in mind if you force an action in the middle of another action, the remainder of the former action’s sequence list will become null and void in favor of the new forced action.


Casting Animations


Casting Animations help provide visual hints for players either by letting them know which battler is going to perform an action or what type of skill that action will be. This plugin enables skills to have casting animations that can be modified universally or customized for each individual skill.

Skill Notetag:
<Cast Animation: x>
Sets the skill’s cast animation to animation ID x. Setting x to zero will cause the skill to not have any animaton at all.


Changing Battle Systems


While the player is not in battle, you can change the battle system using a Plugin Command. With only this plugin, there is only one battle system included: the default battle system.

Plugin Command:
setBattleSys DTB
Sets battle system to Default Turn Battle.

Other future plugins may include other battle systems that may utilize the Battle Engine Core.


Sideview Actions


In RPG Maker MV’s default battle system, both the sideview and the frontview settings do not display counterattacks, reflected magic attacks, nor any case of substituting for battle members. The Battle Engine Core provides games that are using the sideview settings small amounts of animations to relay information to the player in a more visual sense.

Magic Reflection will also display a reflection animation to indicate the battler has reflection properties. This animation can be changed in the parameters, but certain actors, classes, enemies, weapons, armors, and states can display a unique kind of animation for reflection if desired.

Actor, Class, Enemy, Weapon, Armor, and State Notetag:
<Reflect Animation ID: x>
Changes the user’s reflect animation to x. This will take priority in the following order: Actor, Class, Enemy, Weapon, Armor, State, Default.

Sometimes, you don’t want your enemies to be able to move. Or you don’t want certain actors to be able to move. They’re just stationary for whatever reason. To accomplish that, you can use this notetag to forbid the battler from moving.

Actor, Class, Enemy, Weapon, Armor, and State Notetag:
<Sprite Cannot Move>
Prevents the battler’s sprite from moving. This will take priority in the following order: Actor, Class, Enemy, Weapon, Armor, and State. If an enemy is unable to move when it performs an action, it will flash white as if it normally does in front view.


Custom Sideview Battler Anchor


Sideview battlers are generally centered horizontally, and grounded at their feet. However, not all sideview battler spritesheets work this way. In the event you have a sideview battler that doesn’t conform to those standards, you can ‘anchor’ them a different way.

Actor Notetags:
<Anchor X: y.z>
<Anchor Y: y.z>
This sets the anchor location for the actor’s sideview battler at y.z. By default, the X anchor is 0.5 while the Y anchor is 1.0. If you want the X anchor to be a bit more to the left, make it less than 0.5. Make it more than 0.5 to make the X anchor more towards the right. To raise the Y anchor, set the number value to less than 1.0. Keep adjusting until you find that perfect anchor setting.


Action Sequences


The Yanfly Engine Plugins – Battle Engine Core includes the capability of using custom action sequences. Action sequences are basic instructions for the game to creating a customized skill both visually and mechanically. The Battle Engine Core, however, will only include the most basic of action sequences so the instructions on how to create a custom action sequence will be included in the Help file on future extension plugins for this plugin.

Adapted and improved from Battle Engine Melody, Action Sequences can now be used for the hardcore users of YEP’s Battle Engine Core. Using Action Sequences, you can create, animate, and alter the individual aspects of any battle action in the game.


Action Sequences – ala Melody


Battle Engine Core includes Yanfly Engine Melody’s Battle Engine system, where each individual aspect of the skill and item effects can be controlled to a degree. These are called Action Sequences, where each command in the action sequence causes the game to perform a distinct individual action.

Each skill and item consists of five different action sequences. They are as follows:

1. Setup Actions
They prepare the active battler before carrying out the bulk of the action and its individual effects. Usually what you see here are things such as the active battler moving forward a bit, unsheathing their weapon, etc. This step will occur before the active battler expends their skill or item costs.

2. Whole Actions
These actions will affect all of the targets simultaneously. Although this section does not need to be used, most actions will use this for displaying animations upon all enemies. This step occurs after skill and item costs.

3. Target Actions
This section will affect all of the targets individually. Used primarily for physical attacks that will deliver more personal forms of damage. Actions that occur here will not affect other targets unless specifically ordered to do so otherwise.

4. Follow Actions
This section will dedicate towards cleanup work after the individual targeting actions. Here, it’ll do things such as removing immortal flags, start up common events, and more.

5. Finish Actions
This section will have the active battler close up the action sequence. Usually stuff like running waits and holds at the last minute for skills and items, moving back to place, and others.

Now that you know each of the five steps each action sequence goes through, here’s the tags you can insert inside of skills and items. Pay attention to each tag name.

<setup action>
action list
action list
</setup action>

<whole action>
action list
action list
</whole action>

<target action>
action list
action list
</target action>

<follow action>
action list
action list
</follow action>

<finish action>
action list
action list
</finish action>

They will do their own respective action sets. The methods to insert for the action list can be found below in the core of the Help Manual.

Furthermore, to prevent overflooding every single one of your database item’s noteboxes with action sequence lists, there’s a shortcut you can take to copy all of the setup actions, whole actions, target actions, follow actions, and finish actions with just one line.

<action copy: x:y>
Replace x with “item” or “skill” to set the type for the action list code to directly copy. The integer y is then the ID assigned for that particular object type. For example, to copy 45th skill’s action sequences, the code would be <action copy: skill:45> for anything that will accept these action codes. If you do use this notetag, it will take priority over any custom that you’ve placed in the notebox.


Target Typing


You may notice that in some of the actions below will say “refer to target typing” which is this section right here. Here’s a quick run down on the various targets you may select.

user; This will select the active battler.
target, targets; These will select the active targets in question.
actors, existing actors; These will select all living actors.
all actors; This will select all actors including dead ones.
dead actors: This will select only dead actors.
actors not user; This will select all living actors except for the user.
actor x; This will select the actor in slot x.
character x; This will select the specific character with actor ID x.
enemies, existing enemies; This will select all living enemies.
all enemies; This will select all enemies, even dead.
dead enemies: This will select only dead enemies.
enemies not user; This will select all enemies except for the user.
enemy x; This will select the enemy in slot x.
friends; This will select the battler’s alive allies.
all friends; This will select the all of battler’s allies, even dead.
dead friends; This will select the battler’s dead allies.
friends not user; This will select the battler’s allies except itself.
friend x: This will select the battler’s ally in slot x.
opponents; This will select the battler’s alive opponents.
all opponents; This will select the all of the battler’s opponents.
dead opponents; This will select the battler’s dead opponents.
opponent x: This will select the battler’s opponent in slot x.
all alive; Selects all living actors and enemies.
all members; Selects all living and dead actors and enemies.
all dead; Selects all dead actors and enemies.
all not user; This will select all living battlers except user.
focus; Selects the active battler and its targets.
not focus; Selects everything but the active battler and its targets.


Action Sequences – Action List


The following contains a list of the actions you can use inside the five action sequences. Each action has a unique function and requires certain formats to operate properly.


ACTION ANIMATION
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Plays the animation assigned to the skill/item. The animation will automatically select the skill’s/item’s assigned targets.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: action animation


ACTION COMMON EVENT
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Plays the common event found within the skill’s/item’s traits list. This will only play the last common event on the list, following the game engine’s original process. Nothing else will continue on the action list until the common event is finished.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: action common event


ACTION EFFECT: target
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Causes the target(s) to take damage/healing from the skill/item and incurs any changes made to the target(s) such as buffs and states.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: action effect


ANIMATION WAIT: X
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Waits x animaiton frames. Each frame for an animation does not last one game frame, but instead, several. To make life easier, you can use this to have the game wait x frames played for the animation.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: animation 5: user
animation 6: target, mirror


CAST ANIMATION
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Plays an animation on the skill’s user. Will not occur if the action is an item or the user’s default normal attack.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: cast animation


CLEAR BATTLE LOG
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Clears all the messages at the top of the screen.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: clear battle log


DEATH BREAK
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
If a user were to die for any reason during the middle of the skill (either via counter attack or reflection), this will force the remainder of the action sequences for the part of the skill/item to shut down and be skipped.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: death break


DISPLAY ACTION
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Displays the action’s name at the top of the battle log. It will remain there until the battle log is cleared.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: display action


IF … ELSE STATEMENTS
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
For those familiar with programming, you can use if…else statements to perform different actions based on different conditions. Use ‘if’ to specify a block of code to be executed, if a specified condition is true. Use ‘else’ to specify a block of code to be executed, if the same condition is false. Use ‘else if’ to specify a new condition to test, if the first condition is false. Use ‘end’ to specify where the conditions are to end.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –

Usage Example:
if $gameSwitches.value(1)

action effect

else if $gameSwitches.value(2)

action effect

action effect

else

action effect

action effect

action effect

end
*Note: You do not have to indent the code in between to work. It just looks better that way in your action sequences.


IMMORTAL: targets, true/false
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Sets the targets to a state of immortality so that they don’t die in the middle of an attack. This is to ensure every action effect goes through.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: immortal: targets true


MOTION WAIT: target
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Makes the game wait 12 frames if the target(s) performing the action is an actor. If the target(s) is not an actor, no waiting will be done.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: motion wait: user


PERFORM ACTION
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Causes actors to step forward and swing their weapon, thrust it, however the motion that is determined will be automatically done by the game.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: perform action


PERFORM FINISH
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Causes actor to move back to its home spot.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: perform finish


PERFORM START
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Causes actor to move forward from its home spot.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: perform start


WAIT: frames
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Makes the game wait a certain amount of frames before going on to the next action in the action sequence.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: wait: 60


WAIT FOR ANIMATION
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Waits for all animations to finish before going on to the next action in the action sequence.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: wait for animation


WAIT FOR EFFECT
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Waits for all effects to finish playing before continuing on.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: wait for effect


WAIT FOR MOVEMENT
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Waits for all battler movements to finish before going on to the next action in the action sequence.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: wait for movement


WAIT FOR NEW LINE
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Waits for a new line to appear in the log window before going on to the
next action in the action sequence.
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Usage Example: wait for new line


Happy RPG Making!


 

 

Happy RPG Making!


These plugins and Tips & Tricks ideas are made possible thanks to our creative patrons on Patreon! The majority of our Tips & Tricks, Plugins, and Lunatic Pack ideas are placed within the Patreon-exclusive Sample Project for quick and easy access! If you'd like to make a Plugin Suggestion, Yanfly's Patreon-based Suggestion Box a visit here:


If you have any bugs to report, visit the following link:


If you have any questions about Action Sequences, visit the following link:



Thank you!