XML Spriting - dredmor-com/dungeons-of-dredmor GitHub Wiki
Since we are mortals that can't deal with SPR files, we use XML to point to PNGs, and use these XMLs instead of SPR files. If you're making sprites for monsters, the normal conversion is to place these files in Your_mods_name/sprite/monster/name_of_monster (replace with backslashes on Windows systems), start in the folder where all your Dredmor mods are kept. If you are unsure where they're kept, go to [How to Start Creating a Mod] and check out where that is in your system.
To create a Static Sprite (a sprite with no animation), you can do something like this:
<?xml version="1.0" encoding="UTF-8"?>
<sprite>
<frame>sprite_image.png</frame>
</sprite>
sprite_image.png is the PNG file you want to use in the sprite.
In the case where you want to make an animation with the sprite, you can do this:
<?xml version="1.0" encoding="UTF-8"?>
<sprite>
<frame delay="200">image_sequence_001.png</frame>
<frame delay="80">image_sequence_002.png</frame>
<frame delay="120">image_sequence_003.png</frame>
</sprite>
The delay attribute is used to tell Dredmor how long an image is supposed to be displayed before changing to the next. Note that the time is defined in milliseconds.