Difference between revisions of "Battle System - CTB VisuStella MZ"

From Yanfly.moe Wiki
Jump to navigation Jump to search
(Plugin Parameters)
(JS Calculation Mechanics)
Line 129: Line 129:
  
 
=== JS Calculation Mechanics ===
 
=== JS Calculation Mechanics ===
 +
 +
[[File:CTB_Params1.png]]
  
 
While the calculation mechanics aren't changed from their original RPG Maker
 
While the calculation mechanics aren't changed from their original RPG Maker

Revision as of 13:16, 8 October 2020

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 MZ.

Click here for help on how to install plugins and an explanation on the Tier Hierarchy System.


UpdatePlugins.png

Click here to learn how to update plugins.


Troubleshooting.jpg

Click here for how to troubleshoot plugins if you get an error.



CTB Preview1.png CTB Preview2.png
CTB Preview3.png CTB Preview4.png

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.


VisuStella MZ

This plugin is a part of the VisuStella MZ Plugin Library.


Support VisuStella

Click here if you want to help support VisuStella on Patreon.


Introduction

This plugin creates a Charge Turn Battle (CTB) system using RPG Maker MZ's TPB as a base. CTB functions by calculating the speed of every battler 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 additional turns over lower agaility values, which give battlers less advantage and less turns.

A turn order display will appear to compensate for the removal of gauges. The turn order display will show a preview of what the turn order could possibly be like. This turn order display is variable and can be changed due to player and enemy influence by using different action speeds, effects provided by this plugin that alter the turn order, and more!

  • NOTE* To use this battle system, you will need the updated version of

VisuStella's Core Engine. Go into its Plugin Parameters and change the "Battle System" plugin parameter to "ctb".

Features include all (but not limited to) the following:

  • Full control over the TPB integrated mechanics converted for CTB such as speed, calculations, etc.
  • No more waiting for gauges to show up! In fact, you won't even see the TPB gauge in-game.
  • A turn order display that previews a potential lineup for how the participating battlers in battle will play out.
  • Notetags that give skills and items access to manipulating a battler's CTB speed.
  • Notetags that give skills and items access to directly manipulate a target batter's position on the Turn Order display.
  • These mechanics are separate from ATB and TPB itself, so you can still use either battle system without affecting both of them.
  • Through the Core Engine, you can switch in and out of CTB for a different battle system.

Requirements

This plugin is made for RPG Maker MZ. This will not work in other iterations of RPG Maker.

Required Plugin List

This plugin requires the above listed plugins to be installed inside your game's Plugin Manager list in order to work. You cannot start your game with this plugin enabled without the listed plugins.


Tier 2

This plugin is a Tier 2 plugin. Place it under other plugins of lower tier value on your Plugin Manager list (ie: 0, 1, 2, 3, 4, 5).

This is to ensure that your plugins will have the best compatibility with the rest of the VisuStella MZ Plugin library.


Major Changes

This plugin adds some new hard-coded features to RPG Maker MZ's functions. The following is a list of them.

---

Turn Order Display

CTB TurnOrder.png

Despite the fact that the Battle System CTB plugin uses RPG Maker MZ's TPB as a base, it does not have any gauges to depict the time it takes for a battler's turn to appear. Instead, a turn order display appears on the screen (you pick where it can appear: top, bottom, left, or right) and shows a possible preview of the battler turn order.

This is only a preview of what can happen because lots of different things can influence the position and ordering of the turn order display, ranging from skill/item speeds, notetag effects, changes in AGI, etc. What is seen on the turn order display is the most likely possibility instead of the exact order to occur due to the external influences.

---

Skill & Item Speeds

CTB Speed.png

With TPB, skills and items with negative speed values will cause the battler to enter a "casting" state, meaning they have to wait extra time before the action takes off. With this delayed action execution, one might assume that if there is a positive speed value, the battler would require less time for their next turn.

However, this isn't the case with RPG Maker MZ's TPB. By changing it to CTB, skills and items with positive speed values will have an impact on how full their CTB Speed will be in the following turn. A value of 2000 will put the turn at 50% ready, 1000 will put the gauge at 25% ready, 500 will put it at 12.5% ready, and so on. Notetags can also be used to influence this.

---

JS Calculation Mechanics

CTB Params1.png

While the calculation mechanics aren't changed from their original RPG Maker MZ formulas, the functions for them have been overwritten to allow you, the game developer, to alter them as you see fit.

---

Notetags

RPG Maker MZ's editor is unable to allow for custom traits/properties that a game dev may wish to associate with a database object, event, map, etc. Notetags are used to work around such limitations by allowing the game dev to tag certain traits/properties using specific Notetags declared by the related plugin.

Here is a list of Notetag(s) that you may use.


The following are notetags that have been added through this plugin. These notetags will not work with your game if this plugin is OFF or not present.

---

General CTB-Related Notetags

These notetags are general purpose notetags that have became available through this plugin.

---

<CTB Help>
 description
 description
</CTB Help>

- Used for: Skill, Item Notetags
- If your game happens to support the ability to change battle systems, this
  notetag lets you change how the skill/item's help description text will
  look under CTB.
- This is primarily used if the skill behaves differently in CTB versus any
  other battle system.
- Replace 'description' with help text that's only displayed if the game's
  battle system is set to CTB.

---

CTB Turn Order Display-Related Notetags

CTB TurnOrder.png

These notetags affect the CTB Turn Order Display

---

<CTB Turn Order Icon: x>

- Used for: Actor, Enemy Notetags
- Changes the slot graphic used for the battler to a specific icon.
- Replace 'x' with the icon index to be used.

---

<CTB Turn Order Face: filename, index>

- Used for: Actor, Enemy Notetags
- Changes the slot graphic used for the enemy to a specific face.
- Replace 'filename' with the filename of the image.
  - Do not include the file extension.
- Replace 'index' with the index of the face. Index values start at 0.
- Example: <CTB Turn Order Face: Monster, 1>

---

CTB Speed Manipulation-Related Notetags

CTB Delay.gif

These notetags are used for CTB Speed manipulation purposes.

---

<CTB Set Order: x>

- Used for: Skill, Item Notetags
- Sets the target's CTB Turn Order position to exactly x.
- Replace 'x' with a number value depicting the exact position of the turn
  order position. 0 is the currently active battler and cannot be used.
  1 is closest to taking a turn. Higher numbers are further away.
- This does not affect the currently active battler.

---

<CTB Change Order: +x>
<CTB Change Order: -x>

- Used for: Skill, Item Notetags
- Sets the target's CTB Turn Order position by x slots.
- Replace 'x' with a number value indicating the increase or decrease.
  Negative values decrease the turns needed to wait while positive values
  increase the turns needed.
- This does not affect the currently active battler.

---

<CTB After Speed: x%>

- Used for: Skill, Item Notetags
- After using the skill/item, the user's CTB Speed will be set to x%.
- Replace 'x' with a percentile value representing the amount you want the
  CTB Speed to reset to after the skill/item's usage.

---

<CTB Charge Speed: x%>
<CTB Charge Speed: +x%>
<CTB Charge Speed: -x%>

- Used for: Skill, Item Notetags
- If the target is in a charging state, change the target's speed amount to
  x% or by x% (if using the +/- variants).
- Replace 'x' with a percentile value representing the amount of the CTB
  Speed you wish to alter it to/by.
- This only affects targets who are in a charging state.

---

<CTB Cast Speed: x%>
<CTB Cast Speed: +x%>
<CTB Cast Speed: -x%>

- Used for: Skill, Item Notetags
- If the target is in a casting state, change the target's speed amount to
  x% or by x% (if using the +/- variants).
- Replace 'x' with a percentile value representing the amount of the CTB
  Speed you wish to alter it to/by.
- This only affects targets who are in a casting state.

---

JavaScript Notetags: CTB Speed Manipulation

CTB Delay.gif

The following are notetags made for users with JavaScript knowledge to give more control over conditional CTB Speed Manipulation.

---

<JS CTB Order>
 code
 code
 order = code;
</JS CTB Order>

- Used for: Skill, Item Notetags
- Replace 'code' with JavaScript code to determine where to set the target's
  order on the CTB Turn Order Display to.
- The 'order' variable represents the final position on the Turn Order
  Display to place the target.
- The 'position' variable represents the target's current position on the
  Turn Order Display.
- This does not affect the currently active battler.

---

<JS CTB Charge Speed>
 code
 code
 rate = code;
</JS CTB Charge Speed>

- Used for: Skill, Item Notetags
- Replace 'code' with JavaScript code to determine how much to change the
  CTB Speed to if the target is in a charging state.
- The 'rate' variable represents rate value the CTB Speed will change to
  between the values of 0 and 1.
- The 'rate' variable will default to the target's current CTB Speed rate
  if the target is in a charging state.

---

<JS CTB Cast Speed>
 code
 code
 rate = code;
</JS CTB Cast Speed>

- Used for: Skill, Item Notetags
- Replace 'code' with JavaScript code to determine how much to change the
  CTB Speed to if the target is in a casting state.
- The 'rate' variable represents rate value the CTB Speed will change to
  between the values of 0 and 1.
- The 'rate' variable will default to the target's current CTB Speed rate
  if the target is in a casting state.

---

<JS CTB After Speed>
 code
 code
 rate = code;
</JS CTB After Speed>

- Used for: Skill, Item Notetags
- Replace 'code' with JavaScript code to determine how much to change the
  CTB Speed to after performing this skill/item action.
- The 'rate' variable represents rate value the CTB Speed will change to
  between the values of 0 and 1.
- The 'rate' variable will default to 0.

---

Plugin Commands

Plugin Commands are event commands that are used to call upon functions added by a plugin that aren't inherently a part of RPG Maker MZ.

Here is a list of Plugin Command(s) that you may use:

---


The following are Plugin Commands that come with this plugin. They can be accessed through the Plugin Command event command.

---

Actor Plugin Commands

CTB TurnOrder.png

---

CTB Command1.png

Actor: Change CTB Turn Order Icon
- Changes the icons used for the specific actor(s) on the CTB Turn Order.

  Actor ID(s):
  - Select which Actor ID(s) to affect.

  Icon:
  - Changes the graphic to this icon.

---

CTB Update11 Command1.png

Actor: Change CTB Turn Order Face
- Changes the faces used for the specific actor(s) on the CTB Turn Order.

  Actor ID(s):
  - Select which Actor ID(s) to affect.

  Face Name:
  - This is the filename for the target face graphic.

  Face Index:
  - This is the index for the target face graphic.

---

CTB Command2.png

Actor: Clear CTB Turn Order Graphic
- Clears the CTB Turn Order graphics for the actor(s).
- The settings will revert to the Plugin Parameter settings.

  Actor ID(s):
  - Select which Actor ID(s) to affect.

---

Enemy Plugin Commands

CTB TurnOrder.png

---

CTB Command3.png

Enemy: Change CTB Turn Order Icon
- Changes the icons used for the specific enemy(ies) on the CTB Turn Order.

  Enemy Index(es):
  - Select which enemy index(es) to affect.

  Icon:
  - Changes the graphic to this icon.

---

CTB Command4.png

Enemy: Change CTB Turn Order Face
- Changes the faces used for the specific enemy(ies) on the CTB Turn Order.

  Enemy Index(es):
  - Select which enemy index(es) to affect.

  Face Name:
  - This is the filename for the target face graphic.

  Face Index:
  - This is the index for the target face graphic.

---

CTB Command5.png

Enemy: Clear CTB Turn Order Graphic
- Clears the CTB Turn Order graphics for the enemy(ies).
- The settings will revert to the Plugin Parameter settings.

  Enemy Index(es):
  - Select which enemy index(es) to affect.

---

System Plugin Commands

---

CTB Command6.png

System: CTB Turn Order Visibility
- Determine the visibility of the CTB Turn Order Display.

  Visibility:
  - Changes the visibility of the CTB Turn Order Display.

---

Plugin Parameters

Mechanics Settings

CTB Preview1.png

CTB Params1.png

Mechanics settings used for Battle System CTB. The majority of these are JavaScript-based and will require knowledge of JavaScript to fully utilize the plugin parameters.

---

General

 Escape Fail Penalty:
 - Gauge penalty if an escape attempt fails.

---

JavaScript

 JS: Initial Speed:
 - JavaScript code to determine how much speed to give each battler at the
   start of battle.
 JS: Speed:
 - JavaScript code to determine how much speed a battler has.
 JS: Base Speed:
 - JavaScript code to determine how much base speed a battler has.
 JS: Relative Speed:
 - JavaScript code to determine what is the relative speed of a battler.
 JS: Acceleration:
 - JavaScript code to determine how much gauges accelerate by relative to
   reference time.
 JS: Cast Time:
 - JavaScript code to determine how much cast time is used for skills/items
   with negative speed modifiers.

---

Order Change Effects Settings

CTB Delay.gif

CTB Params2.png

Whenever the turn order a battler is changed by a CTB Order notetag, play these effects on the target battler. These effects do not play if the order was changed due to speed changes and only through the specific notetags.

---

Delay Turn Order > Animation

 Animation ID:
 - Play this animation when the effect activates.
 - Occurs when the turn order is delayed.
 Mirror Animation:
 - Mirror the effect animation?
 - Occurs when the turn order is delayed.
 Mute Animation:
 - Mute the effect animation?
 - Occurs when the turn order is delayed.

---

Delay Turn Order > Popups

 Text:
 - Text displayed upon the effect activating.
 - Occurs when the turn order is delayed.
 Text Color:
 - Use #rrggbb for custom colors or regular numbers for text colors from
   the Window Skin.
 Flash Color:
 - Adjust the popup's flash color.
 - Format: [red, green, blue, alpha]
 Flash Duration:
 - What is the frame duration of the flash effect?

---

Rush Turn Order > Animation

 Animation ID:
 - Play this animation when the effect activates.
 - Occurs when the turn order is rushed.
 Mirror Animation:
 - Mirror the effect animation?
 - Occurs when the turn order is rushed.
 Mute Animation:
 - Mute the effect animation?
 - Occurs when the turn order is rushed.

---

Rush Turn Order > Popups

 Text:
 - Text displayed upon the effect activating.
 - Occurs when the turn order is rushed.
 Text Color:
 - Use #rrggbb for custom colors or regular numbers for text colors from
   the Window Skin.
 Flash Color:
 - Adjust the popup's flash color.
 - Format: [red, green, blue, alpha]
 Flash Duration:
 - What is the frame duration of the flash effect?

---

Turn Order Display Settings

CTB TurnOrder.png

CTB Params3.png

Turn Order Display settings used for Battle System CTB. These adjust how the visible turn order appears in-game.

---

General

 Display Position:
 - Select where the Turn Order will appear on the screen.
 Reposition for Help?:
 - If the display position is at the top, reposition the display when the
   help window is open?
 Reposition Log?:
 - If the display position is at the top, reposition the Battle Log Window
   to be lower?
 Forward Direction:
 - Decide on the direction of the Turn Order.
 - Settings may vary depending on position.
 - Left to Right / Down to Up
 - Right to Left / Up to Down
 Subject Distance:
 - How far do you want the currently active battler to distance itself from
   the rest of the Turn Order?
 Screen Buffer:
 - What distance do you want the display to be away from the edge of the
   screen by?

---

Reposition For Help

 Repostion X By:
 Repostion Y By:
 - Reposition the display's coordinates by this much when the Help Window
   is visible.

---

Slots

 Total Horizontal:
 - How many slots do you want to display for top and bottom Turn Order
   Display positions?
 Total Vertical:
 - How many slots do you want to display for left and right Turn Order
   Display positions?
 Length:
 - How many pixels long should the slots be on the Turn Order display?
 Thin:
 - How many pixels thin should the slots be on the Turn Order display?
 Update Frames:
 - How many frames should it take for the slots to update their
   positions by?

---

Slot Border

 Show Border?:
 - Show borders for the slot sprites?
 Border Thickness:
 - How many pixels thick should the colored portion of the border be?
 Actors
 Enemies
   Border Color:
   - Use #rrggbb for custom colors or regular numbers for text colors
     from the Window Skin.
   Border Skin:
   - Optional. Place a skin on the actor/enemy borders instead of
     rendering them?

---

Slot Sprites

 Actors
   Sprite Type:
   - Select the type of sprite used for the actor graphic.
   - Face Graphic - Show the actor's face.
   - Icon - Show a specified icon.
   - Sideview Actor - Show the actor's sideview battler.
   Default Icon:
   - Which icon do you want to use for actors by default?
 Enemies
   Sprite Type:
   - Select the type of sprite used for the enemy graphic.
   - Face Graphic - Show a specified face graphic.
   - Icon - Show a specified icon.
   - Enemy - Show the enemy's graphic or sideview battler.
   Default Face Name:
   - Use this default face graphic if there is no specified face.
   Default Face Index:
   - Use this default face index if there is no specified index.
   Default Icon:
   - Which icon do you want to use for enemies by default?
   Match Hue?:
   - Match the hue for enemy battlers?
   - Does not apply if there's a sideview battler.

---

Slot Letter

 Show Enemy Letter?:
 - Show the enemy's letter on the slot sprite?
 Font Name:
 - The font name used for the text of the Letter.
 - Leave empty to use the default game's font.
 Font Size:
 - The font size used for the text of the Letter.

---

Slot Background

 Show Background?:
 - Show the background on the slot sprite?
 Actors
 Enemies
   Background Color 1:
   Background Color 2:
   - Use #rrggbb for custom colors or regular numbers for text colors
     from the Window Skin.
   Background Skin:
   - Optional. Use a skin for the actor background instead of
     rendering them?

---


Terms of Use

1. These plugins may be used in free or commercial games provided that they have been acquired through legitimate means at VisuStella.com and/or any other official approved VisuStella sources. Exceptions and special circumstances that may prohibit usage will be listed on VisuStella.com.

2. All of the listed coders found in the Credits section of this plugin must be given credit in your games or credited as a collective under the name: "VisuStella".

3. You may edit the source code to suit your needs, so long as you do not claim the source code belongs to you. VisuStella also does not take responsibility for the plugin if any changes have been made to the plugin's code, nor does VisuStella take responsibility for user-provided custom code used for custom control effects including advanced JavaScript notetags and/or plugin parameters that allow custom JavaScript code.

4. You may NOT redistribute these plugins nor take code from this plugin to use as your own. These plugins and their code are only to be downloaded from VisuStella.com and other official/approved VisuStella sources. A list of official/approved sources can also be found on VisuStella.com.

5. VisuStella is not responsible for problems found in your game due to unintended usage, incompatibility problems with plugins outside of the VisuStella MZ library, plugin versions that aren't up to date, nor responsible for the proper working of compatibility patches made by any third parties. VisuStella is not responsible for errors caused by any user-provided custom code used for custom control effects including advanced JavaScript notetags and/or plugin parameters that allow JavaScript code.

6. If a compatibility patch needs to be made through a third party that is unaffiliated with VisuStella that involves using code from the VisuStella MZ library, contact must be made with a member from VisuStella and have it approved. The patch would be placed on VisuStella.com as a free download to the public. Such patches cannot be sold for monetary gain, including commissions, crowdfunding, and/or donations.

7. If this VisuStella MZ plugin is a paid product, all project team members must purchase their own individual copies of the paid product if they are to use it. Usage includes working on related game mechanics, managing related code, and/or using related Plugin Commands and features. Redistribution of the plugin and/or its code to other members of the team is NOT allowed unless they own the plugin itself as that conflicts with Article 4.

8. Any extensions and/or addendums made to this plugin's Terms of Use can be found on VisuStella.com and must be followed.

Terms of Use: Japanese


『VisuStella MZ』利用規約

1. これらのプラグインは、VisuStella.comおよび/または公式に承認されたVisuStellaのソースから合法的な手段で入手したものである限り、フリーゲームや商用ゲームに使用することができます。例外的に使用が禁止される場合については、VisuStella.comの記載をご確認ください。

2. 本プラグインの「クレジット」部分に記載されているすべてのコーダーの名前は、ゲーム内にクレジット表記を行うか、もしくは「VisuStella」という名前の下にまとめて表記する必要があります。

3. ソースコードを自分のものだと主張しない限りは、必要に応じて編集することが可能です。ただしプラグインのコードに変更が加えられた場合、VisuStellaはそのプラグインに対して一切の責任を負いません。高度なJavaScriptのノートタグやJavaScriptコードを許可するプラグインのパラメータを含む、カスタムコントロールエフェクトに使用される、ユーザー提供のカスタムコードについても、VisuStellaは一切の責任を負いません。

4. これらのプラグインやプラグイン内のコードを、「自分のもの」として再配布したり使用したりすることはできません。これらのプラグインとそのコードは、VisuStella.comおよび、その他の公式/承認済みVisuStellaソースからのみダウンロードすることができます。公式/承認済みのソースのリストは、VisuStella.comでご確認いただけます。

5. VisuStellaは、意図しない使用方法による問題、VisuStella MZライブラリ以外のプラグインとの非互換性の問題、プラグインのバージョンが最新でないことによる問題、第三者による互換性パッチが適切に動作していないことなどが原因でゲーム内で発生した問題については、一切の責任を負いません。VisuStellaは、高度なJavaScriptのノートタグやJavaScriptコードを許可するプラグインのパラメータを含む、カスタムコントロールエフェクトに使用される、ユーザー提供のカスタムコードに起因するエラーについても、一切の責任を負いません。

6. VisuStella MZライブラリのコードを使用した互換性パッチをVisuStellaとは関係のない第三者を通じて作成する必要がある場合は、まずVisuStellaのメンバーと連絡を取り、承認を得る必要があります。パッチはVisuStella.comに公開され、誰でも無料でダウンロードすることができるようになります。このようなパッチを、制作発注やクラウドファンディングの対象にしたり、寄付などの金銭的な利益を得るために販売することはできません。

7. このVisuStella MZプラグインが商用製品である場合、プロジェクトチームのすべてのメンバーは、それを使用するため、それぞれ製品を購入しなければなりません。使用方法には、関連するゲームメカニクスの作業、関連するコードの管理、および/または関連するプラグインコマンドや機能の使用、が含まれます。プラグインそのものやそのコードをチームの他のメンバーに再配布することは第4項に抵触するため、そのメンバーがプラグインそのものを所有していない限りは許可されません。

8. このプラグインの利用規約の追加項目や補足については、VisuStella.comに掲載されていますので、それを参照し従ってください。

Credits

If you are using this plugin, credit the following people in your game:

Team VisuStella

Changelog

Version 1.00: October 19, 2020

  • Finished Plugin!

End of File