NotRoadTypes

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: NotRoadTypes

Post by Wolf01 »

Bringing back the topic on the right rails, I already made a patch to allow drawing both catenaries, it needs some polishing but if it gets green light we'll merge it on NRT, so grf authors will be free to draw the catenaries so they could be distinguished between road and tram or both.
If this helps to identify the correct compatibility of vehicles on roads visually, then we'll be a step further to a stable NRT
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5656
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NotRoadTypes

Post by andythenorth »

Screenshots would tell the story better, but from tests:
  • use different positions for road / tram catenary poles so both are visible
  • use different colours for the poles (unspooled has brown poles and grey poles that are quite distinct)
  • don't rely on being able to see the wires, they're barely visible, especially over tram tracks
If these guidelines are followed, it's now much easier for player to tell whether a tram has catenary for road / tram / both (compared to previous NRT where only one catenary is drawn). :)
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: NotRoadTypes

Post by supermop »

andythenorth wrote:use different colours for the poles (unspooled has brown poles and grey poles that are quite distinct)
Can I request/suggest that pole and wire sprites may use CC or even 2CC? This could be very helpful.
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: NotRoadTypes

Post by acs121 »

Unspooled, though, is a great GRF. It helps against the issue of coaches zipping through city centers (damn grids...) at 185 kph (i use the 2cc Bus Set) by making the city-built roads limited. Disabling construction of roads by towns though, you can remove all town-built roads and replace them by normal roads.

And i'm just in love with those light rail tracks. Would there be a possibility of placing tram rails on the center of tile like tracks, while making them unsignaled like real-life light trains (O-Train...) ? And if this could be possible, have then train-tram vehicles that can go both on tram tracks and rails ? I know that's dreaming, it's out of scope, it's one of the hardest things to do in this game, but give me right to dream, OK ?!
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: NotRoadTypes

Post by Wahazar »

supermop wrote: Can I request/suggest that pole and wire sprites may use CC or even 2CC? This could be very helpful.
Good idea, BTW, such feature (CC for traction poles) should be accessible also in trunk, for railroads.
Having poles with CC strips or insulators is much better than these strange ugly fences :)
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5656
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NotRoadTypes

Post by andythenorth »

Latest NRT binary is available from the compile farm

>> https://www.openttd.org/en/download-ratt

-- Changes --

Town-owned roads can now be converted to other types, both by player and in scenario editor

Above all, this makes it possible to build trolley bus roads in town.

- the type being converted to must be compatible with ROAD
- e.g. town roads can't be converted to HAUL in Road Hog
- there is nothing to prevent other players (or AI) late converting these roads to other types
- this is wide open for deliberate or accidental griefing, there is no clean solution to that; it won't be solved in code, this type of griefing is a social problem not a technical problem
- can also now convert OWNER_NONE tunnels and bridges (e.g. from bankrupt companies)

-- Other recent changes --

Separate catenary sprites drawn for road and tram

This makes it possible for newgrf authors to draw catenary so that it is easy for players to tell if road / tram / both catenaries are present on a tile. This avoids confusion about whether vehicles have a valid (powered) route on the tile.

Company colour used for catenary sprites

This makes it easier for newgrf authors to draw catenary so that the player can distinguish the owner company of the catenary.

Only the first company colour is supported for this, similar to railway fences, stations and other cases.

Up to date with trunk OpenTTD

NRT is kept in sync with the trunk branch in the OpenTTD repository. This avoids NRT getting blocked by unexpected conflicts with trunk. Although there's no glamour in the results, work is still done behind the scenes to do this and resolve conflicts. ;)

-- GRFs --

To make use of these changes, try Supermop's Unspooled GRF

viewtopic.php?f=26&t=75986&start=40

And a final note, thanks are owed to all the authors making test grfs for NRT, without them it would be very unlikely to keep moving forward. :)
Kruemelchen
Transport Coordinator
Transport Coordinator
Posts: 287
Joined: 18 Feb 2017 17:47

Re: NotRoadTypes

Post by Kruemelchen »

Great to see this already implemented :D
This feels like a great progress :)

Already tested this with my country roads grf, and found a "bug" in the way roads are converted.
It's very convenient, that the city roads can easily be converted. But while I couldn't convert ROAD to HAUL directly, I could do so by converting ROAD first to another road type (my ROAD-supporting sand road), I was then able to convert this road to a HAUL-supporting (but not ROAD-supporting) road type, and then to HAUL.

This could be a feature, still :P

I think this is possible, because my HAUL-supporting road type (muddy road) also supports RVs, which can run on the ROAD-supporting road type (sand road). I could easily change the newgrf to adjust it. So not really a problem NRT is responsible for. Even though, pretty fun sending HAUL vehicles happily through the city center :mrgreen:

But, on a side note, I was also able to convert bridges which are owned by cities directly to HAUL. This shouldn't be possible I guess.
Attachments
HAUL in the city after converting first to custom road types
HAUL in the city after converting first to custom road types
Narhill Transport, 30. Jun 1930.png (83.76 KiB) Viewed 2575 times
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: NotRoadTypes

Post by acs121 »

After reflection, do you think it'd be possible to recode the HEQS entirely for Heavy-haul road ? It'd make more sense, than having unitised mining trucks zipping at 90 kph through the city center.
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: NotRoadTypes

Post by supermop »

andythenorth wrote:Latest NRT binary is available from the compile farm

>> https://www.openttd.org/en/download-ratt

-- Changes --

Town-owned roads can now be converted to other types, both by player and in scenario editor

Above all, this makes it possible to build trolley bus roads in town.

- the type being converted to must be compatible with ROAD
- e.g. town roads can't be converted to HAUL in Road Hog
- there is nothing to prevent other players (or AI) late converting these roads to other types
- this is wide open for deliberate or accidental griefing, there is no clean solution to that; it won't be solved in code, this type of griefing is a social problem not a technical problem
- can also now convert OWNER_NONE tunnels and bridges (e.g. from bankrupt companies)

-- Other recent changes --

Separate catenary sprites drawn for road and tram

This makes it possible for newgrf authors to draw catenary so that it is easy for players to tell if road / tram / both catenaries are present on a tile. This avoids confusion about whether vehicles have a valid (powered) route on the tile.

Company colour used for catenary sprites

This makes it easier for newgrf authors to draw catenary so that the player can distinguish the owner company of the catenary.

Only the first company colour is supported for this, similar to railway fences, stations and other cases.

Up to date with trunk OpenTTD

NRT is kept in sync with the trunk branch in the OpenTTD repository. This avoids NRT getting blocked by unexpected conflicts with trunk. Although there's no glamour in the results, work is still done behind the scenes to do this and resolve conflicts. ;)

-- GRFs --

To make use of these changes, try Supermop's Unspooled GRF

viewtopic.php?f=26&t=75986&start=40

And a final note, thanks are owed to all the authors making test grfs for NRT, without them it would be very unlikely to keep moving forward. :)

Thanks to Andy and Wolf01 for many hours of work, planning, and discussion to make this happen!
acs121 wrote:After reflection, do you think it'd be possible to recode the HEQS entirely for Heavy-haul road ? It'd make more sense, than having unitised mining trucks zipping at 90 kph through the city center.
It's certainly possible, and I considered doing so myself as HEQs is GPL. However, I decided I had no interest in working in NFO anymore, and if I was going to rewrite the grf from scratch in NML, I could more easily just make my own RV grf - which is what I did.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5656
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NotRoadTypes

Post by andythenorth »

acs121 wrote:After reflection, do you think it'd be possible to recode the HEQS entirely for Heavy-haul road ? It'd make more sense, than having unitised mining trucks zipping at 90 kph through the city center.
It's possible. But HEQS is dead, so unless someone else takes over maintaining, it won't happen. ;)
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: NotRoadTypes

Post by Gwyd »

Well it is released under GPL V2/v3... Who says it couldn't be recoded by someone entirely separate. Who knows NFO. But modifying existing vehicle sets for this doesn't sound like a bad idea: it'll give people more choice when playing with what is quite a special patch.
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: NotRoadTypes

Post by supermop »

Gwyd wrote:Well it is released under GPL V2/v3... Who says it couldn't be recoded by someone entirely separate. Who knows NFO. But modifying existing vehicle sets for this doesn't sound like a bad idea: it'll give people more choice when playing with what is quite a special patch.

It would be fairly easy to recode, if someone wanted to. I considered it, and ultimately determined that the 'someone' would not be me, as I could instead use that time to build out my Trolleybi set into a full RV set to my own tastes.

HEQs has a lot of great sprites already drawn, but would need a few more cargo graphics drawn to support cargos that have been added since it was released. Presumably if adapting it for NRT, you'd also want to draw new trolley-assist mining trucks, and non-electric trams. None of that graphic part is hard, just needs someone who wants to do it.
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: NotRoadTypes

Post by acs121 »

I only know NML. I've heard NFO is way more complicated because it is hexadecimal. But if andythenorth is okay to give all the sprites, and that i'm not alone, i may redo the HEQS adapted for RATT one day, maybe in years ;)
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: NotRoadTypes

Post by Gwyd »

The sprites are openly available on the repository at http://dev.openttdcoop.org/projects/heqs

Sent from my SM-G935F using Tapatalk
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: NotRoadTypes

Post by wallyweb »

A question for Wolf01 and andythenorth ... A lot of talk about vehicle sets having to be coded for ROAD and or HAUL ... This sounds a bit arbitrary. Surely NRT will be a bit more flexible and not require vehicle set recoding, will it not? And ROAD and HAUL are just figments of a road type set GRF built on the NRT feature, Are they not? Why do I ask? In reality all roads are navigable by all road vehicles, just that some RVs are more adept than others for a particular road type or condition. A Ferrari can still go down a gravel road, albeit not at it's full potential and farm tractors are famous for the traffic jamming of Interstates, motorways and autobahns.
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: NotRoadTypes

Post by supermop »

wallyweb wrote:A question for Wolf01 and andythenorth ... A lot of talk about vehicle sets having to be coded for ROAD and or HAUL ... This sounds a bit arbitrary. Surely NRT will be a bit more flexible and not require vehicle set recoding, will it not? And ROAD and HAUL are just figments of a road type set GRF built on the NRT feature, Are they not? Why do I ask? In reality all roads are navigable by all road vehicles, just that some RVs are more adept than others for a particular road type or condition. A Ferrari can still go down a gravel road, albeit not at it's full potential and farm tractors are famous for the traffic jamming of Interstates, motorways and autobahns.
HAUL is a roadtype that Andy has created for his NRT fork of Road Hog, primarily as a proof of concept for incompatible roadtypes (arguably one of the sought features in NRT). The thinking behind HAUL was that it represents special private roads that large mining or similar vehicles would use, and that these vehicles would not necessarily be legal to drive on public streets. While physically, yes, your giant tonka truck could trundle down mainstreet, and your Testarossa could drive to the bottom of a huge open pit mine, HAUL creates a separation as a gameplay mechanic - Private exlusing roads let you run bigger trucks vs smaller street legal trucks let you use public roads through towns and cities.

Currently a couple authors have produced grfs that define HAUL or a compatible type as a roadtype, but I believe only Road Hog provides HAUL vehicles. It is possible for a roadtype grf to define HAUL or a compatible type to allow regular ROAD vehicles as well, or vis versa, if the author wishes. As Kruemelchen mentioned, it's also possible (and has been done) to have HAUL and ROAD themselves be incompatible, but a third type to allow a combination.

The talk about recoding HEQs is primarily about forbidding the giant mining trucks from running on ROAD, which is now possible. HEQs will run as is in NRT without issue, just on regular ROAD compatible types. There are other more esoteric cases imagined for incompatible types as well, like pedestrian malls that allow no vehicles, or chairlifts/bucket lines etc. that don't really resemble a 'road' at all.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: NotRoadTypes

Post by wallyweb »

supermop wrote:HAUL is a roadtype that Andy has created for his NRT fork of Road Hog ...
That's what I was looking for. 8)
yes, your giant tonka truck could trundle down mainstreet,
Don't be giving my grandsons any ideas. :twisted:
The talk about recoding HEQs is primarily about forbidding the giant mining trucks from running on ROAD, which is now possible. HEQs will run as is in NRT without issue, just on regular ROAD compatible types. There are other more esoteric cases imagined for incompatible types as well, like pedestrian malls that allow no vehicles, or chairlifts/bucket lines etc. that don't really resemble a 'road' at all.
Rather than opening up and tinkering with an existing RV GRF, would it be possible to write a property modifying GRF?

A big thanks supermop. :bow:
User avatar
supermop
Tycoon
Tycoon
Posts: 1104
Joined: 21 Feb 2010 00:15
Location: Fitzroy North - 96

Re: NotRoadTypes

Post by supermop »

wallyweb wrote:Rather than opening up and tinkering with an existing RV GRF, would it be possible to write a property modifying GRF?
I'm sure that would be technically possible, but seeing as HEQs (and many other sets) are written in NFO from years before NRT was even conceived, writing such a grf would probably be more difficult than either rewriting the original grf in NML, or just figuring out what bits need to be added to set road types in NFO and pasting those into the code.

I also thought about rewriting egrvts for NRT, but ultimately decided that someday Zephyris would get around to it, and in the meantime it would be faster to make OGFX++RVs for NRT. That got way out of hand with scope creep etc leading to a grf that still has no good name.
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

Re: NotRoadTypes

Post by Wolf01 »

Kruemelchen wrote:But, on a side note, I was also able to convert bridges which are owned by cities directly to HAUL. This shouldn't be possible I guess.
Fixed for next build :wink:
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 14 guests