Quite often when coding stations, I want to put something at the middle of the station. At the moment this involves checking the station length and then coding quite a few different pseudosprites depending on length.
Would it be possible to have versions of C and P that have the middle tile as 0? The other tiles could then be specified by a signed 4-bit variable, e.g. with F (=1111) meaning -7, which still gives 15 possible values. Obviously the middle would have to be chosen arbitrarily for even-length stations, but c and p could have these definitions reversed.
I think this would be quite useful for reducing the difficulty of coding some stations.
"Middle" version of station variables 40/41
Moderator: TTDPatch Moderators
"Middle" version of station variables 40/41
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
Actually you'd have 1000=-8 through 1111=-1, then 0000=0 to 0111=7. Currenty I plan to have var. 46/47 do this, with the format 0TNL00CP, but where C and P are counted from the middle (which is platform/position (N or L + 1)/2. This way you can test for the middle in both length and platforms with one action 2.
It's a bit of a late reply but thanks for doing this
.
On a different note, is there any chance of random station triggers triggering callback 14? I like to use callback 14 to determine my station layouts rather than varying the graphics (because it's easier to code) but random action 2s never change when you are using callback 14. It would be nice to have this feature if it's not too difficult or CPU heavy.
![Pleased :]](./images/smilies/pleased.gif)
On a different note, is there any chance of random station triggers triggering callback 14? I like to use callback 14 to determine my station layouts rather than varying the graphics (because it's easier to code) but random action 2s never change when you are using callback 14. It would be nice to have this feature if it's not too difficult or CPU heavy.
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
It's not trivial, or I would've done it already. It's also not obvious how it should work... should it be constant for the entire station, or change with each platform, or with each tile?
The big problem is that this callback is used for so many different things, vehicles, track type and stations so far, which makes it difficult to figure out a way of generating random numbers that work for all of these.
The big problem is that this callback is used for so many different things, vehicles, track type and stations so far, which makes it difficult to figure out a way of generating random numbers that work for all of these.
I see - as usual, it's more complicated than I first thought. I'd guess that you'd probably want the callback to occur for the whole station, but I'm not at all sure. Maybe the platform would be more appropriate.
Anyway, if it's difficult then I'm sure there are things more worthy of your time than trying to improve eye-candy a little bit - this type of randomness for stations isn't often used, I think.
Anyway, if it's difficult then I'm sure there are things more worthy of your time than trying to improve eye-candy a little bit - this type of randomness for stations isn't often used, I think.
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
Who is online
Users browsing this forum: No registered users and 5 guests