Page 1 of 3

Glass Station Release

Posted: 22 Aug 2005 20:26
by Lakie
Hi,

Finally finished coding Purno's / Born_Acorn's Glass Station.
This is my first ever real attempt at coding a station.
So don't expect it to be perfect. :lol:

Requirements

TTDpatch 2.0.1r Alpha 22 or Higher
The Switch "newstations" set to on in ttdpatch.cfg

If either of these fail the grf will give an error.


Installation

Copy "glassstation(w).grf" to the newgrf directory
Add "newgrf/glassstation(w).grf" to newgrf(w).cfg

Please Note: (w) means only add w there if you have the windows versions


Spefication

Number Of Platforms: 1 to 4
Length Of Platforms: 2 to 7
Custom Layouts for all combinations of the above.


How To Use

Quite simple really.

1. Open The Buy Station Window
2. Click Orientation (A menu should appear)
3*. Select Glass Station
4. You should now see the glass station in the previews
5. Choose the dimentions
6. Place Station


Screenshot
Image
A load more of images of it's development can be found here.


Known Issues

None! If you find any tell me!


Credits

Purno for station concept (Graphics)
Born_Acorn for the graphics (Almost all of them!)
Lakie (Me!) for coding the staton and for fixing some of the graphics


Downloads are below, as normal I will post the source later.

~ Lakie

Posted: 22 Aug 2005 22:39
by lobster
very nice indeed! i'll give them a go tomorrow.

Posted: 22 Aug 2005 22:47
by wallyweb
Nice work guys. Thought you might enjoy this:

Posted: 22 Aug 2005 23:15
by Born Acorn
Heehee. Works perfectly!

Posted: 23 Aug 2005 08:50
by Purno
wallyweb wrote:Image
I see some errors in your screenshot (not the stations);

1. The bridge shows wrong roadtexture on the bridge approaches

2. The railway fence doesn't completely show the new graphics

I don't know how to solve 1, but 2 can be solved by reading the 'readme'/'installation guide' at dinges's site or grfcrawler, IIRC. Got something to do with the order in newgrf.cfg compared to elrails or something.

Sorry for OT,

Lakie, thank you very much, finally some of my graphical work is coded into stations :D

Posted: 23 Aug 2005 09:13
by SHADOW-XIII
I do not think it suits freight trains, I have doubts for passenger ones
but it may be great for monorail

Posted: 23 Aug 2005 09:19
by eis_os
Why not for passengers?

I know one tram station that looks a bit like it ...

Posted: 23 Aug 2005 09:24
by Hyronymus
Depends on what you are used to, Shadow:

LinkwithatoolongURL

Posted: 23 Aug 2005 09:26
by Lightglobe
SHADOW-XIII wrote:I do not think it suits freight trains
........
Well thanks, cause you know, I though I might use a station that obvioulsy would be for a passenger station as a freight station.

But seriously, thats the most obvious comment I've seen today, hell, lets make that this week. God, sometimes you amaze me Shadow.

Posted: 23 Aug 2005 09:49
by Szappy
very nice station, and good coding Lakie :)
one question: what's that... err... how should I put it... not-so-nice concrete block doing in there?
It doesn't fit this sleek design for sure.

I'll use it for mono/mglv station for sure, maybe HSTs also.

Posted: 23 Aug 2005 10:37
by Born Acorn
Its where the people get on to the platform, hence why is it always in the middle. (Or as close to the middle it can get)

Yes, it is only meant to be used as a modern (post 80's) passenger station and for Mono/Maglev.

Posted: 23 Aug 2005 11:06
by peter1138
How about glass doors or, a glass porch? :-)

Also, something to join the platforms when there are more than one. Currently that concrete block opens to a wall of glass...

Posted: 23 Aug 2005 11:14
by Born Acorn
That small building is a ticket office and underpass all in one go.

Posted: 23 Aug 2005 11:33
by peter1138
Ah... sneaky ;)

Posted: 23 Aug 2005 12:08
by Lakie
Didn't relise there was a station like that Hyronymus, looks pretty damn cool.
A few things, I believe it might be bugged with multiple platforms in the north-west to south-east direction (\)

And yes, it does look strange with configurations with more platforms, maybe some new graphics for that Born_Acorn?

I'm more than happy to add changes, or new tiles. Or to extend the limits. (Since I normally use 4x8 station configurations myself), It's just I would need some graphics for a 1x1(n) sized station. :)


Anyways Source as I promised.

Please note, that this was wrote / used to debug eis_os' comment in actions grfcodec (diff).
I add a subclass name incase another station had the same type id...

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 4)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
// Number of sprites in file
    0 * 4	 3E 00 00 00

// Check the TTDpatch Version
    1 * 9	 07 8B 04 
		  # Version must be higher
		  05
		  # 2.0.1r Alpha 21
		  02 0A D2 00 
		  # Skip the next to lines
		  02

// Provide an Error
    2 *	20	 0B
		  # This is a fatal error
		  03
		  # All languages
		  1F
		  # Message is "Requires TTDpatch version..."
		  00
		  # Text for the version
		  "2.0.1r Alpha 22" 00

// Disbale this Grf File
    3 * 9	 07 8B 04 
		  # Version is must be lower
		  04
		  # 2.0.1r Alpha 22
		  02 0A DC 00
		  # Skipp the whole file
		  00

// This Grf can only function if newstations switch is on
    4 * 6	 07 85 01
		  # Bit must be on to trigger
		  00
		  # newstations bit
		  52
		  # Skip the Next 2 Sprites
		  02

// Give Error
    5 * 19	 0B
		  # Critial Error
		  03
		  # All Languages
		  1F			
		  # Message is - "Designed to be used with ..."
		  02
		  # Used With "newstations on"
		  "newstations on" 00

// Skip the rest of the file
    6 * 6	 07 85 01
		  # Bit must be off to trigger
		  01
		  # newstations bit
		  52
		  # Skip the Next 2 Sprites
		  00

// Only enable if it's the temperate
    7 * 6	 07 83 01 
                  # Must Not Match
		  03 
		  # Temperate Climate
		  00 
		  # Skip the whole file
		  00

// Define the Grf
    8 * 59	 08 06
		  "BAGS"
		  "Glass Station v1" 00 
		  "Adds Glass Station v1 to Temperate." 00

// Define the station 
    9 * 697	 00 04 05 01 00
		  # Create a new station class (BAGS)
		  08 "BAGS"
		  # Define 8 tile sprite definations
		  09 08
		   # Set the ground sprite to the default ttd one (/)
		   # First sprite on the tile has no offsets
		   # Offets are all set to 1
		   # Both of these stop clipping
		   # Sprite Id is the start of ttd's station sprites
		   # With an offset of 8000 to make company colours work
		   F4 03 00 00  00 00 00 01 01 01  2D 84 00 00
				# This defines a shadow sprite (Glass)
				# Offsets must be 0 for it to line up
				# Sprite id has 3224000 added to it
				# So it calculates the transparency
				00 00 80 00 00 00  2E 44 22 03
				# Offsets are set to F in the x, y
				# This moves the sprite to the 
				# oppisite corner And stops clipping
				0F 0F 00 01 01 01  35 84 00 00
				# The 80 ends the tile sprite defination
				00 00 80 00 00 00  36 44 22 03  80
		   # Set It to the other way (\)
		   F3 03 00 00  00 00 00 01 01 01  3D 84 00 00
				00 00 80 00 00 00  3E 44 22 03
				0F 0F 00 01 01 01  45 84 00 00
				00 00 80 00 00 00  46 44 22 03  80
		   F4 03 00 00  00 00 00 01 01 01  2F 84 00 00
				00 00 80 00 00 00  30 44 22 03 
				0F 0F 00 01 01 01  37 84 00 00
				00 00 80 00 00 00  38 44 22 03  80
		   F3 03 00 00  00 00 00 01 01 01  3F 84 00 00
				00 00 80 00 00 00  40 44 22 03
				0F 0F 00 01 01 01  47 84 00 00
				00 00 80 00 00 00  48 44 22 03  80
		   F4 03 00 00  00 00 00 01 01 01  31 84 00 00
				00 00 80 00 00 00  32 44 22 03 
				0F 0F 00 01 01 01  39 84 00 00
				00 00 80 00 00 00  3A 44 22 03  80
		   F3 03 00 00  00 00 00 01 01 01  41 84 00 00
				00 00 80 00 00 00  42 44 22 03
				0F 0F 00 01 01 01  49 84 00 00
				00 00 80 00 00 00  4A 44 22 03  80
		   F4 03 00 00  00 00 00 01 01 01  33 84 00 00
				00 00 80 00 00 00  34 44 22 03 
				0F 0F 00 01 01 01  3B 84 00 00
				00 00 80 00 00 00  3C 44 22 03  80
		   F3 03 00 00  00 00 00 01 01 01  43 84 00 00
				00 00 80 00 00 00  44 44 22 03
				0F 0F 00 01 01 01  4B 84 00 00
				00 00 80 00 00 00  4C 44 22 03  80
		  # Restrict building of how many platforms can be made
		  # F0 - 5,6,7,+7
		  0C F0
		  # Restrict building of what length of platform
		  # 81 - 1,+7
 		  0D 81
		  # Define new station layouts
		  0E
		   # Tile Definations - Key (+1 for \)
		   # 00 - Opening (South-West)
		   # 02 - Building Tile (No Opening)
		   # 04 - Tube Tile (No Opening)
		   # 06 - Opening (North-East)
		   #
		   # Length of 2, number of platforums 1
		   # Tile Sprite defination numbers
		   # One id for each tile in the station
		   02 01  06 00
		   # Length of 2, number of platforms 2
		   02 02  06 00 06 00
		   02 03  06 00 06 00 06 00
		   02 04  06 00 06 00 06 00 06 00
		   # Length of 3, number of platforms 3
		   03 01  06 02 00
		   03 02  06 02 00 06 02 00
		   03 03  06 02 00 06 02 00 06 02 00
		   03 04  06 02 00 06 02 00 06 02 00 06 02 00
		   04 01  06 02 04 00
		   04 02  06 02 04 00 06 02 04 00
		   04 03  06 02 04 00 06 02 04 00 06 02 04 00
		   04 04  06 02 04 00 06 02 04 00 06 02 04 00 06 02 04 00
		   05 01  06 04 02 04 00
		   05 02  06 04 02 04 00 06 04 02 04 00
		   05 03  06 04 02 04 00 06 04 02 04 00 06 04 02 04 00
		   05 04  06 04 02 04 00 06 04 02 04 00 06 04 02 04 00 06 04 02 04 00
		   06 01  06 04 02 04 04 00
		   06 02  06 04 02 04 04 00 06 04 02 04 04 00
		   06 03  06 04 02 04 04 00 06 04 02 04 04 00 06 04 02 04 04 00
		   06 04  06 04 02 04 04 00 06 04 02 04 04 00 06 04 02 04 04 00 06 04 02 04 04 00
		   07 01  06 04 04 02 04 04 00
		   07 02  06 04 04 02 04 04 00 06 04 04 02 04 04 00
		   07 03  06 04 04 02 04 04 00 06 04 04 02 04 04 00 06 04 04 02 04 04 00
		   07 04  06 04 04 02 04 04 00 06 04 04 02 04 04 00 06 04 04 02 04 04 00 06 04 04 02 04 04 00
		   # End Tile Layouts
		   00 00

// Import Graphics into file
// Total of 4 sprites per tile
// One sprite for each side (2)
// Each side piece has a shadow sprite (2)
// Four tile types, so 32 images
   10 * 4	 01 04 01 20
// First Sprite seqence (Furthest side) (/)
// Offsets use to line it up with the track
   11 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx    1 1 01 33 44 -31 -14
// Shadow for previous sprite (Repeats all the way down)
// Shadow Sprite must have no offset
// As it inherts the offset from it's main sprite
   12 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx   46 1 01 33 44   0   0
   13 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx   91 1 01 33 53 -31 -14
   14 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  145 1 01 33 53   0   0
   15 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  199 1 01 33 50 -31 -14
   16 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  250 1 01 33 50   0   0
   17 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  301 1 01 23 40 -31  -4
   18 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  342 1 01 23 40   0   0
// Second Sprite Sequence (Closest side) (/)
   19 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  383 1 01 45 41  -7 -44
   20 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  425 1 01 45 41   0   0
   21 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  467 1 01 42 42  -8 -41
   22 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  510 1 01 42 42   0   0
   23 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  553 1 01 43 46 -12 -42
   24 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  600 1 01 43 46   0   0
   25 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  647 1 01 27 41  -8 -26
   26 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  689 1 01 27 41   0   0
// Third Sprite Set (Furtherst side) (\)
   27 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  731 1 01 33 44 -11 -14
   28 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  776 1 01 33 44   0   0
   29 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  821 1 01 33 53 -20 -14
   30 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  875 1 01 33 53   0   0
   31 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  929 1 01 33 50 -17 -14
   32 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx  980 1 01 33 50   0   0
   33 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1031 1 01 23 40  -7  -4
   34 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1072 1 01 23 40   0   0
// Fourth Sprite Set (Closest Side) (\)
   35 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1113 1 01 45 41 -32 -44
   36 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1155 1 01 45 41   0   0
   37 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1197 1 01 42 42 -32 -41
   38 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1240 1 01 42 42   0   0
   39 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1283 1 01 43 46 -32 -42
   40 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1330 1 01 43 46   0   0
   41 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1377 1 01 27 41 -31 -26
   42 C:\TTD\Born_Acorn\GlassStation\glassstation.pcx 1419 1 01 27 41   0   0

// Define Graphic Set
   43 * 7	 02 04 00 00 01 00 00

// Use graphics?
   44 * 7	 03 04 01 00 00 00 00

// Set name
// This is setting the class name (00 C4)
   45 * 20	 04 04 9F 01 00 C4 "Glass Station" 00

// This sets a sub class name (00 C5)
   46 * 20	 04 04 9F 01 00 C5 "Glass Station" 00
~ Lakie

Posted: 23 Aug 2005 12:12
by peter1138
I add a subclass name incase another station had the same type id...
Station numbers are unique to the GRF file, so will not conflict. The only issue is having too many stations per class. Classes are not unique to a file.

Posted: 23 Aug 2005 12:52
by Lakie
It's actually incase it has the same class id (BAGS)

So that the station doesn't end put named some wierd name.
In a class with other stations.

Although I think it's unlightly it would ever be used by another grf (Or station).

~ Lakie

Posted: 23 Aug 2005 12:58
by Patchman
But if everyone used a separate class for each station, we'll run out of station classes. At the moment they're limited to 19 classes.

It would be better if you'd add the station to another class, maybe even the DFLT class.

Posted: 23 Aug 2005 13:05
by Lakie
Yes, you do have a point.

I might need t do that, or I could just make sure any other stations I code uses the same class id.
And rename the Class Id?

I'll think about it.

~ Lakie

Posted: 23 Aug 2005 14:28
by lobster
i guess you could add it to one of the Generic Stations-classes. just ask Aegir 'bout the details.