TALONOS'S PROFILE

Search

[RMVX ACE] Retrieving how much of a parameter has been added via events or items

Short question: How do you, using a script, retrieve the amount of parameter that has been added via items (like the sample "power up" item) or events?

Longer description: I am using Yanfly's Dynamic Stats script. The percent increase function works as expected for your "base" parameter, but any additional parameter increase caused by the above mentioned effects is not counted. I wish for it to be.

I think the following code is responsible for the percent increase:
#--------------------------------------------------------------------------
  # new method: bonus_per_params
  #--------------------------------------------------------------------------
  def bonus_per_params
    return 0 if $game_temp.nil? || $game_temp.eds_actor.nil?
    n = 0
    actor = $game_temp.eds_actor
    for i in 0...8; n += @per_params[i] * actor.param_base(i); end
    return n
  end
After doing some digging, I found that items that are used to increase parameters permanently eventually make their way to the following code:
#--------------------------------------------------------------------------
  # * Increase Parameter
  #--------------------------------------------------------------------------
  def add_param(param_id, value)
    @param_plus[param_id] += value
    refresh
  end
This made me think maybe I could just change the line referring to actor.param_base with the following:
for i in 0...8; n += @per_params[i] * (actor.param_base(i)+actor.param_plus[i]); end
But that doesn't work. It didn't change the behavior at all.

What should I try next?
Pages: 1