// ATB Plugin for RPG Maker MV
// Version 1.0
// Author: Your Name
/*:
* @plugindesc This plugin adds the ability to use an ATB system in your game.
* @author Your Name
*
* @param ATB Gauge Max
* @desc The maximum amount of ATB gauge.
* @default 100
*
* @param Default ATB Speed
* @desc The default ATB speed for all battlers.
* @default 10
*
* @param Battle System
* @desc The battle system to use (Default, Active, Semi-Active).
* @default Default
*
* @help
* This is a plugin that adds an ATB system to your game.
* To use it, just enable it in the plugin manager and set the parameters
* to your desired values.
*
* The ATB System works differently depending on the battle system chosen.
*
* Default Battle System:
* The ATB gauge will fill up for all battlers at the same rate. Once
* a battler's ATB gauge is full, they can choose an action.
*
* Active Battle System:
* The ATB gauge will fill up for all battlers at their own speed.
*
* Semi-Active Battle System:
* The ATB gauge will fill up for all battlers at their own speed.
* However, certain skills or items may have a longer cooldown than
* usual, which will affect the ATB gauge's rate of filling.
*
* If you have any questions or issues, feel free to contact me!
*/
(function() {
//-----------------------------------------------------------------------------
// Parameters
//
// These parameters can be adjusted to change how the ATB system works.
var parameters = PluginManager.parameters('ATB');
var ATB_Gauge_Max = Number(parameters['ATB Gauge Max'] || 100);
var Default_ATB_Speed = Number(parameters['Default ATB Speed'] || 10);
var Battle_System = String(parameters['Battle System'] || 'Default');
//-----------------------------------------------------------------------------
// DataManager
//
// DataManager handles the storage of data.
DataManager.createATBData = function() {
this._atbData = [];
};
DataManager.saveATBData = function() {
$dataATB = {};
for (var i = 0; i < $gameParty.members().length; i++) {
var actor = $gameParty.members()[i];
$dataATB[actor._actorId] = [actor._atbGauge, actor._atbSpeed];
}
};
DataManager.loadATBData = function() {
if ($dataATB === undefined) return;
for (var i = 0; i < $gameParty.members().length; i++) {
var actor = $gameParty.members()[i];
if ($dataATB[actor._actorId]) {
actor._atbGauge = $dataATB[actor._actorId][0];
actor._atbSpeed = $dataATB[actor._actorId][1];
} else {
actor._atbGauge = 0;
actor._atbSpeed = Default_ATB_Speed;
}
}
};
//-----------------------------------------------------------------------------
// Game_Actor
//
// Game_Actor handles all the actor-specific functions.
Game_Actor.prototype.initATBData = function() {
this._atbGauge = 0;
this._atbSpeed = Default_ATB_Speed;
};
//-----------------------------------------------------------------------------
// Game_Battler
//
// Game_Battler handles all the battler-related functions.
Game_Battler.prototype.initATBData = function() {
this._atbGauge = 0;
this._atbSpeed = Default_ATB_Speed;
};
//-----------------------------------------------------------------------------
// Game_Interpreter
//
// Game_Interpreter handles all the interpreter-related functions.
Game_Interpreter.prototype.setATBGauge = function(target, value) {
var actor = $gameActors.actor(target);
if (actor) {
actor._atbGauge = value;
}
};
Game_Interpreter.prototype.setATBSpeed = function(target, value) {
var actor = $gameActors.actor(target);
if (actor) {
actor._atbSpeed = value
2 years ago
Next up
This Book is not going to bite her, i sure it will not.
Never noticed that i (7162 Followers) got more Followers than @LUKELCS (5210 Followers).
Happy #WIPWednesday!
Are you working on a game?
Making some art?
Practicing a song?
Something else?
Tell us in the comments!
Loka Zonzini began to read this Forbidden Fruit of a Book.
Happy #WIPWednesday!
Are you working on a game?
Making some art?
Practicing a song?
Something else?
Tell us in the comments!
Introducting to you "The Nihilist Cookbook".
Happy #WIPWednesday! Are you working on a game? Making some art? Practicing a song? Something else? Tell us in the comments!
Loka's Bedroom, at least, for now.
28 comments