I do spritework like this (using Photoshop).
0. Install IrfanView.
1. Open my units_template.psd file.
. . It is based on the X-Com soldier spritesheet, which is the one with the highest number of frames, so every other spritesheet is as big or smaller than it.
. . I made "sections" for all the frames so it automatically creates all the separate frame images instead of the big image (see further).
. . (I attached it at the bottom of this post).
2. Import the spritesheet neeeded (in the template I included the CIVM.PCK as example) and make sure to have the right palette open.
. . You can find the palette for photoshop somewhere on this forum.
3. Create a new layer (or duplicate, if you just want to modify an existing unit) and draw.
4. When fished drawing, turn off all the work layers and keep only the new unit graphics.
5. Cut the image to the size of the spritesheet needed (in the CIVM.PCK example, I would cut away all the portion of the image without the green background).
. . And then delete any background color the sprite may have (in the CIVM example: the green color).
6. Activate the "frame_GRID" layer.
. . At this point what the image should look as is: the sprites of the unit, on transparent background, "caged" inside a purple grid.
. . "Save for web"
7. IMPORTANT: make sure to have selected all the selections of the image.
8. When all is selected, set the parameters: gif, no dithering, transparency, import palette and select "Battle.act". Then save in the chosen folder.
9. Saving will create a subfolder with all the images for the frames, already divided, inside it.
. . For technical reason it creates also image files for the spaces between the frames, so you'll have a lot of files.
10.Go to the folder and select the "big thumbnail" view. Delete all the image files with the purple line inside; KEEP all the empty image files.
11.Open IrfanView. file > Batch Conversion\Rename.
12. Make sure to have selected "Batch rename" on the top left.
. . Go to the folder and select all the image files, then select "Add All".
. . Then "Sort" them "by Name (ascending, natural)".
. . Make sure to have the right name pattern, it must end with: "_###" (example: "CIVM2_###", for a new male civilian unit).
. . "Start Batch"
. . Now the ascending numeration is again smooth, starting from "_000".
And done. The rest is the ruleset.