fizzly

Veteran
Veteran
Joined
Mar 23, 2012
Messages
803
Reaction score
518
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,843
Reaction score
1,268
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
803
Reaction score
518
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,843
Reaction score
1,268
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,274
Reaction score
1,684
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,274
Reaction score
1,684
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

Finished reworking the design of my Itch.io page <3 Back to making plugins.
I kind of want make a map that's just giant version of the player that's they're running around on. Either by stringing together multiple maps or just by shrinking the player sprite for those maps. Actually that might make a fun reveal... The player's on a normal looking map, but then as realization dawns on them it zooms out to show a much larger map that's a giant version of the player. :LZSexcite:
Do you like to practice level design? I do hahahaha! It's not from a specific game, it's just some tests...Fase 1.png
I really need a better indicator of where you can jump up and down though I feel... otherwise I like how this turned out for the first part of the first dungeon of the game.
@Shaz needs to make a website for his plugins. (it can be done easily for free with google sites.) I can't find a database of them anywhere!

Forum statistics

Threads
109,130
Messages
1,042,399
Members
141,628
Latest member
Ocarina654
Top