Suspended Monorail

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

User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

acs121 wrote:Maybe we should make a higher depot for the Suspended Monorail...
A revised depot is in my plans, but not yet. The bugs come first.
U.N.Owen
Engineer
Engineer
Posts: 19
Joined: 13 Aug 2018 19:11

Re: Suspended Monorail

Post by U.N.Owen »

U.N.Owen wrote:I hope to write required adapter (and explain details) before today evening.
…it's not evening yet, right? ^_^

Is't not a susmon problem. It's a problem of NRT itself. If road/tramtrack has transparency at underlayer level, we can see default road through it. Because compatibility with non-NRT GRF.
Fixe it in each NRT-aware GRF is wrong solution. For each landscape we need to replace bad sprites only once. Therefore we need one global adapter for 4 default landscapes and some specific adapters for additional landscapes.

For defaults Ratt Roads already do it.
For japanese…simplest solution here: ratt-jp.grf in attach. It just replace 19 sprites. This action fixed our problem. And same problem with Ratt Roads in Japanese landscape was fixed too.
However, this also disable default roads. Therefore we need to use here some GRF that provide new NRT roads (yes its Ratt Roads. Also it provide adapter for snow. My quickfix not yet).
Maybe later it will be work without Ratt Roads (we need just replace snowed roads too and provide our own road instead). But now its just "proof of concept".

Valid GRFs order:
  1. Japanese landscape
  2. Ratt Roads
  3. ratt.jp
Also attachment, of course, has susmon-ratt version with transparent underlayer, what works with them all.
acs121 wrote:Maybe we should make a higher depot for the Suspended Monorail...
Maybe.
That about haul road depot from Road Hog? (you can see it at screenshot with "lawn")
wallyweb wrote:How do railtypes and NRT code for layering?
Eh? You asked this from me? But I have only little basic knowledge about this… I can only tell how I added it to this project. Here it's explained better, I think…
Attachments
susmon-ratt.zip
Transparent underlayer + ratt-jp.grf
(115.52 KiB) Downloaded 186 times
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

U.N.Owen wrote:...
I will look at the contents of your zip later tonight. I will then comment sometime tomorrow. 8)
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: Suspended Monorail

Post by Andrew350 »

Haven't looked at the zip file yet so I'm sorry if I'm repeating something, but maybe I can help explain how this works.

The way RattRoads "fixes" the grass mismatch is basically just a copy-over from the way I did it in ARRS. Essentially all it is doing is replacing the road sprites in the base set with a set of "blank" landscape tiles via Action A replacement, using a series of conditional checks to determine the current climate, tiletype, and, in the case of OpenGFX+ Landscape, gridline setting. This is why placing RattRoads in the active NewGRF list works even for this set; it is overwriting the base set sprites that are showing through. :)

The thing is, since this method is simply copied straight from ARRS, the result is that those replacement sprites are "hardcoded" into the NewGRF, which is why currently RattRoads is only compatible with OpenGFX, because those are the sprites I used. With NRT however, it MAY be possible, although I haven't actually checked yet, to simply reference the TTD sprite numbers directly instead of having to hardcode a specific set of sprites into the NewGRF, which would eliminate any such compatibility problems. Again, I haven't checked if it works (there may possibly be issues with slopes) but maybe something to look into.

In any case, it isn't a huge deal to fix this little quirk of NRT on a per-GRF basis, it just requires a little bit of extra logic and perhaps a few sprites. And besides, the same issue already exists in vanilla OTTD with tram track sprites, and nobody besides me seemed to notice or even care :mrgreen: Ultimately, each GRF author can choose to deal with it (or not) as they see fit.
U.N.Owen
Engineer
Engineer
Posts: 19
Joined: 13 Aug 2018 19:11

Re: Suspended Monorail

Post by U.N.Owen »

I have made new version of ratt-jp adapter.
Now it support snow and, as options, provide basic jp roads. In other words, RattRoads is no more required for it (but RattRoads require it for jp landscape).
Andrew350 wrote:The thing is, since this method is simply copied straight from ARRS, the result is that those replacement sprites are "hardcoded" into the NewGRF, which why currently RattRoads is only compatible with OpenGFX, because those are the sprites I used.
Maybe would be better if you split RattRoads. Now it solves two completely orthogonal tasks.
Sprite adapter don't need to provide 6 different road types (only basics roads as option).
Roads itself require sprite adapter, but in unsupported landscapes/sets it need another adapter anyway (my ratt-jp for japanese for example).
If you move your adapter into separate GRF it will be more flexible.
Andrew350 wrote:With NRT however, it MAY be possible, although I haven't actually checked yet, to simply reference the TTD sprite numbers directly instead of having to hardcode a specific set of sprites into the NewGRF, which would eliminate any such compatibility problems.
If it real possible it will be great. With this we can make one universal adapter for all and forget about problem.
Andrew350 wrote:And besides, the same issue already exists in vanilla OTTD with tram track sprites, and nobody besides me seemed to notice or even care
In vanilla, not so much GRF that replace tramstracks. I would not be surprised if only susmon was dealing with this problem before NRT.
Attachments
ratt-jp.zip
(37.68 KiB) Downloaded 137 times
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

U.N.Owen wrote:
wallyweb wrote: If you see any issues with the file posted in the first post and provided that you have not altered it, then, by all means, post a screenshot and written description here and I will take a look at it.
All versions (original susmon1.1, your susmon2.0, my susmon-ratt) has it. Only your bridge hasn't.
Here:
mono-fail.pngLook like we need to move something from catenary_front to catenary_back.
I just tried this with OpenGFX base set and eGRVTS (for trams) as the only GRF and then I tried grvts in TTDPatch, and saw the same problem. This is not a GRF issue.
Tram Test 1.sav
(12.79 KiB) Downloaded 106 times
Tram Test Bounding Boxes.png
Tram Test Bounding Boxes.png (72.19 KiB) Viewed 5859 times
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

U.N.Owen wrote:
wallyweb wrote:So, I moved the back pylons over to the track sprite.
This hack probably works, but not looks as very good solution. Rails and pylons is complete different things, it would be better to keep them separately.
Actually it is not a hack. It is a solution to a bug that has existed for many years and it is based on a working solution for bridges.
For example, if we have this and decide to change track sprites, we cannot just get good sprites from another set but should to add pylons to them too. Situation get worse if they also use this solution and have they own pylons/pillar at the track sprites…
See my notes below. This is a unique project. With NRT we do not have to accommodate other authors' work. Their own NRT will appear as overlays where necessary.
wallyweb wrote:Now if y'all will excuse me, I have a big bunch of sprites to redraw.
…And we will have this problem right now because I changing rails in NRT version.
See my notes below.
Eddi wrote:the "correct" solution here would be to have only one pillar per sprite.
This variant looks much better (if it will work). We should try, I guess.
It will work because I did try it, but for only one sprite. There remains much work to do.

This is about suspended monorails.
Suspended monorails do not have tracks.
I have included the default OpenGFX tracks as a courtesy to those who need the tracks for trams.
This is not an NRT version.

For NRT, I suggest very strongly that there be no tracks included.
If a player wants tracks, they should use a tram type that does have tracks ... and proper tram catenary as well.
NRT supports many tram types and they do not have to be all in one GRF.
Also, for NRT I am thinking about having taller monorail pylons so that the monorail can pass above the rv traffic below.

I realize that you are anxious to get the NRT version completed and I do thank you for that, :bow: but the non-NRT version is far from complete. What I am working on will take several days to complete and test.
U.N.Owen
Engineer
Engineer
Posts: 19
Joined: 13 Aug 2018 19:11

Re: Suspended Monorail

Post by U.N.Owen »

wallyweb wrote:For NRT, I suggest very strongly that there be no tracks included.
If a player wants tracks, they should use a tram type that does have tracks ... and proper tram catenary as well.
Tram can pass under monorail. Therefore, I guess, it would be better if we provide two tramtypes: monorail itself and monorail+tram dual. For second type we need tracks.
[+] Spoiler
And now I have a problem with this second type: it's don't want to activate if hasn't vehicles. Props 18/19 has no effect. I'm still not good at GRF coding…
For the rest I will answer tomorrow, now I'm very sleepy.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: Suspended Monorail

Post by Wolf01 »

U.N.Owen wrote:
[+] Spoiler
And now I have a problem with this second type: it's don't want to activate if hasn't vehicles. Props 18/19 has no effect. I'm still not good at GRF coding…
And that might be an actual bug with NRT, I was trying to get it right, but I might have skipped some cases.
Also I don't think you can disable a tramtype with 2 compatibilities if one of the 2 vehicle isn't available...
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

Wolf01 wrote:
U.N.Owen wrote:
[+] Spoiler
And now I have a problem with this second type: it's don't want to activate if hasn't vehicles. Props 18/19 has no effect. I'm still not good at GRF coding…
And that might be an actual bug with NRT, I was trying to get it right, but I might have skipped some cases.
Also I don't think you can disable a tramtype with 2 compatibilities if one of the 2 vehicle isn't available...
This sounds familiar. In trunk the road GUI will be greyed out until an RV is available. The same for trams. The GRF could be loaded but the GUI will remain greyed out until the first vehicle's available date.
@U.N.Owen ... The first Suspended Monorail vehicle is not available until 1983. What year does your game show?
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

U.N.Owen wrote:
wallyweb wrote:For NRT, I suggest very strongly that there be no tracks included.
If a player wants tracks, they should use a tram type that does have tracks ... and proper tram catenary as well.
Tram can pass under monorail. Therefore, I guess, it would be better if we provide two tramtypes: monorail itself and monorail+tram dual. For second type we need tracks.
In OpenTTD trunk there are no road/tram types. The tram tracks are made available for a player who wants to use trams at the same time as using the suspended monorail. This is done as a courtesy to the player.

NRT makes multiple road/tram types possible so we do not have to offer the courtesy of making trams and tracks available in NRT. The player will find that trams and tracks already exist in other NRT sets. Also, monorail+tram dual does not exist in reality.

Note that NRT makes both trams and trolley buses possible and both can run on the same road, but the trolley bus does not use tracks. It is possible to create a trolley bus set with no trams or tracks and then the player can add a second set that has only trams and that does provide tracks.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

An update:
1. on the back pillar/pylon clipping problem ...
ttdpbase.grf and ttdpbasew.grf introduced tram tracks and catenary as overlays for TTDPatch roads.
Back pillar clipping was there but was never really properly fixed.
When ogfxe_extra.grf introduced the feature to OpenTTD, the problem followed.
A proper fix would be a patch to the source code.
A workaround fix is to move the back pillars over to the tram track overlay sprites.
This has been tested and it works.

2. on the adjacent tile front pillar/pylon clipping problem ...
Eddi wrote:
U.N.Owen wrote:Here is another example of this bug.
i think what's happening here is that the pillar sprite has two pillars at the beginning and end of tile, so each pillar actually gets drawn twice. once as second pillar of the first tile, and once as first pillar of the second tile.

the "correct" solution here would be to have only one pillar per sprite, and then draw pillars more like rail catenary pillars.
This is indeed the correct solution, however it introduces another problem.
There are four u-turn track tiles to be used at the end of a tram line.
They share the same pillar+catenary sprites as the through track tiles.
With a single pillar, two of the u-turn tiles would have one end with unsupported catenaries.
Zephyris' workaround seems to have been to have the far end pillars drawn so as to overlap the near end pillars of the adjacent tile.
This has been tested and works.
Sorry Eddi. Your suggestion was worth a try and I did it, but those floating u-turn catenaries looked rather strange. Perhaps someday somebody will do a patch so that the u-turns can have their own catenaries instead of sharing with the through tracks.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: Suspended Monorail

Post by SimYouLater »

Bug report. I just tried using this NewGRF with 20190603-master-g846fc8fe09. I can't get it to appear when any other tram tracks are available. I've tested with Docklands, Country Roads, RATT and U&RaTT, no matter what I do the suspended monorail won't appear separately from tramtypes.
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
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

SimYouLater wrote:Bug report. I just tried using this NewGRF with 20190603-master-g846fc8fe09. I can't get it to appear when any other tram tracks are available. I've tested with Docklands, Country Roads, RATT and U&RaTT, no matter what I do the suspended monorail won't appear separately from tramtypes.
Thanks for the report. :bow:
It hasn't been coded as a tramtype yet.
As it currently stands it replaces the default tram tracks and catenary.
From your tests does it work if no NRT GRFs are present?
I'm waiting for the NewGRF Specifications and/or the NML specifications to be updated to include NRT in the wiki.
At this writing, JGR's patch pack doesn't support NRT yet, so try it there if only to get an idea as to what it does.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: Suspended Monorail

Post by SimYouLater »

wallyweb wrote:
SimYouLater wrote:Bug report. I just tried using this NewGRF with 20190603-master-g846fc8fe09. I can't get it to appear when any other tram tracks are available. I've tested with Docklands, Country Roads, RATT and U&RaTT, no matter what I do the suspended monorail won't appear separately from tramtypes.
Thanks for the report. :bow:
It hasn't been coded as a tramtype yet.
As it currently stands it replaces the default tram tracks and catenary.
From your tests does it work if no NRT GRFs are present?
I'm waiting for the NewGRF Specifications and/or the NML specifications to be updated to include NRT in the wiki.
At this writing, JGR's patch pack doesn't support NRT yet, so try it there if only to get an idea as to what it does.
It does work as long as no tramtypes are present, such as disabling the tram tracks in U&RaTT. It also works fine with JGR's Patch Pack.
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
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

SimYouLater wrote:It does work as long as no tramtypes are present, such as disabling the tram tracks in U&RaTT. It also works fine with JGR's Patch Pack.
More thanks.
Please remain subscribed to this topic. Any developments will be posted here.
Meanwhile, from what you've seen so far, do you have any suggestions? Now might be a good time for me to consider them.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: Suspended Monorail

Post by SimYouLater »

wallyweb wrote:
SimYouLater wrote:It does work as long as no tramtypes are present, such as disabling the tram tracks in U&RaTT. It also works fine with JGR's Patch Pack.
More thanks.
Please remain subscribed to this topic. Any developments will be posted here.
Meanwhile, from what you've seen so far, do you have any suggestions? Now might be a good time for me to consider them.
Yeah, I've got one. Can you put tram tracks on the street below the suspended monorail? It's easier to deal with the infrastructure when you don't have to choose between trams and monorails. You'll want two widths of tram track, one for the default OpenGFX tracks (made by FooBar, used by Recycled Infrastructure Set and by Docklands) and one for the wider tracks used by Ufiby's Road and Tram Types.

I included a screenshot, which shows the difference. You might need to use custom graphics for Ufiby's tracks, since they didn't put a proper license IIRC.

Thanks in advance.
Attachments
McIntosh & Co., 03_04_2100.png
Two Tramtypes
(91.64 KiB) Not downloaded yet
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
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Suspended Monorail

Post by wallyweb »

SimYouLater wrote:
wallyweb wrote:from what you've seen so far, do you have any suggestions? Now might be a good time for me to consider them.
Yeah, I've got one. Can you put tram tracks on the street below the suspended monorail? It's easier to deal with the infrastructure when you don't have to choose between trams and monorails. You'll want two widths of tram track, one for the default OpenGFX tracks (made by FooBar, used by Recycled Infrastructure Set and by Docklands) and one for the wider tracks used by Ufiby's Road and Tram Types.

I included a screenshot, which shows the difference. You might need to use custom graphics for Ufiby's tracks, since they didn't put a proper license IIRC.
There is a parameter to turn the tram tracks on.
Unfortunately they are Zephyris' original ones.
I did not upgrade them in the hopes that NRT soon would be there.
You will see other issues as well. The monorail trains and the trams run on the same level.

Just curious ... The two tram tracks types in your image ... With NRT, can they exist simultaneously in the same game?
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: Suspended Monorail

Post by SimYouLater »

wallyweb wrote:
SimYouLater wrote:
wallyweb wrote:from what you've seen so far, do you have any suggestions? Now might be a good time for me to consider them.
Yeah, I've got one. Can you put tram tracks on the street below the suspended monorail? It's easier to deal with the infrastructure when you don't have to choose between trams and monorails. You'll want two widths of tram track, one for the default OpenGFX tracks (made by FooBar, used by Recycled Infrastructure Set and by Docklands) and one for the wider tracks used by Ufiby's Road and Tram Types.

I included a screenshot, which shows the difference. You might need to use custom graphics for Ufiby's tracks, since they didn't put a proper license IIRC.
There is a parameter to turn the tram tracks on.
Unfortunately they are Zephyris' original ones.
I did not upgrade them in the hopes that NRT soon would be there.
You will see other issues as well. The monorail trains and the trams run on the same level.

Just curious ... The two tram tracks types in your image ... With NRT, can they exist simultaneously in the same game?
Yes. That's how I took the screenshot.
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: Semrush [Bot] and 8 guests