Page 21 of 51

Posted: 09 Apr 2005 00:44
by krtaylor
You can't just include the code as it is? I figured it'd be pretty easy if it was already done. Or can you not decompile a GRF file, you'd need the NFO file?

Is someone else interested in adding more details to that station?

Actually, while we're on that subject, can someone extract all the sprites from the Silverline GRF recently posted, and post them here as graphic files? That way they can be worked on and added to more readily.

Posted: 09 Apr 2005 05:14
by DaleStan
AIUI, Aegir needs an LST. The NFO/PCX<->GRF conversion is reversable, but the LST/PCX->GRF apparently isn't.

BICBW, &c.

Posted: 09 Apr 2005 07:35
by Aegir
Sorta, but not exactly. I can decode a .grf into a .nfo and .pcx, and import those into GRFMaker, but it rarely works for stations.

When I go to code it though, I will most likely borrow all the rel values and the original offsets and extents from the nfo, most likely by reading it manually. Thats what I had to do for the City stations.

Posted: 09 Apr 2005 07:49
by Aegir
I havent got even the slightest clue how the hell Im going to code these :? Heck, they use 5 sprites in some parts, and I always thought four was the max, or atleast, thats what I thought when I asked Szappy to tell gl2 to increase the amount of sprites per station tile from three to four...

Could a Patch-dev (Or Oracle) please elaborate?

Posted: 09 Apr 2005 14:59
by Sanchimaru
-We must hurry up! the next train is going to come soon!
...
-Bah, it doesn't matter; the next one will arrive within 5 minutes, so there's no need to haste.
-Are you sure? let's check the time-table
-Ah, it comes after 9 minutes, not 5! how come?
-There's a freight car passing away through this station, that takes some time from the regular coaches
-Well, let's go fast then! do you have your ticket?
-Yep... >BUZZZ<
-What's wrong now!? the train is on the platform!
-Aah! off course! today is day 1!! this is the ticket from last month
-You always leave everything for the last moment!! ... bah, go fill in the form and go to the desk for this month's one... we have time, you know? 9 minutes...
-Sorry... well, we can see the freight train as it passes by. I heared they are using some new locomotives, they are cool!
-... whatever

Posted: 09 Apr 2005 15:09
by Patchman
There is technically no maximum for the number of sprites per tile, but if you have too many the sprite sorter will get confused if there are also pylons and wires.

Posted: 09 Apr 2005 17:02
by Aegir
Patchman wrote:There is technically no maximum for the number of sprites per tile, but if you have too many the sprite sorter will get confused if there are also pylons and wires.
Okay, Ill sugest an option to select how many sprites per individual time then.

Posted: 09 Apr 2005 21:19
by Oracle
Aegir wrote:I havent got even the slightest clue how the hell Im going to code these :? Heck, they use 5 sprites in some parts, and I always thought four was the max, or atleast, thats what I thought when I asked Szappy to tell gl2 to increase the amount of sprites per station tile from three to four...

Could a Patch-dev (Or Oracle) please elaborate?
This is quite complicated (and the way it's been coded isn't quite in keeping with the proper guidelines) but it's not really a huge amount different to any other station (although it does have the roof to consider).

If you do some analysis of the GRF file then there are eight different tile designs, due to all possible combinations of these two factors:
Left/right side of track (i.e. even numbered platform)
Front tile/end tile/middle tile (i.e. is tile number either end (which one does make a difference) or any other tile?)
If middle tile, is it a tile 1+4n from the front? (n = 0, 1, 2 ...) (this displays the "departure board" rather than the lamp posts)

How Arte Pro has coded it is to restrict construction to an even number of platforms (fairly obvious) and then he's coded the sprite layout to avoid having to customise TTD's layout, then changing the graphics with an Action 2. I would code the six different tile types separately and then use callback 14 to switch between them (which is probably easier if you know how to do that).

For each tile type there are 12 sprites in the PCX, which I will just call 6 because there's obviously one for each direction. There is:
  • The platform
  • The fence + its semi-transparent bit
  • A blank one (I'm not sure about why this is here, probably to ease the coding in the way he did it)
  • The roof + its semi-transparent bit.
So, if you're coding it the way I suggest, for each tile type you need to code five different sprites. Code the platform as normal, the fence as normal (going on the opposite side of the track to the platform), then the fence's semi-transparent bit (using the 0322442D+X location definition as newgrf.txt says, although GRFMaker might make it easier), then the roof supports and then the roof's semi-transparent bit.
You'll obviously have to do that eight times, but you can reuse the offsets/sizes most of the time, of course.

If that isn't the way you're going to do it then I can't really help, I'm afraid, but I will try to clarify anything if I've been a little opaque at times (as I'm sure I have!).

Posted: 10 Apr 2005 04:59
by Aegir
Cheers for the advice Oracle, that should come in handy when the time for coding those stations crops up :wink: .

Posted: 10 Apr 2005 08:46
by Sanchimaru
ok, here you are the finished version for JR passenger stations. I think everything is ok and ready, but check it out and tell me of anyting you might find, please!

nothing else is to be added, unless someone else suggests, points out someting.

Posted: 10 Apr 2005 10:28
by Aegir
Perfect Sanchimaru, absolutly perfect.

When Im done rebuilding pre 2 and coding pre3, Ill start on the Japanese stations.

Posted: 10 Apr 2005 11:10
by Purno
It looks very good, but isn't it strage that the roofs are not located nearby the overpass?

Posted: 10 Apr 2005 13:22
by d00mh4mm3r
lol.. well if they can afford paying over $100 a trip.. im shore an umbrella wont do them any harm.. lol

Sanchimaru- what was with the little story telling???

Posted: 10 Apr 2005 15:35
by krtaylor
Looks gorgeous, and very much like I remember them being.

Posted: 10 Apr 2005 16:05
by Sanchimaru
I'm glad you liked it! I am very excited to see them working :))

Aegir: thanks for your compliments, take your time and mess with them whenever you have the time. Could you dedicate the time for these and for the japan-style switchyard, please?

Purno: thanks! I'm glad you liked it. As for the roofs, I just added the station parts as I completed them, just to show them and to be sure that they were correctly aligned. Now you mention it, the arrangemet looks a little bit odd as it is, but when Aegir is done, you could make your own configrations 8)

d00mh4mm3r: $100 a trip to where? off course there are expensive trips; go and look for Twilight Express, Sunrise Express or Cassiopeia; and just ask how much is "a trip". But that's not the regular train you are taking every morning to go to the factory, you know...
About the little story telling, it began in the Japan set thread... I had been drawing buildings and trains for that set since over a year ago, but recently I had the idea of not just posting the image but to add a little story, like introducing them. Thus they look more attractive :))

Posted: 10 Apr 2005 17:08
by wallyweb
Sanchimaru wrote:About the little story telling, it began in the Japan set thread...
"That Sanchimaru fellow did a fine job designing this station."
"Yes, but every now and then this big thing comes out of the sky and rearranges the platform."
"I agree. This week the shelters are so far away from the stairs."
"Maybe if we show our dissaproval?"
"No. That just makes them plant more trees."
"Here comes the train ... Something is out of sorts."
"That's one of DanMack's American engines!"
"Here in Japan? What next?"
:lol:

Posted: 10 Apr 2005 17:48
by Geo Ghost
Sanchimaru, those are really looking fantastic. Well done
Cant wait to see them in game :D

Posted: 11 Apr 2005 00:21
by Sanchimaru
wallyweb wrote:...
:mrgreen:

Posted: 11 Apr 2005 00:22
by Oz
Oh, My! :shock: Stunning, man, just stunning.

Posted: 11 Apr 2005 00:29
by DanMacK
Sanchimaru, excellent work as always man~!