Numismatic Overhaul

Numismatic Overhaul

2M Downloads

Numismatic purse can overflow, potentially causing a reset or a very large debt

James103 opened this issue ยท 0 comments

commented

As of mod version a976964, it may be possible to overflow your numismatic purse, which may cause it to reset or incur a large negative debt.

This is problematic if you are gaining many (hundreds of) gold coins each day, as that makes it possible for you to reach 214,748 gold within your lifetime.

To reproduce:

  1. numismatic balance @s set 2147483600
  2. Obtain a silver or gold coin or at least 48 copper.
  3. Add them to your purse.
  4. Notice that the value exceeds 2147483647 (231-1) and has reset to either 0 or -231.

This should be fixed by properly capping purse balances to a reasonable maximum such as 214,748 gold.