Barter System- No set currency

gothicvoid

[GothicVoid]
Veteran
Joined
Feb 14, 2019
Messages
209
Reaction score
186
First Language
English
Primarily Uses
RMMV
Hi! I am having some issues nailing down HOW to do this system and wondering if anyone has some ideas as to the HOW.
There is no gold or set item to really use in my game. The people need food and thats what they trade with. If they dont have food then they use batteries.
The game has a foraging, Hunting, Fishing, and farming system, and in it there are common food items like fruits and vegetables,fish, meat, and herbs and roots.
There are dbl A, triple A, C, D, 9 volt and Car batteries.

My thing is that i want one item in a shop to be able to take the players inventory (say they have 3 apples, a can of spagetti, a tin of spam, and a few double A batteries) and barter using the available inventory. let the player deside if they want to trade for the item with batteries or some of the food they have.

I dont want to have one item 50 times in a shop with proxies. So going the Yanfly plugin way would not work. Ive considered Conditional branches but that is A LOT of branches when you have over 100 items of food possibilities.

Anyone have ideas on how to implement this? and Willing to share the way to do it? like set up and such. I know a few people that are looking at similar approaches so im hoping this would help others.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,884
Reaction score
521
First Language
English
Primarily Uses
N/A
A crude solution to this would be they first exchange the item and get store credit, then they trade the credit for the item they want. When the player is done, they could get something cheap as change, like turnips or something
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
285
Reaction score
70
First Language
English
Primarily Uses
RMXP
Have you ever considered simplifying the system a little bit? The game should be accessible for both developers and players. Making it too convoluted is not an advantage but a slightly bad design.
 

duty

Keepin' it simple
Veteran
Joined
Mar 13, 2012
Messages
96
Reaction score
104
First Language
English (US)
Primarily Uses
RMMV
You may have to do your shopping entirely with events.

Instead of the standard "talk to the shop keep and open the shop menu" create a store with actual counters and bins or NPCs that sell specific items.

Each bin, counter, and salesperson is an event triggered on hero contact or button press, just like speaking with an NPC.

The event opens a dialogue window indicating the item for sale, maybe a brief description of the item, and a series of choices corresponding to the purchase options. Will the player be paying in food or batteries?

When the player chooses an option, run a conditional branch that checks to see if the player has those items for barter. If yes, the purchase completes, if not, inform the player that they do not have items to barter.

An interesting twist to this idea could be areas with different prices based on the local economy. Fish might be useful in one economy, while vegetables may be better in another.

Maybe have batteries be more of a consistent currency with few price fluctuations. So you can reliably by certain items for a certain number of batteries in every shop. There could even be a "battery bank" where an NPC will perform battery exchanges: something like 2 AAAs for a AA. 2 AAs for a 9 volt. A couple of 9 volts for a C. Etc.

Other thoughts:
Why just food and batteries? Bullets seem like they'd be rather valuable too?
Is the assumption that all batteries have a full charge? I'd hate to trade a sandwich for a 9 volt and find out it's mostly drained.
 

gothicvoid

[GothicVoid]
Veteran
Joined
Feb 14, 2019
Messages
209
Reaction score
186
First Language
English
Primarily Uses
RMMV
Have you ever considered simplifying the system a little bit? The game should be accessible for both developers and players. Making it too convoluted is not an advantage but a slightly bad design.
It isnt a bad design if its pulled off correctly, and feasibly its something that would not be outside the realm of possibility. Which is why i turned to the hive mind of the forums.


A crude solution to this would be they first exchange the item and get store credit, then they trade the credit for the item they want. When the player is done, they could get something cheap as change, like turnips or something
I thought of that too by using something called "Rations" where they might have a station they can convert all food into this.... but again... a lot of conditional branches that i would have to do if it can be neatly wrapped up as a plugin that would be different.

You may have to do your shopping entirely with events.

Instead of the standard "talk to the shop keep and open the shop menu" create a store with actual counters and bins or NPCs that sell specific items.

Each bin, counter, and salesperson is an event triggered on hero contact or button press, just like speaking with an NPC.

The event opens a dialogue window indicating the item for sale, maybe a brief description of the item, and a series of choices corresponding to the purchase options. Will the player be paying in food or batteries?

When the player chooses an option, run a conditional branch that checks to see if the player has those items for barter. If yes, the purchase completes, if not, inform the player that they do not have items to barter.

An interesting twist to this idea could be areas with different prices based on the local economy. Fish might be useful in one economy, while vegetables may be better in another.

Maybe have batteries be more of a consistent currency with few price fluctuations. So you can reliably by certain items for a certain number of batteries in every shop. There could even be a "battery bank" where an NPC will perform battery exchanges: something like 2 AAAs for a AA. 2 AAs for a 9 volt. A couple of 9 volts for a C. Etc.
again how to set an amount if i have 4 different items in bag, for one item in shop... i still would have to resort to proxies for the same item.

Other thoughts:
Why just food and batteries? Bullets seem like they'd be rather valuable too?
Is the assumption that all batteries have a full charge? I'd hate to trade a sandwich for a 9 volt and find out it's mostly drained.
There are no guns in this setting. its... just how this world is. plenty of items laying around... but Guns and ammunition where never a factor. A design flaw maybe, but its just how the world of the game is. I know that doesnt quite make sense, but trust me please when i say that it was intentional on the IPs end.
 

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,884
Reaction score
521
First Language
English
Primarily Uses
N/A
I thought of that too by using something called "Rations" where they might have a station they can convert all food into this.... but again... a lot of conditional branches that i would have to do if it can be neatly wrapped up as a plugin that would be different.
You could do it all in the shop they exchange it in. Just exchange it for a variable or gold, then have them purchase what items they want, and if any gold is left over, it's turned in for extra supplies
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,573
Reaction score
6,496
First Language
Indonesian
Primarily Uses
RMVXA
It's easy to solve design-wise, however, I'm not going to be the one who provides the implementation solution. Here is what I have in mind. But you gotta accept the fact that you will still use the currency. With slightly different label so it does not feel like a currency.

We are going to rename the currency to "acceptance". You have these items:
Item A = acceptance 50
Item B = acceptance 100

You give two items B to the NPC, now you have 200 value of acceptance from B. With that 200 acceptance currency, you could trade it with 4 items A from the NPC. If you ordered 5 item A, they will refuse as it will not benefit them. However, there is nothing that is stopping you from just trading 3 items A. The currency will not be saved, it was only a temporary for one transaction.

By this, if a certain NPC needs a certain item, you could double the acceptance value by two times or more.
 

Kupotepo

Fantasy realist/ Forum Reactor‍/ Advocatus Diaboli
Veteran
Joined
Jul 5, 2017
Messages
1,812
Reaction score
1,813
First Language
Thai
Primarily Uses
RMMV
I think you can make the dialogues choice and used the conditional breach to check if there is the items there. Like one cattle equals 3 rolls of grain.
Check required items from the trading if they are in the inventory. The seller takes the items while gives the party the items.
That is my simple function idea lol.

I think that how ancient civilization people did the barter trading before the invention of currency.
 
Last edited:

Oddball

Veteran
Veteran
Joined
Sep 4, 2014
Messages
1,884
Reaction score
521
First Language
English
Primarily Uses
N/A
It's easy to solve design-wise, however, I'm not going to be the one who provides the implementation solution. Here is what I have in mind. But you gotta accept the fact that you will still use the currency. With slightly different label so it does not feel like a currency.

We are going to rename the currency to "acceptance". You have these items:
Item A = acceptance 50
Item B = acceptance 100

You give two items B to the NPC, now you have 200 value of acceptance from B. With that 200 acceptance currency, you could trade it with 4 items A from the NPC. If you ordered 5 item A, they will refuse as it will not benefit them. However, there is nothing that is stopping you from just trading 3 items A. The currency will not be saved, it was only a temporary for one transaction.

By this, if a certain NPC needs a certain item, you could double the acceptance value by two times or more.
What i was trying to say, but better worded
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,523
Reaction score
4,534
First Language
English
Primarily Uses
RMMV
Since this is an implementation question, I'm moving this thread to MV support.

Moved to MV Support.

 

duty

Keepin' it simple
Veteran
Joined
Mar 13, 2012
Messages
96
Reaction score
104
First Language
English (US)
Primarily Uses
RMMV
again how to set an amount if i have 4 different items in bag, for one item in shop... i still would have to resort to proxies for the same item
Looks like I misunderstood the original post. It seems like the player should be able to pay with any combination of acceptable goods, and not always have a health kit cost 3 cans of tuna or a pair of D batteries.

An event driven system can still get you where you need to go with a system like this:
Here is what I have in mind. But you gotta accept the fact that you will still use the currency. With slightly different label so it does not feel like a currency.

We are going to rename the currency to "acceptance". You have these items:
Item A = acceptance 50
Item B = acceptance 100
The conditional branches for the evaluation of "acceptance" can be simplified if you group items to specific ID ranges in your item list, and created in order of intrinsic value.

So, if your game has 10 fish items, then items 1-10, 11-20, 21-30, etc would be the fish items, with the least ID number being the least quality fish, and the greatest ID number being the greatest quality fish.

When you evaluate to see if the item offered in trade is a "fish" item, you don't have to write 10 separate conditional branches for each item ID. You can just write a single set of evaluations for an item ID that satisfies the range.

So if your fish are all between items 21-30, the eval would be, is the selected item greater than or equal to 21 and less than or equal to 30.

And because you know that the fish IDs are in order of quality, you can just subtract 20 from the item ID and get a base acceptance value of 1-10.

Based on how much the shop keeper likes fish, you can then add a modifier to the final acceptance value.
 

gothicvoid

[GothicVoid]
Veteran
Joined
Feb 14, 2019
Messages
209
Reaction score
186
First Language
English
Primarily Uses
RMMV
Looks like I misunderstood the original post. It seems like the player should be able to pay with any combination of acceptable goods, and not always have a health kit cost 3 cans of tuna or a pair of D batteries.

An event driven system can still get you where you need to go with a system like this:


The conditional branches for the evaluation of "acceptance" can be simplified if you group items to specific ID ranges in your item list, and created in order of intrinsic value.

So, if your game has 10 fish items, then items 1-10, 11-20, 21-30, etc would be the fish items, with the least ID number being the least quality fish, and the greatest ID number being the greatest quality fish.

When you evaluate to see if the item offered in trade is a "fish" item, you don't have to write 10 separate conditional branches for each item ID. You can just write a single set of evaluations for an item ID that satisfies the range.

So if your fish are all between items 21-30, the eval would be, is the selected item greater than or equal to 21 and less than or equal to 30.

And because you know that the fish IDs are in order of quality, you can just subtract 20 from the item ID and get a base acceptance value of 1-10.

Based on how much the shop keeper likes fish, you can then add a modifier to the final acceptance value.
my issue with that is my item database is already set up and separated by types of foods (IE Fruits, Vegetables, Herbs and nuts, Fish, canned goods, etc.)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I had a birthday party earlier today. No-one showed up. ;_;
yay my offer is up :) joys
@wrigty12 hi! thanks for showing interest in my work. Sadly the tablet I'm using broke, so I wasn't able to create anything for weeks. Got a new one with display, I'm still not used to it though, so I'm still practicing, doing basic drawings again. Also I'm in my last year of college. Thesis, projects and other activities takes most of my time ;_;.
I'll get back to it whenever I get a free time.
Any artists here planning on participating in the Inktober art prompts this October?
It's right around the corner.
It's rpg maker related so I'll post it here, I worked on a little free rpg maker zine and this was my piece. Play Grimm's Hollow if you haven't already, I liked it a lot. (i don't remember if posting a link to a product even if free is allowed via profile posts, so if anyone knows lemme know)

Forum statistics

Threads
103,025
Messages
996,759
Members
134,497
Latest member
Grung
Top