Difference between revisions of "AGIWiki/Inventory items"

From ScummVM :: Wiki
Jump to navigation Jump to search
(Created page with "{{AGIWiki}} The inventory item data type refers to the items that are listed in the game's OBJECT file. Inventory items are referenced in logics by an u...")
 
m (added screenshots)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{AGIWiki}}
{{AGIWiki}}


The inventory item data type refers to the items that are listed in the game's [[AGIWiki/OBJECT file|OBJECT file]].
<code>Prefix: i, i0 - i255</code>
 
The inventory item data type refers to the items that are listed in the game's [[AGIWiki/OBJECT file|OBJECT file]]. These items are things that the player can carry around with them. Their names are stored in the OBJECT file. A game contain up to 256 objects (numbered from 0-255). Each object used by the game must be present in the OBJECT file.
 
Every object has a room number which is a value from 0-255. If the room number is 255, it is in the player’s inventory.


Inventory items are referenced in logics by an unsigned eight bit number that corresponds to the index of the item in the OBJECT file.
Inventory items are referenced in logics by an unsigned eight bit number that corresponds to the index of the item in the OBJECT file.


The first inventory item (index 0) in all known [[AGIWiki/Sierra Made Games|Sierra games]] is the single character '?'. Other item indices that aren't used by the game are also set to this single question mark character. Setting the first item to a single question mark does not appear to be required. Most [[AGIWiki/Fan Made Games|fan made games]] continue using the question mark for item 0 and any unused/undefined items.
The first inventory item (index 0) in all known [[AGIWiki/Sierra Made Games|Sierra games]] is the single character '?'. Other item indices that aren't used by the game are also set to this single question mark character. Setting the first item to a single question mark does not appear to be required. Most [[AGIWiki/Fan Made Games|fan made games]] continue using the question mark for item 0 and any unused/undefined items.
[[File:AGIWiki King's Quest 3-Fly wings.png|thumb|320px|right|Fly wings in [[AGIWiki/King's Quest III: To Heir Is Human|King's Quest III: To Heir is Human]]]]
[[File:AGIWiki AGI Studio-Object Editor-King's Quest 3-Fly wings.png|thumb|320px|right|Fly wings in [[AGIWiki/AGI Studio|AGI Studio's]] Object Editor.]]
== Related ==
* [[:Category:AGIWiki/Inventory_Item_Commands|Inventory Item commands]]


== Data types ==
== Data types ==


* Data types
{{AGIWiki/Data types}}
** [[AGIWiki/Number|Numbers]]
** [[AGIWiki/Variable|Variables]]
*** [[AGIWiki/Special variables|Special variables]]
** [[AGIWiki/Flag|Flags]]
*** [[AGIWiki/Special flags|Special flags]]
** [[AGIWiki/Message|Messages]]
** [[AGIWiki/Animated object|Animated objects]]
** [[AGIWiki/Inventory items|Inventory items]]
** [[AGIWiki/String|Strings]]
** [[AGIWiki/index.php/Word|Words]]
** [[AGIWiki/Controllers|Controllers]]

Latest revision as of 08:30, 22 September 2016

AGIWiki


Prefix: i, i0 - i255

The inventory item data type refers to the items that are listed in the game's OBJECT file. These items are things that the player can carry around with them. Their names are stored in the OBJECT file. A game contain up to 256 objects (numbered from 0-255). Each object used by the game must be present in the OBJECT file.

Every object has a room number which is a value from 0-255. If the room number is 255, it is in the player’s inventory.

Inventory items are referenced in logics by an unsigned eight bit number that corresponds to the index of the item in the OBJECT file.

The first inventory item (index 0) in all known Sierra games is the single character '?'. Other item indices that aren't used by the game are also set to this single question mark character. Setting the first item to a single question mark does not appear to be required. Most fan made games continue using the question mark for item 0 and any unused/undefined items.

Fly wings in AGI Studio's Object Editor.

Related

Data types