Items spoil / transform over time based on frames and variables

Discussion in 'RGSS3 Script Requests' started by sutorumie, Sep 19, 2016.

  1. sutorumie

    sutorumie I'm a whimsical girl. Veteran

    Messages:
    30
    Likes Received:
    1
    First Language:
    English
    Primarily Uses:
    RMMV
    There's this script I found in an old request thread for items that "go bad" over time; the way it works is, you add a notetag to certain items that indicate that the item will turn into a different item after x amount of steps. It also comes with a progress bar visible in the items menu and is compatible with instance items, so all items of the same id rot at their own pace rather than all at once. I'm using tsukihime's version for compatibility with other scripts that I'm using, and it works perfectly.


    However, the idea of anything happening based on step count not only stresses me out (like I need to be super careful about WALKING, of all things, just so my items don't spoil) but it doesn't fit in with the way time progresses in my game, which is based on frames (used in common events to update variables for hunger, thirst, etc), a timer (it counts 10 minutes, then updates the time of day, ex. morning -> noon, then resets), and variables (for time of day, day of year, hunger, thirst, energy, etc etc). If this sounds confusing I'll elaborate further, I mean. If it's necessary?


    So I'd prefer that all items "spoil" based on frames (or individual timers, if that's better). I'm using a limited inventory system, so the player should only have a maximum of 15 items at any one time, and anything in storage either doesn't update (if that's what it needs to be to prevent horrible lag) or updates at a slower pace based on where it's stored, so food stored in a fridge decays at half the normal rate or something like that. At the moment, all items in storage decay at the same rate (your steps still count for stored items, I mean).


    The variable aspect would be to advance all item progress bars at the same time, for when the player does something that advances time without the use of the timer (mentioned above), ex. by sleeping. Maybe there could be multiple variables, like. Items in inventory, items stored in a fridge, items stored in a freezer; that way I can advance the variables separately so items in proper storage decay differently. I'd probably need to make notetags for which items can be stored where, and figure out how to get the script to tell whether an item is stored in a specific location... bleh. This just gets more and more complicated huh :p


    I'm not super script savvy, most of what I can do is purely aesthetic, and I can't figure out how to do the frame+variable thing AT ALL, even when referencing from scripts that already have a feature like that. I can MAYBE figure out how to get the storage thing to work by myself (I haven't tried, considering it would probably be a waste of time while the script still uses step counts) so if it sounds like I'm asking for way too much all at once then uh. Ignore all that storage nonsense, and just focus on the frame/timer/variable request.
     
    #1

Share This Page