Coding station graphics
Moderator: Graphics Moderators
I'm assuming that's one of the issues delaying the Alpine set?
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Don't forget to set station prop. 10, the little/lots of cargo threshold.
Then it's as simple as this:
Have a look at the newstat.zip in the newgrfdemo folder at the source code site.
Then it's as simple as this:
Code: Select all
# station ID 0 has 3 cargo amounts under 128 and one above
136 * 13 02 04 00 03 01 00 00 01 00 02 00 03 00
http://www.ttdpatch.net/src/newgrfdemo/
Not all of the files there work with recent alphas, and none of them are useful except as test/demo files.
Not all of the files there work with recent alphas, and none of them are useful except as test/demo files.
No, that's been asked before, and it can't be done, except with the debugger, and that causes other problems.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
I'll dig up this topic to avoid making another one.
Two questions about coding station graphics:
Two questions about coding station graphics:
- Are you allowed to leave callback 14 "unanswered", i.e. not giving it a value?
- Are you not allowed to make a class and not have any of the stations in it available at any one time? I wanted to have a station available from 1970-1990 and another from 1990 onwards and that didn't work: TTD hung every time I used the upper set of arrows to move into where that class would have been.
US Train Set v0.87.1 now released: http://www.tt-forums.net/viewtopic.php?t=8754
Don't forget to read the manual: http://wiki.ttdpatch.net/tiki-index.php?page=Manual
Don't forget to read the manual: http://wiki.ttdpatch.net/tiki-index.php?page=Manual
Sorry for digging.
This topic contains many good graphics, but is there any progress?
This topic contains many good graphics, but is there any progress?

In order to protect the visitors of this site,
TTO Full Conversion!
This post has been lol 1337 times.
No. And it's annoying. The problem is, there are FAR too few coders. Would you be interested in learning how to code stations? Oracle can help you.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Maybe...
Ok I'll try. (somebody have to tell me how to code)
Ok I'll try. (somebody have to tell me how to code)

In order to protect the visitors of this site,
TTO Full Conversion!
This post has been lol 1337 times.
If you've learned it, I will draw a Slovenian train for you, so you can code itEddy wrote:I wan't to learn how to code too

Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.

Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
- Born Acorn
- Tycoon
- Posts: 7596
- Joined: 10 Dec 2002 20:36
- Skype: bornacorn
- Location: Wrexham, Wales
- Contact:
OK, Eddy and Jezulkim. I'll try to get you started with a little preliminary explanation.
1. All new graphics for TTD have to be manually coded. Of course the graphics themselves can be drawn with any graphics program, but once you have the files with the little sprites, you have to code them in a special way to tell the game how to use them. You do this by manually writing an NFO file. Then there's a compiler that takes the NFO file and the graphic file, and compiles them into the GRF file you can actually use with the game.
2. The Patch supports GRF encoding for trains, planes, road vehicles, stations, and buildings. Bridges are being added too. It is NOT necessary to know how to code everything, to be able to code something. So for instance, you seem to be interested in coding stations; you don't have to learn how to code trains, in order to be very useful coding stations.
3. Not many people know how to code, and it isn't well documented. Oracle knows how to code both trains and stations, very well. norfolksouthern also knows how to code stations, although I don't think he is quite as familiar with all the fancy options. Patchman knows how to code everything, obviously, since he wrote the Patch, but you don't want to bother him unless nobody else can help you.
4. At the Patch website
http://www.ttdpatch.net
there is a Wiki which includes at least some information on coding graphics. I recommend you start there. You should also PM Oracle, and he will point you at useful tools and some tutorials that are being worked on.
5. It's useful to look at existing GRF files to see how they were coded. The stations in this thread were, I think, coded by ChrisCF, and if you PM him to send you the NFO files, I think he will. Hopefully he commented them so you can see how they work.
I personally cannot code, but I know who knows everything. So if you have questions, I may not be able to answer them, but I can point you in the right direction of who to ask.
Good luck, and I'll help you all I can.
1. All new graphics for TTD have to be manually coded. Of course the graphics themselves can be drawn with any graphics program, but once you have the files with the little sprites, you have to code them in a special way to tell the game how to use them. You do this by manually writing an NFO file. Then there's a compiler that takes the NFO file and the graphic file, and compiles them into the GRF file you can actually use with the game.
2. The Patch supports GRF encoding for trains, planes, road vehicles, stations, and buildings. Bridges are being added too. It is NOT necessary to know how to code everything, to be able to code something. So for instance, you seem to be interested in coding stations; you don't have to learn how to code trains, in order to be very useful coding stations.
3. Not many people know how to code, and it isn't well documented. Oracle knows how to code both trains and stations, very well. norfolksouthern also knows how to code stations, although I don't think he is quite as familiar with all the fancy options. Patchman knows how to code everything, obviously, since he wrote the Patch, but you don't want to bother him unless nobody else can help you.
4. At the Patch website
http://www.ttdpatch.net
there is a Wiki which includes at least some information on coding graphics. I recommend you start there. You should also PM Oracle, and he will point you at useful tools and some tutorials that are being worked on.
5. It's useful to look at existing GRF files to see how they were coded. The stations in this thread were, I think, coded by ChrisCF, and if you PM him to send you the NFO files, I think he will. Hopefully he commented them so you can see how they work.
I personally cannot code, but I know who knows everything. So if you have questions, I may not be able to answer them, but I can point you in the right direction of who to ask.
Good luck, and I'll help you all I can.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
Who is online
Users browsing this forum: No registered users and 14 guests