Track item sales with variables?

RainbowGrenade

Paint Princess
Veteran
Joined
Jan 21, 2013
Messages
278
Reaction score
329
First Language
English
Primarily Uses
RMMV
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.
 

standardplayer

Keeper of Kitties
Veteran
Joined
Apr 6, 2016
Messages
698
Reaction score
3,450
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 likeexample.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
 

RainbowGrenade

Paint Princess
Veteran
Joined
Jan 21, 2013
Messages
278
Reaction score
329
First Language
English
Primarily Uses
RMMV
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


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
Thank you.  I'll keep that option in mind.  I hadn't thought of going at it from that angle. :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top