Preliminaries
What you need to know and do when making new graphics
To write:
- explain GRFCodec / GRFWizard
- explain hex codes: specific examples using Windows calculator, ideally with screenshots
- maybe: explain DOS/Windows version and how to convert between them
- other things?
-=What's a .GRF file?=-
As you probably already found out ttd can load new graphics files with help of the patch. These files have the extension .grf and are located in the newgrf folder.
These .grf files are made by GRFcodec, this program merges a .pcx file and a .nfo file. (links to george his tut now, but I think on top of that page should be an explanation about pcx files and their palet ) In this tutorial we won't look at those 2 file types yet, at first we shall try to explain the basics.
-= The GRFCodec and the GRFWizzard=-
Like said before a .grf file is a file made by the GRFCodec. The Codec is a package of 3 programs:
1. GRFCodec: Convert a GRF into an editable PCX file and vice versa
2. GRFDiff: Compare two GRF files for differences, and write only the differences to a GRD file
3. GRFMerge: Take a GRD file and merge it back into the GRF file
In this tutorial we will only use the first program, if you want more info about the other programs look [1].
The GRFCodec is a commandline program. This means it's option are only been set in the comand line, there is no nice user interface. For the nice interfase you can download the [2] This program is realy helpfull. Be warned though for the GRFWizzard to work you need the GRFCodec too.
When you run the GRFWizzard for the first time you have to point it to the Codec, when you have done this everything is realy straight forward, you can encode your homemade sprites (sprites are the little drawwings that represend one side of a building/vehicle) or you can decode a grf from someone else.
When you want to encode graphics you have to point the wizard wich grf file you want to encode the 2nd step is to tell it in wich you placed the NFO and PCX. All these file should have the same name.
If you want to encode totaly new graphics you have to make a "fake" grf. Just make a new txt file and rename it to the grf you want to encode.
If you choose to decode a grf, the nfo and pcx will be extracted to a map called sprites in the in the folder where you placed the grfcodec in.
-=Hex=-
some sort of text here to explain why you need to understand hex?
HEX is a way of counting. You normaly count from 1 till 9 and then go to 10,11 etc. In HEX it works a bit diferend: you count from 0 till 9 but then you go one with A, B,C,D,E,F. So 1 till 9 is just 1 till 9, but then it gets funky A=10, B=11, C=12 and so one till F= 15. when you reach F you just do like you would do normaly, you start at 0 again but now with a 1 in front thus 10 (gee thats almost like normal counting! :P) so 10=16 If you want a better understandable explanation visit [3] link.
Now it would be rather uneasy if you have to count it all by yourself (or at least for me being of the lazy generation) so you can use the windows calculator for that.
If you open it it take any hex, so you have to go to scientific. Just open view and klick on scientific mode.
If you did it corect it will look like this:
(sory I had to eat, I will see this page later on again)