RPG Maker Forums

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.

    #  :pdr_n_value => "self.def",

   #   :pdr_formula => "base_pdr - (n / (256.0 + n)) * 0.500 - 0.000",

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

     :pdr_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

}

 

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top