- Joined
- Apr 21, 2018
- Messages
- 18
I want to make the value of an item change throughout the game based off how many of that item type have been sold recently.
Example: A player sells 100 loaves of bread. The base price for bread is 10g, every loaf of bread sold reduces the value by 1%, so 1g every 10 loaves. We could have a max stack size of 10 so the player can only sell in increments of 10. Therefore, the first stack would net the player 100g, the second stack 90g... and then by the player's last stack the npc says "No, f you, I don't want any more of your damn bread!" and gives the player 0 gold. Then over time the price will go back up to a base price.
What are some ways we could accomplish this?
The first way that comes to my mind is to remove the gold gained from selling the item and then add a modified value based on a variable, but then how do I remove the special effect from selling the item as to not confuse the player? They will see it sell for 10g but then only get 9...
Thanks!
Example: A player sells 100 loaves of bread. The base price for bread is 10g, every loaf of bread sold reduces the value by 1%, so 1g every 10 loaves. We could have a max stack size of 10 so the player can only sell in increments of 10. Therefore, the first stack would net the player 100g, the second stack 90g... and then by the player's last stack the npc says "No, f you, I don't want any more of your damn bread!" and gives the player 0 gold. Then over time the price will go back up to a base price.
What are some ways we could accomplish this?
The first way that comes to my mind is to remove the gold gained from selling the item and then add a modified value based on a variable, but then how do I remove the special effect from selling the item as to not confuse the player? They will see it sell for 10g but then only get 9...
Thanks!