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
859
Reaction score
464
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
276
Reaction score
238
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

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
663
Reaction score
217
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
32,571
Reaction score
8,159
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
7
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,309
Reaction score
15,776
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
40
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
32,571
Reaction score
8,159
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
40
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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Man, nobody has created an MZ state animation plugin outside of VisuStella. That breaks my heart.
Finnuval wrote on Alador's profile.
Cute new avatar you got there ;)
Alberest so far, got a lot done but still ALOT left to do.
Wish I had a better means of taking screenshots...
Map is 148x98

concept: zombie slayer fest.

Lag because of outdated hardware.

Lots todo:
-Terrax lightning should have another step for the flashlight, between up down left right.
-Also Online mv from Nelderson should emit the flashlight from the other player.
-Animation needed for killing the zombie...
Before adding it to #crypchania.
Working on a case. Get all the evidence to prosecute some bad guys. :kaojoy:
But, the game development schedule delayed. :kaoswt2:
The moral of the story: No good deed goes unpunished... I guess...
Except that, nothing to see here. :kaoswt2:

Forum statistics

Threads
111,460
Messages
1,061,267
Members
144,833
Latest member
Keitaro122
Top