Sheethes for swords & body displacement: heartlings are magicians

Hi all,
i woke up this morning with inspiration and i -nearly- pulled it off.

i wanted to make it so that when a hearthling enquipped a sword, a sword sheeth would be put on their left hip.

made a model, took code from the two-handed sword (the offhand bit, recycled into a sheath)

{
   "mixins": "stonehearth:mixins:item_properties",
   "type": "entity",
   "components": {
      "model_variants": {
         "default": {
            "layer": "clothing",
            "transparent": "true",
            "models": [
               "file(sword_sheeth.qb)"
            ]
         },
         "female": {
            "layer": "clothing",
            "transparent": "true",
            "models": [
               "file(sword_sheeth_female.qb)"
            ]
         }
      },
      "stonehearth:equipment_piece": {
         "render_type": "merge_with_model",
         "slot": "accessory",
         "ilevel": 1,
         "required_job_level": 0,
         "roles": "combat",
         "equip_effect": "stonehearth:effects:weapon_level_up"
      }
   },
   "entity_data": {
      "stonehearth:net_worth": {
         "value_in_gold": 0,
         "rarity": "common",
         "shop_info": {
            "buyable": false,
            "sellable": false
         }
      },
      "stonehearth:catalog": {
         "display_name": "i18n(stonehearth:entities.armor.sword_sheeth.display_name)",
         "description": "i18n(stonehearth:entities.armor.sword_sheeth.description)",
         "icon": "file(sword_sheeth.png)",
         "category": "armor",
         "material_tags": "leather armor light_armor stockpile_equipment"
      }
   }
}

but it brings with it an unexpected problem.

i hooked it up on my bronze sword off my nordling mod. (the code above)
and it works perfecly on innitial enquip: hearthling grabs sword, gets both a sword and a sheeth, propperly alligned. (i had to model on the opposite side that come ingame, no clue why)

the problem comes when that hearthling enquips armour. suddenly the main body floats outside the hearthling! like a bad magic trick!

while, if i un-footman them, let them armour up first, and THEN pick up the word everything is ok.
anyone know why this is?

1 Like

seems the system did not like an optimised model, had to use the old "bigass block of nothing"sollution. so a bit more kb-inneficient, but it works now!

little sneak peek

8 Likes