That's a good idea. I have a suggestion, how about you add it yourself? Get your feet wet in adding python commands because I'm sure there will be lots of little requests like that. The commit is https://github.com/GrognardsFromHell/TemplePlus/commit/194b436e29ad6702b1a411e4ea332423c91407e4 If Mind Blade is the name of the modifier, yeah.
How many invisible inventory slots are there past the first 24? I looked through inventory.h/cpp but c0uldn't find anything.
They 'end' at 200 (which is where the equipped inventory indices begin; btw don't mix this up with the EquiSlot enums, these are offsets relative to 200). There's actually more past the equipped slots, which belong to the unfinished 'bags'.
I'm seeing a number of functions that are preceded by a "_", and they seem to stem back to the inventorysystem using rebase() for them. Is that tying the function directly to binary in the toee engine? Because it limits me from knowing more in depth how they work, like setitemparent for example, which just calls _setitemparent.
Yeah, the _ functions are calls to the engine. Gotta add descriptions to those. For your purposes you can check what the python command for item_get does and add it to item_wield.
I thought you wanted to make item_wield able to equip an item that is not currently in the inventory? To do that you first have to transfer it to inventory. Alternately you can modify item_get so that it takes an optional flags argument that tells it it's ok to put an item in the invisible slots.
I think in the wield modification, I want to check first if the item is in the inventory or not. Would using GetInventoryLocation be the best to do this? IE it returns 0 if item is not found in inventory. Also, given this line Code: (*inventoryArray)[i] = obj->GetObjHndl(invenField, i); If there was no item (empty inventory slot) at any point, would the value be equal to 0?
Are you using Visual Studio? You had some glaring errors (undeclared result variable in ItemGet, and did not use ivnentory.GetParent for Wield)
My version of VS 2015 kicked out of trial and wouldn't let me use it any more. I just edited in browser. I see my miss on inventory.getparent, but the result variable in itemget seems fine to me?
Eh? Why did you have to use a trial? Were you using an enterprise version or something? There's a free edition for non-commercial use. Editing in browser is a bad idea because you can easily miss errors like that. As for result, you declared it in an internal scope - it's undefined outside of the if (...){} clause. (this isn't Python...) Also I didn't even notice that SetItemParent is the same as inventory.ItemGet, heh.
Whoops, forgot that small stuff. Just pushed twice to master branch for the fixes. I used trial because that was the first version I found, I thought it was the free edition . Next weekend I'll be able to get access to my 2012 install disc for VS that should work. As for mind blade, it seems that with the changes, everything should work properly now hopefully. I just haven't made it recognized as the new weapon type yet, for that can I just put wt_mindblade in the protos.tab for weapon type?