Inventory

From Dragon Age Toolset Wiki
Jump to: navigation, search

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