Pretty newbie scripting question, but invovles Yanfly's script so I posted here instead. What am I doing wrong?
▼ Yanfly Engine Ace - Extra Param Formulas v1.00
(also using
# This adjusts the formula for PDR. PDR is the Physical Damage Reduce Rate.
# This provided formula uses the user's flat total amount of DEF as a
# bonus contributing factor to increasing the user's PDR. If you do not
# wish to use this formula, change it to "base_pdr" to have it use
# whatever the original PDR rate is.
#

dr_n_value => "self.def",
#

dr_formula => "base_pdr - (n / (256.0 + n)) * 0.500 - 0.000",

dr_n_value => "self.xstat.Might", #this part is okay

dr_formula => "if n == 0 then 1 else if n==1 then 0.75 else if n==2 then 0.5 else if n==3 then 0.25",
I get an error message for the last line, saying Script '(eval)' line 6: SyntaxError occured. unexpected $end, expecting key word_end ,,,then 0.5 else if n==3 then 0.25
Putting in the word 'end' at the end of the string doesn't seem to work. What am I doing wrong?
------------
I'm using N.A.S.T.Y. Extra Stats together with ▼ Yanfly Engine Ace - Ace Status Menu v1.02. I want the to show the new stats instead of the original parameters (att, def, agi, luk, etc), of course, but that is turning out to be quite involved.
http://forums.rpgmakerweb.com/index.php?/topic/998-nasty-extra-stats/
PARAM_COLOUR ={
# ParamID => [:stat, Colour1, Colour2 ],
2 => [ :Might, Color.new(225, 100, 100), Color.new(240, 150, 150)],
3 => [ :Finesse, Color.new( 60, 180, 80), Color.new(120, 200, 120)],
4 => [ :Will, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
6 => [ :agi, Color.new( 60, 180, 80), Color.new(120, 200, 120)],
7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
}
Of course, it reports atk, def and matk instead of my custom parameters of Might, Finesse and Will from Nasty's Extra stats. I'm at a loss how to insert the new stats instead. I suspect I have to edit the following line somewhere, but I'm rally not sure how:
#--------------------------------------------------------------------------
# draw_param_gauge
#--------------------------------------------------------------------------
def draw_param_gauge(param_id, dy, rate)
dw = contents.width - 48
colour1 = param_gauge1(param_id)
colour2 = param_gauge2(param_id)
draw_gauge(24, dy, dw, rate, colour1, colour2)
end
---------
This is what it looks like in NASTY extra stats
module Z26
STATS = [:Might,:Finesse,:Will]
#Default xstat formulas for ACTORS
DEFAULT_LEVEL_FORMULA =
{
:Might => 0,
:Finese => 0,
:Will => 0
}