ToyTrax Toyland-Style Track Set

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

ToyTrax Toyland-Style Track Set

Post 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 118 times
Last edited by SimYouLater on 08 Aug 2018 21:24, edited 12 times in total.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: ToyTrax (Coding Questions)

Post 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. :)
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: ToyTrax (Coding Questions)

Post 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!
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: ToyTrax (Coding Questions)

Post 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?
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: ToyTrax

Post by PikkaBird »

You'll probably have to set an introduction_date. Read https://newgrf-specs.tt-wiki.net/wiki/A ... ailability
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: ToyTrax

Post 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.
Attachments
ToyTrax_Source.zip
(226.39 KiB) Downloaded 100 times
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: ToyTrax Toyland-Style Track Set

Post by SimYouLater »

Latest source code added to OP, you can now use ToyTrax as a replacement or as a new tracktype!
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: ToyTrax Toyland-Style Track Set

Post 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.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: le_harv and 19 guests