RPG Maker MV / MZ Script Call List

ferallag

Veteran
Veteran
Joined
Aug 5, 2020
Messages
53
Reaction score
5
First Language
english
Primarily Uses
RMMV
we need one for MZ now :elswt: shouldn't Rpg maker provide one with the engine?
how different MV JS from MZ JS?
 

henrypan321

Villager
Member
Joined
Jan 16, 2015
Messages
7
Reaction score
4
First Language
English
Primarily Uses
RMVXA
Hi, I noticed a small issue with the script calls for Show Animation and Show Balloon Icon, with the wait option (setWaitMode). Using script call currently in the list with the wait option will crash the game with the error: "TypeError: Cannot read property 'isAnimationPlaying' of null".

There needs to be an extra line with "this._character = character" with another modification, like so:

Show Animation
Code:
this._character = character;
this._character.requestAnimation(id);
this.setWaitMode('animation');

Show Balloon Icon
Code:
this._character = character;
this._character.requestBalloon(id);
this.setWaitMode('balloon');

where character in the first line is to be replaced with specific event (like $gamePlayer, already listed in the comment section).
 

akemiakia

Villager
Member
Joined
Sep 12, 2020
Messages
8
Reaction score
5
First Language
english
Primarily Uses
RMMV
Thank you for this goldmine of information!
 

JMsoup

New guy
Veteran
Joined
Apr 2, 2012
Messages
53
Reaction score
38
First Language
Chinese
Primarily Uses
Hi all,

Does anyone know the script call for the value of sp and ex parameters?
I'm using yanfly's battle ai and am trying to make priority conditions based on things such as evasion and damage rate.
 

dopan

Veteran
Veteran
Joined
Mar 27, 2020
Messages
861
Reaction score
465
First Language
German
Primarily Uses
RMMV
Hi all,

Does anyone know the script call for the value of sp and ex parameters?
I'm using yanfly's battle ai and am trying to make priority conditions based on things such as evasion and damage rate.
Im using "$gameActors.actor(1)" for this Example but that should work the same as using "$gameParty.leader()" or other character data.
("$gameActors.actor(1)" is only depending on actor ID(1) , "$gameParty.leader()" is only the Party Leader)

JavaScript:
$gameActors.actor(1).agi
// returns the agi_Value of Actor 1 in Numbers
that works with all stats from the following IMG:
Screenshot_1.png
JavaScript:
if ($gameActors.actor(1).agi == 22) {add Stuff Here};
// thats if actor 1 has agi_Value 22..
Example for "If Condition"..
 
Last edited:

ThreeSixNine

Veteran
Veteran
Joined
Jan 22, 2019
Messages
311
Reaction score
255
First Language
English
Primarily Uses
RMMV
we need one for MZ now :elswt: shouldn't Rpg maker provide one with the engine?
how different MV JS from MZ JS?
I'm guessing the reason that they don't is that they technically already do. It's all there in the code and the community has transcribed it before so we will probably do it again. Also, it could be considered motivation to start looking under the hood, so to speak, for some of us. I just got to the point recently where I wanted to change the players movement speed based on whether or not they were on the world map so I wrote a script for it. I realized that if I'm adding a script to every move event, I should be able to write a mini plugin that accomplishes this on its own. And with some help from an amazing member of this community, I was able to do it. If I hadn't started digging around in the js files, I never would have reached to this point.
 

JMsoup

New guy
Veteran
Joined
Apr 2, 2012
Messages
53
Reaction score
38
First Language
Chinese
Primarily Uses
Im using "$gameActors.actor(1)" for this Example but that should work the same as using "$gameParty.leader()" or other character data.
("$gameActors.actor(1)" is only depending on actor ID(1) , "$gameParty.leader()" is only the Party Leader)
Thanks for your reply! This works when I'm using it out of battle but not in the plugin I'm using.
(http://www.yanfly.moe/wiki/Battle_A.I._Core_(YEP)#Extension_Plugins)

I found a workaround though, so thanks for the help!
 

Vis_Mage

Wisp Charmer
Veteran
Joined
Jul 28, 2013
Messages
693
Reaction score
226
First Language
English
Primarily Uses
RMMV
Odd question, but is there a script call that can be used to change an events z axis? What I'm trying to achieve is have an event show up above a picture.
 

Arcmagik

Game Developer
Veteran
Joined
Sep 27, 2015
Messages
522
Reaction score
680
First Language
English
Primarily Uses
RMMV
Is there and if so, what is the script call to determine the regionID of an event?

I know there is a script call to get the player's regionID which I can put into a variable using
$gameVariables.setValue(50, $gamePlayer.regionId()) and it works... and there is a script call to get a specific tiles regionID that I can put into a variable using the same method, but there doesn't seem to be a script call listed to get an events regionID.

I tried to use the same method with $gameMap.regionId(x, y) but setting the x, y to call on the game variables like you can do in $gameMap.event(ID).setPosition(x, y) but it doesn't seem to work. It doesn't set the regionID the way the above two methods do. I know the variables are working because I am using them to set the position of a spawned event which is happening perfectly. So I can only assume that the variables can't be read inside $gameMap.regionId(x, y) for some reason.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,371
Reaction score
8,395
First Language
German
Primarily Uses
RMMV
Is there and if so, what is the script call to determine the regionID of an event?
I don't know if there is a direct function as a shortcut, but you can get that info the same way an event gets it without scripting.
Search for the script equivalent of "get location info", that event command let's you get the region ID of any given map position. Provide the map position by variable/event position and you get the region ID where the event is.
 

Arpy_G

JRPGs are life
Member
Joined
Mar 13, 2021
Messages
14
Reaction score
8
First Language
English
Primarily Uses
RMMZ
Hi! I know this is a 6 year old post, but if by chance you read this, would you know if these script commands transfer over to MZ as well? I am new to Javascript and RPG Maker, but I'm learning! Thank you for your time and consideration

UPDATE: Hi! I found your Plugin Creation tutorial for MZ with all the Script References in it = https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mz-plugin-creation-tutorial.128486/

Thank you so much, you must be one of the Gods of RPG Maker!
 
Last edited:

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,384
Reaction score
15,844
First Language
Filipino
Primarily Uses
RMMZ
I updated Show Choice command. I'm slowly updating this list and making them friendlier to use. It might take a while but there's a message spreadsheet that shows my work in progress.
 

yoluko

Veteran
Veteran
Joined
Mar 9, 2020
Messages
41
Reaction score
4
First Language
English
Primarily Uses
RMMV
I have an event that I want to copy onto multiple maps. I have a conditional branch which I want to check if the player has previously accessed the event on this screen. Easily done by checking to see if a variable matches the current map's ID, and then changing the variable to the current map ID afterwards.

My question is, so that I don't need to change the required map ID number every time I paste the event, what is the script call for calling the map ID?

Basically, what I want to do is essentially "If variable 1 = this map ID..." without having to manually write in numbers for the map ID.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
33,371
Reaction score
8,395
First Language
German
Primarily Uses
RMMV
@yoluko if this is in an event, you don't need a script call at all. control variable gets the map ID of the current map in the game data section.
just use a control variable command to get that into a new variable directly before comparing the two variables in the conditional branch
 

yoluko

Veteran
Veteran
Joined
Mar 9, 2020
Messages
41
Reaction score
4
First Language
English
Primarily Uses
RMMV
@yoluko if this is in an event, you don't need a script call at all. control variable gets the map ID of the current map in the game data section.
just use a control variable command to get that into a new variable directly before comparing the two variables in the conditional branch
Wow, my brain must be melting. I couldn't work out to use two variables both set to map ID. Thanks for the solution.
 

orphalese

Villager
Member
Joined
Jun 1, 2021
Messages
14
Reaction score
2
First Language
Spanish
Primarily Uses
RMMZ
YES I WAS LOOKING FOR THIS!
Thanks you so much Archeia!!
 

XAREN

Warper
Member
Joined
Jun 6, 2021
Messages
2
Reaction score
0
First Language
French
Primarily Uses
RMMV
Hi Hi

Question : on MV, I want to have the possibility of terraforming, I found the command line 153 "$ dataMap.data [(Z * $ dataMap.height + Y) * $ dataMap.width + X] = TILEID;" the problem is that if you open a menu or whatever, this modification disappears ...
how can we keep the terrain modifications made?

(message write with google translate because of my English level close to 0, sorry^^)
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,895
Reaction score
14,994
First Language
English
Primarily Uses
RMMV
@XAREN

use this.

 

XAREN

Warper
Member
Joined
Jun 6, 2021
Messages
2
Reaction score
0
First Language
French
Primarily Uses
RMMV
wow, thx Shaz, this is perfect :)
 

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
359
Reaction score
51
First Language
Spanish
Primarily Uses
RMMV
There's an error in the Show Balloon Icon section.
It says
character.requestBalloon(id);
this.setWaitMode('balloon');
but it's 'Balloon' with a capital B

Otherwise, you'll get an error
 

Latest Threads

Latest Profile Posts

Just a little close up shot...
w2xZocX.jpg
finally drew the last member of "team outcast" for my game. since my game has a lot fighting game elements in it, there's bosses in teams of three like King of Fighters.
What do you guys think about Survival mechanics in games (Hunger, thirst, etc.)?
Do you find them to be an enjoyable obstacle or a bit of a nuisance?

Asking for a friend... :stickytongue:
Run Script Calls & Play Unique Sound Effects With Each Skill & Item | RPG Maker News #113

Let's continue making our game in MZ! Touchfuzzy is... still eventing... though this time we may be working on eventing some tutorial stuff for our players!

Forum statistics

Threads
113,850
Messages
1,077,925
Members
147,929
Latest member
SevenFoes
Top