Auge's Basic Roads
Moderator: Graphics Moderators
Auge's Basic Roads
Hello
By studying the source code and taking graphics from RattRoads, CountryRoads, Unspooled and AuzRoads I started my own road set. Following roads are planned.
- a foot path for providing ways where a village can build houses but with no vehicles on it
- a precinct/pedestrian zone for towns, also with no vehicle traffic but for cities
- a dirt road (30km/h)
- a paved town road (45km/h)
- an asphalt town road (55km/h, available: 1965)
- a paved country road (60km/h)
- a concrete country road (75km/h, avalable: 1940)
- an asphalt country road (90km/h, available: 1970)
- a concrete highway (90km/h, available: 1930)
- an asphalt highway (120km/h, available: 1975)
The first few roads are snow aware (foot path, dirt road, all country roads). The two town roads should also be available with trolley wires (not done) and I plan to include tram tracks without and with overhead wires with the same speed limits and introduction dates as the town roads and additionally interurban tram tracks.
In the current state I am far from done (so far no trolleys and trams, not all streets are snow aware and many graphics are placeholders as one can see in the screenshot). I will release the set under the GPL2 (because but not only because the sets I use as base are also GPL2-licensed). The code will be avaliable on Github (currently it is a private repository).
I have and will have questions.
First for now: Is it possible to prevent roads getting sidewalks when a town grows? It is nice to get the sidewalks automatically for town roads but they looks ugly when under the dirt road or the slim foot path.
So far from me.
Tschö, Auge
By studying the source code and taking graphics from RattRoads, CountryRoads, Unspooled and AuzRoads I started my own road set. Following roads are planned.
- a foot path for providing ways where a village can build houses but with no vehicles on it
- a precinct/pedestrian zone for towns, also with no vehicle traffic but for cities
- a dirt road (30km/h)
- a paved town road (45km/h)
- an asphalt town road (55km/h, available: 1965)
- a paved country road (60km/h)
- a concrete country road (75km/h, avalable: 1940)
- an asphalt country road (90km/h, available: 1970)
- a concrete highway (90km/h, available: 1930)
- an asphalt highway (120km/h, available: 1975)
The first few roads are snow aware (foot path, dirt road, all country roads). The two town roads should also be available with trolley wires (not done) and I plan to include tram tracks without and with overhead wires with the same speed limits and introduction dates as the town roads and additionally interurban tram tracks.
In the current state I am far from done (so far no trolleys and trams, not all streets are snow aware and many graphics are placeholders as one can see in the screenshot). I will release the set under the GPL2 (because but not only because the sets I use as base are also GPL2-licensed). The code will be avaliable on Github (currently it is a private repository).
I have and will have questions.
First for now: Is it possible to prevent roads getting sidewalks when a town grows? It is nice to get the sidewalks automatically for town roads but they looks ugly when under the dirt road or the slim foot path.
So far from me.
Tschö, Auge
Re: Auge's Basic Roads
OpenTTD still places the town roads from the base graphics set underneath the NRT roads; that's where the sidewalks are coming from. In order to get rid of them, you basically have two options:
- You can use the "replace" block to override the base set graphics (sprites 1313-1331) with something of your choosing. This has the benefit of only having to be done once, but whether it's worth it depends on what your specific goals are for what town roads will look like for different roadtypes. For example, I do this in RattRoads to ensure a consistent sidewalk sprite independent of the base set used, so I don't need specific sprites for each roadtype.
- You can provide full tile sprites via the "underlay" or "overlay" graphics callbacks to hide the base graphics under your NRT roads. This must be done on a per-roadtype basis, but accomplishes the same thing.

-
- Traffic Manager
- Posts: 180
- Joined: 18 Feb 2017 17:47
Re: Auge's Basic Roads
This set looks promising! I like the idea of footpaths! 

Re: Auge's Basic Roads
So far, so known.
I found only the replacement for one-way-road-arrows and subarctic-street-trees (and something, I can't remember without seeing the code) but no code for sidewalk-replacements in your nml-source for RattRoads 1.0.2. I must find my own ancient code for the Comic-Roads replacements, where I did nothing else than replacing the base graphics.Andrew350 wrote: ↑02 Jan 2021 06:37 You can use the "replace" block to override the base set graphics (sprites 1313-1331) with something of your choosing. This has the benefit of only having to be done once, but whether it's worth it depends on what your specific goals are for what town roads will look like for different roadtypes. For example, I do this in RattRoads to ensure a consistent sidewalk sprite independent of the base set used, so I don't need specific sprites for each roadtype.
Beside that I suspect, I can only disable the default streets in general but not per road type?
That sounds promising but ...
... this point is valid for the second approach or for both of them?
It would be nice to have a bitmask flag to control this per roadtype (ROADTYPE_FLAG_NO_DEFAULT UNDERLAY or ..._NO_SIDEWALKS or something similar).
Anyway, thank you for your advice.
Tschö, Auge
Re: Auge's Basic Roads
Ah, that bit is here:
Code: Select all
replace replace_road_city_universal (1313, "gfx/misc_sprites.png") { //replaces the base sprites to make sure city roads stay consistent across base sets
template_roads_main_new(1, 1)
}
That is correct.
Both of them, unfortunately.
I agree

-
- Traffic Manager
- Posts: 248
- Joined: 22 May 2006 18:25
- Location: London-ish.
- Contact:
Re: Auge's Basic Roads
It'd be nice to be able to toggle the town pavements and the depot underlays separately per roadtype, perhaps something like ROADTYPE_FLAG_NO_TOWN_PAVEMENTS and ROADTYPE_FLAG_NO_DEPOT_UNDERLAY.
(There are also bridge heads, but I'm not sure if those are useful to turn off as they vary according to bridge type)
(There are also bridge heads, but I'm not sure if those are useful to turn off as they vary according to bridge type)
Re: Auge's Basic Roads
You might find this to be useful. It's the source code to a "Roadtype Fixes" GRF I've already released on BaNaNaS. It replaces the default road graphics with grass and concrete.Auge wrote: ↑01 Jan 2021 22:40 Hello
By studying the source code and taking graphics from RattRoads, CountryRoads, Unspooled and AuzRoads I started my own road set. Following roads are planned.
- a foot path for providing ways where a village can build houses but with no vehicles on it
- a precinct/pedestrian zone for towns, also with no vehicle traffic but for cities
- a dirt road (30km/h)
- a paved town road (45km/h)
- an asphalt town road (55km/h, available: 1965)
- a paved country road (60km/h)
- a concrete country road (75km/h, avalable: 1940)
- an asphalt country road (90km/h, available: 1970)
- a concrete highway (90km/h, available: 1930)
- an asphalt highway (120km/h, available: 1975)
The first few roads are snow aware (foot path, dirt road, all country roads). The two town roads should also be available with trolley wires (not done) and I plan to include tram tracks without and with overhead wires with the same speed limits and introduction dates as the town roads and additionally interurban tram tracks.
AB-Roads-Status-2021-01-01.png
In the current state I am far from done (so far no trolleys and trams, not all streets are snow aware and many graphics are placeholders as one can see in the screenshot). I will release the set under the GPL2 (because but not only because the sets I use as base are also GPL2-licensed). The code will be avaliable on Github (currently it is a private repository).
AB-Roads-Schnee-2021-01-01.png
I have and will have questions.
First for now: Is it possible to prevent roads getting sidewalks when a town grows? It is nice to get the sidewalks automatically for town roads but they looks ugly when under the dirt road or the slim foot path.
So far from me.
Tschö, Auge
- Attachments
-
- nrtfix_12a.7z
- (181.73 KiB) Downloaded 11 times
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
Re: Auge's Basic Roads
Re: Auge's Basic Roads
Hello
I am working on adding new and overhaul existing graphics for a few road types and fell into a trap while experimenting. I wanted to add graphic styles for european roads and north american roads with their white or yellow road markings. Nothing easier than that. Add the parameter to the NewGRF and use it to select the according sprite set.
Then I had the idea to define the road markings as the overlays to a single underlay spriteset (no need for more as this one then) and tried that on one road type. The road-marking-overlays would be compemented with optional snow sprites as a second, combined variant. And so it began. Everything worked as expected until it came to bridge surfaces. With the correct underlay the surface in itself was correct displayed but OpenTTD used the overlays for straight, rising and descending street tiles for the road markings on bridges. That way also the outside road markings of these tiles is visible.
As one can see, the program combines on bridges the road surface sprites with their hardcoded road markings (with the doubled solid lines for the north american style) with the open worked line of the flat road sprites and the one-side open worked line of the road marking for rising street sprites and with the outer road markings of these sprites. Is it normal that OpenTTD uses the wrong overlays for bridges when they are provided as overlay (road markings in general and the complete bridge surface sprites)? Other road type graphics (taken from other sets) have their road markings hardcoded in the underlay and have no overlays for bridge sprites.
Is it a blind alley to follow the idea to provide different road markings as overlays (it seems so)? It seems to be easier to generate the different underlays for the road styles with their matching, hardcoded road markings in one spriteset.
Oh and another question. Is it possible to detect the game setting for left- or right-hand-driving in the GRF respectively with NML?
Thank you in advance and tschö, Auge
I am working on adding new and overhaul existing graphics for a few road types and fell into a trap while experimenting. I wanted to add graphic styles for european roads and north american roads with their white or yellow road markings. Nothing easier than that. Add the parameter to the NewGRF and use it to select the according sprite set.
Then I had the idea to define the road markings as the overlays to a single underlay spriteset (no need for more as this one then) and tried that on one road type. The road-marking-overlays would be compemented with optional snow sprites as a second, combined variant. And so it began. Everything worked as expected until it came to bridge surfaces. With the correct underlay the surface in itself was correct displayed but OpenTTD used the overlays for straight, rising and descending street tiles for the road markings on bridges. That way also the outside road markings of these tiles is visible.
As one can see, the program combines on bridges the road surface sprites with their hardcoded road markings (with the doubled solid lines for the north american style) with the open worked line of the flat road sprites and the one-side open worked line of the road marking for rising street sprites and with the outer road markings of these sprites. Is it normal that OpenTTD uses the wrong overlays for bridges when they are provided as overlay (road markings in general and the complete bridge surface sprites)? Other road type graphics (taken from other sets) have their road markings hardcoded in the underlay and have no overlays for bridge sprites.
Is it a blind alley to follow the idea to provide different road markings as overlays (it seems so)? It seems to be easier to generate the different underlays for the road styles with their matching, hardcoded road markings in one spriteset.
Oh and another question. Is it possible to detect the game setting for left- or right-hand-driving in the GRF respectively with NML?
Thank you in advance and tschö, Auge
-
- Traffic Manager
- Posts: 248
- Joined: 22 May 2006 18:25
- Location: London-ish.
- Contact:
Re: Auge's Basic Roads
Yes - here is the relevant switch from Timberwolf's Roads:
Code: Select all
switch (FEAT_ROADTYPES, SELF, switch_driveside_town_underlay, traffic_side) {
TRAFFIC_SIDE_RIGHT: rhs_town_underlay;
town_underlay;
}
Re: Auge's Basic Roads
Hello

Beside that, I get the feeling that my experiment with road markings as overlay was a fail. I will rework graphics and code. Additionally I get new ideas studying the code of your set (maybe i.e. time dependent sprites and speed limits).
Tschö, Auge
Thank you. That's really simple and reacts instantaneously on the change of the game setting (as tested just now with your road set).Timberwolf wrote: ↑18 Jan 2021 14:02 here is the relevant switch from Timberwolf's Roads:
Hopefully that makes sense enough by itself, the relevant variable is traffic_side.Code: Select all
switch (FEAT_ROADTYPES, SELF, switch_driveside_town_underlay, traffic_side) { TRAFFIC_SIDE_RIGHT: rhs_town_underlay; town_underlay; }

Beside that, I get the feeling that my experiment with road markings as overlay was a fail. I will rework graphics and code. Additionally I get new ideas studying the code of your set (maybe i.e. time dependent sprites and speed limits).
Tschö, Auge
Re: Auge's Basic Roads
Hello
With the help of Timberwolf's code example I was able to implement the left hand driving sprites into the first road type. It's not perfect but it's a starting point. Thank you, Timberwolf.
Tschö, Auge
With the help of Timberwolf's code example I was able to implement the left hand driving sprites into the first road type. It's not perfect but it's a starting point. Thank you, Timberwolf.
Tschö, Auge
Who is online
Users browsing this forum: No registered users and 41 guests