EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
965 stars 183 forks source link

[Feature Request] - Allow to set a custom number for the maximum (and minimum) value for variables #3067

Open Mimigris opened 11 months ago

Mimigris commented 11 months ago

Currently, the maximum and minimum values accepted for the variables in the games supported are the following:

It may be interesting for compatibility purposes to allow to set the maximum and minimum values for variables from another mode than the one currently used, for example if there is a plan to migrate to another mode without having to care if the change of minimum and maximum values accepted may cause issues.

Outside of that, setting custom values may interest some users in some specific cases I guess (e.g. not allowing negative values), but this is probably extremely specific so it would need feedback from interested users (which I'm not really).

Ghabry commented 9 months ago

There are two database chunks for this, I think they are called easyrpg_max/min_variable. As usual no way to set them outside of lcf2xml. Does this fulfill that request?

Mimigris commented 9 months ago

There are two database chunks for this, I think they are called easyrpg_max/min_variable. As usual no way to set them outside of lcf2xml. Does this fulfill that request?

From what I can see from how it works, it's exactly what I was requesting, so it's good 👍 The only thing that I could say is that one of the examples I've given which is not allowing negative values does not work (since 0 is considered as using the default value and will not set 0 as the value to use). Outside of this, the main use that I've mentioned with this is for compatibility purposes and this should work as intended so it's all good. (Unrelated to the feature request but rather related to the feature that you mentioned, but if the minimum value set is above 0, variables that are set to 0 by default when loading the game will not be updated and will still be considered as 0 until their value is attempted to be changed, just me testing weird edge-cases.)