login

Author Topic: Inventory slots numbering chart  (Read 4646 times)

Offline Fisheye

  • Blues Brother
  • Moderator
  • *****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Inventory slots numbering chart
« on: October 03, 2007, 10:25:02 AM »
At-a-glance:



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
« Last Edit: October 03, 2007, 10:49:47 AM by Fisheye »

grailknighthero

  • Guest
Re: Inventory slots numbering chart
« Reply #1 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.

« Last Edit: November 22, 2007, 05:23:13 PM by grailknighthero »

Offline Hellequin

  • Journeyman
  • ***
  • Posts: 254
    • View Profile
Re: Inventory slots numbering chart
« Reply #2 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.