Difference between revisions of "Inventory"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Inventory Subgroup Codes)
(Armor)
 
(7 intermediate revisions by 4 users not shown)
Line 17: Line 17:
  
 
See [[Treasure system]] for auto-generated loot.
 
See [[Treasure system]] for auto-generated loot.
 +
 +
== Inventory Count - basic syntax ==
 +
 +
How do you know if the user has enough inventory space before adding items?
 +
 +
<dascript>
 +
//Get max inventory size
 +
int iMaxInventorySize = GetMaxInventorySize(GetHero());
 +
object[] oInv = GetItemsInInventory(GetHero(), GET_ITEMS_OPTION_BACKPACK, 0, "", 1);
 +
 
 +
PrintToLog("Max Inventory size:" + IntToString(iMaxInventorySize));
 +
PrintToLog("Current Inventory count:" + IntToString(GetArraySize(oInv)));
 +
</dascript>
 +
 +
This returned 102 items in my inventory out of a total of 120.
  
 
== Inventory Subgroup Codes ==
 
== Inventory Subgroup Codes ==
  
Armor:
+
===Armor===
*Light Armor  331000
+
*351000 - Mage Robe / Clothing
*Medium Armor    332000
+
*331000 - Light Armor   
*Heavy Armor    333000
+
*332000 - Medium Armor     
*Massive Armor   334000
+
*333000 - Heavy Armor     
*Mage Robe    35100
+
*334000 - Massive Armor
 +
 
 +
===Glove===
 +
*311000 - Light Gloves
 +
*312000 - Medium Gloves
 +
*311000 - Heavy Gloves
 +
*314000 - Massive Gloves
  
Glove:
+
===Boots===
*Light Gloves    311000
+
*321000 - Light Boots
*Medium Gloves    312000
+
*322000 - Medium Boots
*Heavy Gloves    311000
+
*323000 - Heavy Boots
*Massive Gloves    314000
+
*324000 - Massive Boots
  
Boots:
+
===Helmets===
*Light Boots    321000
+
*301000 - Light Helmet
*Medium Boots    322000
+
*302000 - Medium Helmet
*Heavy Boots    323000
+
*303000 - Heavy Helmet
*Massive Boots    324000
+
*304000 - Massive Helmet
 +
*351500 - Mage Helmet
  
Helmets:
+
===Shields===
*Light Helmet    301000
+
*343000 - Kite Shield
*Medium Helmet   302000
+
*342000 - Large Shield    
*Heavy Helmet    303000
+
*341000 - Small Shield
*Massive Helmet    304000
+
*344000 - Tower Shield
*Mage Helmet    351500
+
  
Shields:
+
===Magic Staff===
*Kite Shield    343000
+
*221000 - Staff
*Large Shield    342000
+
*Small Shield    341000
+
*Tower Shield    344000
+
  
Magic Staff:
+
===Melee Weapons===
*Staff    221000
+
*201000 - Waraxes
 +
*202000 - Battleaxes
 +
*203000 - Daggers
 +
*204000 - Greatswords
 +
*205000 - Longswords
 +
*206000 - Maces
 +
*207000 - Mauls
  
Melee Weapons:
+
===Ranged Weapons===
*Axes    201000
+
*211000 - Shortbows
*Battleaxes    202000
+
*212000 - Longbows
*Daggers    203000
+
*213000 - Crossbows
*Greatswords    204000
+
*214000 - Ammo
*Longswords    205000
+
*Maces    206000
+
*Mauls    207000
+
  
Ranged Weapons:
+
===Other===
*Ammo    214000
+
*411000 - Amulets
*Crossbows    213000
+
*421000 - Belts
*Longbows    212000
+
*431000 - Rings
*Shortbows    211000
+
  
Other:
+
===Special===
*Amulets    411000
+
*361000 - Collar
*Belts    421000
+
*362000 - Warpaint
*Rings    431000
+
  
 
[[Category:Inventory]]
 
[[Category:Inventory]]

Latest revision as of 07:38, 9 July 2011

A creature or container object can contain one or more items in inventory.

If a container is destroyed the contents of its inventory are transferred to a Bodybag.

Each item can have the following properties set:

  • Subgroup
  • Slot - Sets whether the creature has equipped the item. "Not equipped" leaves the item in the general inventory, "Main" puts the item into the creature's main hand, and "off-hand" puts the item into the creature's off hand.
  • Set - Items that are part of a set are meant to be given as a group. !!This is handled in the giving/taking script?!!
  • StackSize - how many copies of this item are present in a stack
  • Droppable - a checkbox that indicates whether the item is dropped when the creature is killed
  • Stealable - a checkbox that indicates whether the item can be stolen from the creature
A typical creature inventory screen

Merchants also have an inventory.

See Treasure system for auto-generated loot.

Inventory Count - basic syntax

How do you know if the user has enough inventory space before adding items?

 //Get max inventory size
 int iMaxInventorySize = GetMaxInventorySize(GetHero());
 object[] oInv = GetItemsInInventory(GetHero(), GET_ITEMS_OPTION_BACKPACK, 0, "", 1);
 
 PrintToLog("Max Inventory size:" + IntToString(iMaxInventorySize));
 PrintToLog("Current Inventory count:" + IntToString(GetArraySize(oInv)));

This returned 102 items in my inventory out of a total of 120.

Inventory Subgroup Codes

Armor

  • 351000 - Mage Robe / Clothing
  • 331000 - Light Armor
  • 332000 - Medium Armor
  • 333000 - Heavy Armor
  • 334000 - Massive Armor

Glove

  • 311000 - Light Gloves
  • 312000 - Medium Gloves
  • 311000 - Heavy Gloves
  • 314000 - Massive Gloves

Boots

  • 321000 - Light Boots
  • 322000 - Medium Boots
  • 323000 - Heavy Boots
  • 324000 - Massive Boots

Helmets

  • 301000 - Light Helmet
  • 302000 - Medium Helmet
  • 303000 - Heavy Helmet
  • 304000 - Massive Helmet
  • 351500 - Mage Helmet

Shields

  • 343000 - Kite Shield
  • 342000 - Large Shield
  • 341000 - Small Shield
  • 344000 - Tower Shield

Magic Staff

  • 221000 - Staff

Melee Weapons

  • 201000 - Waraxes
  • 202000 - Battleaxes
  • 203000 - Daggers
  • 204000 - Greatswords
  • 205000 - Longswords
  • 206000 - Maces
  • 207000 - Mauls

Ranged Weapons

  • 211000 - Shortbows
  • 212000 - Longbows
  • 213000 - Crossbows
  • 214000 - Ammo

Other

  • 411000 - Amulets
  • 421000 - Belts
  • 431000 - Rings

Special

  • 361000 - Collar
  • 362000 - Warpaint