Are limb attachments possible?

Is it possible to create limb attachments for character models, so that they can be blown off by explosives or guns?

yes it’s possible to do so, but you’d need a lua gore system.

Whats the procedure for setting up the models correctly, is there a wiki for it by chance?

That depends on the gore system. I don’t even know if there is one yet. All I know is that it’s possible.

EDIT:

Try this? http://steamcommunity.com/sharedfiles/filedetails/?id=118314978&searchtext=gore

Ah, I’ll be coding the Lua myself. I’m just not sure how the models can be set up or how they should be compiled. https://developer.valvesoftware.com/wiki/$bodygroup maybe? Should the mesh basically just be exported separately for each limb with fillers between so there’s no holes?

There’s this too, https://developer.valvesoftware.com/wiki/$attachment

Could either work maybe?

TF2 uses $collisiontext for gibs, but I’m not sure if that applies here.

What one guy uses for gibs is bodygroups then has it so when certain hitbox numbers are hit the bodygroup changes and it spawns a gib.

I’m no coder but I can spew dumb theories:

  • Record the way the player dies. If the damage is excessive at death, swap the model to a gore variant.

  • (gore model) Each detachable part of the player will be split into its own model (the actual meat and gore sticking out can be bodygrouped and hidden, but ran on limbs that actually detach as well as on the socket the limb detached from. Each split part of the model will just be the limb itself with an appropriate physics mesh. These limbs and components will be bonemerged into one model and lined up with the player on death to form the gore mesh ragdoll.

  • Record damage taken to specific hitgroups (be sure to negate these if the player heals). For a zombie-style set-up, you could then detach limbs that eventually take a large amount of damage – especially if at once, though you’d need custom animations and code to ensure removal of the limb actually effects the player. For standard gore, you may wish to wait until the player’s death instead. Excessive damage taken to specific hitgroups on death should result in the limb being detached (no longer bonemerged).

  • Don’t forget some nice blood detail textures for the model and/or blood splatters for nearby walls.

I haven’t experimented yet, but I think setting up two hit groups for each limb (detached, normal) then setting which bodygroup is active according to damage position & amount will work. Thanks for the replies :slight_smile: