#Understanding Item Slots in Attachables

1 messages · Page 1 of 1 (latest)

muted gazelle
#

The value of c.item_slot in an attachable depends on where the attachable is slotted:

  • For slot.weapon.mainhand, returns 'main_hand'
  • For slot.weapon.offhand, returns 'off_hand'
  • For slot.armor.head, returns 'head'
  • For slot.armor.chest, returns 'torso'
  • For slot.armor.legs, returns ''
  • For slot.armor.feet, returns ''

Yes, because the last 2 return empty strings, there's no way using the context variable alone to tell when in those 2 slots/which one it is.

From there, q.item_slot_to_bone_name is… well… seemingly the lamest query ever conceivable. The output is a mapping of the given input:

  • For 'main_hand', returns 'rightitem'
  • For 'off_hand', returns 'leftitem'
  • For anything else, returns the input

Now I could be wrong about this last one, as this seems absurd compared to, say, chained conditionals, but you never know.

A Note on Molang Strings
Strings in Molang are seemingly hashed into 64-bit values using FNV1 64 for fast comparisons, but I can't prove this.

silver hound
#

How do we use it?