GRF coding
From PikkaWiki
(Difference between revisions)
(New page: Writing NFO for smarties. Because you're not as dumb as you think you are. Okay, welcome to my basic tutorial for coding grf sets. To begin with, I will concentrate on trains, because t...) |
|||
Line 18: | Line 18: | ||
**Resist the temptation to decode any other grf and have a look at what comes out. It will not be useful to you at this point. Believe me. | **Resist the temptation to decode any other grf and have a look at what comes out. It will not be useful to you at this point. Believe me. | ||
*Install nforenum into <grfcodec directory>/SPRITES, which should have been created when you decoded trg1r.grf. | *Install nforenum into <grfcodec directory>/SPRITES, which should have been created when you decoded trg1r.grf. | ||
− | |||
− | |||
And you're ready to go! | And you're ready to go! |
Revision as of 08:32, 7 May 2007
Writing NFO for smarties. Because you're not as dumb as you think you are.
Okay, welcome to my basic tutorial for coding grf sets. To begin with, I will concentrate on trains, because that is what most people want to start with. However, what you learn here can easily be transferred across to coding any other sort of graphics.
Contents |
What you will need
- A recent (ie, nightly) build of TTDPatch or, if you must, OpenTTD.
- GRFCodec
- NFORenum
- A coder's text editor (preferably something more advanced than notepad, since you'll want to be doing some formatting to make your nfo readable. NOT a rich text editor like wordpad).
- A graphics program of your choice that can manipulate .pcx and/or .png files.
- The Book
- A computer running Windows, and/or the ability to translate what I say in Windows-speak into the language of your operating system. Creating and testing grfs on non-Windows systems may have additional challenges.
Getting set up
- Install grfcodec into a directory under/near your TTD directory.
- Copy trg1r.grf to this directory (and, if you like, the other default grfs) and decompile them with grfcodec. (grfcodec -d trg1r.grf -p2).
- Resist the temptation to decode any other grf and have a look at what comes out. It will not be useful to you at this point. Believe me.
- Install nforenum into <grfcodec directory>/SPRITES, which should have been created when you decoded trg1r.grf.
And you're ready to go!