So I'm reworking how stats work in my game, and I really want to set both actor and enemy stats (particularly Attack and Defense) to 0. The engine won't let me set any stats to 0 and defaults them to 1. When I run an event that decreases the stats, it won't decrease them below 1. Also, I don't see a way to do that at all with enemies. Is a plugin required for this?
How to set Actor and Enemy stats to 0?
RPG Maker MV SupportYou'd need a plugin for that, yeah. Any changes you make to the data during the game won't be saved, so this isn't really something you can easily event.
That said, though, stats only have relevance in damage formulas generally. Is there a particular thing you need it to be 0 for that you can't accomplish with formulae?
That said, though, stats only have relevance in damage formulas generally. Is there a particular thing you need it to be 0 for that you can't accomplish with formulae?
However I strongly suggest that you doublecheck all your mathematics when you do this.
There are reasons why the engine forces a minimum of 1, and that is that some formulae do not work correctly with zero. If you place the wrong value at zero, it may cause bugs or crashes, exactly because the core programming assumes a minimum of 1 for almost every value.
There are reasons why the engine forces a minimum of 1, and that is that some formulae do not work correctly with zero. If you place the wrong value at zero, it may cause bugs or crashes, exactly because the core programming assumes a minimum of 1 for almost every value.
Thanks for the replies!
The main reason I wanted an attack of 0 is because I'm going to a "low damage, low numbers" stat system, kind of like paper mario, so starting with an attack of 0 is ideal. But I can work around it if it's risky. Such as having the starting weapons not give any additional attack, and just subtracting 1 with the main attack skill. Thanks for helping clarify that!
The main reason I wanted an attack of 0 is because I'm going to a "low damage, low numbers" stat system, kind of like paper mario, so starting with an attack of 0 is ideal. But I can work around it if it's risky. Such as having the starting weapons not give any additional attack, and just subtracting 1 with the main attack skill. Thanks for helping clarify that!
I achieve this using Yanfly's Base Parameter Control plugin. http://www.yanfly.moe/wiki/Base_Parameter_Control_(YEP)
By changing the customMin number in the plugin settings to 0 instead of 1, then on a new game I have an event run that subtracts 1 from the relevant stats, setting them to 0.
My game doesn't have combat so I haven't run into any stat formula issues, maybe experiment with that to see if it causes any problems for you.
By changing the customMin number in the plugin settings to 0 instead of 1, then on a new game I have an event run that subtracts 1 from the relevant stats, setting them to 0.
My game doesn't have combat so I haven't run into any stat formula issues, maybe experiment with that to see if it causes any problems for you.
Have you tried to use a script?
Attack:
$dataEnemies[n].params[2] = 0
Defense:
$dataEnemies[n].params[3] = 0
Replacing n with the ID number of the enemy.
Attack:
$dataEnemies[n].params[2] = 0
Defense:
$dataEnemies[n].params[3] = 0
Replacing n with the ID number of the enemy.
@Ariestra The $data structures are not saved, so if he used that the command would have to be given over and over again, at minimum after each loading a saved game
Original thread: https://forums.rpgmakerweb.com/threads/how-to-set-actor-and-enemy-stats-to-0.153276/