MBX

Mount&Blade Expansion => Mod Graveyard => Modding Knowledge Base => Topic started by: Fisheye on October 03, 2007, 10:25:02 AM

Title: Inventory slots numbering chart
Post by: Fisheye on October 03, 2007, 10:25:02 AM
At-a-glance:

(http://img205.imageshack.us/img205/9283/invslotsft9.jpg) (http://imageshack.us)

Description (see header_items.py):
ek_item_0 = 0
ek_item_1 = 1
ek_item_2 = 2
ek_item_3 = 3
ek_head   = 4
ek_body   = 5
ek_foot   = 6
ek_gloves = 7
ek_horse  = 8
ek_food   = 9
Contents of slots can be retrieved with:
troop_get_inventory_slot
troop_get_inventory_slot_modifier

These slots can be set transparently (silently) with troop_set_inventory_slot.

Their amounts (e.g. 50/50) can be manipulated with

troop_inventory_slot_set_item_amount
troop_inventory_slot_get_item_amount
troop_inventory_slot_get_item_max_amount
Title: Re: Inventory slots numbering chart
Post by: grailknighthero on November 22, 2007, 03:56:20 PM
(agent_get_wielded_item,<destination>,<agent_id>,<hand_no>), What are the hand numbers?  0 and 1?  Which is the hand number for weapons?

(troop_get_inventory_slot,<destination>,<troop_id>,<inventory_slot_no>),  This gets an item id right?

(troop_set_inventory_slot,<troop_id>,<inventory_slot_no>,<value>),  The value is an item id right?  Can this be used in mission templates?  I mean actually change what the player's inventory in a mission and use the item you give the player?

Edit: Never mind I figured it all out except for allowing the item you put in the player's inventory to be available without the player going back to his inventory.

Title: Re: Inventory slots numbering chart
Post by: Hellequin on November 23, 2007, 10:38:42 AM
That latter is because the player agent, like all agents, doesn't seem to update its equipment on the fly.  Once assigned from a troop it needs a trigger (opening inventory or F-keying an onfield item seem to do it) to tell it to reassess the agent's stuff on the basis of the troop's.