Page 1 of 1

ToyTrax Toyland-Style Track Set

Posted: 25 Apr 2018 22:58
by SimYouLater
I decided to finish TTD-Scale after all.

Right now I have a working version that replaces the default and electric rails. Currently trying to figure out how to make separate tracktypes.

Unfortunately, compatibility is defined from the train set outwards. Unless train and track sets include TYTX and ELTX compatibility in their code, it will not be possible to use ToyTrax.

I have created two versions of ToyTrax. One is ToyTraxReplace, which replaces RAIL and ELRL with the rails I made (for use with OpenGFX Toyland). The other is ToyTrax, which defines the tracks as separate railtypes. The code and graphics are released in GPL v2.
toytrax_railtype.zip
v1.6, source code and NewGRFs
(131.65 KiB) Downloaded 120 times

Re: ToyTrax (Coding Questions)

Posted: 26 Apr 2018 05:02
by PikkaBird
How do I alter this code to make ToyTrax show up even if a large track set (NuTracks, AuzTracks) is loaded?
Only 16 railtype IDs are available (including the default four, which may be hidden but not undefined), so your tracks won't show up if all the IDs have already been used. Track sets are a bit like Industry sets, in that loading more than one is rarely a good idea.
Also, how do I disable fences?
By providing blank fence sprites. :)

Re: ToyTrax (Coding Questions)

Posted: 26 Apr 2018 18:57
by SimYouLater
PikkaBird wrote:
How do I alter this code to make ToyTrax show up even if a large track set (NuTracks, AuzTracks) is loaded?
Only 16 railtype IDs are available (including the default four, which may be hidden but not undefined), so your tracks won't show up if all the IDs have already been used. Track sets are a bit like Industry sets, in that loading more than one is rarely a good idea.
When I load ToyTrax as the only track set and use a custom ID, only the normal rails are available. Also, I have loaded AuzTracks, Early Rail, 600m Narrow Gauge, Wired and VacTrains together with no issues. I've also loaded North American Track Set, Early Rail, 600m Narrow Gauge, Wired and VacTrains with only overwriting of the maglev as an issue. That said, I use JGRPP so I have 32 slots to fill.
PikkaBird wrote:
Also, how do I disable fences?
By providing blank fence sprites. :)
I was going to ask how to do that, only to find fences.png and fixing it in literally less than a minute. Thanks!

Re: ToyTrax (Coding Questions)

Posted: 27 Apr 2018 22:38
by SimYouLater
Can someone help me to figure out why "RAIL" and "ELRL" being replaced works, but "TYTX" and "ELTX" don't add a track type?

Re: ToyTrax

Posted: 28 Apr 2018 01:05
by PikkaBird
You'll probably have to set an introduction_date. Read https://newgrf-specs.tt-wiki.net/wiki/A ... ailability

Re: ToyTrax

Posted: 28 Apr 2018 01:38
by SimYouLater
PikkaBird wrote:You'll probably have to set an introduction_date. Read https://newgrf-specs.tt-wiki.net/wiki/A ... ailability
Thanks. Now I just need to know how to get normal trains to run on the tracks. Here's the latest code...

EDIT: So, apparently compatibility with other rail types requires compliance by other tack sets and by train sets. As a result, I will be releasing ToyTrax and hoping that other NewGRF makers will be kind enough to alter their code to include compatibility to TYTX and ELTX.

Re: ToyTrax Toyland-Style Track Set

Posted: 02 May 2018 21:18
by SimYouLater
Latest source code added to OP, you can now use ToyTrax as a replacement or as a new tracktype!

Re: ToyTrax Toyland-Style Track Set

Posted: 08 Aug 2018 21:33
by SimYouLater
Source Code has been updated for both ToyTrax and ToyTraxReplace, since I was unable to figure out how to enable compatibility with Early Rail Set and no other changes needed to be made.