Stackcode

From Nguhcraft Wiki
Jump to navigation Jump to search

Stackcode is a counting system that is designed for Minecraft storage.

Etymology

"Stackcode" is a play on "hexcode", which represents base 16 using the digits 0-9 and the letters A-F. This is despite hexcode using base 8, rather than base 16.

Design

Stackcode is based around base 8, as 8 is the square root of 64, which is one stack. Therefore, a stack of items is represented by any number from 01 to 77, and once you reach 100, you have more than one stack. However, storage options above the stack do not hold an integer power of 8 stacks. Therefore, the "hundreds place" of stackcode is replaced with a different radix, represented in base 8. This radix is 27, the number of items that fit in a single chest or shulker box. Likewise, the "myriads place" of stackcode also uses a radix of 27 (or 59, see the "Modified stackcode" section), and can represent the number of single chests filled with shulker boxes. The "hundred-myriads place" of stackcode, then, is simply the number of these chests, written in base 8, ad infinitum.

In some people's notesTemplate:Who, these numbers are instead written in decimal, but seeing as the stack is 64, the deviser of the stackcode system decided that this meant that the "canon" base of Minecraft should be 8 (or 16), rather than 10.

An example of a number written in so-called "pure stackcode" is 5;03;53. The semicolons separate the ones from the hundreds, the hundreds from the myriads, and if present, the myriads from the hundred myriads; beyond this point, normal commas are used every 4 octal places as expected. Therefore, this number represents 5 chests, 3 stacks, 43 (base 10) items, for a grand total of 8875 items.

Modified stackcode

For most of Nguhcraft Season 2's history, including the time in which the stackcode system was devised, shulker boxes were illegal items in Nguhcraft. Therefore, a modified version of the stackcode counting system is sometimes used.

Modified stackcode uses the observation that farms typically use hoppers to extend one chest into many. These hoppers hold up to 5 stacks of an item, which with the 54 stacks that a double-chest can hold, means every double-chest-hopper set used in a build holds 59 stacks of items. Therefore, in modified stackcode, the "hundreds place" (which normally represents the number of items that fit in a single-chest or shulker box) has a radix of 59, rather than 27.

Rarely, a version of stackcode is used which retains the original 27-radix hundreds place, but has a 59-radix myriads place. However, because items cannot be auto

Compressible stackcode

Compressible stackcode notes that some items, such as gold, can be compressed or uncompressed. For example, Þunan Qumreá's gold farm generates mostly gold nuggets, which are 1/9 of a gold ingot, which are 1/9 of a gold block, while Kozdenen's iron farm generates iron ingots, which are 1/9 of an iron block. Items like gold nuggets which can be compressed in a 1/9 ratio like this are referred to as "compressible", and result in saving 8/9 of the storage capacity of the item in the limit.

In cases like these, the number of items will likely be assumed to be in the most compressed form, such as a gold block, and a novemal point is added to the number, which ranges from 0 to 8, and represents the number of uncompressed items that are included. If the block is doubly compressible, as in gold nuggets, then a second novemal place is added after the first one, but no second point is added. This is not to be confused with Petrified Oak Slab representation, which uses an octal point to represent the number of Slablets the player has; this is not dissimilar to the compressible blocks, but Petrified Oak Slabs are a compressed form of a half-stack of slablets, rather than 9 slablets, so it is easy and non-wasteful to represent the quantity in octal as a number between 00 and 37.

An example of a quantity written in compressible stackcode is "3,21.44 gold". This represents 3 stacks, 17 (decimal) blocks of gold, plus 4 gold ingots, plus 4 gold nuggets. This is also a significantly compressed number compared to the total number of gold nuggets (the main drop of zombified piglins), which would be 16969 nuggets (11,26,11).

Rauratoshan's Office of the Treasury notates the amount of raw iron the royal vault has in compressible stackcode, while the amount of musan it has generated is represented in decimal form with a seximal point for payang, as is standard. Rarely, musan themselves are represented in stackcode, as like all other items, musan needs to be stored, and that storage will use the same stack/chest system as any other item would.

Uses

Stackcode is used in compact representation of Petrified Oak Slabs and farmable blocks and items.