RPG Maker MV Script Call List

Ossra

Formerly Exhydra
Veteran
Joined
Aug 21, 2013
Messages
965
Reaction score
707
First Language
English
Primarily Uses
RMMV
@jjleroy Unfortunately, no.

Code:
// EVAsion rate
eva: { get: function() { return this.xparam(1); }, configurable: true }

Game_BattlerBase.prototype.xparam = function(xparamId) {
    return this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId);
};

Game_BattlerBase.prototype.traitsSum = function(code, id) {
    return this.traitsWithId(code, id).reduce(function(r, trait) {
        return r + trait.value;
    }, 0);
};
The 'eva' property does not have a 'set' option, so we can only 'get' the calculated value. If we look further in the code we can see that whenever you access the 'eva' property, it is executing the 'xparam' and 'traitsum' functions which go through all currently worn armors, states active on the actor, and so on to add up the current evasion rate.

So, if an attack you are working on is raising or lowering the evasion rate of an actor, it would be much easier to change the evasion rate through the use of a state.
 

jjleroy

I love bananas
Veteran
Joined
Aug 5, 2017
Messages
184
Reaction score
34
First Language
German, English
Primarily Uses
RMMV
@jjleroy Unfortunately, no.

Code:
// EVAsion rate
eva: { get: function() { return this.xparam(1); }, configurable: true }

Game_BattlerBase.prototype.xparam = function(xparamId) {
    return this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId);
};

Game_BattlerBase.prototype.traitsSum = function(code, id) {
    return this.traitsWithId(code, id).reduce(function(r, trait) {
        return r + trait.value;
    }, 0);
};
The 'eva' property does not have a 'set' option, so we can only 'get' the calculated value. If we look further in the code we can see that whenever you access the 'eva' property, it is executing the 'xparam' and 'traitsum' functions which go through all currently worn armors, states active on the actor, and so on to add up the current evasion rate.

So, if an attack you are working on is raising or lowering the evasion rate of an actor, it would be much easier to change the evasion rate through the use of a state.
I see! Thank you so much for your amazingly helpful post @Ossra
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
690
Reaction score
205
First Language
English
Primarily Uses
@jjleroy
No.
By default you can't just manipulate an xp-param or sp-param.
However you can try:
This plugin as there's no native script call that let's you easily manipulate your exp parameters & sp parameters like eva.
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,335
Reaction score
328
First Language
German
Primarily Uses
RMMV
There is the Scriptcall to put Player x and y map tile coordinates into variables(i know thatone),
but does the Engine also safe the previous coordinates by default?
If yes: what is the scriptcall for that? This is interestig when the player moves while his direction is fixed.
If no: dont worry i surly find some way to "event code" around it.
 

NuelLai

Villager
Member
Joined
Jun 6, 2019
Messages
13
Reaction score
2
First Language
German
Primarily Uses
RMMV
Is there a Script call to check if a party member currently got his/her turn?
I playing around with the Hud Maker atm and i want to set a condition to show a picture if the party lead has her turn and it need to dissapear if the second party member got his turn.

all i have atm is "$gameParty.leader()" so the picture shows up if the Lead is in the party and dissapear if she isn't there anymore. Anyone know what i have to add to that call to change it towards a turn check?
 

J-G

Veteran
Veteran
Joined
Oct 4, 2019
Messages
396
Reaction score
99
First Language
English
Primarily Uses
RMMV
Does anyone know how i can use this in an Armor $gameActors.actor(a).skills().contains($dataSkills)
so that I can get any character to use any skill equipped to a weapon to work with say a counter move.

For example if my player weapons gives him a fire skills, when he has this armor on he will counter with this skill instead of using it directly from the command window. This way I can have a set Armor piece that can work with any player without having to make multiples just for each player. Giving each player that counter ability with whatever skill the weapon gives them.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
12,595
Reaction score
12,910
First Language
English
Primarily Uses
RMVXA
@J-G : That is not possible to be added to an armor, and you will need a plug-in to do something like that. Post under plug-in requests for further help with that.
 

J-G

Veteran
Veteran
Joined
Oct 4, 2019
Messages
396
Reaction score
99
First Language
English
Primarily Uses
RMMV
okay thanks i will try my luck there
 

Boonty

Veteran
Veteran
Joined
Oct 10, 2018
Messages
48
Reaction score
20
First Language
French
Primarily Uses
RMMV
Hey guys, could you help me out ?

I want to permanenlty change the stateRate of one of my heroes to make him immune with javascript formula. I am quite lame so I tried this :

$gameActors.actor(3).stateRate(19) = 0
But it didn't work. What it the correct formula ?
 

J-G

Veteran
Veteran
Joined
Oct 4, 2019
Messages
396
Reaction score
99
First Language
English
Primarily Uses
RMMV
I'm not good at it either but it seems to me that if you want to make him immune to it, you may be using the wrong thing. Since "rate" would be the rate in which you apply a state. So shouldn't it be resist instead?
 

Boonty

Veteran
Veteran
Joined
Oct 10, 2018
Messages
48
Reaction score
20
First Language
French
Primarily Uses
RMMV
I find a way with Galv Dynamic Traits plugin.

But you were right, it wasn't staterate. It was isStateResisted(id).
 

J-G

Veteran
Veteran
Joined
Oct 4, 2019
Messages
396
Reaction score
99
First Language
English
Primarily Uses
RMMV
Glad you found a way!
 

Paper

Warper
Member
Joined
Dec 16, 2019
Messages
1
Reaction score
0
First Language
Portuguese
Primarily Uses
RMMV
When I open the menu options, everything its fine, but when I close it, the game crash ;-;
 

Kes

Global Moderators
Global Mod
Joined
Aug 3, 2012
Messages
21,582
Reaction score
10,918
First Language
English
Primarily Uses
RMVXA
@Paper This thread is for script calls only.
Please make a thread in this section for your query. Give as much detail as you can. Is this a new project, or is it one you've been working on, but now it has developed this bug? Give the exact error message. Give a screen shot of what information the console gives (use Alt+PrtSc for taking the shot so that it is only of the active window, not your whole desktop).
 

dommit

Villager
Member
Joined
Dec 30, 2019
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMMV
What's the script call for the If Win, If Escape, If Lose conditional branches for battles?
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,335
Reaction score
328
First Language
German
Primarily Uses
RMMV
You are right, it is missing. Battle Processing Eventcommand Code in the Link does not cover the
Conditional Branches for Win, loose and Escape. I would also like the answer being inserted into the List.
 

Vis_Mage

Novice Magician
Veteran
Joined
Jul 28, 2013
Messages
435
Reaction score
149
First Language
English
Primarily Uses
RMVXA
Could someone help me fix a script call I'm attempting to use in a conditional branch?

I'm trying to check if ActorID (equil to variable 10) has skill 40. As it stands, I get false regardless of if they have the skill or not.

$gameActors.actor($gameVariable.value (10)).skills().contains($dataSkills[40]);
 

dommit

Villager
Member
Joined
Dec 30, 2019
Messages
6
Reaction score
1
First Language
English
Primarily Uses
RMMV
Could someone help me fix a script call I'm attempting to use in a conditional branch?

I'm trying to check if ActorID (equil to variable 10) has skill 40. As it stands, I get false regardless of if they have the skill or not.

$gameActors.actor($gameVariable.value (10)).skills().contains($dataSkills[40]);
You've got some typos in your snippet; it's $gameVariables not $gameVariable

if ($gameActors.actor($gameVariables.value(10)).skills().contains($dataSkills[40])) {
console.log('yep, has the skill!');
}
else {
console.log('nah, doesn't have the skill');
}
 

Users Who Are Viewing This Thread (Users: 0, Guests: 3)

Latest Threads

Latest Posts

Latest Profile Posts

I'm currently being attacked by the RPG Maker Hydra: fixing one problem only to have two more rise to take its place.
Hey you! Yeah YOU! Whatcha doin' not backing up your projects? You a masochist or sumthin'? GO BACK UP YOUR PROJECTS! Sheeesh... Didn't think I'd hafta spell it out for yas.
now I need to determine, how MV determines if an auto tile is complete or not.
Edit:From what I can tell it uses Autotile kinds to do that.
Edit 2: The editor determines it and packs picture data for the engine....
Finished with the ground work for my class system, using Ellye's Class Change Equipment and Yanfly's Class Change Core plugins to implement an equip based subclass feature!
Hi people! I was wondering... Here in Brazil, we have a whats app group for we talk about rpg maker and our projects. A more informal way for we meet each other. Is there any whats app group out there? :)

Forum statistics

Threads
94,281
Messages
919,639
Members
124,014
Latest member
AnnuRavi
Top