You are on page 1of 2

UPDATED: 6/24/2020

http://forums.rpgmakerweb.com/index.php?/topic/25759-script-call-collection-for-vxace/
- Added remove buff/debuff script call

Troops
Use one of the scripts call inside a conditional branch. This helps you avoid Force
Check if Enemies are Alive $gameTroop.aliveMembers().length > 0
Action Issues.
Use one of the scripts call inside a conditional branch. This helps you avoid Force
Check if Party Members are Alive $gameParty.aliveMembers().length > 0
Action Issues.
Check if an Enemy Unit is still Alive. $gameTroop.members()[ID].isDead() Replace ID with the enemy troop # you want. Remember it goes 0-7.
Check if an actor has x state $gameActors.actor(x).isStateAffected(x)
This check if alive party members have state #5
$gameTroop.aliveMembers().every(function(member) { return member.
Check if Alive Party Members have x state $gameTroop.aliveMembers().every(function(member) { return member.isStateAffected(stateID) })
isStateAffected(5) })

Remember that enemy ID starts at 0.

Param ID:
0 = MHP
1 = MMP
Remove Buff and Debuff $gameTroop.members()[ID].removeBuff(PARAM_ID_HERE); 2 = Atk
3 = DEF
4 = M.Atk
5 = M.def
6 = AGI
7 = LUK

var text = "Your text goes in there."


Insert Battle Log Text SceneManager._scene._logWindow.addText(text) You can use all normal text codes but have to use \\ instead of \.
SceneManager._scene._logWindow.clear();

UPDATED: December 26, 2018

Basic Variables
a The actor doing the current action.
b The target of said action.
v The damage formula equivalent of variables.

Tips and Tricks Link: https://forums.rpgmakerweb.com/index.php?threads/tips-and-tricks-tutorial-ver.97011/


Discussion Thread: https://forums.rpgmakerweb.com/index.php?threads/tips-and-tricks-tutorial-ver-discussion.97205/

Variable
Example Use:
[121, 122, 123, 124, 125, 126, 127].some(function(id){ return $gameVariables.
[variableid, variableid, variableid].some(function(id) { return $gameVariable.value(id) === value}){ value(id) === 1})
Check a range of variables if some of them has x value
This means that from Variables 121 - 127, it will check if one or more of them has
the value of 1.
Example Use:
[121, 122, 123, 124, 125, 126, 127].every(function(id){ return $gameVariables.
Check if a range of variables has x value [variableid, variableid, variableid].every(function(id) { return $gameVariable.value(id) === value}){ value(id) === 1})

This means that from Variables 121 - 127, it will check if they have the value of 1.

Map Events
Calculate Distance $gameVariables.setValue(VarID, ($gamePlayer.x - $gameMap.event(ID).x));
(Not Using Absolute) $gameVariables.setValue(VarID, ($gamePlayer.y - $gameMap.event(ID).y));
Flush Image Cache ImageManager.clear()
$gameVariables.setValue(17, $gamePlayer.characterName());
$gameVariables.setValue(18, $gamePlayer.characterIndex()); To restore image:
Make only the leader invisible
$gamePlayer.setImage($gameVariables.value(17), $gameVariables.value(18));
$gamePlayer.setImage('', index)
Player go slower, but not slower than 3 $gamePlayer._moveSpeed = Math.max(3, $gamePlayer._moveSpeed - 1);
Player go faster, but not faster than 5 $gamePlayer._moveSpeed = Math.min(5, $gamePlayer._moveSpeed + 1);

Utility
Forcibly Stop Messages SceneManager._scene._messageWindow.terminateMessage();
End Event Processing $gameMap._interpreter.command115(); You can theoretically replace command115 to other event commands seen in rpg_objects.js

Game_Character.ROUTE_END = 0; Script Call


In rpg_objects.js look for the following:
Game_Character.prototype.processMoveCommand = function(command) {

and look at the cases like moveStraight, etc.


var cMove = { code: Game_Character.ROUTE_MOVE_RANDOM, parameters: [] };
var cEnd = { code: Game_Character.ROUTE_END, parameters: [] };
Example:
var cList = [cMove, cEnd];
$gameMap.event(5).moveStraight(4);
var route = { list: cList, repeat: true, skippable: false, wait: false };
var eventId = 5;
$gameMap.event(id)._moveType = x;
$gameMap.event(eventId).forceMoveRoute(route);
0 = Fixed, 1 = Random, 2 = Approach

$gameMap.event(id)._trigger = x;
Game_Character.ROUTE_MOVE_DOWN = 1; 0 = Action, 1 = Player Touch, 2 = Event Touch, 3 = Autorun, 4 = Parallel
var cMove = { code: Game_Character.ROUTE_MOVE_RANDOM, parameters: [] };
var cEnd = { code: Game_Character.ROUTE_END, parameters: [] };
var cList = [cMove, cEnd];
var route = { list: cList, repeat: false, skippable: false };
this._character = youreventID;
this._character.forceMoveRoute(route);
Game_Character.ROUTE_MOVE_LEFT = 2; this.setWaitMode('route');
Game_Character.ROUTE_MOVE_RIGHT = 3;
Game_Character.ROUTE_MOVE_UP = 4;
Game_Character.ROUTE_MOVE_LOWER_L = 5;
Game_Character.ROUTE_MOVE_LOWER_R = 6;
Game_Character.ROUTE_MOVE_UPPER_L = 7;
Game_Character.ROUTE_MOVE_UPPER_R = 8;
Game_Character.ROUTE_MOVE_RANDOM = 9;
Game_Character.ROUTE_MOVE_TOWARD = 10;
Game_Character.ROUTE_MOVE_AWAY = 11;
Game_Character.ROUTE_MOVE_FORWARD = 12;
Game_Character.ROUTE_MOVE_BACKWARD = 13;
Game_Character.ROUTE_JUMP = 14;
Game_Character.ROUTE_WAIT = 15;
Game_Character.ROUTE_TURN_DOWN = 16;
Game_Character.ROUTE_TURN_LEFT = 17;
Game_Character.ROUTE_TURN_RIGHT = 18;
Game_Character.ROUTE_TURN_UP = 19;
Game_Character.ROUTE_TURN_90D_R = 20;
Game_Character.ROUTE_TURN_90D_L = 21;
Game_Character.ROUTE_TURN_180D = 22;
Game_Character.ROUTE_TURN_90D_R_L = 23;
Game_Character.ROUTE_TURN_RANDOM = 24;
Game_Character.ROUTE_TURN_TOWARD = 25;
Game_Character.ROUTE_TURN_AWAY = 26;
Game_Character.ROUTE_SWITCH_ON = 27;
Game_Character.ROUTE_SWITCH_OFF = 28;
Game_Character.ROUTE_CHANGE_SPEED = 29;
Game_Character.ROUTE_CHANGE_FREQ = 30;
Game_Character.ROUTE_WALK_ANIME_ON = 31;
Game_Character.ROUTE_WALK_ANIME_OFF = 32;
Game_Character.ROUTE_STEP_ANIME_ON = 33;
Game_Character.ROUTE_STEP_ANIME_OFF = 34;
Game_Character.ROUTE_DIR_FIX_ON = 35;
Game_Character.ROUTE_DIR_FIX_OFF = 36;
Game_Character.ROUTE_THROUGH_ON = 37;
Game_Character.ROUTE_THROUGH_OFF = 38;
Game_Character.ROUTE_TRANSPARENT_ON = 39;
Game_Character.ROUTE_TRANSPARENT_OFF = 40;
Game_Character.ROUTE_CHANGE_IMAGE = 41;
Game_Character.ROUTE_CHANGE_OPACITY = 42;
Game_Character.ROUTE_CHANGE_BLEND_MODE = 43;
Game_Character.ROUTE_PLAY_SE = 44;
Game_Character.ROUTE_SCRIPT = 45;

You might also like