Lazauya Posted December 1, 2016 Posted December 1, 2016 Hello, currently I'm having a bit of trouble with inventories. I want to access entries to the player's or some other container's inventory, but apparently I have come across a strange quirk. I'm taking an object reference and casting it as a ExtraContainerData. Then I acess data->objList to get the tList of EntryData's. However, when I Fall the Count() oft tList, only 5 members are counted, even though I know there are more. The five members appear to be the set of iron armor the player is wearing. I'm very confused as to why this is. Should I be casting the object ref as something else to access the entire list? Or is there another list included in the ExtraContainerChanges I don't know about? For reference, here's a code snippet:ExtraContainerChanges * pToContainerREF = static_cast<ExtraContainerChanges*>(ContainerREF->extraData.GetByType(kExtraData_ContainerChanges)); ExtraContainerChanges::EntryDataList * pToContainerREFItemList = pToContainerREF->data->objList; pToContainerREFItemList->Count() //returns 5 I'm using the "default inventory", the inventory that a generic player actor has when they load into a cell without loading a save game or starting a new one.
irswat Posted December 1, 2016 Posted December 1, 2016 (edited) Why wouldn't you use papyrus to access a containers inventory, and then pass that to your plugin? speed? Edited December 1, 2016 by irswat
Lazauya Posted December 2, 2016 Author Posted December 2, 2016 On 12/1/2016 at 9:55 PM, irswat said: Why wouldn't you use papyrus to access a containers inventory, and then pass that to your plugin? speed?My goal is to eventually add things to the container with just SKSE, but since I was having trouble that more complex task I thought it better to try a more simple one, like finding all the items in said container. But so far all I can find is a list of items that does directly reference some items in the container, but not all. Because of this, I'm very confused.If you want to know exactly why: I'm trying to add items to the inventory without letting them stack. This might sound stupid, but it's part of a larger project and this is one of the most crucial parts.
irswat Posted December 2, 2016 Posted December 2, 2016 (edited) have you looked at http://www.nexusmods.com/skyrim/mods/49743/? , this: https://github.com/xanderdunn/skaar/wiki/Inventories , and this: http://www.nexusmods.com/skyrim/mods/1227/? Edited December 2, 2016 by irswat
Recommended Posts