Choose the format first. GRP is the old 8-bit one and it does not work properly on Remastered: inserting a GRP does not replace the image, it shifts the original up and left by half the bitmap size you built it at. The Remastered format is the 32-bit anim.
An anim file lives in the game's CASC storage as anim/main_<imageId>.anim. The image id comes from EUD Editor 3's Images tab, and CascView - Open Online, then StarCraft 1 - is how you pull the file out.
Open the extracted anim in Animosity. Exporting with Sprite then Export Frames, tick diffuse only and leave bright, teamcolor and the rest off; the frames come out as PNGs.
The frame count looks daunting and the structure is not. The Civilian has 136, which is 17 x 8: a bundle of 17 directions, times 8 motions. You work out which motion each bundle is and fill the same slots with your own art in the same order.
Why there are only 17 directions matters. StarCraft stores art from twelve o'clock round to six - 0 to 180 degrees - and mirrors it for 181 through 359. So you never draw a left-facing frame at all, which halves the work.
| Colour depth | Export at 32-bit. Saved at 8-bit it simply breaks. |
|---|---|
| A transparent background | Use sprites with a transparent background, or you erase every frame by hand. |
| A sense of scale | A 128x128 image covers 4x4 terrain tiles, because a tile is 32x32. |
| The idle motion | An idle bundle is not guaranteed to be an idle frame. The Civilian's last bundle is idle but the art is a right-foot step, so check each bundle by eye. |
This procedure comes from one mapper's public guide, and its author says plainly that some of it is inference. The format and structure parts - anim versus GRP, 17 directions and mirroring, the CASC path - hold up elsewhere; treat the tool steps as something to confirm as you follow them.
Knowing what the file looks like inside explains why the tools behave as they do. SD is not split into separate anim files: SD/mainSD.anim holds all of them, one entry per image id, 999 in total. HD and Carbot are the other way round, one entry per file.
| 999 entries | One per image id. |
|---|---|
| 131 are references to another entry | A frame count of 0 marks a reference - there is no art of its own. |
| 756 DXT1 · 112 DXT5 | DXT5 is the ones that need real alpha - the effects. |
| Only 155 carry a teamcolor layer | The rest take no player colour at all. |
An SD teamcolor layer is not a DDS. It is the four characters "BMP " followed by width times height bytes, each 0x00 or 0xFF - a white pixel takes the player colour fully and a black one not at all. Only HD (0x0202) and later use a DDS for it. This is Remastered's equivalent of the magenta placeholder in the old GRP palette.
An SD entry's own width and height are 0 - take the size from the layer record. And the entry-pointer array exists only in the SD file; in an HD file the entry follows the header directly.
First, something about colour. A GRP carries no palette, so the colours come from outside it - and the engine does not use one palette for everything.
| Unit | The current tileset's .wpe: 1024 bytes, 256 RGBA entries with alpha unused. Indices 8 to 15 stand in for the player colour. |
|---|---|
| Command icons | game\ticon.pcx, the 16-shade icon ramp. |
| Wireframes | game\twire.pcx - and its remap rows are the damage tints. |
game\tunit.pcx is not the unit palette, it is the team-colour placeholder. Draw a Marine with it and it comes out almost entirely magenta - that is the wrong palette, not a property of the sprite. To look at a unit, draw it with a tileset palette.
Once the art is ready there is one more wall: the unit stands still but the picture jumps from frame to frame. The cause is almost always the same - ANIM positions by the image file's actual size, not by where the character is inside it.
- Every frame must be the same image size. A differently-sized frame imports without complaint, so the unit teleports on exactly that frame and no other.
- The character has to sit in the same place in every frame. animosity looks as though it crops to the character, and it does not.
Importing doubles the dimensions. Treat a 600 by 540 source as 1200 by 1080: (0,0) is the top-left, (1200,1080) the bottom-right, and the centre is the original size, (600,540). Do not copy the texture size field into Dimensions - that is the combined size of several images and it has transparency trimmed off.
Replacing a whole tileset is a file-size problem before it is a graphics one. A tileset is about 6,588 tile images, and dropping an untouched one in makes the map 28 MB - bigger than a map stuffed with music.
Shrinking it is blunt: keep the tiles the map actually places and overwrite every other frame with a tiny empty image. Exported tile 0 is already transparent and 844 bytes, so copy that. The same map goes from 28 MB to 316 KB. A transparent tile renders black in game, which is the right answer for a tile the map never places and immediately obvious if you miss one it does.
For renaming thousands of files at once, DarkNamer stops at about 300. Its successor BatchNamer handles ten thousand.
Finally, a way to get seventeen different pictures out of one GRP. It only works for a still - decoration, a background, a message plate - and there turn out to be a lot of those.
Frames 0 to 16 of a unit's GRP are its facings, from up to down. Replace those seventeen with seventeen unrelated pictures and “which way is it facing” becomes “which picture is showing”.
- 1Set the unit's iscript ID to 89 - the blank script, which stops the idle facing drifting and stops an air unit bobbing.
- 2Tick Graphics Turns, or the image does not follow the facing at all.
- 3Tick redraw and permanent cloak. Not required - it keeps the thing off the minimap and unclickable.
- 4Set its AI to Nothing or remove its weapon. The point of all four steps is to close every path by which the facing changes on its own.
- 5Replace frames 0 to 16 with your seventeen pictures using animosity's import frames.
// 만들 때 고르기: units.dat startDirection, 0x6605F0, 유닛당 1바이트
function startDirectionModify(unit:TrgUnit, location:TrgLocation, imageNumber) {
const a = (unit % 4) * 8;
EUDSwitch(imageNumber);
foreach(p : py_range(17)) {
EUDSwitchCase()(p);
SetMemoryXEPD(EPD(0x6605F0) + unit/4, SetTo, p << a, 0xFF << a);
CreateUnit(1, unit, location, 6);
break;
}
EUDEndSwitch();
}
// 만든 뒤에 바꾸기: 살아 있는 유닛의 0x21, 256등분이라 p * 8
function curDirectionModify(epd, imageNumber) {
EUDSwitch(imageNumber);
foreach(p : py_range(17)) {
EUDSwitchCase()(p);
SetMemoryXEPD(epd + 0x21/4, SetTo, (p * 8) << 8, 0xFF00);
break;
}
EUDEndSwitch();
}The failure mode is other air units. An air unit shoved by another air unit changes facing, and the picture changes with it. Either use the noAirCollision plugin, or put the sprite on a Beacon made into an air unit.
The graphics chain, unit to GRP