Decinbr

Veteran
Veteran
Joined
Mar 20, 2015
Messages
338
Reaction score
74
First Language
brazil
Primarily Uses
Hi guys, thanks for helping me every time I needed it.
Once again I come to ask for your help.
I want to change a parameter of a hero, not add or subtract, just change it to a specific value.
I tried using this code, but it didn't work:
$gameActors.actor(1).luk = 1;
can anybody help me?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
36,278
Reaction score
9,702
First Language
German
Primarily Uses
RMMV
it can't be done that way.

what you need to do is mathematics:
calculate the difference between the current value and the value you want, then add that difference.

you can't set any actor value like that because the values aren't calculated that way.
 

caethyril

^_^
Global Mod
Joined
Feb 21, 2018
Messages
3,672
Reaction score
2,760
First Language
EN
Primarily Uses
RMMZ
Short answer - you have to add a value or use a plugin.

Longer answer - basic parameters like LUK are calculated based on various factors:
  • The actor's class & level;
  • Their equipment - weapon(s) & armor(s);
  • Permanent bonuses - from the Change Parameter command;
  • Parameter Rate traits.
If there are no Parameter Rate traits then you can calculate the difference between the current and target parameter values in a variable, then use a Change Parameter command, e.g.

◆Control Variables:#0030 = 50 ◆Control Variables:#0030 -= Luck of Reid ◆Change Parameter:Reid, Luck + {#0030}
[Edit: ninja'd.]
 

Latest Threads

Latest Posts

Latest Profile Posts

The main game of my trilo/saga 50%OFF on Steam..... its now or never more
I swap between Ace and MZ so I can stay fresh but - what do you mean you can use subfolders in the plugin's folder for easier organization!?
Did some new music again, praise be. To the next song!
Watch Studio Blue play Numina by starlit in our latest RPG Maker Games Critique stream starting NOW!

Forum statistics

Threads
123,141
Messages
1,154,289
Members
161,478
Latest member
mrlimbs
Top