Old School RuneScape Wiki
mNo edit summary
(cleanup)
 
(46 intermediate revisions by 40 users not shown)
Line 1: Line 1:
  +
{{External|rs}}
'''Stackable items''' are items that only take up one space in a player's [[inventory]] not being carried in [[note]] form. 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. Most items stored in the [[bank]] will stack, even if they don't stack in a player's [[inventory]]. A few exceptions would be [[brawling gloves]], [[satchels]], and the various forms of the [[morphic tool]]. Stackable items do not [[Weight|weigh]] anything, and cannot be withdrawn from the [[bank]] as a note.
 
  +
'''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 ==
Stackable items include [[bait]], [[charms]], [[runes]], [[:Category:Ammunition|all arrows]], [[:Category:Seeds|all seeds]], [[note]]s, and [[coins]]. Other stackable items include [[biscuit]]s, [[bolt]]s, [[bolt tips]], [[dart]]s, [[dart tip]]s, [[nail]]s, [[arrowtip]]s, [[Throwing knife|throwing knives]], [[cannonballs]], [[javelin]]s, [[thrownaxe]]s, [[feather]]s, [[arrow shaft]]s, [[needle]]s, [[thread]], [[summoning scroll |scrolls]], [[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.
 
  +
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.
[[File:Trading sticks.png|frame|right|[[Trading sticks]] also stack in the inventory.]]
 
[[File:Pieces of eight (3).png|frame|right|[[Pieces of Eight]] stack in the inventory.]]
 
   
 
== Truncation convention ==
==Limit of a stack==
 
  +
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]].
The maximum number of an item that a player can hold in a stack is 2,147,483,647, as limited by a signed (positive and negative) 32-bit [[wikipedia:Integer|integer]], i.e. 2<sup>31</sup> - 1.
 
   
 
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:
[[Jagex]] would only be able to expand this if 64-bit integers were used instead, as unsigned (positive only) integers do not exist as a primitive data type in [[Java]]. This would be problematic to implement, however, as it would require doubling the amount of storage space used for ''all'' item quantities. Using the 64 integer it will equal to: 9,223,372,036,854,775,807.
 
   
 
{| class="wikitable"
Despite [[Java]] lacking native support for unsigned arithmetic, a quick search through a computer's memory while it is playing RuneScape finds a 32-bit unsigned integer attached to every object in one's inventory that controls the amount of that object in the [[inventory]] slot. But, these variables are for local use only to draw the object, and changing them has no effect after the game updates the player's inventory.
 
 
!colspan=2|Range
 
 
!rowspan=2|Text Colour
It should also be noted that a player can own more than this amount of gold, but can only hold that many in a single stack. For instance, a player could hold 2,147,483,647 in an inventory and another 2,147,483,647 in his bank, so long as the two stacks are never combined.
 
 
!rowspan=2|Suffix
 
 
!rowspan=2|Multiplier
In a recent question and answer session with [[Andrew Gower]], he stated that they wouldn't change to a 64-bit integer because there are too many lines of code to change in the RuneScape program.
 
 
!rowspan=2|Example
 
==Truncation convention==
 
 
[[File:Truncation.png|frame|right|This also applies to items other than [[coins]].]]
 
 
When referring to numbers, '''truncation''' is the removal of less [[wikipedia:Significant figures|significant 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 "31633", and the examine text is that of an individual item. For stacks of 100,000 or more, the examine text displays the exact number of items in the stack. The following conventions are used to display the quantity in a bank or inventory slot:
 
 
It should be noted that these truncation conventions are also applied to items other than [[coins]].
 
 
{|class="wikitable"
 
!colspan="2"|Range
 
!rowspan="2"|Text Colour
 
!rowspan="2"|Suffix
 
!rowspan="2"|Multiplier
 
!rowspan="2"|Example
 
 
|-
 
|-
!from
+
!from!!to
!to
 
 
|-
 
|-
  +
|0||99,999||Yellow||None||1||style="background-color: black; color: white;"|99,999 displayed as "<span style="color: yellow; font-weight: bold;">99999</span>"
|1
 
|99,999
 
|Yellow
 
|None
 
|1
 
|99,999 displayed as "<span style="color: yellow; background-color:black;padding:2.5px;">'''99999'''</span>"
 
 
|-
 
|-
  +
|100,000||9,999,999||White||K||1,000||style="background-color: black; color: white;"|9,999,999 displayed as "<span style="color: white; font-weight: bold;">9999K</span>"
|100,000
 
|9,999,999
 
|White
 
|K
 
|1,000
 
|9,999,999 displayed as "<span style="color: white; background-color:black;padding:2.5px;">'''9999K'''</span>"
 
 
|-
 
|-
  +
|10,000,000||2,147,483,647||Green||M||1,000,000||style="background-color: black; color: white;"|999,999,999 displayed as "<span style="color: #00FF80; font-weight: bold;">999M</span>"
|10,000,000
 
|2,147,483,647
 
|Green
 
|M
 
|1,000,000
 
|999,999,999 displayed as "<span style="color: #00FF80; background-color:black;padding:2.5px;">'''999M'''</span>"
 
 
|}
 
|}
 
==References==
 
{{reflist}}
 
 
[[de:Stapelbar]]
 
 
[[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"