Discovered the meanings of some more unknown vectors. These may be relevant to the healing script that crossmr was trying to write:
http://www.bay12forums.com/smf/index.php?topic=91166.msg4297004#msg4297004 , in particular the body component severed and status flags.
See
https://github.com/angavrilov/df-structures/blob/master/df.items.xml#L738body_layer_328 is a 0-100 value indexed by nonsolid layer id. Initially 100 for all liquid, gas, etc. body part layers, it can be drained to 0 as the creatures lose material. I'd call it "percent fluid remaining". Used in fire men and iron men, among others.
body_layer_338 is normally 0 for each body part layer, but is 1 if the body part layer is severed (i.e. you can break away a layer without destroying the entire body part). It is also 2 if the body part layer is leaking (i.e. iron men), and 3 if the body part layer has completely leaked away (1+2=3).
body_layer_348 is the contact area of wounds on the body part layer. It seems to heal instantly to 0 outside of combat.
body_layer_358 is 100x the surface percentage of cuts/fractures on the body part layer. If you stab a dwarf with a contact area 50 weapon in a body part that has a calculated contact area of 80, the surface percentage of the wound is 63, so the corresponding value in body_layer_358 is 6300.
body_layer_368 is 100x the surface percentage of dents on the body part layer. It seems to heal instantly to 0 outside of combat.
body_layer_378 is 100x the surface percentage of "effects" on the body part layer (such as bruises, burns, frostbite, melting, freezing, necrosis, and blistering).
These are related to some of the wound data found here:
https://github.com/angavrilov/df-structures/blob/master/df.units.xml#L1084Also see this lua script that I wrote to explore the data:
unit=dfhack.gui.getSelectedUnit()
if unit==nil then
print ("No unit under cursor! Aborting with extreme prejudice.")
return
end
--printall(unit.body.components)
local lpart=""
local lname=""
local lid=""
for k,v in pairs(unit.body.components.body_layer_328) do
if true then
lid=unit.body.body_plan.nonsolid_layers[k]
lpart=unit.body.body_plan.layer_part[lid]
lname=" "
for x,y in pairs(unit.body.body_plan.body_parts[lpart].layers) do
if y.layer_id==lid then
lname=y.layer_name
end
end
print("FLUID LEFT",lname,v,unit.body.body_plan.body_parts[lpart].name_singular[0].value)
end
end
for k,v in pairs(unit.body.components.body_layer_338) do
if v ~= 0 then
lpart=unit.body.body_plan.layer_part[k]
lname=" "
for x,y in pairs(unit.body.body_plan.body_parts[lpart].layers) do
if y.layer_id==k then
lname=y.layer_name
end
end
print("SEVER/LEAK",lname,v,unit.body.body_plan.body_parts[lpart].name_singular[0].value)
end
end
for k,v in pairs(unit.body.components.body_layer_348) do
if v ~= 0 then
lpart=unit.body.body_plan.layer_part[k]
lname=" "
for x,y in pairs(unit.body.body_plan.body_parts[lpart].layers) do
if y.layer_id==k then
lname=y.layer_name
end
end
print("CONTACT AREA",lname,v,unit.body.body_plan.body_parts[lpart].name_singular[0].value)
end
end
for k,v in pairs(unit.body.components.body_layer_358) do
if v ~= 0 then
lpart=unit.body.body_plan.layer_part[k]
lname=" "
for x,y in pairs(unit.body.body_plan.body_parts[lpart].layers) do
if y.layer_id==k then
lname=y.layer_name
end
end
print("SURF % DAMAGE",lname,v,unit.body.body_plan.body_parts[lpart].name_singular[0].value)
end
end
for k,v in pairs(unit.body.components.body_layer_368) do
if v ~= 0 then
lpart=unit.body.body_plan.layer_part[k]
lname=" "
for x,y in pairs(unit.body.body_plan.body_parts[lpart].layers) do
if y.layer_id==k then
lname=y.layer_name
end
end
print("SURF % DENT",lname,v,unit.body.body_plan.body_parts[lpart].name_singular[0].value)
end
end
for k,v in pairs(unit.body.components.body_layer_378) do
if v ~= 0 then
lpart=unit.body.body_plan.layer_part[k]
lname=" "
for x,y in pairs(unit.body.body_plan.body_parts[lpart].layers) do
if y.layer_id==k then
lname=y.layer_name
end
end
print("SURF % EFFECT",lname,v,unit.body.body_plan.body_parts[lpart].name_singular[0].value)
end
end
for k,v in pairs(unit.body.components.body_part_status) do
for kk,vv in pairs(v) do
if vv==true then
print("STATUS FLAG",kk,unit.body.body_plan.body_parts[k].name_singular[0].value)
end
end
end
Use it on creatures that are fighting in the arena and have wounds.