[SOLVED!!!!] Questions regarding multi-tile stations (Layout & Reserved Path Awareness)

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
Quast65
Tycoon
Tycoon
Posts: 2661
Joined: 09 Oct 2011 13:51
Location: The Netherlands

[SOLVED!!!!] Questions regarding multi-tile stations (Layout & Reserved Path Awareness)

Post by Quast65 »

Hi all!!

I have a couple of questions regarding a (6-track wide, 7-platforms long) station I am trying to code.

First of all regarding station-layout for a 6x7 station (This I have in working order)
These are the action-2s I am using:

Code: Select all

 1176 * 7	 02 04 00 00 01 00 00
 1177 * 30	 02 04 01 81 41 0C 0F       05 04 80 01 01 06 80 02 02 08 80 03 03 0A 80 04 04 0C 80 05 05 00 80
 1178 * 16	 02 04 02 81 41 80 0F 00 07 01 01 00 00 00 18 80
 1179 * 30	 02 04 03 81 41 0C 0F       05 10 80 01 01 12 80 02 02 14 80 03 03 16 80 04 04 18 80 05 05 0E 80
 1180 * 16	 02 04 04 81 41 80 0F 00 07 01 03 00 01 01 02 00
 1181 * 30	 02 04 05 81 41 0C 0F       05 1C 80 01 01 1E 80 02 02 20 80 03 03 22 80 04 04 24 80 05 05 1A 80
 1182 * 16	 02 04 06 81 41 80 0F 00 07 01 05 00 02 02 04 00
 1183 * 30	 02 04 07 81 41 0C 0F       05 28 80 01 01 2A 80 02 02 2C 80 03 03 2E 80 04 04 30 80 05 05 26 80
 1184 * 16	 02 04 08 81 41 80 0F 00 07 01 07 00 03 03 06 00
 1185 * 30	 02 04 09 81 41 0C 0F       05 34 80 01 01 36 80 02 02 38 80 03 03 3A 80 04 04 3C 80 05 05 32 80
 1186 * 16	 02 04 0A 81 41 80 0F 00 07 01 09 00 04 04 08 00
 1187 * 30	 02 04 0B 81 41 0C 0F       05 40 80 01 01 42 80 02 02 44 80 03 03 46 80 04 04 48 80 05 05 3E 80
 1188 * 16	 02 04 0C 81 41 80 0F 00 07 01 0B 00 05 05 0A 00
 1189 * 30	 02 04 0D 81 41 0C 0F       05 4C 80 01 01 4E 80 02 02 50 80 03 03 52 80 04 04 54 80 05 05 4A 80
 1190 * 16	 02 04 0E 81 41 80 0F 00 07 01 0D 00 06 06 0C 00
 1191 * 14	 02 04 0F 81 0C 00 FF 01 0E 00 14 14 00 00
What I would like to know is if the numbers circled in red correspond with the numbers circled in green:
Example335.png
Example335.png (27.93 KiB) Viewed 2151 times
As this may be important for my next question ;-)


So, the next question...
I would like to make that station Reserved Path aware (so that the graphics of a row of platforms change when a train reserves a path through that row of platforms)
I have already managed to do that for single-tile stations, but not yet for multi-tile stations.
In case of single-tiles I use this code:

Code: Select all

  327 * 6	 01 04 01 FF 08 00
  328 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   10   7   64  122  -31  -91 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp  10   7   64  122  -31  -91 normal chunked
  329 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   330   7   64  122  -0  -0 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp   330   7   64  122  -0  -0 normal chunked
  330 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   90   7   64  122  -53  -102 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp   90   7   64  122  -53  -102 normal chunked
  331 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   410   7   64  122  -0  -0 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp  410   7   64  122  -0  -0 normal chunked
  332 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   170   7   64  122  -31  -91 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp   170   7   64  122  -31  -91 normal chunked
  333 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   490   7   64  122  -0  -0 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp  490   7   64  122  -0  -0 normal chunked
  334 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   250   7   64  122  -9   -102 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp   250   7   64  122  -9   -102 normal chunked
  335 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   570   7   64  122  -0  -0 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp  570   7   64  122  -0  -0 normal chunked
  336 * 7	 02 04 00 00 01 00 00
  337 * 6	 01 04 01 FF 08 00
  338 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   10   149   64  122  -31  -91 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp  10   149   64  122  -31  -91 normal chunked
  339 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   330   149   64  122  -0  -0 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp   330   149   64  122  -0  -0 normal chunked
  340 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   90   149   64  122  -53  -102 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp   90   149   64  122  -53  -102 normal chunked
  341 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   410   149   64  122  -0  -0 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp  410   149   64  122  -0  -0 normal chunked
  342 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   170   149   64  122  -31  -91 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp   170   149   64  122  -31  -91 normal chunked
  343 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   490   149   64  122  -0  -0 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp  490   149   64  122  -0  -0 normal chunked
  344 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   250   149   64  122  -9   -102 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp   250   149   64  122  -9   -102 normal chunked
  345 c:/grfcodec603/auzstations/gfx/template_rpa_singletile_8bpp_EMPTY.png  8bpp   570   149   64  122  -0  -0 normal chunked
    | c:/grfcodec603/auzstations/gfx/template_rpa_singletile_32bpp.png  32bpp  570   149   64  122  -0  -0 normal chunked
  346 * 7	 02 04 01 00 01 00 00
  347 * 106	 00 04 04 01 0F 08 "AS05" 11 FF 0B 0F 09 02 
	         F4 03 00 00 00 00 00 10 05 03 2D 04 00 00 00 00 80 00 00 00 2E 44 22 03 00 0B 00 10 05 03 2F 04 00 00 00 00 80 00 00 00 30 44 22 03 80
                 F3 03 00 00 00 00 00 05 10 03 31 04 00 00 00 00 80 00 00 00 32 44 22 03 0B 00 00 05 10 03 33 04 00 00 00 00 80 00 00 00 34 44 22 03 80
  348 * 14	 02 04 02 81 44 00 01 01 01 00 01 01 00 00
  349 * 10	 03 04 01 0F 01 FF 00 00 02 00
  350 * 37	 04 48 FF 01 0F "ÅTEMPLATE RPA-tile, Single Tile" 00
  351 * 45	 04 48 FF 01 0F "ÄAuzStations: Reserved Path Aware Tiles" 00
2 graphics-blocks with their own "basic" Action-2 (codeline 336 & 346) and an action-2 that does the " reserved path magic" (codeline 348).

Now I want to impliment this into the multi-tile station.
What should I do?

Option-1:
Do I now give each graphics-block its own entire action-2 block (like the one in the first code-example)?
If so, should I then for the second graphics-block change the numbers I circled in red, to corresponding numbers circled in green, or do they stay the same?

Graphics-block 1 then ends up with Action2-ID

Code: Select all

0F
Graphics-block 2 then ends up with Action2-ID

Code: Select all

1F
Do I then combine those using an Action-2 that does the "reserved path magic", like this:

Code: Select all

02 04 20 81 44 00 01 01 1F 00 01 01 0F 00
And if that is correct, how should the Action-3 then look like (the last 4 bits)?

Option-2:
I only have 2 "basic" Action-2s at the end of each graphics-block, like this:

Code: Select all

*Graphicsblock-1*
02 04 00 00 01 00 00
*Graphicsblock-2*
02 04 01 00 01 00 00
Then I add the Action-2 that does the "reserved path magic"

Code: Select all

02 04 02 81 44 00 01 01 01 00 01 01 00 00
After that, should I then add just one Action-2-block that does the station-layout?
If so, do I need to change the numbers I circled in red, to corresponding numbers circled in green, or do they stay the same?
And how should the Action-3 then look like (the last 4 bits)?



Is one of these two options the right way to go? Or should it be done another way?
Help is appreciated!! :bow:
Last edited by Quast65 on 08 Aug 2017 13:57, edited 1 time in total.
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
Quast65
Tycoon
Tycoon
Posts: 2661
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: Questions regarding multi-tile stations (Layout & Reserved Path Awareness)

Post by Quast65 »

I have tried to narrow down the problem... Maybe this will make it easier to explain it and get some help ;-)

I now have this code (I have omitted the Action-1s and the Action-0 as those blocks are huge for a station this large and that information is not important for my current problem):

Code: Select all

*Action-1 graphics-block A*
 1175 * 7	 02 04 00 00 01 00 00
 
*Action-1 graphics-block B*
 1431 * 7	 02 04 01 00 01 00 00
 
 *Action-0 block*
 
 1433 * 14	 02 04 02 81 44 00 01 01 01 00 01 01 00 00

 1434 * 30	 02 04 03 81 41 0C 0F       05 04 80 01 01 06 80 02 02 08 80 03 03 0A 80 04 04 0C 80 05 05 00 80
 1435 * 16	 02 04 04 81 41 80 0F 00 07 01 03 00 00 00 18 80
 1436 * 30	 02 04 05 81 41 0C 0F       05 10 80 01 01 12 80 02 02 14 80 03 03 16 80 04 04 18 80 05 05 0E 80
 1437 * 16	 02 04 06 81 41 80 0F 00 07 01 05 00 01 01 04 00
 1438 * 30	 02 04 07 81 41 0C 0F       05 1C 80 01 01 1E 80 02 02 20 80 03 03 22 80 04 04 24 80 05 05 1A 80
 1439 * 16	 02 04 08 81 41 80 0F 00 07 01 07 00 02 02 06 00
 1440 * 30	 02 04 09 81 41 0C 0F       05 28 80 01 01 2A 80 02 02 2C 80 03 03 2E 80 04 04 30 80 05 05 26 80
 1441 * 16	 02 04 0A 81 41 80 0F 00 07 01 09 00 03 03 08 00
 1442 * 30	 02 04 0B 81 41 0C 0F       05 34 80 01 01 36 80 02 02 38 80 03 03 3A 80 04 04 3C 80 05 05 32 80
 1443 * 16	 02 04 0C 81 41 80 0F 00 07 01 0B 00 04 04 0A 00
 1444 * 30	 02 04 0D 81 41 0C 0F       05 40 80 01 01 42 80 02 02 44 80 03 03 46 80 04 04 48 80 05 05 3E 80
 1445 * 16	 02 04 0E 81 41 80 0F 00 07 01 0D 00 05 05 0C 00
 1446 * 30	 02 04 0F 81 41 0C 0F       05 4C 80 01 01 4E 80 02 02 50 80 03 03 52 80 04 04 54 80 05 05 4A 80
 1447 * 16	 02 04 10 81 41 80 0F 00 07 01 0F 00 06 06 0E 00
 1448 * 14	 02 04 11 81 0C 00 FF 01 10 00 14 14 00 00

 1449 * 10	 03 04 01 29 01 FE 11 00 02 00
 
 1450 * 35	 04 48 FF 01 29 "ÅRoosendaal, Locomotive Depot" 00
 1451 * 64	 04 48 FF 01 29 "ÄDutch Addition: Stations with Tracked and Non-Track Tiles" 00
 
The Action-2 in codeline 1433 is to get different graphics when a train chooses a path through it.
The Action-2 block from line 1434 to 1448 is to get the layout I want.

This now happens ingame:
Example337.png
Example337.png (73.76 KiB) Viewed 2086 times
The layout is as I would like to have it, but as you can see nothing happens along the paths chosen by the trains...

But, when I change the Action-3 from:

Code: Select all

 1449 * 10	 03 04 01 29 01 FE 11 00 02 00
To:

Code: Select all

 1449 * 10	 03 04 01 29 01 FE 02 00 11 00
This happens:
Example338.png
Example338.png (70.24 KiB) Viewed 2086 times
There are now different graphics for the tiles along the chosen paths, but the layout is completely wrong....


So, its either the one or the other...
But I would like both features! :mrgreen:


So, how do I combine them?
Do I need another Action-2 to combine both (if so, how should that Action-2 look like) and then referr to that one in my Action-3 (and how would that Action-3 look like)?
Or do I need to somehow insert the Action-2 for the different graphics into the Action-2 block for the layout (and then how would the Action-3 look like)? Or the other way around (make two Action-2 blocks for the layout and combine those using an Action-2 like in line 1433)?
Or am I completely wrong with either possible solution? :|
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
Quast65
Tycoon
Tycoon
Posts: 2661
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: Questions regarding multi-tile stations (Layout & Reserved Path Awareness)

Post by Quast65 »

I have solved it!!!!! :mrgreen:

Writing down the problem always helps ;-)

This is my solution:

I have changed codeline 1448 from this:

Code: Select all

 1448 * 14    02 04 11 81 0C 00 FF 01 10 00 14 14 00 00
To this:

Code: Select all

 1448 * 14    02 04 11 81 0C 00 FF 01 10 00 14 14 02 00
And the Action-3 from this:

Code: Select all

 1449 * 10    03 04 01 29 01 FE 11 00 02 00
to this:

Code: Select all

 1449 * 10	 03 04 01 29 01 FE 11 00 00 00
Which gives this ingame:
Example339.png
Example339.png (76.41 KiB) Viewed 2084 times
The correct layout with different graphics for the tiles along a chosen path!!! :]
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 14 guests