From 1df38cb7820baa880cd46f1534b01b08473d49b6 Mon Sep 17 00:00:00 2001 From: Ixrec Date: Sat, 20 Dec 2025 22:19:42 +0000 Subject: [PATCH] Docs: explicitly document why 2^53-1 is the max size, not ^31 or ^63 (#5717) * explicitly document why 2^53-1 is the max size, not ^31 or ^63 * explicitly recommend 32-bit ids * make description correct by explicitly mentioning and linking to a description of 'safe' --- docs/world api.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/world api.md b/docs/world api.md index db6da50cf4..48e863fb26 100644 --- a/docs/world api.md +++ b/docs/world api.md @@ -225,7 +225,10 @@ and has a classification. The name needs to be unique within each game and must letter or symbol). The ID needs to be unique across all locations within the game. Locations and items can share IDs, and locations can share IDs with other games' locations. -World-specific IDs must be in the range 1 to 253-1; IDs ≤ 0 are global and reserved. +World-specific IDs **must** be in the range 1 to 253-1 (the largest integer that is "[safe](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER#description)" +to store in a 64-bit float, and thus all popular programming languages can handle). IDs ≤ 0 are global and reserved. +It's **recommended** to keep your IDs in the range 1 to 231-1, +so only 32-bit integers are needed to hold your IDs. Classification is one of `LocationProgressType.DEFAULT`, `PRIORITY` or `EXCLUDED`. The Fill algorithm will force progression items to be placed at priority locations, giving a higher chance of them being