Decinbr

Veteran
Veteran
Joined
Mar 20, 2015
Messages
336
Reaction score
73
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,236
Reaction score
9,681
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,658
Reaction score
2,749
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 Profile Posts

Suddenly, games mean nothing. The money spent was worth it to bring souls towards the light of life. May God bless my path forever. I pray that all are shaken for truth and poured out flat on the table of true understanding, knowledge, and wisdom. Bless you.
Finally I bought OMORI...cant wait to get traumatised!!!
Finished making this pretty ambitious forest map. Was wondering what y'all think of it! :kaopride:
1656136876015.png
All this anger everywhere,Who's happy but me?
Seems to be all the people that don't follow Jesus wholeheartedly. My smile might burn you ahhhhhhhhhhh!
Zoom in for cut-scenes and the like? Yay or Nay?

Forum statistics

Threads
123,020
Messages
1,153,442
Members
161,362
Latest member
Dthwithdoom
Top