tassaron / dnd-character

library for making Dungeons & Dragons 5e characters as serializable data
https://pypi.org/project/dnd-character/
Eclipse Public License 2.0
44 stars 17 forks source link

Coins #9

Closed tassaron closed 1 year ago

tassaron commented 1 year ago

Currently wealth is a single int property of the Character class.

According to the SRD: Screenshot_20230712_144828

So ultimately it would be nice to have some these coins each individually represented, maybe with some conversion functions.

For reference sake, the current SRD_equipment has stuff like this:

{'yew-wand':
    {'cost':
        {'quantity': 10, 'unit': 'gp'}
    }
}

So it's best to use the name gp instead of gold or anything else.

gergo-szabo commented 1 year ago

The universal standard is gold. Other denominations usually not relevant for gameplay. Platinum might be interesting for volume/weight reduction but volume/weight management is rarely used. Silver might be interesting due to certain enemies. "Emergency" crafting or puzzles might need the less used ones.

I think wealth should be a float, rounded to 2 digit (copper) for better representation. It should be the serializable value.

Internally a wealth_detailed dict could track what the players have for more detail oriented use cases. I think it would mimic a realistic money management if

Functions needed:

tassaron commented 1 year ago

I agree with you about gold being the standard, and I think wealth being a float with 1 gp = 1.00 wealth would make a lot of sense.

However, I think we should try to avoid inferring the distribution of coins if possible, but resort to it if necessary. I don't want to prevent someone having 100gp worth of copper. So we have to serialize the wealth_detailed as well, though it isn't necessary for deserialization.

Both your functions would be needed, then.