v1.3.1 — Big numbers survive the console
The console keeps big numbers exact with the new big: prefix.
Big numbers are no longer rounded
Section titled “Big numbers are no longer rounded”playerdata set read every value as JSON, and JSON has no integers past what a
double holds. A big number typed into the console was stored smaller than it was
typed, with no warning:
123456789012345678901234567890 -> 1.2345678901234568e+299007199254740993 -> 9007199254740992A field holding a BigNumber is a table of limbs, so
overwriting it with an ordinary number also broke the game’s own arithmetic on
that field, far from the command that caused it.
Digits are now promoted to a big number when an ordinary number cannot hold them
exactly. The check compares against what a number reproduces, so the boundary
is exact:
9007199254740992 stays an ordinary number9007199254740993 becomes a big numberThe big: prefix
Section titled “The big: prefix”A small value such as 1500 fits either way, so the console cannot tell whether
a field should hold it as a big number. Mark it explicitly:
playerdata set Someone main Stats.Coins big:1500A big: value that is not whole digits is refused instead of being stored as
text.
What get prints, set accepts
Section titled “What get prints, set accepts”The console used to shorten a big number, for example to 123.46Oc, so an admin
could not read the stored value or type it back. A big number now prints as
big: followed by every digit, and pasting that into set stores the same
value.
Full changelog
Section titled “Full changelog”Every change in this release is listed in the changelog.