aaron wroteWe want some weapons to use multiple images so as they animate they show different angles of the weapon. An attachment can contain at most one image, so this won't work. We will have to use a different slot for each piece of equipment.
You'll need a slot for each angle you want to show, not each weapon.
The other problem I foresee is with having several hundred potentially equippable weapons, clothing, and items (some of which animate). Aside from it making the skeleton HUGE, its going to have a vast library of images that will all need to be in a single sprite sheet.
You can use an atlas with multiple pages. Note that this will cause additional texture binds, but you can minimize this by packing images drawn together on the same atlas page. Eg, you could have an atlas page with all the character images, and another with all the weapons. This could result in a bind for the character images, a bind for the weapon, and a bind for the rest of the character images. Of course you could have more binds depending on your attachments. If you are targeting desktop it isn't much of an issue. On mobile if you have only a few characters where you do this you could be alright.
Is there a strategy or method to attach things (bones, slots, other skeletons) to a skeleton at runtime?
You can have an application specific data structure (eg, maybe a JSON file) that describes what attachments make up a weapon. Or, maybe you use a naming convention. Either way, you then just set the attachments.
To make your attachment changes reusable with animations, you can use skins. You have a skin for "machine gun" and you define the attachments for each angle (normal, tilted1, tilted2, or whatever) using skin placeholders. Then you have another skin "laser gun" and you do the same. Now in animations you can change which view of the weapon is shown, without actually knowing if it is a machine gun, laser gun, or something else.
You can use this approach for multiple parts of your character. Eg, say you want to use skins for how your character looks, but also use skins for your weapons. At runtime, a skeleton can only have a single skin, however you can programmatically create a skin. You can then take two skins and combine them into one at runtime, and use that for your skeleton. In this way you can mix and match skins to get the look you want, and all your animations will work even if they have attachment change keys. Currently Spine only allows a single skin to be visible in the editor. This makes it harder to preview in the editor, but still works fine at runtime.