diff --git a/dfhack/modules/Materials.cpp b/dfhack/modules/Materials.cpp
index b03e5ac57..9cdab2ffc 100644
--- a/dfhack/modules/Materials.cpp
+++ b/dfhack/modules/Materials.cpp
@@ -297,6 +297,7 @@ bool Materials::ReadCreatureTypesEx (void)
uint32_t sizeof_string = mem->getHexValue ("sizeof_string");
uint32_t caste_colormod_offset = mem->getOffset ("caste_color_modifiers");
uint32_t caste_bodypart_offset = mem->getOffset ("caste_bodypart_vector");
+ uint32_t caste_attributes_offset = mem->getOffset ("caste_attributes");
uint32_t bodypart_id_offset = mem->getOffset ("bodypart_id");
uint32_t bodypart_category_offset = mem->getOffset ("bodypart_category");
uint32_t bodypart_layers_offset = mem->getOffset ("bodypart_layers_vector");
@@ -354,6 +355,9 @@ bool Materials::ReadCreatureTypesEx (void)
caste.bodypart.push_back(part);
}
+
+ p->read(caste_start + caste_attributes_offset, sizeof(t_attrib) * (6+11), (uint8_t *)&caste.strength);
+
mat.castes.push_back(caste);
}
mat.tile_character = p->readByte( p_races[i] + tile_offset );
diff --git a/examples/materialtest.cpp b/examples/materialtest.cpp
index 0ebddf300..ccd62c0ec 100644
--- a/examples/materialtest.cpp
+++ b/examples/materialtest.cpp
@@ -96,7 +96,24 @@ int main (int numargs, const char ** args)
<< castes[j].rawname << ":"
<< castes[j].singular << ":"
<< castes[j].plural << ":"
- << castes[j].adjective << "] ";
+ << castes[j].adjective << "] ["
+ << "st:" << castes[j].strength.level << "/"
+ << "ag:" << castes[j].agility.level << "/"
+ << "to:" << castes[j].toughness.level << "/"
+ << "en:" << castes[j].endurance.level << "/"
+ << "re:" << castes[j].recuperation.level << "/"
+ << "di:" << castes[j].disease_resistance.level << "/"
+ << "an:" << castes[j].analytical_ability.level << "/"
+ << "fo:" << castes[j].focus.level << "/"
+ << "wi:" << castes[j].willpower.level << "/"
+ << "cr:" << castes[j].creativity.level << "/"
+ << "in:" << castes[j].intuition.level << "/"
+ << "pa:" << castes[j].patience.level << "/"
+ << "me:" << castes[j].memory.level << "/"
+ << "li:" << castes[j].linguistic_ability.level << "/"
+ << "sp:" << castes[j].spatial_sense.level << "/"
+ << "mu:" << castes[j].musicality.level << "/"
+ << "ki:" << castes[j].kinesthetic_sense.level << "]";
cout << endl;
for(uint32_t k = 0; k < castes[j].ColorModifier.size(); k++)
{
diff --git a/output/Memory.xml b/output/Memory.xml
index 2b123d148..fb9b9e63d 100755
--- a/output/Memory.xml
+++ b/output/Memory.xml
@@ -1444,9 +1444,10 @@ map_data_1b60_offset 0x1B9c
Castes
======
+ 0x70
0x51C
0xACC
- 0x70
+ 0x654
Body Parts
==========