Is it possible to make a modifier * 0?

In my game, charecters regain MP each turn in battle. I'm trying to make a few states that among other things, they make it so the afflicted doesn't regain MP. (Enraged, Stunned, Blockage, ect)

The problem is if they get inflicted with multipules of these states, their MP will drain instead of stay stagnant.

Is their a way to make it so in some states status changes are multiplicative while others are addition?
not without scripts, and even then it's difficult because the engine is build to assume one type of mathematic operation only on any value.

you'll have to request a script for that specific change, and you'll need to give a more detailed description for that.
have each of them simply apply "MP Regen Rate * 0", it's a trait.
it's a trait.
That uses addition
not without scripts, and even then it's difficult because the engine is build to assume one type of mathematic operation only on any value.

you'll have to request a script for that specific change, and you'll need to give a more detailed description for that.
Well then is it possible for states to use multiplication and have actor/class traits use the traditinal way?
<mrg Rate: 0%>
Use YEP_ExtraParamFormula.js:
<mrgRate: 0%>
And what is the equivalent for vx ace?

I can see the idea working, but it would need a vx ace script.
Damn, sry I have zero experience w/ VXAce... But didn't Yanfly make VX plugins before moving on to MV?
But didn't Yanfly make VX plugins before moving on to MV?
VX and VX Ace are not the same, but both use scripts not plugins.

I don't see why just using Features in the State wouldn't work.

1594634080195.png
@Kes Because these traits are additive in VX.
So there are no modificators.

You can only do +50% for example but not *0%

So the best you can do is -100% MRG.
But if the character is also influenced by another MRG trait, the total MRG rate would not be 0% any longer.
Edit: I just realized that the MRG rate is at 0% by default, but you get what I meant.
How would you want to be able to set this?
@ScorchedGround Ah yes, I'd forgotten that. Thanks for the reminder.
I guess I don't mind sharing the scripting I used to do this. It's an overwrite of the BattleManager's Turn End method. I think you could also alias it instead, if you had other scripts overwriting the Turn End method's behavior.

On the line where I first define the Natural EP regen, you could set the amount of MP characters should regain each turn (and then remove any MP regen you are giving each turn with whatever you are using now, like States or Troop Events). For example, if you want to grant 10 MP each turn, just do increase = 10 and if you want to grant 5% of the actor's Max MP, you would do increase = actor.mmp / 20 and that should work too.

All of the conditional stuff below that is what you would customize to check, for example, whether the character is Stunned or Enraged, and if so you would set "increase" to 0. Finally, right near the end, make sure to change actor.tp to actor.mp since you want to increase MP rather than TP like I did.

Code:
module BattleManager

  #--------------------------------------------------------------------------
  # * End Turn
  #     OVERWRITE METHOD!
  #--------------------------------------------------------------------------
  def self.turn_end
    @phase = :turn_end
    @preemptive = false
    @surprise = false
    # Energy Points regeneration
    for actor in $game_party.members
      # Natural EP regen is equal to one-third of AGI
      increase = (actor.agi / 3)
      # Energy Buff: Gain +10 EP per turn (affected by regen modifiers)
      if actor.state?(83)
        increase += 10
      end
      # Halve natural EP regen for Resource Damper or Plagueridden
      if (actor.state?(40) or actor.state?(42))
        increase = (((increase + 1) * 0.50).to_i)
      end
      # Reduce natural EP regen to zero for Exhausted or Stunned
      if (actor.state?(57) or actor.state?(34) or actor.state?(39))
        increase = 0
      end
      # Telos' Fury state increases his EP regen by 50%
      if actor.state?(328)
        increase *= 1.50
      end
      actor.tp += increase
    end
  end

end
Here a simpler solution.
Code:
class Game_Battler
  alias overriden_mrg mrg
  def mrg
    return 0 if states.any? {|state| state.note.include?("<suppress mrg>")}
    return overriden_mrg
  end
end
All you need to do is to give a state with notetag <suppress mrg>
So if the state is added to the battler, it will simply return 0

This script patch should be put under all of your custom scripts.
Here a simpler solution.
Code:
class Game_Battler
  alias overriden_mrg mrg
  def mrg
    return 0 if states.any? {|state| state.note.include?("<suppress mrg>")}
    return overriden_mrg
  end
end
All you need to do is to give a state with notetag <suppress mrg>
So if the state is added to the battler, it will simply return 0

This script patch should be put under all of your custom scripts.
Thank you!

I'll give you credit for this scriptlet

@Wavelength Thank you. but your method won't work, sense some attacks use agi in the formula. Basicly a.MAT or a.MDF or a.AGI or a.LUK are used in most formula's along side a.ATK to determine damage. There are a few outliers, but they're the exception

AGI also affects the ATB bar and even though the bar fills up fast and is basicly close to a CBT, it will still slow down those affected

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-make-a-modifier-0.123991/