I found a little wonkiness with Stonesense's creature sprites, and it's probably because I have a bizarre creature. I'll put the work-around here in case anyone is as OCD in their creature raws as I am.
The creature in question has two dozen castes, and due to how descriptions appear in-game there is no way to tell what caste one is when looking at its detailed description. To insert some differentiation, I changed the
TLCM_NOUN for skin to something unique for each caste. So the Awakened Granite has "granite surface" instead of "skin", the Awakened Slate has "slate surface" and so on. This also looks nice in combat logs. Most of the castes have several possible surface colors (for example, marble has
[TL_COLOR_MODIFIER:WHITE:10:ASH_GRAY:4:GRAY:2:MOSS_GREEN:2:PALE_PINK:1]).
Stonesense throws errors if I refer to the creature's "skin" bodypart, which it should. But it doesn't seem to understand
<variant caste="BASALT" sheetIndex="0" color="bodypart" bodypart="basalt surface" zoom="2">
<subsprite sheetIndex="1" color="bodypart" bodypart="eyes" zoom="2" /> <!-- The missing pattern_index is not an error, their eyes are a solid color. -->
</variant>
It does color the main sprite properly, but the subsprite isn't drawn. This happens even if I use a named color for the subsprite. I figured out this is because Stonesense defaults to the first color-modifier defined for the sprite and breaks out of the entire
<variant> structure.
But you can make this work. Simply omit the
bodypart= argument. There are no errors in the console, it defaults to the correct color, and it processes the rest of the
<variant>. The problem is that the custom
TLCM_NOUN seems to wreck references to any colors defined later in the creature. In my case, all creatures of the same caste have the same color eyes, so I could just do it with named colors.
(When I define the eyes first and the faux-skin second, the default color becomes the eye color. But in that case I can reference the eyes properly, I just have no way to reference the faux-skin's color.)
So if you have some bizarre creature with odd description text, you can take advantage of Stonesense's intelligent fail-over behavior, but then you only get to reference that one color. I imagine that parsing custom
TLCM_NOUN text is really low on the priority list, but it would be an awesome addition when the program is stable.
<?xml version="1.0" ?>
<creatures file="tesb_awakened_stone.png">
<creature gameID="AWAKENED_STONE" >
<!-- The "skin" bodypart is renamed in the creature raws to fix in-game descriptions.
Stonesense doesn't pick up the custom names properly, but the default seems to be
the first color defined, which works just fine. They eye colors differ from
the creature raws slightly for better visibility. -->
<variant caste="ANDESITE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="CREAM" zoom="2" />
</variant>
<variant caste="BASALT" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="RED" zoom="2" />
</variant>
<variant caste="CHALK" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="WHITE" zoom="2" />
</variant>
<variant caste="CHERT" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="FLAX" zoom="2" />
</variant>
<variant caste="CLAYSTONE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="CREAM" zoom="2" />
</variant>
<variant caste="CONGLOMERATE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="FLAX" zoom="2" />
</variant>
<variant caste="DACITE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="SILVER" zoom="2" />
</variant>
<variant caste="DIORITE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="PURPLE" zoom="2" />
</variant>
<variant caste="DOLOMITE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="BLACK" zoom="2" />
</variant>
<variant caste="GABBRO" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="AMETHYST" zoom="2" />
</variant>
<variant caste="GNEISS" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="BLUE" zoom="2" />
</variant>
<variant caste="GRANITE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="EMERALD" zoom="2" />
</variant>
<variant caste="LIMESTONE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="BLACK" zoom="2" />
</variant>
<variant caste="MARBLE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="GOLDEN_YELLOW" zoom="2" />
</variant>
<variant caste="MUDSTONE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="SCARLET" zoom="2" />
</variant>
<variant caste="PHYLLITE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="AUBURN" zoom="2" />
</variant>
<variant caste="QUARTZITE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="INDIGO" zoom="2" />
</variant>
<variant caste="RHYOLITE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="TURQUOISE" zoom="2" />
</variant>
<variant caste="ROCKSALT" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="CHESTNUT" zoom="2" />
</variant>
<variant caste="SANDSTONE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="AMBER" zoom="2" />
</variant>
<variant caste="SCHIST" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="AQUAMARINE" zoom="2" />
</variant>
<variant caste="SHALE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="IVORY" zoom="2" />
</variant>
<variant caste="SILTSTONE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="BEIGE" zoom="2" />
</variant>
<variant caste="SLATE" sheetIndex="0" color="bodypart" zoom="2">
<subsprite sheetIndex="1" color="named" color_name="DARK_BROWN" zoom="2" />
</variant>
</creature>
</creatures>