fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
802
Reaction score
517
First Language
Polish
Primarily Uses
RMMV
Is it possible to track/check which(and how much) X item was sold?
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,841
Reaction score
1,266
First Language
Portuguese - Br
Primarily Uses
RMMZ
I think you can track it with event commands before open the shop and after close the shop.
before: Check the items that party already have, and record it somehow(in a variable, for example)
Open the shop.
After the player leaves the shop: Compare the items that the player has with the items that the player had before opening the shop.
Through this, you can compare the items the player had before entering the shop with the items he has after leaving the shop.
 

fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
802
Reaction score
517
First Language
Polish
Primarily Uses
RMMV
I think you can track it with event commands before open the shop and after close the shop.
before: Check the items that party already have, and record it somehow(in a variable, for example)
Open the shop.
After the player leaves the shop: Compare the items that the player has with the items that the player had before opening the shop.
Through this, you can compare the items the player had before entering the shop with the items he has after leaving the shop.
Thats pretty clever! Thank you, can't believe myself that the solution was so easy...
 

dwiseman57

Merchant Prince Digital
Veteran
Joined
Jun 29, 2014
Messages
40
Reaction score
1
First Language
English
Primarily Uses
N/A
This works if you only have a few items... but what if you have 100's of different items? You'd need to check and store the number of each item you have in your inventory for each and every item in the database...
Is there not a script/plugin based way to do this? Just a simple plugin that counts the number of each item sold and stores it, rather than having to set up the variables yourself?
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,841
Reaction score
1,266
First Language
Portuguese - Br
Primarily Uses
RMMZ
A little script call can do the trick to compare the items player have before and after, and use a code to catch the exceptions.
But I'm busy right now, if no one appears, I see what I can do later.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,273
Reaction score
1,681
First Language
EN
Primarily Uses
RMMZ
Is there not a script/plugin based way to do this? Just a simple plugin that counts the number of each item sold and stores it, rather than having to set up the variables yourself?
I have a plugin that might help: view/download Cae_BuySellVar (Google Drive).

It lets you stick a notetag like <sell var: 12> in an item's notebox; the game should then automatically add 1 to the value of game variable 12 every time the player sells one of those items. :kaophew:
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,273
Reaction score
1,681
First Language
EN
Primarily Uses
RMMZ
This looks perfect thank you! I will give it a try and report back. Do you make a lot of custom plugins caethyril?
Great! And yes, you can find my RMMV plugins over here~
 

Latest Threads

Latest Profile Posts

hmm... I just solved one of the more annoying sideview battler problems in MV.. Passive States and Visual States can make it so when your character is in crisis HP, they don't go back to normal walk/wait when it's their turn. they stay in the crisis motion... neat.
Apparently all of LGBT reddit hates me. I posted a simple question and only got hate mail. What's the deal? The doompost was literally 6 months ago and I've changed my views since then and apologized.
MOD NOTE: See second response before replying to this. - Wavelength
Amazing. Simply amazing...

JRPG Browser - Playlist:
Hello, comrades, do you have a pack of modern or student clothes? i need for my project: 3

Forum statistics

Threads
109,098
Messages
1,042,004
Members
141,581
Latest member
neex84
Top