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

peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: NotRoadTypes

Post by peter1138 »

Our current thinking is to do away with RoadSubTypes, so all of the API changes have been reverted. There is now a RoadTypeList instead, and the ability to check if a RoadType is road or tram.

This is possible as there are now 63 road types rather than 15 road types. Road and tram types now share the same range, so there is a total of 63 road and tram types rather than 63 road, and 63 tram types. This minor reduction in types simplifies the code massively.
He's like, some kind of OpenTTD developer.
Diesel Power
Traffic Manager
Traffic Manager
Posts: 222
Joined: 18 Jun 2016 19:05

Re: NotRoadTypes

Post by Diesel Power »

Has this fork been updated now so we have 63 roadtypes? Or is it now just possible?
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: NotRoadTypes

Post by peter1138 »

Er, it was updated a year ago for 63 road types... now it's changed internally so that road and tram types use up the same set of IDs to simplify things internally, which wasn't possible with only 15 types as that would be too restrictive.
He's like, some kind of OpenTTD developer.
User avatar
stefino_cz
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: NotRoadTypes

Post by stefino_cz »

I'm sorry for stupid question, but roadtypes are available in the basic game like railtypes? So can I code roadtypes in 1.9 version? Or is it only available in patched game?

I think that it is possible to have roadtypes only in patched game (because NRT is patch) but I'm little bit confused now.

Thanks, stefino

PS: What does the "fork" mean? Some adjustment for game engine?
Image
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: NotRoadTypes

Post by wallyweb »

stefino_cz wrote:I'm sorry for stupid question, but roadtypes are available in the basic game like railtypes? So can I code roadtypes in 1.9 version? Or is it only available in patched game?

I think that it is possible to have roadtypes only in patched game (because NRT is patch) but I'm little bit confused now.

Thanks, stefino

PS: What does the "fork" mean? Some adjustment for game engine?
NRT is not a patch.
It is a fork.
A fork is a program that is based upon an original program but the fork includes changes that are not compatible with the original.
The hope is that once NRT's new code is seen to be stable, then it will be merged into OpenTTD.

DISCLAIMER: I stand to be corrected.
Auge
Director
Director
Posts: 632
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: NotRoadTypes

Post by Auge »

Hello
stefino_cz wrote:I'm sorry for stupid question, but roadtypes are available in the basic game like railtypes? So can I code roadtypes in 1.9 version? Or is it only available in patched game?

I think that it is possible to have roadtypes only in patched game (because NRT is patch) but I'm little bit confused now.

PS: What does the "fork" mean? Some adjustment for game engine?
The development of NRT is separated from OpenTTD with the fork. When it's ready it should get included into OpenTTD. So no, currently it is not part of the core.

Tschö, Auge
Diesel Power
Traffic Manager
Traffic Manager
Posts: 222
Joined: 18 Jun 2016 19:05

Re: NotRoadTypes

Post by Diesel Power »

peter1138 wrote:Er, it was updated a year ago for 63 road types...
How did I miss this?! Been having to choose which road grfs to use, not knowing i could use them all!
Diesel Power
Traffic Manager
Traffic Manager
Posts: 222
Joined: 18 Jun 2016 19:05

Re: NotRoadTypes

Post by Diesel Power »

andythenorth wrote: Meanwhile, keep an eye on https://github.com/OpenTTD/OpenTTD/pull/6811

I get that this is an experimental version and is WIP.
Just tried this and there's a few major bugs in it:

Towns are building haul roads.
The original roads have not been disabled by the grfs.
Non electric tramways display the cantanary from the original tramways.

Are these NRT issues or grf ones that need reporting to the authors?
I'm using:
Unspooled (full roster)
Docklands (chips and ISR)
Country roads (haul enabled)

Thanks
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: NotRoadTypes

Post by peter1138 »

Thanks for testing and reporting! This is how we get bugs fixed ;)

Actually, this is due to me removing electrified roads/non-electrified trams from the defaults (much earlier than removing roadsubtypes internally), therefore it is using the default flags of the default types. I will fix this by clearing the road type flags for new road/tram types.

I've just pushed with this change, and some deduplication efforts, if you could test please :-)
He's like, some kind of OpenTTD developer.
Diesel Power
Traffic Manager
Traffic Manager
Posts: 222
Joined: 18 Jun 2016 19:05

Re: NotRoadTypes

Post by Diesel Power »

Will do. Download from the same link?
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: NotRoadTypes

Post by peter1138 »

Ah, I didn't realize there were precompiled NRT binaries! That one is kinda old already. If you self-built from the PR on github, you can do that again. If you used the precompiled build, then that has just been queued, so will take a little time.

EDIT: Website has been updated, new build at https://www.openttd.org/downloads/opent ... atest.html
He's like, some kind of OpenTTD developer.
User avatar
Andrew350
Chairman
Chairman
Posts: 768
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: NotRoadTypes

Post by Andrew350 »

Ooh, new binaries! :D

Speaking of bugs, I just downloaded the latest build to test it out and the infinite money glitch is still a thing.

Also sort of related, the modified version of NML for NRT seems to have never been updated to include callbacks for tunnel sprites, or at least it claims not to recognize them. I know NML is a separate thing, but seeing as all existing NRT NewGRFs are made with it, it's worth mentioning that tunnel support is lacking :)
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: NotRoadTypes

Post by peter1138 »

Ah, major bug with this version, loading savegames with trams will fail due to an initialization order mess up. Oddly, this order isn't anything I changed, so I'm not entirely sure how it used to work... :p

Fix has been pushed to the repo, but no build at the moment.
He's like, some kind of OpenTTD developer.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: NotRoadTypes

Post by peter1138 »

New build 20190416-pr6811-g43aab42a4c is published at https://www.openttd.org/downloads/opent ... atest.html

This fixes loading games with trams and also the money bug, and is otherwise also fully synced up with master.
He's like, some kind of OpenTTD developer.
Argus
Tycoon
Tycoon
Posts: 1203
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: NotRoadTypes

Post by Argus »

Not loading previous NRT save files :( Crashing.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: NotRoadTypes

Post by peter1138 »

How old is the savegame? NRT is not a patch pack and will only load NRT saves since the last savegame bump in unpatched master.
He's like, some kind of OpenTTD developer.
Argus
Tycoon
Tycoon
Posts: 1203
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: NotRoadTypes

Post by Argus »

From last RATT build.
Never mind, it wasn't a long game. :)
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: NotRoadTypes

Post by peter1138 »

AI docs updated at http://fuzzle.org/~petern/wip-nrt-aidoc ... _8hpp.html

Sorry for the false start with the last doc update. All the stuff to do with road sub types has been removed.
He's like, some kind of OpenTTD developer.
Diesel Power
Traffic Manager
Traffic Manager
Posts: 222
Joined: 18 Jun 2016 19:05

Re: NotRoadTypes

Post by Diesel Power »

Now trying the latest build and there are still a few bugs.
In the screenshot below is a bugged rough tram line from Unspooled. It was built over a stone paved road but when the road was removed it looked like this.
You may also notice the the vanilla roads are also still available and have not been disabled.

I haven't been able to reproduce this bug outside of the save game with just the minimum grf's needed but i'm still working on it.
Bingo! it happens in the town zone where the roads have pavements but not trees.
Attachments
The Snow Shifters, 21st Oct 1863.png
(161.35 KiB) Not downloaded yet
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1728
Joined: 30 Mar 2005 09:43

Re: NotRoadTypes

Post by peter1138 »

Sorry, I can't guess what NewGRFs you have loaded and what order they are from a screenshot. Can you post the savegame please.

EDIT: Incorrect ground sprite for paved tram with no road has been fixed.
He's like, some kind of OpenTTD developer.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 4 guests