best way to handle body parts?

Posted by Swimming on Fri 24 Mar 2006 12:06 AM — 2 posts, 12,949 views.

#0
hi. just curious as to what you think the best way to handle bodyparts may be.
i have some ideas and would like to know what you think.
there are many races, some with wings and arms, some with legs and wings.. and i'm hoping to have them set as race's arm, race's leg, etc..
so should i
have one set of bodyparts, that are assigned to the race via the race file? all the body parts being set in an area file.
if it's that way, that would work for pc races, but what of
npc? should i set up race files for npcs as well? or just set up the body parts in the code?
i have other questions as well, but cannot think of how to prase them right now.
i know it has the parts that get chopped off after a fight, but i did not want to do that with them. i want to have them to keep track of damage to character..

thanks

Canada #1
Uh.. you should define an int bodycondition[x] under the char_data struct. Then, in ch_ret damage, assign damage to a number_range(0, x), and then call a function that updates that bodypart depending on the damage it's taken - that is, if you want broken limbs/disembowelment and the such.

To see bodypart info for difference between things like wings and arms over different races, a switch statement under show_condition would probably be your best bet, unless you've going to have wildly differing characteristics between each char: for example ebon-tipped wings vs. snow-white wings.