[VX Ace] Help with buff boost formula

● ARCHIVED · READ-ONLY
Started by S.Court 4 posts View original ↗
  1. Hello, I'm using Yanfly buff & state manager script (you can find him there: https://github.com/Archeia/YEARepo/blob/master/Gameplay/Buff_%26_State_Manager.rb) and in the line number 269 there is a formula to manage the buff/debuff parameter

    # This is the formula used to apply the rate used for buffs and debuffs.

    BUFF_BOOST_FORMULA = "buff_level(param_id) * 0.25 + 1.0"

    Well, I'd like to make of this formula something similar to Pokemon buff/debuff manager

    Basicly what I need is the formula shows this when the buff level is equal to those numbers

    -4: 2/6 (x 0,33)

    -3: 2/5 (x 0,4)

    -2: 2/4 (x 0,5)

    -1: 2/3 (x 0,67)

    0: 0 (no buff/debuff)

    1: 3/2 (x 1,5)

    2: 4/2 (x 2)

    3: 5/2 (x 2,5)

    4: 6/2 (x 3)

    Is there a way to modify this boost formula to make it works like that? Thank you
  2. Changing the 0.25 to 0.5 should work for buffs. However, I'll need to investigate more for the debuffs, because if it uses 0.50 also for that you will run into some trouble.
  3. I forgot some rules with the fractional number in math

    2/3 * -1 = 3/2

    So that means if the buff_level number is a negative number, the formula should be multipied by -1 to get this, is there a way to make this?

    EDIT: I have a solution but not sure how to write it in the script, it'd be like something like that:

    (Absolute valor of buff_level(param_id) + 2)/2

    BUT if buff_level is a negative number, the formula would be multiplied by -1

    Is there a way to capture this formula idea?
  4. Well, sorry by letting this post alone for a loooooong time, but I'm interested in this still

    I forgot some rules with the fractional number in math

    2/3 * -1 = 3/2

    So that means if the buff_level number is a negative number, the formula should be multipied by -1 to get this, is there a way to make this?

    Sorry, I TOTALLY forgot I have posted before