The Piggy Bank icon

The Piggy Bank -----

a simple custom item based economy



Fractional Currency Values
This release implements support for currency values that are less than 1 and greater than 0.

This is not normally necessary in an item based economy where the base value is always 1, but the capability is implemented nonetheless.

Currency amounts could be fractional if the base item could be comprised with smaller items. For example, if your currency is called leather, your base item of leather would have a value of . But you might setup a currency item for rabbit hide that is 1/4 of the value if leather, matching the recipe. In this case, the value of rabbit hide could be 0.25.

You would also need to setup the decimal_format in the config.yml to allow decimal display of the currency amount, however you could have a balance of 2.5 leathers. In this case, 0.5 leathers is represented by 2 rabbit hides.

Note: While this works well for currencies with a base of 1 and items that are fractional of that base, it should be noted that currency items with decimal values that repeat when added together would not exactly match amounts precisely.

For example, if you have a gold ingot with a base value of 1, and decide that gold nugget should have a value of 0.11111111, then when you add up 9x of these nuggets, the value would be 0.99999999, resulting in a precision error of 0.00000001. When Piggy Bank is determining if a currency item is a multiple of the amount being considered, it will check if the error is within bounds of 0.0001 to -0.0001, however there will still be precision issues in the balances if you decide to use these repeating values.

This release also adds the commands /bank exchange and /exchange that will take any currency on-hand and consolidate it. This may be useful if the player does several withdrawals or physically receives coins from loot and may want to consolidate into higher currency denominations.
----------, Feb 9, 2020
Resource Information
Author:
----------
Total Downloads: 5,970
First Release: Jan 6, 2020
Last Update: Dec 18, 2023
Category: ---------------
All-Time Rating:
31 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings