RPG Maker MV / MZ Script Call List

● ARCHIVED · READ-ONLY
Started by Archeia 569 posts Page 19 of 29 View original ↗
  1. we need one for MZ now :elswt: shouldn't Rpg maker provide one with the engine?
    how different MV JS from MZ JS?
  2. 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).
  3. Thank you for this goldmine of information!
  4. 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.
  5. JMsoup said:
    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"..
  6. ferallag said:
    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.
  7. Dopan said:
    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!
  8. 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.
  9. 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.
  10. Arcmagik said:
    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.
  11. 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!
  12. 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.
  13. 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.
  14. @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
  15. Andar said:
    @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.
  16. YES I WAS LOOKING FOR THIS!
    Thanks you so much Archeia!!
  17. 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^^)
  18. wow, thx Shaz, this is perfect :)
  19. 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