Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - [D&D5e] - Merchant Currency Conversion breaks when over 99=1 Ratio #694

Open
NelanaPrime opened this issue Feb 12, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@NelanaPrime
Copy link

I confirm the following:

  • [✅] I am on the latest version of Item Piles
  • [✅] I have tried to clear my cache (Ctrl / Cmd + F5)
  • [✅] I have checked the console for errors (F12 to open, Console tab)
  • [✅] I have tried to reset Item Piles' system settings
  • [✅] I have reproduced this bug with only item piles & its dependency modules enabled

Describe the bug
When you have the currencies configured for a 100 = 1 ratio (100 copper = 1 silver, 100 silver = 1 gold ect) the merchants no longer properly give change back.

To Reproduce
Steps to reproduce the behavior:

  1. Set the currency settings to a 100=1 ratio
  2. Give a character one platinum/gold
  3. Buy something worth less than 100 copper
  4. Merchant claims you will pay "1 Silver" even if the actor doesn't have any silver, and will only give you copper change. Merchant doesn't take the platinum and leave you with the item, and extra copper from nowhere.

Expected behavior
If you only have a platinum and you buy an item worth 50 copper with a 100=1 you would expect to be left with: 0 Plat 99 gold 99 silver 50 copper

Screenshots
Gif of me performing the transaction:
Image

Screenshot of my currency settings:
Image

Setup

  • Foundry Version: 12.331
  • System Version: Tested both DND5e 3.3.1 and 4.2.2
  • Item Piles Version: 3.1.6
  • Browser & version: Foundry standalone program

Active modules
Tested with Item piles only, issue persists.

Additional context
For some reason, The module seems to perform perfectly fine up to a 99=1 ratio (99 copper = 1 silver, ect). But as soon as you change it to 100=1 it breaks.

@NelanaPrime NelanaPrime added the bug Something isn't working label Feb 12, 2025
@NelanaPrime
Copy link
Author

Bit of an update after messing around with this a little more. Same issue when using the standard 5E currencies. Give a actor 1 plat and buy something for one copper. The game says you pay a gold and you gain money out of thin air as it doesn't take the platinum you have.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant