Skip to content

Skate attachment to player model — how it actually works #11

Description

@illmatix

@Danweel — looping you in since this came up and may differ from what your research described. Posting here so it's easy to reference.

Mechanism: standard ItemWearable clothing attachment

The skates use the same attachment path vanilla boots use — no custom renderer, no attachment-point math, no per-frame transform code.

1. Equippable in the foot clothing slot

assets/iceskates/itemtypes/iceskates.json:

  • class: "ItemIceSkates" — subclass of ItemWearable (Vintagestory.GameContent)
  • storageFlags: 128 — flags it as equippable
  • attributes.clothescategory: "foot"
  • attributes.wearableAttachment: true

2. Shape is bone-parented via stepParentName

assets/iceskates/shapes/item/iceskates.json has two root elements:

SkateR  →  stepParentName: "LowerFootR"
SkateL  →  stepParentName: "LowerFootL"

At render time, VS grafts these roots (and all children — BladeR, BladeTipR, ToeBoxR, HeelR, AnkleR, ShaftR, CuffR, TongueR) onto the named bones of the seraph rig. They inherit the bone transform every frame, including the walk-cycle animation. Identical to vanilla shoeR/shoeL on LowerFootR/LowerFootL.

3. Coordinate space — no rotation on the roots

Element coords are authored in LowerFoot local space: X = lateral, Z = forward (heel→toe), Y = up. Same convention as vanilla boots. The geometry is built natively in this space, so the roots have no rotationY — none of the 41 vanilla foot shapes use one. We tried rotationY: -90 earlier and in-game testing confirmed it made orientation worse.

4. Textures

Two texture keys — #blade and #strap — resolved per variant:

"blade": "iceskates:item/skateblade-{blade}"
"strap": "iceskates:item/skatestrap-{strap}"

PNGs are generated at runtime by TextureGenerator.cs (noise + palettes) and injected into the asset system before the texture atlas is built.


TL;DR: clothing-category ItemWearable + stepParentName bone grafting. If your research describes entity-attachment points, a custom renderer, or transform overrides, that path is for handheld/held-item attachment or non-clothing wearables — not for foot-slot clothing like this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    assetsTextures, shapes, models, langskatingIce detection, speed, hunger, particles

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions