Coding station graphics

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

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
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

No, he's just spending all of his spare time on his new stations set.
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

I suppose he's seen all this action on the stations front here, and wants to get in there first ;)
User avatar
Saskia
Director
Director
Posts: 523
Joined: 22 Feb 2004 14:23
Location: Cologne, Germany
Contact:

Post by Saskia »

Saskia wrote:
Akalamanaia wrote:it would be nice if ya could only make the passengers apperear when station got passengers waiting at it..
Planned for tonight :)
Didn't work :cry: Josef, help me to be faster than MB :cry:
ChrisCF
Transport Empire Developer
Transport Empire Developer
Posts: 3608
Joined: 26 Dec 2002 16:39
Location: Over there --->

Post by ChrisCF »

In theory, getting different passenger numbers is exactly like different load states on wagons, though I've not tried it.
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Don't forget to set station prop. 10, the little/lots of cargo threshold.

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
Have a look at the newstat.zip in the newgrfdemo folder at the source code site.
User avatar
Bernhard
Transport Coordinator
Transport Coordinator
Posts: 293
Joined: 11 Mar 2004 11:26
Location: 52º31'20"N 13º17'51"O

Post by Bernhard »

:oops: sorry, asked for 1000 times, i guess :oops:
:oops: can you give me a link to that site Patchman? :oops:
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

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.
User avatar
Bernhard
Transport Coordinator
Transport Coordinator
Posts: 293
Joined: 11 Mar 2004 11:26
Location: 52º31'20"N 13º17'51"O

Post by Bernhard »

thanks Patchman.

Another Idea. Is it possible to add Signals to the Stations?
Or would it be possible to add another Signal-Ground?
In big stations it is possible, that two trains use the same track.
But then they must have a signal in the middle of the platform like this
paint:
Image
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

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
User avatar
Oracle
Tycoon
Tycoon
Posts: 2138
Joined: 22 May 2003 09:59

Post by Oracle »

I'll dig up this topic to avoid making another one.

Two questions about coding station graphics:
  1. Are you allowed to leave callback 14 "unanswered", i.e. not giving it a value?
  2. 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.
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

1. If you don't give a return value, or if it's not a valid callback result (with FF in the high byte), the default tile type from the regular layout will be used.

2. That's a bug, the class should be skipped if no stations are available. I've fixed it for alpha 32.
User avatar
Jezulkim
Chairman
Chairman
Posts: 844
Joined: 04 Jan 2004 09:40
Location: Finland/Suomi

Post by Jezulkim »

Sorry for digging.

This topic contains many good graphics, but is there any progress?
Image
In order to protect the visitors of this site,
TTO Full Conversion!
This post has been lol 1337 times.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

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
User avatar
Jezulkim
Chairman
Chairman
Posts: 844
Joined: 04 Jan 2004 09:40
Location: Finland/Suomi

Post by Jezulkim »

Maybe...

Ok I'll try. (somebody have to tell me how to code)
Image
In order to protect the visitors of this site,
TTO Full Conversion!
This post has been lol 1337 times.
User avatar
Eddy
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 01 Sep 2004 07:40
Location: Slovenia
Contact:

Post by Eddy »

I wan't to learn how to code too :roll: and I have loads of free time plus I would really like to see a project completed :P
Check out my fresh new site
-It's about TT-
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

Eddy wrote:I wan't to learn how to code too
If you've learned it, I will draw a Slovenian train for you, so you can code it :wink:
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
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."
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7596
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

aww, i liked this project.

(hopes for coders)
Image
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

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.
Development Projects Site:
http://www.as-st.com/ttd
Japan, American Transition, Planeset, and Project Generic Stations available there
User avatar
Eddy
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 01 Sep 2004 07:40
Location: Slovenia
Contact:

Post by Eddy »

I know some basics and actions i've read wiki manual about nfo files. But I want to learn something more complicated than basic trains ( though I would really like to see a slovenian train Purno )
Check out my fresh new site
-It's about TT-
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Amazon [Bot] and 12 guests