Skip to main content

Timeline for RPG Currency System

Current License: CC BY-SA 3.0

7 events
when toggle format what by license comment
Jun 10, 2020 at 13:24 history edited CommunityBot
Commonmark migration
Mar 17, 2016 at 13:11 comment added Krythic Logic elsewhere will handle that, such as withdrawing/depositing money into an in-game bank. If the bank is full, I will simply disallow the action.
Mar 17, 2016 at 12:39 comment added JvR @Krythic Add/Subtract Inverse: not going negative is a good thing; bottoming out against zero without throwing an exception is not. The same with the upper bound: if you need a bound, do enforce it, but consider informing the user of your class that things did not go as planned. Since you'll never hit that bound, the exception won't hurt anyone, right? :)
Mar 17, 2016 at 1:48 comment added Krythic "Add/Subtract are not inverse operations" Let me first start by stating that actually achieving 999 platinum in my game would likely never happen. Conceptually, platinum would never drop from enemy encounters, and 1 or 2 Gold would be a rare occurance, too. The upper bounds of platinum(being so large) is almost unrealistic to achieve by anyone. I set up a test-case earlier that gave me 1 Silver every few seconds, and it took forever to get up to a platinum. The only other thing would be the lower bounds, which I am fine with it not being able to go negative.
Mar 17, 2016 at 1:44 comment added Krythic "Or would you set a base 'worth'?" I would Compute the base price in Copper, then compare to see if the player has enough money, and then if they do, simply subtract the amount from what they currently have.
Mar 17, 2016 at 1:34 comment added Krythic "HasXYZ vs GetXYZ" : How about this new implementation instead: pastebin.com/b9mGqXdm?
Mar 16, 2016 at 21:18 history answered JvR CC BY-SA 3.0