Grazer said the max int was 2,147,483,647 not 999,999,999 but 9 complete decimal places is easier I guess.
Also I don’t see how 9 decimal places equates to 81 locations if you use 1 decimal place per location going by your description, so at best it only works for a 3x3 grid or 9 positions.
I thought of a way to pack 27 bits into a single Number component though, using 9 decimal places as the max. Imagine a 27x1 grid:
A B C - D E F - G H I - J K L - M N O - P Q R - S T U - V W X - Y Z !
for location A or 1,1 we can record a location by using value 1 if there is something there, or 0 if nothing
for location B or 2,1 we can record a location using value 2 or 0
for C we can record a location using 4 or 0
These three bits are added together or multiplexed into a single decimal place that records all three position’s data. For example this is all the possible outcomes:
0 means A B and C contain nothing.
1 means A contains something, and B and C contain nothing. A=1
2 means B contains something, and A and C contain nothing. B=2
3 means A and B contain something, C nothing. A=1 + B=2
4 means C contains something, and A/B nothing. C=4
5 means A and C contain something, B nothing. A=1 + C =4
6 means B and C contain something. B=2 + C=4
7 means A B and C contain something. A=1 + B=2 + C=4
So this first decimal place can be between 0-7 and represent 3 positions. For the second decimal place you use the same values but multipled by increasing values of ten.
the next group D E F uses 10,20,40. the third uses 100,200,400. the fourth 1000,2000,4000, and so on with the final 9th group uses 100,000,000 200,000,000 and 400,000,000.
The way I imagined this being done was having recording blocks spaced out every 27 blocks, or alternatively and probably easier just a single recording block that moves throughout the map grid writing the data into Number components. Every 27 blocks it just restarts and writed onto the next Number component. After everything is done being written down these numbers can be saved and when it’s tome to start the map and load, it reads these numbers in reverse to spawn out blocks in the location as it moves around the map grid. Each block type would potentially have to have its own write/read system though, but it should be as easy as making anew object, copy/pasting the code, changing the specific block type to the new block.