Equip Dynamic Stats

Last Updated: 2012.01.05
Download Link
Github Link

This script allows for dynamic parameter bonuses acquired through equipment. These bonuses can come in the form of percentile bonuses based on the wearing actor’s base stats or be based off of a variable.

Dynamic stats can come in the form of percentile stats where the stats will be based off of the actor’s base stats or in the form of a variable. Insert these notetags into the noteboxes of weapons or armours:

<stat: +x>
<stat: -x>

Changes the stat bonus of the piece of equipment to yield +x or -x. Allows bonus to go over +500 and under -500. Replace stat with one of the following:
MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, LUK

<stat: +x%>
<stat: -x%>

Changes the stat bonus of the piece of equipment to yield +x% or -x% of the equipped user’s base stat. Replace stat with one of the following:
MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, LUK

<stat variable: x>

Changes the stat bonus to be modified by whatever variable x is. Replace stat with one of the following:
MAXHP, MAXMP, ATK, DEF, MAT, MDF, AGI, LUK

And I’m a Mormon!

17 comments on “Equip Dynamic Stats

  1. Hmmm, well, you could use that variable tag for greens somehow. If you force the player to get rid of one piece of armour before getting another one of that kind, that is. This is not exactly what I was hoping for, but apparently the best I can get for green equipment as known from MMORPGs. :) So: nice one!

  2. What happened to the -And that’s all folks!- *sigh* I always enjoy seeing my porky pig plug on this site. Anyway I really like the way you implemented variable use in this version, I am going to get a LOT of use from that. Thanks.

  3. With the whole variable thing, is there any way use variables to keep track of how many enemies the character equipped with the weapon has killed or anything similar? Because then you could make a Death Penalty-style weapon or even armor. You could probably do this somehow but I’m not great at scripting and I’ve switched over to Ace straight from XP, and the differences are kind of throwing me. (Damage formulas? In the database?! Sweet!)

  4. I notice that when this script is used in succession, it actually stacks.
    ie: you have 4 different equips on at the same time that all add +100% MHP, each.
    if it only adds to the base, then it should only add +400% MHP. Instead when you put them all on, it adds 2x HP, then doubles that, then doubles THAT, and doubles AGAIN, really giving 2x2x2x2 (16x) MHP.

    Any way to make the multiplier separately calculated and then multiplied against the stat? I’m having trouble following the script path to fix this :(

  5. The percent bonuses only apply to the base stats of the particular character. It does not include any bonuses from stat growth items. If you have 100 base attack, and grew by another 100 attack using items, the script will only boost the 100 base attack. Does anyone know how to include all bonuses in the percent boost?

  6. Is there a way to make the item menu show xparams and sparams effects of an item? I’ve gotten it sufficiently modified to draw the empty boxes and show the names for the parameters (well, also need to modify the number of lines in the item description box), but I can’t figure out how to actually grab xparam/sparam values (Item Features). I kind of want it since all weapons modify the hit rate.
    #————————————————————————–
    # draw_item_stats
    #————————————————————————–
    def draw_item_stats
    return unless @item.is_a?(RPG::Weapon) || @item.is_a?(RPG::Armor)
    dx = 96; dy = 0
    dw = (contents.width – 96) / 4
    for i in 0…8
    draw_equip_param(i, dx, dy, dw)
    dx = (dx >= (96 + (3 * dw))) ? 96 : dx + dw
    dy += line_height if dx == 96
    end
    # EX1 Params
    for property in YEA::STATUS::PROPERTIES_COLUMN1
    draw_ex_equip_param(property, dx, dy, dw, 1)
    dx = (dx >= (96 + (3 * dw))) ? 96 : dx + dw
    dy += line_height if dx == 96
    end
    # EX2 Params
    for property in YEA::STATUS::PROPERTIES_COLUMN2
    draw_ex_equip_param(property, dx, dy, dw, 2)
    dx = (dx >= (96 + (3 * dw))) ? 96 : dx + dw
    dy += line_height if dx == 96
    end
    # EX3 Params
    for property in YEA::STATUS::PROPERTIES_COLUMN3
    draw_ex_equip_param(property, dx, dy, dw, 3)
    dx = (dx >= (96 + (3 * dw))) ? 96 : dx + dw
    dy += line_height if dx == 96
    end
    end

    #————————————————————————–
    # draw_ex_equip_param
    #————————————————————————–
    def draw_ex_equip_param(property, dx, dy, dw, which)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    text = property[1]
    draw_text(dx+4, dy, dw-8, line_height, text)
    draw_ex_param(property[0], dx, dy, dw)
    end

    #————————————————————————–
    # draw_ex_param
    #————————————————————————–
    def draw_ex_param(identifier, dx, dy, dw)
    param_id = 0
    case identifier
    when :hit
    param_id = 0
    else;
    end
    #value = @item.xparams[param_id] #Will crash the game.
    #change_color(param_change_color(value), value != 0)
    #text = value.group
    #text = “+” + text if value > 0
    #draw_text(dx+4, dy, dw-8, line_height, text, 2)
    #return text
    end

  7. is there a way to add states to specific enemies? (e.g a Hornet’s Attack command has a chance of adding poison)

  8. I saw that you no longer plan on making scripts for a while, and I wanted to message you personally but don’t know where or how to get a hold of you, and since this is relevant to this particular script I figured this would be the best place to ask.

    I was wondering if there were a way to either convert this script, or to maybe update an old VX script from elsewhere that did exactly what I’m talking about, to make it so that instead of the equipment giving these bonuses the skills give these bonuses. So if a player knew the fire skill, for example, they would get a bonus to Magic Atk or whatever else I chose to put there. This would also allow a player to give their characters Passive skills that have the sole purpose of buffing a character.

  9. This might be a silly question, but that screenshot at the top, how and where do you access that menu in the game? I have installed the script correctly but can’t work out how to access that menu shown there.

  10. I’m confused, how exactly does the variable work on this. How do I make it so that variable 16 lowers or boosts a stat by 200? I have no idea…

  11. Alright! Good script but I noticed a bit problem there. Most of the equipment Dynamics work as intented, but few give me this weird long humber. In example: “+5.6,000,000,000,000,005”. Is this working as intented?

    • Yeah… it’s been a coupla years since this script was posted, but I’ve been having the same problem: really long numbers in the shop preview. I’ve tried editing the script to round the number or cast it as in int, but no luck.
      I ended up just disabling the preview menu… but I’d rather not do that if it can be helped.

      If you ever read this, do you have any suggestions, Yanfly?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s