So I am writing a script that can change your stats by a specific percentage. The question is:
$gameActors.actor(1).def; // => 46
But doing:
$gameActors.actor(1).def = 500;
$gameActors.actor(1).refresh();
$gameActors.actor(1).def; // => 46 ???
Why didn't it change?
Update ^ : I just noticed that .def is a get function. You get the value, you cannot set it this way, so based on below, do I set it through the class based on the level of that class?
So I did some research and it seems I can do: $gameActors.actor(1).currentClass().params[0][1] = 4500; // changes the actor 1 current classes level 1 hp to 4500.
But this seems wrong. I shouldn't have to manipulate the classes stats, I should be able to manipulate the characters stats no?
Whats the correct way to change actor 1's def to something like 999 (for example) ?
$gameActors.actor(1).def; // => 46
But doing:
$gameActors.actor(1).def = 500;
$gameActors.actor(1).refresh();
$gameActors.actor(1).def; // => 46 ???
Why didn't it change?
Update ^ : I just noticed that .def is a get function. You get the value, you cannot set it this way, so based on below, do I set it through the class based on the level of that class?
So I did some research and it seems I can do: $gameActors.actor(1).currentClass().params[0][1] = 4500; // changes the actor 1 current classes level 1 hp to 4500.
But this seems wrong. I shouldn't have to manipulate the classes stats, I should be able to manipulate the characters stats no?
Whats the correct way to change actor 1's def to something like 999 (for example) ?