fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
802
Reaction score
516
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,826
Reaction score
1,250
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
516
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,826
Reaction score
1,250
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,259
Reaction score
1,666
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,259
Reaction score
1,666
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 Posts

Latest Profile Posts

Today we be doing an unscheduled stream! Lets get some work done on the titlescreen for Lightestone! <3
www.twitch.tv/riazey
I can't believe it... my mom is going to sign me up for the Planet Fitness down the street! I need to lower my cholesterol according to my doctor, and I'll need to lose some weight to fit into Helen Henny's skirt (I ordered a skirt for my mascot outfit and realized it was a bit too small). My doctor says I need to lose weight anyway.
I blame my lilest bro for the duck suit. Sketched it and realized it had to be added to a mock fashion magazine cover. The titles are actually inside jokes about the place this NPC is from.
EvKECQJVEAw3Qux
Kes
After a few hectic months, my hiatus is over, and I'm now back. Good to see so many familiar names posting. And a forum update while I was away.
V1.3 of Demo, a new concept artist on the team, character voices are coming into light more... I'm happy to say that the fangame is making good progress.

Forum statistics

Threads
108,855
Messages
1,040,084
Members
141,295
Latest member
megmaconqueror
Top