----------------------------------------
** Updated January 14 2003 **
Since TTDPatch 1.9.1 alpha 6, it is possible to add new vehicle graphics to the game, similar to the new ships by Michael Blunck, but now also possible for trains, road vehicles and planes.
Unlike simply changing the existing graphics, adding new ones is a bit more complicated.
I wrote a very technical explanation which is part of the source code .zip file, and I'll also attach the current version here.
I'm attaching three example files as well, one for each vehicle type, which you can decode with GRFCodec, and try to understand how they work after reading the newgrf.txt file.
Here's a very brief summary:
- Copy the lines from the TRG1.NFO file for the vehicle type you want to modify. Pick a vehicle that's closest in size and shape to what you want to add.
- Paste these into a new .NFO file; perhaps a copy of one of the example .NFO files attached here.
- Add the first special sprites, don't worry about the numbers yet
- Add an action 0 to at least set that vehicle's sprite to FD for trains or FF for everything else
- Add an action 1, after which you paste the copied .NFO strings from trg1.nfo
- Add one or more action 2 entries
- Add one action 3 entry for each different vehicle
- Run renum.pl on it, or count the sprites yourself
- Encode it with GRFCodec
- Copy it to the newgrf folder in your TTD directory
- add the line "newgrf/yourfile.grf" to newgrf.txt, where "yourfile" is your .grf file name
- Try it! Hopefully it works...
Update on January 13 2003:
I have changed the format of the new graphics files slightly, to allow for random graphics and variational graphics (which are like random graphics but deterministic). These changes apply to alpha 13 and higher. In alpha 12, the format of action 0 changed slightly; for trains, a missing property has been inserted ( 18 ), which changed the numbers for properties for sound/graphics effect type to 19, and sorting to 1A.
Please read the changes in action 2 and 3 if you want to use randomized or variational graphics, as well as wagon overrides.
Randomized graphics means a wagon for example will have several different graphics set, and one set will be chosen randomly. At your option, the graphics will be randomized again when the wagon is receives the next load and/or enters a depot.
Variational graphics are graphics that depend on variables, such as current date/year or the vehicle age or speed. These are a set of different graphics like random graphics, but they aren't chosen randomly, and instead determined by the variables.
Finally, wagon override means that you can specify graphics for certain wagons, which will only be used when attached to a specific engine. For example, you could make an ICE engine that forces the regular passenger wagon to look like an ICE wagon, but only when actually connected to the ICE engine.
Please have a look at the attached files to see how all of this works.
Update on January 14 2003:
I had to change the definition of random cargo ID lists, please insert one byte, according to the updated newgrf.txt.
Oh and could someone please fix this topic? I can't write replies (topic_notify error), only edit this existing post.