Battle System - CTB (YEP)

From Yanfly.moe Wiki
Revision as of 17:25, 20 June 2019 by Yanfly (talk | contribs) (Created page with "{{MvPlugin |preview=<youtube>https://www.youtube.com/watch?v=zNMhNob7vSU</youtube> |link1=<html><iframe src="https://itch.io/embed/398271" height="167" width="552" frameborder...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.



Download

System

This is a plugin created for RPG Maker MV.

For help on how to install plugins, click here.

For help on how to update plugins, click here.

Got errors with your RPG Maker MV plugin? Click here.


Masterarbeit Writer

Required Plugins

The following plugins are required in order to use this plugin.

Place the following plugins above this plugin located in the Plugin Manager.

Yanfly Engine Plugins

This plugin is a part of the Yanfly Engine Plugins library.


Help File

============================================================================
Introduction
============================================================================

The Battle System - Charge Turn Battle plugin is an extension plugin for
Yanfly Engine Plugins' Battle Engine Core. This extension plugin will not
work without the main plugin.

To use the CTB system, go to the Battle Engine Core plugin and change the
'Default System' setting in the parameters to 'ctb'.

The Charge Turn Battle system functions by calculating every battlers' speed
and balancing them relative to one another. When it's a battler's turn, the
battler will either choose an action to perform immediately or charge it for
later depending if the skill requires charging.

This is a battle system where agility plays an important factor in the
progress of battle where higher agility values give battlers more advantage
and lower agility values give battlers less advantage.

============================================================================
Plugin Commands
============================================================================

To change your battle system to Charge Turn Battle if it isn't the default
battle system, you can use the following Plugin Command:

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

Using the above Plugin Commands, you can toggle between the Default Battle
System and Charge Turn Battle!

============================================================================
Notetags
============================================================================

The following are notetags that pertain to and affect the CTB system.

Actor and Enemy Notetags:
  <CTB Icon: x>
  This sets the icon used for the actor/enemy to be x.

  <CTB Border Color: x>
  This sets the border color used for the actor/enemy to text color x.

  <CTB Background Color: x>
  This sets the background color used for the actor/enemy to text color x.

Actor only Notetags:
  <Class x CTB Icon: y>
  This sets it so that if the actor is a specific class, the actor will get
  a specific icon used for the CTB Turn Order. If the actor is class x, it
  will receive icon y.

  <Hero CTB Icon: x>
  <Warrior CTB Icon: x>
  <Mage CTB Icon: x>
  <Priest CTB Icon: x>
  If you prefer to use names instead of class ID's, you can use the above
  notetag format. If the actor is the named class, it will receive icon x.
  If you have multiple classes with the same name, priority will be given to
  the class with the highest ID.

Skill and Item Notetags:
  <CTB Help>
  text
  text
  </CTB Help>
  For those planning on using multiple battle systems, sometimes you may
  have your skills perform differently while using CTB. If so, using this
  notetag will allow skills and items to display different help text while
  CTB is enabled.

  <CTB Speed: x>
  Usable only during CTB. This sets the target's current speed to x.

  <CTB Speed: x%>
  Usable only during CTB. This sets the target's current speed to x% of
  the CTB turn completion target.

  <CTB Speed: +x>
  <CTB Speed: -x>
  Usable only during CTB. This increases or decreases the target's current
  speed by x.

  <CTB Speed: +x%>
  <CTB Speed: -x%>
  Usable only during CTB. This increases or decreases the target's current
  speed or charge by x% of the CTB turn completion target.

  <CTB Order: +x>
  <CTB Order: -x>
  Moves target's position in the turn order by +x or -x. +x will make the
  target having to wait more before getting their turn while -x will make
  the target having to wait less. The effect is minimal and will only last
  for the current turn cycle.
  * Note: If you use this for multiple targets, each target will shift turns
  individually at a time.

  <After CTB: x>
  <After CTB: x%>
  This will set the skill/item user's CTB speed value to x or x%. If 'x' is
  used, this will be the exact CTB value. If x% is used, this will be the
  percentage of the CTB turn completion target that it will be at.

Actor, Class, Enemy, Weapon, Armor, and State Notetags:
  <CTB Start: +x>
  <CTB Start: +x%>
  Usable only during CTB. This will give the actor, class, enemy, weapon,
  armor, or state the property of starting battle with X CTB Speed or X% of
  the CTB turn completion target.

  <CTB Turn: +x>
  <CTB Turn: +x%>
  Usable only during CTB. This will give the actor, class, enemy, weapon,
  armor, or state the property of starting a turn with X CTB Speed or X% of
  the CTB turn completion target.

============================================================================
Lunatic Mode - Conditional CTB Speed and Conditional CTB Charge
============================================================================

For those who have a bit of JavaScript experience and would like to have
more unique ways of performing CTB speed and charge changes, you can use the
following notetags:

Skill and Item Notetags:
  <Target CTB Speed Eval>
  speed = x;
  charge = x;
  </Target CTB Speed Eval>
  You can omit speed and/or charge. Whatever you set 'speed' to will change
  the CTB speed of the target. If the target is charging, 'charge' will
  cause the target's charge to change to that value. To make things more
  simple, 'max' will be the full gauge value.

  Here is an example:

  <Target CTB Speed Eval>
  speed = target.hp / target.mhp * max;
  charge = target.hp / target.mhp * max;
  </Target CTB Speed Eval>
  The above code will set the user's current CTB gauge to position equal to
  the target's HP ratio. If the target has 25% HP, the CTB gauge will go to
  25% full for the target.

  --- --- --- --- ---

  <Target CTB Order Eval>
  order = x;
  </Target CTB Order Eval>
  Set the 'order' variable to how much you want to alter the target's
  current turn order by. If 'order' is positive, the order will need to wait
  that many more turns before its turn comes up. If 'order' is negative, it
  will will that amount of turns less before the order comes up.

  Here is an example:

  <Target CTB Order Eval>
  if (target.hp > 1000) {
    order = 3;
  } else {
    order = -1;
  }
  </Target CTB Order Eval>
  If the target when attacked has over 1000 HP left, the target will have to
  wait 3 more turns before its turn arrives. If the target has 1000 or less,
  the target actually waits 1 less turn.

  --- --- --- --- ---

  <After CTB Eval>
  speed = x;
  </After CTB Eval>
  This is the CTB set after the user has used the skill/item and the custom
  CTB amount you want the user to be at after. 'max' be the value of the
  full gauge value. Whatever you set 'speed', the user's CTB speed value
  will change to that much:

  Here is an example:

  <After CTB Eval>
  speed = user.mp / user.mmp * max;
  </After CTB Eval>
  The above code will set the user's CTB gauge after using the skill/item to
  equal the user's MP ratio. If the user has 25% MP, the CTB gauge will go
  to 25% full for the user.

============================================================================
Yanfly Engine Plugins - Battle Engine Extension - Action Sequence Commands
============================================================================

You can make use of these extra CTB related action sequences.

=============================================================================
CTB ORDER: target, +X
CTB ORDER: target, -X
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usable only for CTB. Moves target's position in the turn order by +x or -x.
+x will make the target having to wait more before getting their turn while
-x will make the target having to wait less. The effect is minimal and will
only last for the current turn cycle.
* Note: If you use this for multiple targets, each target will shift turns
individually at a time.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usage Example: ctb order: target, -2
               ctb order: target, +3
=============================================================================

=============================================================================
CTB SPEED: target, X
CTB SPEED: target, X%
CTB SPEED: targets, +X
CTB SPEED: targets, +X%
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usable only for CTB. Sets the target's CTB speed to X or X%. This only
applies when the target is filling up its CTB gauge. This will not affect
the user to prevent mechanical issues.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usage Example: ctb speed: targets, +5000
               ctb speed: target, -50%
=============================================================================

============================================================================
Changelog
============================================================================

Version 1.17:
- Bypass the isDevToolsOpen() error when bad code is inserted into a script
call or custom Lunatic Mode code segment due to updating to MV 1.6.1.

Version 1.16:
- Updated for RPG Maker MV version 1.5.0.

Version 1.15:
- Lunatic Mode fail safes added.

Version 1.14a:
- Updated check for CTB Charging. Units in the turn order will not be
considered 'ready' unless they are in the front of the CTB Turn Order.

Version 1.13:
- Timing has been changed for states that update turns at Turn Start. Now,
the states will update prior to the actor's command box opening or the enemy
make a decision on which action it will use.

Version 1.12:
- Updated for RPG Maker MV version 1.1.0.

Version 1.11:
- Counterattacks no longer cause turn order inconsistencies.

Version 1.10a:
- Updated plugin to update the AI more accordingly with Battle AI Core.
- Optimized CTB Turn Order further to reduce lag when there are larger
quantities of battle members.

Version 1.09:
- Fixed a bug where forced actions clear out an action's effects before the
turn is over, making post-turn effects to not occur.

Version 1.08a:
- Fixed a bug where changing back and forth between the Fight/Escape window
would prompt on turn start effects.
- Made an update where if using Battle Engine Core's "Lower Windows" to
false, the icons no longer show above the windows.

Version 1.07:
- Made a mechanic change so that turn 0 ends immediately upon battle start
rather than requiring a full turn to end.

Version 1.06:
- Fixed a bug that would cause a crash when a party member leaves the party.

Version 1.05c:
- Implemented a Forced Action queue list. This means if a Forced Action
takes place in the middle of an action, the action will resume after the
forced action finishes rather than cancels it out like MV does.
- Fixed a graphical issue where enemies appearing midway don't have letters
attached to their icons.
- Added a fail safe for loaded saves that did not have CTB installed before.

Version 1.04:
- Added a speed position check for Instant Casts to maintain order position.

Version 1.03:
- Fixed a bug that doesn't update state turns properly.
- Removed 'Turn Structure parameter' as it goes against the nature of a
Tick-Based battle system.

Version 1.02:
- Added failsafe for battlers without actions.
- Added speed rebalance formulas for tick-based systems (innate).
- Added <Class x CTB Icon: y> and <classname CTB Icon: x> notetags.

Version 1.01:
- Provided loop breaks to prevent lock-ups with non-Yanfly plugins.
- Added 'Icon Size' parameter to allow customization of icon sizes.

Version 1.00:
- It's doooooooooone!