Track item sales with variables?

Discussion in 'RPG Maker VX Ace' started by RainbowGrenade, Apr 8, 2016.

  1. RainbowGrenade

    RainbowGrenade Paint Princess Veteran

    Messages:
    229
    Likes Received:
    126
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMVXA
    What I'd like to do is pretty simple, but search as I may, I can't seem to find any info on how to do it.  I would just like to have variables attached to certain items that will increase as they are sold.  I found one script that seemed like it would work, but it wasn't working/compatible and it was from a very old discussion, so feedback on it is unlikely.  Any insight on this issue would be appreciated.  Thanks.
     
    #1
  2. standardplayer

    standardplayer Keeper of Kitties Veteran

    Messages:
    350
    Likes Received:
    1,303
    First Language:
    English
    Primarily Uses:
    N/A
    Without breaking into the script and aliasing anything I wouldn't be able to help on that end. However, you could potentially have an event that occurs right before you call Shop Processing on a merchant, for example, (it would be copy/pastable) that stores how many of said item you have in a variable, and then after the Shop Processing it could use another variable to store your new amount of that item, subtract one from the other and store/add that final difference to the variable you're looking for. 


    Here's what an example might look like example.png


    Hope this helps, btw since it seems odd to buy something and sell it in the same transaction, just know that this won't account for doing something like that. I just whipped it up as an example to show you how you could do some math and keep track of things without having to do anything plugin-wise
     
    #2
    RainbowGrenade likes this.
  3. RainbowGrenade

    RainbowGrenade Paint Princess Veteran

    Messages:
    229
    Likes Received:
    126
    Location:
    California
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thank you.  I'll keep that option in mind.  I hadn't thought of going at it from that angle. :)
     
    #3

Share This Page