I want to use custom formulas for the basic parameters of HP, MP, etc.
I downloaded Yanfly Engine Ace - Extra Param Formulas v1.00, but it is not actually meant for these basic parameters and I am running into some issues. This is the code:
CODE
class Game_BattlerBase
#--------------------------------------------------------------------------
# mass alias methods
#--------------------------------------------------------------------------
alias_param = ["mhp"]
alias_param.each { |param|
aStr = %Q(
alias game_battlerbase_#{param}_epf #{param}
def #{param}
base_#{param} = game_battlerbase_#{param}_epf
n = eval(YEA::XPARAM::FORMULA[:#{param}_n_value])
return eval(YEA::XPARAM::FORMULA[:#{param}_formula])
end
)
module_eval(aStr)
} # Do not remove this.
end # Game_BattlerBase
And this is the formula:
CODE
:mhp_n_value => "self.level",
:mhp_formula => "((1.0587**(n+81.7))*1.0).to_i",
Now the issue is, I need to use "self.level". This is not available for enemies, so I get an error message in battles. I can't check "self.is_a?(Game_Actor)" because it's BattlerBase... And
also, I need to be able to check the actor's id, because the stats need to vary between actors.
Anyone can help? ^^;
Normally I'm quite good at figuring these things out, but it seems the parameter methods are absent from the RGSS3 code...
[edit] Nevermind! I think I fixed it by editing the defs at the top of BattlerBase and the param_base call in Game_Actor to change the appearance in the status window, etc. Not sure why I didn't think of this before. -_-
This post has been edited by Twin Matrix: Mar 6 2013, 02:35 AM