Eusebius
Warlord
Tutorial: Editing GameFonts.tga for Free
BEFORE YOU START: Get the image(s) you want to add to the file.
The same process will work for GameFonts_75.tga, except that the size of each icon is 16x16 and the size of the bar with the green pixel is 3x16. I have never succeeded in converting GameFonts.tga by resizing it; I have always had to do the whole thing twice.
I played around with trying to generate the alpha channel by taking the original image and converting it to black & white and then taking the negative. All of these efforts resulted in abyssmal failure. Cutting and pasting from the real alpha channel is all I could get to work.
Free Windows Applications Mentioned in this Tutorial
Eusebius
BEFORE YOU START: Get the image(s) you want to add to the file.
- Because I am really cheap, I usually hunt Google Images for what I want and then use IrfanView to resize and edit it. I then paste it into GIMP to save as a DDS file. (I am mystified by GIMP’s user interface and use it for as little as possible.)
- Get a copy of DTXBmp; install it.
- Go to the GameFonts.tga file you want to edit in File Manager. With the right mouse button, select "Open With" DTXBmp
- You should get a screen that looks like this…
- Click on the third icon from the left on the bottom; floating help identifies it as "send to editor".
- The Windows Paint application will pop up with the main icon screen, using filename ‘norm.bmp’. At this point, I like to maximize that window and View->Zoom->Custom->200%
- Pull up the image you want to add. Resize it to be 21 pixels wide by 20 pixels high. Hit Edit->Copy to put it on the clipboard. (Again, I like IrfanView for this purpose.)
- Go over the Paint application and hit Edit->Paste. Then drag it to the next available empty spot of the type you want to use. In my case, I put it after the religion icons. If you are adding a resource, put it after the resource icons. You should be able to enclose your new bitmap within the purple gridlines so that all the lines still show. Click somewhere else in Paint to leave your image there permanently.
- Put the crosshair cursor right at the point where you pasted your picture. The lower right corner of Paint will show the coordinates. Write these down somewhere.
- Notice that all the existing icons in the file have a single green pixel after each icon. I have no idea what this is for, but according to rumor it might be important. So, go to one of the purple gridlines that has it, grab a 3x20 section containing the line, Edit->Copy and then Edit->Paste as once for each icon. You should be able to do this by eye. (Zoom helps!)
- Hit File->Save. (I hope you are still with me because all this has been the EASY part!)
- Go back to DTXBmp and hit the fourth icon from the left on bottom. "Refresh From Edit". The colored image in the center should now reflect your changes. [DO NOT CLOSE THE PAINT APP YET—you might still want it.]
- Now, go over to the right side where there is a black square with white icons on it. This is the infamous alpha channel part of your tga file. Hit the second icon from the left under it. "Send to Editor".
[*]Another Paint application will pop up with the filename ‘trans.bmp’. I maximize and zoom here. - Now, take a look over the white icons and pick the one that is closest to your new image. This will usually be one of the big round ones or the square one for Confucianism. Select a 21x20 area around it. Hit Edit->Copy.
- Now hit Edit->Paste. Move the pasted section to the coordinates that you wrote down in step #8. Click somewhere else in Paint to leave your image there permanently.
- Hit File->Save.
- Go back to DTXBmp. Under the black rectangle, hit the third icon from the left, "Refresh after Edit". Now both the colored image and the alpha channel should reflect your changes.
- In DTXBmp, hit File->Save.
- You are done. Close all the windows.
- Exclaim "What a hassle that was!"
- Reach over and smack your friend who is a graphics expert and is laughing hysterically at you by now. Remind him that you did this for FREE!
The same process will work for GameFonts_75.tga, except that the size of each icon is 16x16 and the size of the bar with the green pixel is 3x16. I have never succeeded in converting GameFonts.tga by resizing it; I have always had to do the whole thing twice.
I played around with trying to generate the alpha channel by taking the original image and converting it to black & white and then taking the negative. All of these efforts resulted in abyssmal failure. Cutting and pasting from the real alpha channel is all I could get to work.
Free Windows Applications Mentioned in this Tutorial
- DTXBmp may be found at http://fly.to/mwgfx/
- Irfanview may be found at http://www.irfanview.com/
- GIMP may be found at http://gimp-win.sourceforge.net/stable.html. (You need both the runtime environment and the application.)
Eusebius