This would require a Mod. There's really no way around it.
If anyone feels up to the task of doing this in a Mod, here's how I can see it working:
METHOD 1 (Uses all limbs with vertexdata)
- When an entity (probably will be character explicit, but don't see why it couldn't be done for ANY entity) is loaded intot he system, run through all limbs and determine which limbs are corresponding to vertexdata. If vertexdata corresponding to limb is found, save limb name into array and create a bounding box for this limb (for faster raycasting a box would be best) which the index for will also be saved into array.
- When player fires, determine which entities may be within the line of fire, compile the list and check for ray collision with their limb boxes.
METHOD 2 (Uses specified limbs)
- When entity is loaded in, compile list of limbs from FPE file. Run through list and create bounding boxes for each limb specified. FPE will also contain "damage ratio" for each limb to determine which limb shots hurt the most or the least.
- When player fires, determine which entities may be within the line of fire, compile the list and check for ray collision with their limb boxes. Apply damage based on damage ratio of the limb.
For collision detection it would probably be best if the regular "bounding box" was used first... if the entity detected being shot, THEN run through individual limbs and run individual checks against them.
That's the way I see it being done code-wise. Anyone else have thoughts on this?
The one and only,