Negative Parameters

Does anyone know of a way to alter the script/add a new one that will allow the use of negative parameters; -30 defense, -50 defense, -120 defense, etc. Please only provide answers, as the game I'm working on REQUIRES something akin to this, so alternatives would also be appreciated.

Thanks for any help! signed: Charalyn Dreemurr
Do you mean negative parameters as in equipment parameters, states or classes parameters? So basically, where do you need those parameters to be used?
Please only provide answers
Challenge accepted

First, add this as a new script.
Code:
class Game_Battler
  def param_min(param_id)
    return 0 if param_id == 1  # MMP
    return -9999
  end
end
Since the editor does not allow you to set the parameter into minus (and we can not change how the editor works), you have to do it manually.

You can add it by script call such as $game_actors[ID].add_param(PARAM_ID,value) and replace
  • ID with actor ID
  • PARAM_ID with these number
    • 2 for ATK
    • 3 for DEF
    • 4 for MAT
    • 5 for MDF
    • 6 for AGI
    • 7 for LUK
  • value with a number, use minus
However, do note that due to the default formula on how the battler stat is calculated if you use negative value and you use trait/feature in the database and multiplied by more than 100%, the negative value will be multiplied as well.

Do note that I only provide an answer. If this is not what you want, then you have to explain in detail.

Edit:
As a disclaimer, using a negative number may or may not complicate things. Either technical side because I never use negative number so I have no idea what is the consequence, or the game design (calculating how negative number behaves)

Original thread: https://forums.rpgmakerweb.com/threads/negative-parameters.116502/