Modding sprites (OpenXcom)
Jump to navigation
Jump to search
- Install IrfanView.
- Open my media:units_template.PSD.zip 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).
- 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 the forum.
- Create a new layer (or duplicate, if you just want to modify an existing unit) and draw.
- When fished drawing, turn off all the work layers and keep only the new unit graphics.
- 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). Then delete any background color the sprite may have (in the CIVM example: the green color).
- 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"
- IMPORTANT: make sure to have selected all the selections of the image.
- When all is selected, set the parameters: gif, no dithering, transparency, import palette and select "Battle.act". Then save in the chosen folder.
- 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.
- 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.
- Open IrfanView. file > Batch Conversion\Rename.
- 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.