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,332
Reaction score
9,717
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,684
Reaction score
2,766
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

SpaceBot wrote on DoctorMolotov's profile.
I miss you :kaocry:
I have game ideas, but none of them would fit the theme for IGMC. XD
Why the heck do I keep comparing my games to ones made by huge companies? I'd love them to have that level of polish but I'm simply not good enough.
Hell of a day at the London Games Market! :D

1656892272017.png

Check out my haul!

Forum statistics

Threads
123,306
Messages
1,155,664
Members
161,730
Latest member
my_birthday1205
Top