Hey I know this is offtopic but... how does the game know which tiles to use in the graphical mode if there are 10 different bitmaps for it to pick them from? I'm trying to make a race of... half-dragons, I guess you could call them? I can't figure out how to make sure it uses the right graphics for them, I don't want it to take from one of the elf bitmaps, for example, when I'm trying to get it to use a new graphic for them. Can anyone help me?
Using Deon's graphics_example.txt, (to keep it semi-on topic, I suppose) You'll find these lines at the head of the dwarven entry:
[TILE_PAGE:DWARVES]
[FILE:dwarves.bmp]
[TILE_DIM:16:16]
[PAGE_DIM:12:19]
And these lines at the head of the elf entry:
[TILE_PAGE:ELVES]
[FILE:sylvan.bmp]
[TILE_DIM:16:16]
[PAGE_DIM:9:4]
Those lines tell the game, in order: 1. that there's a new race entry, and it's name. 2. the name of the file to use (stored in the same folder) 3. the size of the images for each of the entries, and 4. the over-all size of the file (Important probably to prevent crashes, Armok knows DF has enough of those already)
To define a graphics entry, you make a line like this: [MINER:DWARVES:0:1:AS_IS:DEFAULT] The first tag tells DF what job the tile is for, the second one tells it which graphics file to use, the next two tags tell it which tile to use from that file, in standard x,y. In this example, the miner uses the first tile (0) of the second row (1). Remember that computers like to start counting from 0, and you should be fine. The other two tags, tbh, I have no clue of their function, but since they're always :AS_IS:DEFAULT, you shouldn't need to worry about that. I *think* they change the color, but I don't feel like messing around with it to find out.
Just make sure your new race image is laid out in the same way as the dwarf one, copy the dwarf entry, and change all the references to DWARVES to your new race name, and the image file name to your new image, and Voila. A side-note: If you are on linux, or you want your mod to work with linux, make sure the filenames match up EXACTLY, case and all. Linux will choke on trying to find orcs.png if the filename is orcs.PNG *nudge, nudge, deon*
fakedit: Ninja'd, but keeping it 'cause mine's more detailed.