Hello,
There's no means to access/manipulate party inventory or I am missing something? Couldn't find in docs.
Any means to access inventory?
Re: Any means to access inventory?
http://www.grimrock.net/modding/scripting-reference/
and scroll down to the last few entries in Champion section
and scroll down to the last few entries in Champion section
Re: Any means to access inventory?
Sure, what do you want to know? How to add an item? how to look for an item in the inventory? To remove it? _Here's the list of instructions. Hope it helps!
Champion:insertItem(slot, item)
Inserts an item to an equipment slot. Slot must be one of the following: 1 (head), 2 (torso), 3 (legs), 4 (feet), 5 (cloak), 6 (neck), 7 (left hand), 8 (right hand), 9 (gaunlets), 10 (bracers), 11-31 (backpack slots).
Champion:removeItem(slot)
Removes an item from an equipment slot.
Champion:getItem(slot)
Returns an item in an equipment slot.
Champion:insertItem(slot, item)
Inserts an item to an equipment slot. Slot must be one of the following: 1 (head), 2 (torso), 3 (legs), 4 (feet), 5 (cloak), 6 (neck), 7 (left hand), 8 (right hand), 9 (gaunlets), 10 (bracers), 11-31 (backpack slots).
Champion:removeItem(slot)
Removes an item from an equipment slot.
Champion:getItem(slot)
Returns an item in an equipment slot.
Re: Any means to access inventory?
@shroom oh man, you've beaten me for two seconds...
Re: Any means to access inventory?
My bad. Missed info about 11-31 being backpack slots... Thanks!
Re: Any means to access inventory?
Hmm,
Champion:getItem() seem always returning nil to me - party:getChampion(1):getItem(i) wherever slot I test (ie 1-31). What's me doing wrong?
update:
Weird thing! all nil from getItem() is if your champions have only everlasting torch equiped. If party has any other item beside everlasting torch - getItem() works fine and return all items correctly, including debug torch.
Champion:getItem() seem always returning nil to me - party:getChampion(1):getItem(i) wherever slot I test (ie 1-31). What's me doing wrong?
update:
Weird thing! all nil from getItem() is if your champions have only everlasting torch equiped. If party has any other item beside everlasting torch - getItem() works fine and return all items correctly, including debug torch.
Re: Any means to access inventory?
I've tried but it's working fine for me... don't know what happened to youMebaru wrote:Hmm,
Champion:getItem() seem always returning nil to me - party:getChampion(1):getItem(i) wherever slot I test (ie 1-31). What's me doing wrong?
update:
Weird thing! all nil from getItem() is if your champions have only everlasting torch equiped. If party has any other item beside everlasting torch - getItem() works fine and return all items correctly, including debug torch.