Auto-translated
To extract the animation, use ResEdit to open the Data folder in the directory where Heroes is installed. Then, open h3sprite.lod (this is one of the LODs – archives that store animations for creatures, spells, buildings, etc.). Select the desired DEF file and right-click to choose ExtractTo, thereby extracting the file to wherever you want.
For example: you want to recolor a devil. Its DEF file is CDEVIL.DEF (all DEF file names for ordinary monsters start with "C"). Then, open the extracted DEF file with DefPreview, open the DEF file, and extract all the images (animation frames of the monster) from it. Then, in Photoshop or another program, change all the frames as needed. For example, simply recolor the devil to blue, but at the same time, the blue background behind the devil itself should not change (and if there is purple in the frames, it should not change either!!). You can do this in Photoshop using the "magic wand" tool – by selecting the entire blue area and inverting the selection.
So, after recoloring the devil to blue, you need to open its DEF file again and save it as a DEF list (File - Save As - and select def-list at the bottom). Save this DEF list in the folder with the recolored devil frames.
Then, to create a new DEF file, download DefTool3.0. In this program, open the DEF list saved earlier; the devil's frames should be distributed to their respective places (Attack, defense, etc.). Then, in this program, specify your H3sprite.lod in the "add to LOD" field, click "generate DEF" (or something similar, I don't remember the exact name), and that's it. In theory, the ordinary devil in battle should be replaced with a blue one.
But there are also icons in the hero's army, the appearance of the monster on the map – all of this needs to be changed separately.