Make item control variable

● ARCHIVED · READ-ONLY
Started by WillowWren 1 posts View original ↗
  1. This should be incredibly simple, but I can't figure it out for the life of me. I still have about zero Ruby, but I've been experimenting with scripts, and even tried to create my own script to do this, but to no avail.

    All I want to do is make an item change a variable when consumed. Like $game.variables = $game.variables + [constant].

    I want to specify the constant within the item, because I don't want a million common events just for slight changes in the constant. I've tried to see if I could get Hime Effects Manager or Formula Effects to do it, or even Yanfly Skill Cost Manager with custom cost (I thought the system treated skills and items basically the same, so maybe the note tags would work for items too, but no). My own script doesn't work, I think, because I don't understand what classes to call to control a consumable item, though I tried to look up several models.

    I know this is probably overly simple, but please help!

    EDIT:

    I'm not sure what I was doing wrong, but I got this to work with the existing Formula Effects Script. For anyone else looking to do this, you can tag the item's note with:

    <formula effect>
    v[5] = v[5] + 2
    </formula effect>

    When I tried this the first time, it didn't seem to be working, but I must have had something else wrong with the item settings. Script available here: http://himeworks.com/2014/02/formula-effects/