• Editor
  • Skeletons within skeletons?

Is there a way to do this in the editor? I'm thinking it might make it easier when splitting a character up into separately attackable elements (like cannons that you can blow up separately)... you animate the whole thing together but in game you can grab a sub-piece of it and render it separately with a special damage shader as it loses hit points.

Currently there is not support for that inside the editor. The feature would be called "skeleton attachments" and we have an issue to track it here:
Skeleton attachments · #8 · EsotericSoftware/spine-editor
My comment farther down in the issue explains some of the difficulties with the feature.

It is implemented in spine-libgdx, but you need to wire it up at runtime.

As mentioned in the issue, in 3.8 we have a new feature called "skin bones and constraints" that can do a similar job. It allows bones that are only active when a particular skin (or skins) is active. This allows a skeleton to have many skins (and therefore attachments) that each have their own bones. At the extreme it could be used so each skin has different bones (except the root).

Hmm, okay, maybe I should use that? The hacky thing I've been doing is putting a prefix on all image slots and collision bounds I want to go together (e.g. "leftarm_"), then my in-game object (let's call it Arm) uses that string to only use those collision bounds and only render those parts.

One idea I had for skeleton attachments would be that the attachment is a whole separate file and you choose which animation you want to play on that file in a dropdown, with a boolean for whether it loops forever or plays once, and then animate those attributes.

Skin bones and constraints are really powerful. Lots of things you can do! From the little I know of your setup, it sounds like it would be a good fit. 3.8 is almost out of beta, it should not be an issue to switch to it while it's still officially beta.

Aye, see the issue comments for some complexities about skeleton attachments. Eg, loading at runtime requires some juggling to wire things up, as a separate project or skeleton within a project editing animations on the skeleton unattached would be suboptimal, editing them together becomes tricky because now you have coordinate systems of nested skeletons, etc. It's not impossible, but skin bones and constraints solves a good deal of the same use cases that skeleton attachments would solve, and does so more elegantly.

Probably doing something wrong here, but it seems like I can only see one skin at a time? I was thinking the way it worked was that if you wanted separate parts, like left arm, right arm, left leg, right leg, each one would be a skin, and I'd put all the attachments and collisions for each under that skin.

Yes, that is how it works. Often you'd use a skin per "item", eg a shirt might be a single item made up of multiple attachments: left arm, right arm, and torso. An "item" skin like a machine gun could have its own bones for the shell casing.

Are you using 3.8? You'll need to opt in to the beta:
Settings - Spine User Guide: Version

You can use the Skins view to show multiple skins at once in the editor, 6:08 here: