Train Stations and Animation
Although implemented several patches ago, I've yet to see it work. I don't want to call it a bug yet, but I'd like to know whether I missed something.
First we have the station properties 16, 17 and 18. The patch seems to accept them, at least it complains if property size is incorrect.
Then, there are the 3 callbacks 140, 141 and 142; if they are called at all, the result is simply ignored and yes, I do have bits 2 and 3 set in station property 0B. I cannot even make the game crash by supplying a non-existent frame number or any other silly values.
My understanding is that the frame number is added to the sprite number, so that the correct animation sprite can be displayed.
However, I would have expected to set a bit in the sprite number (station property 09), so that the patch knows which sprites are part of an animation sequence. Working in a similar way to company colour determination. If that is not the case, the whole thing looks a bit silly. Property 16 specifies the number of frames for a particular station, so every sprite will be treated the same way; e.g. :
We have an animated station tile, consisting of 1 rear platform, 1 front platform, 1 fence to the rear and 1 to the front plus the 8 sprites making the animation sequence. That will cost me 12 sprites. But with only having property 16 to say that the tile has an 8 frame animation sequence, I would have to supply the first 4 sprites 8 times as well although they will always be the same costing me 40 sprites in total; what a waste. Don't say I could put everything on the one sprite; in that case I would need a sprite with no fences, 1 fence to the rear only, 1 fence to front only and fenced either side, costing me 32 sprites to start with. This is a very easy set up, but most station tiles are far more complex with roofs, benches, lights, crosswalks, gates, stairs, subways, etc, to accommodate all possible combinations would cost me thousands of sprites. On the other hand, using the Lego System, I can easily configure a station tile. On average I have about 16 configurations of each station tile (by station ID), easy ones a few less, more complex ones a few more.
The absolute minimum required for station animation is :
. set property 16 to, say, 4 frames.
. set property 17 to, say, 6 (animation speed about 2 seconds)
Right ? All the rest including callbacks is for customisation of the whole process.
Doing that, nothing happens !
Now, the question that remains is, how does station tile animation really work ?
And while we are on the subject of station coding, it's one of the features that suffers from a real lack of information (station variables that is).
Why does an industry tile has access to a vast amount of information about its surroundings, but a station tile has almost nothing. Could it just be possible to copy the 'GetTileInfo' to the station feature. I would be quite happy to only have access to ss (slope data) of variable 60. Maybe while you are at it the owner of the tile in question too; i.e. although, I can find out whether on an adjacent non-station tile there is track, but I do not know whether it is my company that owns that track or someone else has decided to build a piece of track immediately next to my station.
This has already been suggested, in a slightly different form, but using the same set up as for industry tiles makes more sense.
Another very important piece of information lacking, is the station ID and tile type of adjacent station tiles. The only thing I know is whether there is another station tile that belongs to another station ID (using a combination of var 40, 41 and 45), but I don't know the station ID and/or the real tile type (the one I have assigned) or even whether the station tile belongs to another station set, in which case I'm not interested.
Any help would be highly appreciated, thank you.