Old School RuneScape Wiki
m (→‎Truncation convention: General fixes)
(cleanup)
 
(18 intermediate revisions by 17 users not shown)
Line 1: Line 1:
  +
{{External|rs}}
'''Stackable items''' are items which only take up one space in a player's [[inventory]]. When multiple stackable items are carried in the inventory, a number is shown on the item's picture to indicate the quantity of items in the stack. Stackable items do not [[weight|weigh]] anything, and cannot be withdrawn as a bank note. Stackable items include [[runes]], [[:Category:Ammunition|arrows]], [[:Category:Seeds|seeds]], [[bank]] notes, [[coins]], and other items such as [[feather]]s, [[arrow shaft]]s, [[nail]]s, [[bolt tips]], [[skewer stick]]s, [[woad leaves]], and [[proboscis]]es. Also, [[swamp tar]] and anything made from swamp tar, such as [[swamp paste]] or [[guam tar]], is always stackable. Most items appear to be stackable in a player's [[bank]] to preserve bank space.
+
'''Stackable items''' are items which only take up one space in a player's [[inventory]]. When multiple stackable items are carried in the inventory, a number is shown on the item's picture to indicate the quantity of items in the stack. Stackable items do not [[weight|weigh]] anything, and cannot be withdrawn as a bank note. Stackable items include [[coins]], [[runes]], [[:Category:Ammunition|arrows]], [[:Category:Seeds|seeds]], [[bank]] notes, [[purple sweet]]s and other items such as [[feather]]s, [[arrow shaft]]s, [[nail]]s, [[bolt tips]], [[skewer stick]]s, [[woad leaves]], and [[proboscis]]es. Also, [[swamp tar]] and anything made from swamp tar, such as [[swamp paste]] or [[guam tar]], is always stackable. Most items appear to be stackable in a player's [[bank]] to preserve bank space.
   
 
== Limit of a stack ==
 
== Limit of a stack ==
 
The maximum quantity of an item a player can hold in a stack is 2,147,483,647 (2³¹-1). This is because the value of a stack is represented as a signed (positive or negative) 32-bit integer. This could be improved by making the coin value an unsigned (only positive) 32-bit integer.
   
  +
[[Dark essence fragments]] and [[Coin pouch]]es can stack only to a specific amount instead of following the format for other stackable items.
The maximum quantity of an item a player can hold in a stack is 2,147,483,647, as limited by a signed (positive and negative) 32-bit integer. This could be improved by making the coin value an unsigned (only positive) 32-bit integer. It should be noted that these truncation conventions are also applied to items other than [[coins]].
 
   
 
== Truncation convention ==
 
== Truncation convention ==
 
 
When referring to numbers, '''truncation''' is the removal of insignificant digits from the end of a number.
 
When referring to numbers, '''truncation''' is the removal of insignificant digits from the end of a number.
   
 
In ''RuneScape'', stacks of items have their quantity truncated to reduce the number of characters required to show the quantity of an item in a [[stack]].
 
In ''RuneScape'', stacks of items have their quantity truncated to reduce the number of characters required to show the quantity of an item in a [[stack]].
   
For stacks of items containing less than 100,000, the amount is rendered precisely, such as "31633", and the examine text is that of an individual item. For stacks 100,000 or more, the examine text displays the exact number of items in a stack, and the following conventions are used to display the quantity in a bank or inventory slot:
+
For stacks of items containing less than 100,000, the amount is rendered precisely, such as "31337", and the examine text is that of an individual item. For stacks 100,000 or more, the examine text displays the exact number of items in a stack, and the following conventions are used to display the quantity in a bank or inventory slot:
   
 
{| class="wikitable"
 
{| class="wikitable"
Line 29: Line 30:
 
|}
 
|}
 
[[Category:Mechanics]]
 
[[Category:Mechanics]]
  +
[[Category:Stackable items]]
  +
[[Category:Items]]

Latest revision as of 12:00, 3 March 2019

Stackable items are items which only take up one space in a player's inventory. When multiple stackable items are carried in the inventory, a number is shown on the item's picture to indicate the quantity of items in the stack. Stackable items do not weigh anything, and cannot be withdrawn as a bank note. Stackable items include coins, runes, arrows, seeds, bank notes, purple sweets and other items such as feathers, arrow shafts, nails, bolt tips, skewer sticks, woad leaves, and proboscises. Also, swamp tar and anything made from swamp tar, such as swamp paste or guam tar, is always stackable. Most items appear to be stackable in a player's bank to preserve bank space.

Limit of a stack

The maximum quantity of an item a player can hold in a stack is 2,147,483,647 (2³¹-1). This is because the value of a stack is represented as a signed (positive or negative) 32-bit integer. This could be improved by making the coin value an unsigned (only positive) 32-bit integer.

Dark essence fragments and Coin pouches can stack only to a specific amount instead of following the format for other stackable items.

Truncation convention

When referring to numbers, truncation is the removal of insignificant digits from the end of a number.

In RuneScape, stacks of items have their quantity truncated to reduce the number of characters required to show the quantity of an item in a stack.

For stacks of items containing less than 100,000, the amount is rendered precisely, such as "31337", and the examine text is that of an individual item. For stacks 100,000 or more, the examine text displays the exact number of items in a stack, and the following conventions are used to display the quantity in a bank or inventory slot:

Range Text Colour Suffix Multiplier Example
from to
0 99,999 Yellow None 1 99,999 displayed as "99999"
100,000 9,999,999 White K 1,000 9,999,999 displayed as "9999K"
10,000,000 2,147,483,647 Green M 1,000,000 999,999,999 displayed as "999M"