RPG Maker MV Script Call List

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,078
Reaction score
2,654
First Language
Greek
Primarily Uses
RMMZ
It would be nice to have some help here.
I am not sure about the syntax of these commands.

  • $gameScreen.movePicture(pictureId, origin, x, y, scaleX, scaleY, opacity, blendMode, duration)
  • Sound Object: { name: filename, volume: n, pitch: n, pan: n }
  • AudioManager.playBgm( refer to sound object above );
  • AudioManager.fadeOutBgm(n);

  1. It would be nice to know what values these parameters can take.
  2. It would also be nice to see a few examples, so we can understand how to use them.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,682
Reaction score
1,095
First Language
Portuguese - Br
Primarily Uses
RMMZ
  • $gameScreen.movePicture(
    pictureId, = Any number between 1 and 100. It's the picture Id.
    origin, = 0 for top left, and 1 for center.
    x, = the x coordinate that you want to show on the screen
    y, = the y coordinate that you want to show on screen.
    scaleX, = 100 it's the normal scale. You can adjust for less or more.
    scaleY, = 100 it's the normal scale. You can adjust for less or more.
    opacity, = from 0 to 255. Higher the number, higher the opacity.
    blendMode, 0(normal), 1(additive), 2(multiply), 3(screen)
    duration = A time in frames.
    )
  • let myBgm = {
    name: filename(must be a string "myTown". Don't write the extension),
    volume: 0 to 100(I presume),
    pitch: 50 to 150(default is 100),
    pan: -100 to 100(default is 0)
    }
  • AudioManager.playBgm(myBgm );
  • AudioManager.fadeOutBgm(Put here the time in frames(or seconds) that will take for the bgm to fade);
 

ozubon

surströmming?
Veteran
Joined
Oct 16, 2018
Messages
178
Reaction score
168
First Language
English
Primarily Uses
RMMV
@Eliaquim Interestingly, using the script call, the pitch range goes from 0 to infinity, you can get some really low, slow drones from a short sound file.
 

HeadHunterX

Warper
Member
Joined
May 19, 2013
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Thank you! This has been really handy for me!
 

yoluko

Villager
Member
Joined
Mar 9, 2020
Messages
17
Reaction score
2
First Language
English
Primarily Uses
RMMV
What's a script call to check if the party has a weapon in their inventory? I can find calls on the list to give them weapons and items, but not simply to check for possession.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,923
Reaction score
533
First Language
English
Primarily Uses
N/A
What's a script call to check if the party has a weapon in their inventory? I can find calls on the list to give them weapons and items, but not simply to check for possession.
Weapon check.png
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
That's not a script call. The script call that that event command calls is this:

JavaScript:
$gameParty.hasItem($dataWeapons[this._params[1]], this._params[2])
So if you want to check weapon 4:

JavaScript:
$gameParty.hasItem($dataWeapons[4], true)
Change true to false if you don't want to include equipped weapons.
 

yoluko

Villager
Member
Joined
Mar 9, 2020
Messages
17
Reaction score
2
First Language
English
Primarily Uses
RMMV
That's not a script call. The script call that that event command calls is this:

JavaScript:
$gameParty.hasItem($dataWeapons[this._params[1]], this._params[2])
So if you want to check weapon 4:

JavaScript:
$gameParty.hasItem($dataWeapons[4], true)
Change true to false if you don't want to include equipped weapons.
Thanks!
 

Dangime

Villager
Member
Joined
Aug 31, 2014
Messages
23
Reaction score
2
First Language
English
Primarily Uses
$gameParty.addActor(n);
$gameParty.removeActor(n);

Am I able to use a variable rather than straight actorID where n is for these commands? How would I format that?
 

Piyan Glupak

Veteran
Veteran
Joined
Nov 14, 2016
Messages
68
Reaction score
39
First Language
English
I would try:

$gameParty.addActor($gameVariables.value(19));

That example uses variable 19 to hold the value of the actor id. You can use any variable that you want, of course.

edit: Things like that are one of the main advantages of using scripts instead of sticking to the editor commands, in my opinion.
 

Dangime

Villager
Member
Joined
Aug 31, 2014
Messages
23
Reaction score
2
First Language
English
Primarily Uses
I would try:

$gameParty.addActor($gameVariables.value(19));

That example uses variable 19 to hold the value of the actor id. You can use any variable that you want, of course.

edit: Things like that are one of the main advantages of using scripts instead of sticking to the editor commands, in my opinion.
Seems to work. Thank you.
 

agsteiner

Warper
Member
Joined
Jul 21, 2020
Messages
3
Reaction score
11
First Language
German
Primarily Uses
RMMZ
Just wanted to say a quick (huge) thanks for this great list and the thread. I'm a rmmv newbie but developing software for decades, and just had my first "hello world" script running in an event. Wow! That opens up a lot of possibilities!
 

Dagothe

Warper
Member
Joined
Jul 25, 2020
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
This list is wonderful and helped me along real well. I managed to fix all the errors I had going from VX to MV in this script. Although this list doesn't mention _targetActorId, _classId or currentExp(), it does have the learn all, or forget all skills script which I had no clue how to fix.


x = $gameParty._targetActorId
c = $gameActors.actor(x)._classId

if (c !== 3) {

$gameVariables.setValue(1, $gameActors.actor(x).currentExp())

$dataSkills.forEach(function(skill){ if(skill) $gameActors.actor(x).forgetSkill(skill.id);});

$gameActors.actor(x).changeClass(3, false)

$gameActors.actor(x).learnSkill(9)

$gameActors.actor(x).gainExp($gameVariables.value(1))

}


Thanks a ton! Now I can change everyone's class with items or spells, reset their skills and put them back at the same exp they were, learning all the skills of new class upto their obtained level before hand, and won't keep giving them xp once they changed class since it doesn't reset xp again once class changed. Now just need to make it more dynamic so all the different items and spells change different classes, without copy pasting this script for every class.. this scripting sure saves alot of hassle creating conditions in MV itself, _targetActorId is a time saver.

For some reason x.currentLevelExp did work but returned 0, while $gameActors.actor(x).currentLevelExp returned the function, function () { return this.expForLevel(this._level); }

Same with currentExp.. without the () it returns the function code I guess..

Interesting to see how the function is written.
 
Last edited:

Phoenixsylph

=w= just chillin
Veteran
Joined
Sep 25, 2017
Messages
63
Reaction score
47
First Language
English
Primarily Uses
RMMV
Would there happen to be any script calls to change the mouse arrow cursor? [I mean the entire mouse cursor, not just in windows or battle, but the mouse moving on the map]
 

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
1,076
Reaction score
854
First Language
English
Primarily Uses
RMMV
@Phoenixsylph Do you mean the OS cursor? If so, then yes, you can use the following :

Code:
// Change cursor to an hourglass.
document.getElementsByTagName("body")[0].style.cursor = 'wait';

// Change cursor to a custom graphic.
document.getElementsByTagName("body")[0].style.cursor = 'url(img/system/Shadow1.png), auto';
See the list provided on this page to see what standard cursors you can use.
 

Phoenixsylph

=w= just chillin
Veteran
Joined
Sep 25, 2017
Messages
63
Reaction score
47
First Language
English
Primarily Uses
RMMV
You rock Ossra, thank you!
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
Or slightly shorter:

JavaScript:
document.body.style.cursor = '...'
 

Myrmecodromo

The place where ants go.
Member
Joined
Aug 11, 2020
Messages
21
Reaction score
8
First Language
Español
Primarily Uses
RMMV
Hi!, thank you for making this list. Im pretty new in this, but I'm trying to make the best I can.
Actually, I have one question about the battle log script. I'm trying to do An alternativo fighting mechanic where the most important thing has to do with chance of narration. I have done a lot of things with skills, common skills, etc. So I saw thst script and tried to add some battlelog text as mentioned, but when I try the command it says "Cannot read property 'addText' of undefined.

I am missing something? I am going to put the exact script that im using so you can see something wrong

var text = "Ana olvidó leer con la luz encendida..."
SceneManager._scene._logWindow.addText(text)
SceneManager._scene._logWindow.clear();
 

SolidSilver

Villager
Member
Joined
Jun 29, 2020
Messages
6
Reaction score
0
First Language
English
Primarily Uses
RMMV
I know this is an old thread, but is there a way to detect what an actor's MP is at using this and/or any plugins?
 

Users Who Are Viewing This Thread (Users: 1, Guests: 5)

Latest Threads

Latest Posts

Latest Profile Posts

All of the auditions for our game are so good, I'm so glad I'm not in charge of choosing completely. lol I just can't with some of them. I listen to them on repeat. XD
Working on a Patch to integrate AlphaABS into random generated Dungeons. Was a bit tricky, but the outcome is a real Life Changer!!

Will release it the next days!
Been pretty busy... but I got a better headset for recording and listening today. Dad says that he'll consider taking me to Great Wolf Lodge for the first time once I finish summer classes (my final semester!) I'll be taking my plushie friends with me: Bendy, Lolbit, and Helen Henny. (I WUV PLUSHIES!)
SF_Monster3,4 added!


My only regret is the portal mirror effect is too subtle to show up in these GIFs. It probably just needs more sparkles. :LZSwink:

Forum statistics

Threads
105,648
Messages
1,015,277
Members
137,325
Latest member
SergeantGrif
Top