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 »

Auge wrote:Hello

I have a question about the features too. Can road types define that houses can't be built beside these roads?

Tschö, Auge
Yes, they might do it, I already have a patch but we are discussing about it's merging
Auge
Director
Director
Posts: 636
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: NotRoadTypes

Post by Auge »

Hello
Wolf01 wrote:
Auge wrote:I have a question about the features too. Can road types define that houses can't be built beside these roads?
Yes, they might do it, I already have a patch but we are discussing about it's merging
Thank you for your answer. I read it meanwhile next door. :-)

Tschö, Auge
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: NotRoadTypes

Post by wallyweb »

andythenorth wrote:This isn't done-done-done, but a lot of it is there.
For us NFO dinosaurs, how about the feature number and a NFO translation of what you put into your NML fork.
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5658
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NotRoadTypes

Post by andythenorth »

wallyweb wrote:For us NFO dinosaurs, how about the feature number and a NFO translation of what you put into your NML fork.
Sure :)

roadtypes are feature 0x12, tramtypes are 0x13

There's no magic to this component of nml, it's just a mapping of keywords to the nfo properties, so here's a paste ;)

Code: Select all

properties[0x12] = {
    'label'                    : {'size': 4, 'num': 0x08, 'string_literal': 4},
    'toolbar_caption'          : {'size': 2, 'num': 0x09, 'string': 0xDC},
    'menu_text'                : {'size': 2, 'num': 0x0A, 'string': 0xDC},
    'build_window_caption'     : {'size': 2, 'num': 0x0B, 'string': 0xDC},
    'autoreplace_text'         : {'size': 2, 'num': 0x0C, 'string': 0xDC},
    'new_engine_text'          : {'size': 2, 'num': 0x0D, 'string': 0xDC},
    'powered_roadtype_list'    : {'custom_function': lambda x: roadtype_list(x, 0x0F)},
    'roadtype_flags'           : {'size': 1, 'num': 0x10},
    'construction_cost'        : {'size': 2, 'num': 0x13},
    'speed_limit'              : {'size': 2, 'num': 0x14, 'unit_type': 'speed', 'unit_conversion': (5000, 1397)},
    'map_colour'               : {'size': 1, 'num': 0x16},
    'introduction_date'        : {'size': 4, 'num': 0x17},
    'requires_roadtype_list'   : {'custom_function': lambda x: roadtype_list(x, 0x18)},
    'introduces_roadtype_list' : {'custom_function': lambda x: roadtype_list(x, 0x19)},
    'sort_order'               : {'size': 1, 'num': 0x1A},
    'name'                     : {'size': 2, 'num': 0x1B, 'string': 0xDC},
    'maintenance_cost'         : {'size': 2, 'num': 0x1C},
Byte count (size) and property number are the two most relevant items there. It pretty well follows railtypes so this page may be useful https://newgrf-specs.tt-wiki.net/wiki/A ... t_.280E.29

The paste is for roadtypes; tramtypes props simply use an identical nfo schema (in nml, 'tramtype' is substituted for 'roadtype' in the keywords but that's irrelevant to the nfo).

Also needed are the road type and tram type translation tables; these again are identical to the rail type translation table, as global vars 0x16 and 0x17 respectively (where the rail type table is 0x12) https://newgrf-specs.tt-wiki.net/wiki/A ... e_.2812.29

The only new prop for vehicles is 0x05 - track type, which works like the equivalent train property where a type translation table is present. The value should be a roadtype label or a tramtype label. https://newgrf-specs.tt-wiki.net/wiki/A ... e_.2805.29

Flagging a vehicle as a tram is unchanged: set the appropriate flag in prop 1C https://newgrf-specs.tt-wiki.net/wiki/A ... s_.281C.29

I ran 'grfcodec -d' and then 'grfcodec -e' on the Road Hog test grf, and it appears to work (grf loads in game fine and all types are there). Renum however does not work at this point, so you have to get all your byes correct :twisted:

I think that's everything for the nfo props, but a list of realsprites is also needed for the various features (surfaces, catenary, depots etc). One step at a time eh? :)
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: NotRoadTypes

Post by wallyweb »

andythenorth wrote:
wallyweb wrote:For us NFO dinosaurs, how about the feature number and a NFO translation of what you put into your NML fork.
Sure :)
Wonderfull. Thank you. :bow:
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: NotRoadTypes

Post by Wahazar »

Thank you for completing 'mission impossible' :)

May I have a suggestion/request? To have possibility (in config maybe) to define road type placed by town itself, and roadtype placed by town during road reconstruction.
Twenty years ago I was thinking, that road reconstruction really improve roads and use it for my own towns. Quickly realised that I was wrong.
Maybe it is a time for use this action not only for griefing?
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.
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: NotRoadTypes

Post by frosch »

I added a page to the other wiki, describing the current NewGRF specification for NotRoadTypes, including NFO and NML syntax:
https://wiki.openttd.org/Frosch/NotRoadTypes

At the bottom it also contains a list of potential extensions, which I read in IRC and on forums.
Please check whether something is missing :)
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
kamnet
Moderator
Moderator
Posts: 8580
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: NotRoadTypes

Post by kamnet »

frosch wrote:I added a page to the other wiki, describing the current NewGRF specification for NotRoadTypes, including NFO and NML syntax:
https://wiki.openttd.org/Frosch/NotRoadTypes

At the bottom it also contains a list of potential extensions, which I read in IRC and on forums.
Please check whether something is missing :)
Thank you, Frosch!
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: NotRoadTypes

Post by wallyweb »

frosch wrote: ...
I'm adding my thanks as well. :bow:
At a quick glance it looks promissing. i'll be studyng it in detail tonight.
User avatar
Aegir
Tycoon
Tycoon
Posts: 2884
Joined: 09 Feb 2004 10:02
Contact:

Re: NotRoadTypes

Post by Aegir »

I don't have much productive to add, but I would like to congratulate you folks on your work. We're not worthy? :bow:
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: NotRoadTypes

Post by Andrew350 »

I also would like to add my thanks and tell you how excited I am about this project. I've been stalking you guys on the IRC Logs for a few months now after I accidentally stumbled in there one day and caught wind of NRT. I've been eagerly waiting to see it come to life. :mrgreen:

Proper (Not)RoadTypes have been on my wishlist for a very long time, and now that it seems to be actually happening and I'm getting close to having more free time, I'm starting to get the itch to make something for it. I'd like to have a whack at making a NewGRF, possibly converting ARRS or branching it to something new, but without some kind of NML to start playing with, it's kinda hard to get going.

So my question is: Has anyone built the NML fork for Windows yet?

And thanks again, you guys rock 8)
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: NotRoadTypes

Post by frosch »

Oh right... I didn't consider that windows needs binaries to run NML.

Anyway, try these:
http://devs.openttd.org/~frosch/nml-nrt ... -win32.zip
I hope the .zip contains everything needed.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
einsteinyh
Engineer
Engineer
Posts: 46
Joined: 15 Feb 2016 01:22
Location: Bogotá

Re: NotRoadTypes

Post by einsteinyh »

I really llike this, I was expecting for it a long time ago :bow: so... I wonder if there were any possibillity of adding multi-lane behavior to RVs.
I mean... in highways an RV takes the 2nd lane and stays on it till highway finishes. :mrgreen:
User avatar
STD
Tycoon
Tycoon
Posts: 1810
Joined: 02 Jul 2012 14:53
Location: Russia, Samara

Re: NotRoadTypes

Post by STD »

How are things going with the project - NotRoadTypes? :) Before the new year, users and developers were actively discussing the question of how to implement more types of different roads, including tram tracks. Now everything calmed down. At what stage of development is this project? I think you need to add those types of roads, which were presented in a special version of - OpenTTD. I very much hope that you will be able to introduce more types of roads in the game :) .
[OpenTTD] STD screenshots
----------------------------------------------------------------------------------------------------------------------------------
[OpenTTD] STD saved games - My finished scenarios and saves from the game
My Youtube channel - OpenTTD | Wiki xUSSR set (RU) | Wiki xUSSR set (EN) | Download the latest version of the xUSSR set
TT Screenshot of the Month - the page editor | Screenshot Of The Month Contest Winner: August 2017
Auge
Director
Director
Posts: 636
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: NotRoadTypes

Post by Auge »

Hello
andythenorth wrote: OpenTTD builds and forked repo
https://www.openttd.org/en/download-ratt
At the moment (2017-02-16 21:39 CET) requesting any resource (binary, changelog) from the linked page will be responded with HTTP-status 404. :-(

Code: Select all

Error response

Error code 404.

Message: File Not Found.

Error code explanation: 404 = Nothing matches the given URI. 
Tschö, Auge
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: NotRoadTypes

Post by TrueBrain »

Turns out that after more than a year uptime, the balancer no longer picked up some new files ;) Balancer is restarting as we speak, and that should restore functionality :)
The only thing necessary for the triumph of evil is for good men to do nothing.
arikover
Route Supervisor
Route Supervisor
Posts: 466
Joined: 15 Jun 2007 09:27
Skype: madchimiste
Location: Berlin, Deutschland

Re: NotRoadTypes

Post by arikover »

Awesome feature!

I have a question: so far, all road/tram/types share the same graphics for drive-in/through stops. Would it be possible to have different graphics? Or is this maybe a completely different matter, that should be addressed by another patch?
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: NotRoadTypes

Post by frosch »

Roadtypes can provide specific underlays for drive-in-stops. Take a look at Docklands for examples.

About the "buildings" on roadstops: I don't consider roadtypes the correct place to define alternative roadstop graphics.
For drive-through-stops there is always the issue of having both road and tram on the same tile, but also for drive-in-stops I would rather make a comparison to railstations: Railstations are defined independent from railtypes, you can build different railstations for the same railtype.
I am unsure how realistic this is: But in the long run it would make sense to separate non-track station tiles from the station tracks. Many of these "mineral pile" or "building" tiles make equally sense for road and rail stations, docks and airports. Similar I would like to treat the track parts of rail and road stations the same. Larger multi-line busstops have similar roofs like railstations, and there are also railstations which rather look like a bus stop.

Though docks and airports are completely in the air :)
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
arikover
Route Supervisor
Route Supervisor
Posts: 466
Joined: 15 Jun 2007 09:27
Skype: madchimiste
Location: Berlin, Deutschland

Re: NotRoadTypes

Post by arikover »

frosch wrote:About the "buildings" on roadstops: I don't consider roadtypes the correct place to define alternative roadstop graphics.
For drive-through-stops there is always the issue of having both road and tram on the same tile, but also for drive-in-stops I would rather make a comparison to railstations: Railstations are defined independent from railtypes, you can build different railstations for the same railtype.
Makes perfect sense, thank you for the explanation!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 50 guests