ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
UPDATED: October 3, 2017
(Added a new section, Set Player Location.
Sometimes Transfer Player causes FPS Drop if teleported on the same map.)
VXA Version: https://docs.google.com/spreadsheets/d/1SPWPqSZ3I_LgilZse2I2sDPq-QyNQphb4T3i5aWMQic/edit?usp=drive_web&ouid=112741546968112756440
http://forums.rpgmakerweb.com/index.php?/topic/25759-script-call-collection-for-vxace/
http://forums.rpgmakerweb.com/index.php?/topic/46456-rpg-maker-mv-script-call-list/&page=1
CTRL+ ENTER or ALT+ ENTER for new lines
2
Event Page 1
3
Message
4
Show Text$gameMessage.setFaceImage('Actor1',0)
$gameMessage.setBackground(1)
$gameMessage.setPositionType(1)
$gameMessage.add("Show Text Script Call")
5
Show Choiceschoices = []; params = [];
$gameMessage.setChoices(choices, 0)
choices.push("I love you1");choices.push("I love you2");
choices.push("I love you3");choices.push("I love you4");
choices.push("I love you5");choices.push("I love you6");
choices.push("I love you7");choices.push("I love you8");
params.push()
6
Input Number$gameMessage.setNumberInput(var, digits);
7
Select Key Item$gameMessage.setItemChoice(var, n);n = 1 for regular items, 2 for key items, 3 for Hidden A, 4 for Hidden B
8
Show Scrolling Text$gameMessage.setScroll(scrolling_speed, no_fast_forward);
$gameMessage.add("Text");
scrolling speed should be a number e.g. 2, fast_forward should be true or false
you need this line for each line of text individually
9
10
Party
11
Change Gold$gameParty.gainGold(n);
12
Change Items$gameParty.gainItem($dataItems[itemId], n);
13
Change Weapons$gameParty.gainItem($dataWeapons[weaponId], n, true/false *note);*note if decreasing, true will mean it will include already equipped weapons.
14
Change Armor$gameParty.gainItem($dataArmorsweaponId], n, true/false *note);*note if decreasing, true will mean it will include already equipped armors.
15
Change Party Member$gameParty.addActor(n);
$gameParty.removeActor(n);
To initialize: $gameActors.actor(actorId).setup(actorId);
16
17
Game Progression
18
Control Switches$gameSwitches.setValue(num, true/false);
19
Control Variables$gameVariables.setValue(var, value);
20
Control Self Switch$gameSelfSwitches.setValue(key, true/false);key = [mapId, eventId, A-D]
var key = [66, 5, 'A'];
$gameSelfSwitches.setValue(key, true);
21
Control Timer$gameTimer.start(time); $gameTimer.stop();
22
23
Flow Control
24
Conditional Branchif (code) { stuff } else { stuff }
25
Loopwhile (;;) { stuff }
26
Break Loopbreak;
27
Exit Event Processing$gameInterpreter._index = $gameInterpreter._list.length;
28
Common Event$gameTemp.reserveCommonEvent(n);
29
Label
30
Jump to Label
31
Comment/*
32
33
Actor
34
Change HP$gameActors.actor(actorId).gainHp(n)Also allow using party member index: $gameParty.members()[index].gainHp(n)
35
Change MP$gameActors.actor(actorId).gainMp(n)Also allow using party member index: $gameParty.members()[index].gainMp(n)
36
Change TP$gameActors.actor(actorId).gainTp(n)Also allow using party member index: $gameParty.members()[index].gainTp(n)
37
Change State$gameActors.actor(actorId).addState(n);
$gameActors.actor(actorId).removeState(n);
Also allow using party member index: $gameParty.members()[index].addState(n);
38
Recover Allfor (var j = 0; j < $gameActors.length; j++) {
$gameActors.actor(j).recoverAll();
};
39
Change EXP$gameActors.actor(actorId).gainExp(n);Negative n if you want the actor to lose Exp.
40
Change Level$gameActors.actor(actorId).changeLevel(n, true/false);n = level the actor will become. true/false to show level up.
41
Change Parameters$gameActors.actor(actorId).addParam(paramId, n);
Negative n if you wish the actor to lose stats. Params: 0-MaxHP, 1-MaxMP, 2-ATK, 3-DEF, 4-MAT, 5-MDEF, 6-AGI, 7-LUK
42
Change Skill$gameActors.actor(actorId).learnSkill(n);
$gameActors.actor(actorId).forgetSkill(n);
43
Change Equipment$gameActors.actor(actorId).changeEquip(slotId, item);item = $dataWeapons[n] or $dataArmors[n]
44
Change Name$gameActors.actor(actorId).setName(n)
45
Change Class$gameActors.actor(actorId).changeClass(n, keepExp)keepExp is either true or false
46
Change Nickname$gameActors.actor(actorId).setNickname(n)
47
Change Profile$gameActors.actor(actorId).setProfile(n)
48
49
Event Page 2
50
Movement
51
Transfer Player$gamePlayer.reserveTransfer(mapId, x, y, direction, fade type);direction = look at NumPad fade type = 0-Black, 1-White, 2-None
52
Set Vehicle Location$gameMap.vehicle(vehicleId).setLocation(mapId, x, y);
53
Set Event Location$gameMap.event(eventID).setPosition(x, y)
54
Set Player Location$gamePlayer.locate(x, y);
55
Scroll Map$gameMap.startScroll(direction, distance, speed);direction = look at NumPad
56
Set Movement Route
57
Get ON/OFF Vehicle$gamePlayer.getOnOffVehicle();
58
59
Timing
60
Wait$gameInterpreter.wait(frames);
61
62
Character
63
Change Transparency$gamePlayer.setTransparent(flag)
64
Change Player Followers$gamePlayer.showFollowers(); $gamePlayer.hideFollowers();Might need $gamePlayer.refresh();
65
Gather Followers$gamePlayer.gatherFollowers(); this.setWaitMode('gather');
66
Show Animationcharacter.requestAnimation(id); this.setWaitMode('animation');Replace character with one of these: $gamePlayer; $gameMap.event(ID);
67
Show Balloon Iconcharacter.requestBalloon(id); this.setWaitMode('balloon');Replace character with one of these: $gamePlayer; $gameMap.event(ID);
For example: $gameMap.event(6).requestBalloon(3); this.setWaitMode('balloon');
68
Erase Event$gameMap.eraseEvent(this._eventId);
69
70
Screen
71
Fadeout Screen$gameScreen.startFadeOut(fade_speed);Default is 24
72
FadeIn Screen$gameScreen.startFadeIn(fade_speed);might want to call wait to go with it, by default the event command does
73
Tint Screen$gameScreen.startTint([red,green,blue,grey], duration);red,green,blue between -255 to 255, grey between 0 and 255, if you want wait for completion call the following $gameInterpreter.wait(duration);
74
Flash Screen$gameScreen.startFlash([red, green, blue, intensity], duration);All between 0 and 255, if you want wait for completion call the following $gameInterpreter.wait(duration);
75
Shake Screen$gameScreen.startShake(power, speed, duration);If you want wait for completion call the following $gameInterpreter.wait(duration);
76
Set Weather Effect$gameScreen.changeWeather("weather", power, duration);Weather = "none","rain","storm","snow". If you want wait for completion call the following $gameInterpreter.wait(duration);
77
78
Picture
79
Show Picture$gameScreen.showPicture(pictureId, name, origin, x, y,
scaleX, scaleY, opacity, blendMode)
80
Move Picture$gameScreen.movePicture(pictureId, origin, x, y, scaleX,
scaleY, opacity, blendMode, duration)
81
Picture Blend Mode$gameScreen._pictures[id]._blendMode = #
82
Rotate Picture$gameScreen.rotatePicture(pictureId, speed);
83
Tint Picture$gameScreen.tintPicture(pictureId, tone, duration);
84
Erase Picture$gameScreen.erasePicture(pictureId);
85
Audio & Video
86
Sound Object: { name: filename, volume: n, pitch: n, pan: n }
87
Play BGMAudioManager.playBgm( refer to sound object above );
88
Fadeout BGMAudioManager.fadeOutBgm(n);
89
Save BGM$gameSystem.saveBgm();
90
Replay BGM$gameSystem.replayBgm();
91
Play BGSAudioManager.playBgs( refer to sound object above );
92
Fadeout BGSAudioManager.fadeOutBgs(n);
93
Play MEAudioManager.playMe( refer to sound object above );
94
Play SEAudioManager.playSe( refer to sound object above );
95
Stop SEAudioManager.stopSe();
96
Play MovieGraphics.playVideo(path/name.ext);
97
98
Event Page 3
99
Scene Control
100
Battle ProcessingBattleManager.setup(troopId, true/false, true/false);
$gamePlayer.makeEncounterCount();
SceneManager.push(Scene_Battle);
First true/false is for allowing to Escape, 2nd true/false is for allowing the player to lose
101
Shop ProcessingSceneManager.push(Scene_Shop);
102
Name Input ProcessingSceneManager.push(Scene_Name);
SceneManager.prepareNextScene(actorId, name length);
103
Open Menu ScreenSceneManager.push(Scene_Menu);
104
Open Save ScreenSceneManager.push(Scene_Save);If you want to check if your game has any savefiles at all:
DataManager.isAnySavefileExists()

Useful for custom title screens that are evented.
105
Open Load ScreenSceneManager.push(Scene_Load);
106
Game OverSceneManager.goto(Scene_Gameover);
107
Return to Title ScreenSceneManager.goto(Scene_Title);
108
Call Event$gameMap.event(EventID, EventPage).start();You can either use it as the following:
$gameMap.event(8).start();

For a specific page:
$gameMap.event(8,3).start();
109
Map
110
Change Map Name Display$gameMap.enableNameDisplay();
$gameMap.disableNameDisplay();
111
Change Tileset$gameMap.changeTileset(n);
112
Change Battleback$gameMap.changeBattleback(filename, filename);
113
Change Parallax$gameMap.changeParallax(name, loopX, loopY, speed x, speed y);
114
Get Location Info$gameMap.terrainTag(x, y);
$gameMap.eventIdXy(x, y);
$gameMap.tileId(x, y, layer);
115
Get Region for Player and Events$gamePlayer.regionId()
$gameMap.regionId(x, y);
Set x and y to the x, y of the player/event
116
117
System Settings
118
Change Battle BGM$gameSystem.setBattleBgm(name);
119
Change Victory ME$gameSystem.setVictoryMe(name);
120
Change Defeat ME$gameSystem.setDefeatMe(name);
121
Change Vehicle BGM$gameMap.vehicle(vehicleId).setBgm(name);
122
Change Save Access$gameSystem.disableSave();
$gameSystem.enableSave();
123
Change Menu Access$gameSystem.disableMenu();
$gameSystem.enableMenu();
124
Change Encounter$gameSystem.disableEncounter();
$gameSystem.enableEncounter();
125
Change Formation Access$gameSystem.disableFormation();
$gameSystem.enableFormation();
126
Change Window Color$gameSystem.setWindowTone(tone); (red, green, blue, gray);
127
Change Actor Images$gameActors.actor(actorId).setCharacterImage(name, index);
$gameActors.actor(actorId).setFaceImage(name, index):
$gameActors.actor(actorId).setBattlerImage(name);
Might need $gamePlayer.refresh();
128
Change Vehicle Image$gameMap.vehicle(vehicleId).setImage(name, index);
129
130
Battle
131
Change Enemy HP$gameTroop.members()[enemyIndex].gainHp(n);Use negative n if you want the enemy to lose HP.
132
Change Enemy MP$gameTroop.members()[enemyIndex].gainMp(n);Use negative n if you want the enemy to lose MP.
133
Change Enemy TP$gameTroop.members()[enemyIndex].gainTp(n);Use negative n if you want the enemy to lose TP.
134
Change Enemy State
$gameTroop.members()[enemyIndex].addState(n);
$gameTroop.members()[enemyIndex].removeState(n);
135
Enemy Recover All$gameTroop.members()[enemyIndex].recoverAll();
136
Enemy Appear$gameTroop.members()[enemyIndex].appear();
137
Enemy Transform$gameTroop.members()[enemyIndex].transform(n);n is the enemy ID you want the enemy to transform into.
138
Show Battle Animation$gameTroop.members()[enemyIndex].startAnimation(animationId, true/false, delayN);true/false is for mirror. delayN is for the frames to delay the animation.
139
Force Action$gameParty.members()[index].forceAction(skillId, targetIndex);
BattleManager.forceAction($gameParty.members()[index]);

$gameTroop.members()[index].forceAction(skillId, targetIndex);
BattleManager.forceAction($gameTroop.members()[index]);
140
Abort BattleBattleManager.abort();
141
142
Advanced
143
Plugin Command
It would be cool if we could teach people about params/notetags here.
var aliasPluginCommand = Game_Interpreter.prototype.pluginCommand;

Game_Interpreter.prototype.pluginCommand = function(command, args) {
aliasPluginCommand.call(this, command, args);
if (command === 'plugincommandtextname') {
dostuff(args);
}
};
144
145
Actor Stats
146
HP$gameActors.actor(actorId).hp
147
MaxHP$gameActors.actor(actorId).mhp
148
MP$gameActors.actor(actorId).mp
149
MaxMP$gameActors.actor(actorId).mmp
150
ATK$gameActors.actor(actorId).param[2]
151
DEF$gameActors.actor(actorId).param[3]
152
MAT$gameActors.actor(actorId).param[4]
153
MDF$gameActors.actor(actorId).param[5]
154
AGI$gameActors.actor(actorId).param[6]
155
LUK$gameActors.actor(actorId).param[7]
156
157
# Check for Name/ID of Player Equipment
# ----------------------------------------------
$game_actors[X].equips[Y].id unless $game_actors[X].equips[Y] == nil
# Returns the ID of the equipment on actor X, equipped in slot Y

$game_actors[X].equips[Y].name unless $game_actors[X].equips[Y] == nil
# Returns the name of the equipment on actor X equipped in slot Y

# NOTE: If using any scripts that give or take equipment slots, the #Y is the number of the character's slot
# not the slot's number in the script. I.E. using Yanfly Equip Menu script - if your character has equipment
# slots 6,7,8,15,15,32,75 available then $game_actors[1].equips[0].id would return the ID of the
# item equipped in the slot defined as slot 6 in Yanfly script because it's the 1st equipment slot for the
# specific character.
if ($gameActors.actor(actorId).equips()[n]) {
return $gameActors.actor(actorId).equips()[n].id;
};

if ($gameActors.actor(actorId).equips()[n]) {
return $gameActors.actor(actorId).equips()[n].name;
};
158
159
# Checking Actors
# ----------------------------------------------
$game_actors[X].name # Returns the name of the actor X
$game_actors[X].nickname # Returns the nickname of the actor X
$game_actors[X].class.id # Returns the ID of the actor X class
$game_actors[X].class.name # Returns the name of the actor X class
$gameActors.actor(actorId).name()
$gameActors.actor(actorId).nickname()
$gameActors.actor(actorId).currentClass().id
$gameActors.actor(actorId).currentClass().name
160
161
# Screen Clean Up
# ----------------------------------------------
# Clear Fade
# Clear Tone
# Clear Flash
# Clear Shake
# Clear Weather
# Clear Pictures
$game_map.screen.clear

# Clear Tone (Immediate)
$game_map.screen.clear_tone

# Clear Shake (Immediate)
$game_map.screen.clear_shake

# Clear Weather (Immediate)
$game_map.screen.clear_weather

# Clear Pictures (Immediate)
$game_map.screen.clear_pictures
$gameScreen.clear();

$gameScreen.clearTone();

$gameScreen.clearFlash();

$gameScreen.clearShake();

$gameScreen.clearWeather();

$gameScreen.clearPictures();
162
163
Input.trigger?(:A)
Input.repeat?(:A)
Input.press?(:A)
# Change A to your desired key, refer to F1 when you testplay and see the keys.

Please Include Touch Input and such.
(Input.isTriggered('ok'))
(Input.isRepeated(ok'))
(Input.isPressed('ok'))
(Input.isLongPressed('ok'))

(TouchInput.isTriggered())
(TouchInput.isRepeated())
(TouchInput.isPressed())
(TouchInput.isLongPressed())
(TouchInput.isCancelled())
(TouchInput.isMoved())
(TouchInput.isReleased())
164
165
Movement Commands
$game_player.moving?
$game_player.dash?
$game_player.jumping?
$game_map.events[event_id].moving?
$game_map.events[event_id].jumping?

$game_map.passable?(X, Y, D)
$game_player.passable?(x, y, d)
$game_map.events[event_id].passable?(x, y, d)

# $game_map.passable? only tells you whether you can leave one tile in the direction of the other.
# The player and event versions take it further and tell you if you can leave that tile in the
# direction of the other AND if you can enter the other tile from the tile you're on now (for example,
# if you are facing right and the tile in front of you is the edge of a cliff that is higher than you -
# $game_map.passable? would tell you that you CAN step right from the current tile.
# But $game_player.passable? would tell you that you could not move onto the next tile from the left).
# It also looks to see if there is an event on your target tile which would stop you going there,
# but $game_map.passable? would not tell you that.

# Q: I want to check the position of Player and compare with the position at side of Events.
# ----------------------------------------------
# Variable [6] = Position X Player
# Variable [7] = Position Y Player
# Variable [8] = Position X Event
# Variable [9] = Position Y Event

# If you only want them to be beside the event (positions 1 or 3), use this:
$game_variables[7] == $game_variables[9] and ($game_variables[6] - $game_variables[8]).abs == 1
# which says if the y value is the same and there is a difference of 1 between the x values.
# Note: abs = absolute value

# If you want them to be on any of the 4 numbered tiles, use this:
($game_variables[6] - $game_variables[8]).abs + ($game_variables[7] - $game_variables[9]).abs == 1
# which says there is a difference of 1 between the x values OR a difference of 1 between the y values
# It is comparing the difference between the x position of the player and the tile of interest.
# Using abs lets me take one away from the other in any order and still end up with a positive number -
# it doesn't matter which has the # higher or lower x value. Then it does the same with the y position of
# the player and the tile of interest. Then it adds them together (+ means plus, not and).
# So if the sum of the x distance and the y distance between the two tiles is 1, it means the player is on
# a tile that is directly touching the tile of interest (and not corner-ways, as then the sum of the numbers would be 2)

# ----------------------------------------------
# Follower Move Route Option
# ----------------------------------------------
$game_player.followers[n].force_move_route(move_route)
# For Followers (0 for first after actor, 1 for second after actor, etc.)
$gamePlayer.isMoving()
$gamePlayer.isDashing()
$gamePlayer.isJumping()

$gameMap.events()[eventId].isMoving()
$gameMap.events()[eventId].isJumping()

$gameMap.isPassable(x, y, direction)

$gameVariables.setVariable(6, $gamePlayer.x)
$gameVariables.setVariable(7, $gamePlayer.y)
$gameVariables.setVariable(8, $gameMap.events()[n].x)
$gameVariables.setVariable(9, $gameMap.events()[n].y)

166
167
# Change an actor's equipment.
# ----------------------------------------------
$game_actors[1].change_equip(n,$data_weapons[1])
# Change n with one of the following:
# 0 = weapon, 1 = shield, 2 = headgear, 3 = body-gear (armor), 4 = accessory
168
169
# Check Conditional Branch: if [Actor] has [Weapon] Equipped
# ----------------------------------------------
$game_actors[actor id].weapons.include?($data_weapons[weapon id])
right_hand = $game_actors[actor_id].equips[0]
left_hand = $game_actors[actor_id].equips[1]

# To get the items. Replace the index in equips for the item you're looking for:
# 0 = right hand, 1 = left hand, 2 = head, 3 = body, 4 = accessory
# provided you're not using any scripts that change that. You can check their types with:

if right_hand.is_a?(RPG::Weapon)
# do something
elsif right_hand.is_a?(RPG::Armor)
# do something else
end

# Or get their properties with with:
right_hand.id
right_hand.name
right_hand.icon_index
right_hand.description
# etc..

# Example: if you want to check if you have a Prinny Gun equipped on your first weapon slot:
right_hand = $game_actors[actor_id].equips[0]
if !right_hand.nil? && right_hand.name.eql?("Prinny Gun")
# Do something
end

# You don't even need to keep track of the IDs, really (unless you want to, for some reason).
# If there's no way to not have a weapon equipped in your game, you can also take out the ".nil?" check.
$gameActors.actor(actor_id).equips()[slot_id] == null;
*change null to id
170
171
# Currency unit set from the system tab:
# ----------------------------------------------
$data_system.currency_unit
172
173
# Move Events and players by fractional squares
# ----------------------------------------------
$game_map.events[ID].moveto(x, y)
$game_player.moveto(x, y)

# Example of fractional squares
$game_map.events[1].moveto(0, 5.5)
$game_player.moveto(7.5, 3)
end
# The Collission box is still seen as 32x32
174
175
# Script Call Battle Logs!
# ----------------------------------------------
# First add this scriptlet:
class Scene_Battle < Scene_Base
attr_accessor:log_window
end

# To load your own battle logs
SceneManager.scene.log_window.add_text("Insert custom text here")
# It doesn't clear out and just stays there until something else replaces it.
SceneManager.scene.log_window.wait
# If you want it to clear make sure to use this.
SceneManager.scene.log_window.wait_and_clear

# You can also do something like this!
x = "Hi."
x += " Hello."
x += " This is getting long eh?"
x += " Surely so long. wahahahahahaha"
SceneManager.scene.log_window.add_text(x)

# or:
y = SceneManager.scene.log_window
y.add_text(text)
176
177
# ----------------------------------------------
# Follower Move Route Option
# ----------------------------------------------
$game_player.followers[n].force_move_route(move_route)
# For Followers (0 for first after actor, 1 for second after actor, etc.)
178
179
$game_player.center($game_player.x, $game_player.y)
You can set an event or the player to be in the center of the screen. It snaps but it's pretty good :D!
$gamePlayer.center($gamePlayer.x, $gamePlayer.y)
180
DataManager.save_game(0)SceneManager.goto(Scene_Map)$gameSystem.onBeforeSave();
DataManager.saveGame(id);
SceneManager.goto(Scene_Map);
181
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 0
SceneManager._scene.addChild(new Window_Gold(x, y));