Is it possible to set/restore actors' parameters to default one's according to their lvl after I manually changed them for gameplay reasons?
MV Restore actors' parameters after changing them
Javascript/Plugin SupportHi there!
I think it depends on how you changed them.
If you use an Item's grow effect or event commands to change these parameters, these changes will be stored on the _paramPlus property of the actor(which is an array).
So theoretically, if you just set this property to 0, their parameter will be "restored". But don't know if it will have any side effects. You have to try.
Another way to get the raw actor parameter by their level and class would be:
Which every actor has shorthand:
I think it depends on how you changed them.
If you use an Item's grow effect or event commands to change these parameters, these changes will be stored on the _paramPlus property of the actor(which is an array).
JavaScript:
Game_BattlerBase.prototype.addParam = function(paramId, value) {
this._paramPlus[paramId] += value;
this.refresh();
};
So theoretically, if you just set this property to 0, their parameter will be "restored". But don't know if it will have any side effects. You have to try.
JavaScript:
$gameActors.actor(ID)._paramPlus[PARAMID] = 0
$gameActors.actor(ID).refresh()
(or $gameParty.members()[INDEX])
Another way to get the raw actor parameter by their level and class would be:
$dataClasses[classId].params[paramId][level]Which every actor has shorthand:
$gameActors.actor(actorId).currentClass().params[paramId][level]absolutely no need for javascript here, that option is even available as event command.
go to the add/remove member command. if the checkbox for "initialize" is checked, the actor will be reset to database defaults on adding to the party.
go to the add/remove member command. if the checkbox for "initialize" is checked, the actor will be reset to database defaults on adding to the party.
True, but that could have some undesirable effects in this context.
- I believe initializing will also set their equipment to the default, which would almost certainly be undesirable.
- If the player has rearranged any party order, removing and re-adding the members would mess with that, and it would also be visually obvious if you were in a position where your followers were visible on the map.
- If there are more actors available than you have chosen from to be in your party, the event coding to check who's in it and remove and add the same people would definitely be more complex than two lines of JavaScript.
I ended up creating a custom system for it, but these worked too, just not exactly as I needed. Thank u for your answers. Consider this solved
Thread closed
Original thread: https://forums.rpgmakerweb.com/threads/restore-actors-parameters-after-changing-them.140067/