Jump to content

Hardcoded limit on the number of EQUIPSLOTS ?


Recommended Posts

Hello,

 

correct me if I am wrong but i looks like there is a limit on the numer of equipslots that can be added through mods.

When reaching the eigth equipslots (reached using the regular "hands", "body" and "torso", to which is added "back" and "neck" from Extra Equip Slot, the "quiver" from Archery Mod, the "drug" slots from Apothecary Medicamento and the "waist" slot from EES API Edition), the game displays the following error

 

Net partial byte (8) out of range [0, 7]
Error serializing lua state for entity hammer[108643]
Net partial byte (8) out of range [0, 7]
Error serializing lua state for entity crossbow[108651]
Net partial byte (8) out of range [0, 7]
Error serializing lua state for entity spear[108671]
 

 

It took me some time to understand it was related to the custom equipslots, but I noticed that the error disappear as soon as one of the extra equip slot is removed. Then maybe I am wrong?

 

If not, then I was wondering if it would be possible to increase this limitation?

 

 

EDIT : and I think I am right.

When you equip something here is what is called

 

    self.inst.replica.equippable:SetEquipSlot(equipslot)

 

This function is 

 

function Equippable:SetEquipSlot(eslot)
    self._equipslot:set(EQUIPSLOT_IDS[eslot])
end
 
and finally 
 
    self._equipslot = net_tinybyte(inst.GUID, "equippable._equipslot")
 
It's a tinybyte which is a 3-bits unsigned integer, so the max is 2^2 + 2^1 + 2^0 = 7
 
Could it be raised?
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...