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

Eddi
Tycoon
Tycoon
Posts: 7396
Joined: 17 Jan 2007 00:14

Re: NotRoadTypes

Post by Eddi » 04 May 2019 12:32

wallyweb wrote:So if I understand you correctly, when a player starts a new game, there will be no speed limits anywhere until the player overbuilds a road with a road type
that depends on the road GRF used. if the road GRF only offers a dirt road with 15km/h speed limit at game start, then all towns will use that one.
and if the player wants to maintain zone specific speed limits the player will have to monitor the towns as they grow?
if you're crazy enough to micromanage your towns that way... i guess you can do that?
You might not exactly be interested in Ferion, but if you are, have fun :)

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

Re: NotRoadTypes

Post by wallyweb » 04 May 2019 12:42

Eddi wrote:if you're crazy enough to micromanage your towns that way... i guess you can do that?
If anybody is looking for me I'll be in the third padded room on the right. :lol:

User avatar
Andrew350
Route Supervisor
Route Supervisor
Posts: 484
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: NotRoadTypes

Post by Andrew350 » 04 May 2019 20:48

Eddi wrote:the check for 1.9 vs. 1.10 still works
wallyweb wrote:@Andrew350 - Do you need to test for changes to master, or will a simple "stable/not stable" test satisfy what you need?
Hmm, yeah I found a semi-acceptable solution by throwing an error for OpenTTD < 1.9.9. It doesn't check the exact version but at least it won't load in stable this way. At least as long as there aren't 10 bug fix releases anyway :P

But while I've been playing around with the version checking to see if I can get something that works, I've found that the results seem inconsistent to what I'm expecting.

Maybe I'm doing something wrong or expecting the wrong results? I set up a test grf with an error check like so:

Code: Select all

if (openttd_version <= version_openttd(1, 9, 1)) {
	error(FATAL, REQUIRES_OPENTTD, string(STR_MIN_OPENTTD_VERSION));
For reference, I tried the following with these results:

openttd_version <= version_openttd(1, 9, 1) => grf loads in 1.9.1
openttd_version == version_openttd(1, 9, 1) => grf loads in 1.9.1
openttd_version > version_openttd(1, 9, 1) => grf fails in 1.9.1 and master
openttd_version < version_openttd(1, 10, 0) => grf fails in 1.9.1 and master
openttd_version < version_openttd(1, 9, 2) => grf fails in 1.9.1 and loads in master
openttd_version > version_openttd(1, 9, 2) => grf loads in 1.9.1 and fails in master

?( The first three seem wrong to me, but want to rule out my own ignorance first before filing a bug. Maybe someone can verify this? And sorry for going off topic.
wallyweb wrote:I'll make an assumption here. NRT has been merged into master. Once it has passed muster and the merge is found to be stable, OTTD stable will move to 1.10 and master to 1.11.
The tentative plan appears to be aiming for an October release, but that's of course subject to change :)

User avatar
kamnet
Moderator
Moderator
Posts: 6641
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: NotRoadTypes

Post by kamnet » 04 May 2019 21:53

Perhaps a foolish question, and I'm assuming it's not possible, but is it possible for a vehicle to be coded both for a roadtype and a tramtype?

For a specific example, let's say I want to abuse this for transport of liquid cargo in pipes. For some areas I want pipes to overlay with roadways in some areas, and overlay with tramways in other areas, so that I can provide a seamless transport from end to end.

User avatar
acs121
Tycoon
Tycoon
Posts: 1901
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: NotRoadTypes

Post by acs121 » 04 May 2019 22:12

That has never been possible in OpenTTD (otherwise, I'm pretty sure andy would have done it for the Gmund Hi-Rail Truck in HEQS) and I don't think it's possible in NRT anyway. Tramways are too different from roadways to make this possible.

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

Re: NotRoadTypes

Post by wallyweb » 04 May 2019 23:09

kamnet wrote:Perhaps a foolish question, and I'm assuming it's not possible, but is it possible for a vehicle to be coded both for a roadtype and a tramtype?

For a specific example, let's say I want to abuse this for transport of liquid cargo in pipes. For some areas I want pipes to overlay with roadways in some areas, and overlay with tramways in other areas, so that I can provide a seamless transport from end to end.
Use the sprite aligner tool. Point it at a tram track and then point at each of the sprite numbers in the right panel, starting at the bottom. Repeat this for a non-road tram track, an on road tram track and a no-track road. Look for the first layer that is common to all three. That is where your pipe needs to be ... if it is possible.

User avatar
kamnet
Moderator
Moderator
Posts: 6641
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: NotRoadTypes

Post by kamnet » 04 May 2019 23:24

wallyweb wrote:
kamnet wrote:Perhaps a foolish question, and I'm assuming it's not possible, but is it possible for a vehicle to be coded both for a roadtype and a tramtype?

For a specific example, let's say I want to abuse this for transport of liquid cargo in pipes. For some areas I want pipes to overlay with roadways in some areas, and overlay with tramways in other areas, so that I can provide a seamless transport from end to end.
Use the sprite aligner tool. Point it at a tram track and then point at each of the sprite numbers in the right panel, starting at the bottom. Repeat this for a non-road tram track, an on road tram track and a no-track road. Look for the first layer that is common to all three. That is where your pipe needs to be ... if it is possible.
This isn't about alignment, but being able to transition over the various types. If I'm laying a series of road-pipe, and along my path there is other road, I cannot have to road types on top of each other, likewise if I was laying tram-pipe. Ideally what I want to do is to be able to have the road-pipe and tram-pipe meet and have a vehicle continue from one to the other.

I may have to draw pictures to show what I'm thinking if you can't wrap your head around what I'm trying to say. :)

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

Re: NotRoadTypes

Post by wallyweb » 05 May 2019 00:36

kamnet wrote:This isn't about alignment, but being able to transition over the various types.
I'm not suggesting alignments. Just using the alignment tool to reveal the structure of a road tile and a tram tile. But them, that is a graphical solution. Are you looking for a coding solution, a vehicle that runs on both road and tram, ROAD (Normal road) and RAIL (Tramway)? Scroll down on this page for an image.

User avatar
kamnet
Moderator
Moderator
Posts: 6641
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: NotRoadTypes

Post by kamnet » 05 May 2019 01:10

wallyweb wrote:
kamnet wrote:This isn't about alignment, but being able to transition over the various types.
I'm not suggesting alignments. Just using the alignment tool to reveal the structure of a road tile and a tram tile. But them, that is a graphical solution. Are you looking for a coding solution, a vehicle that runs on both road and tram, ROAD (Normal road) and RAIL (Tramway)? Scroll down on this page for an image.

Yes, I'm asking if it is possible for a vehicle to be coded for both roadtypes and tramtypes simultaneously, so that a vehicle can transition from running on one to the other.

Eddi
Tycoon
Tycoon
Posts: 7396
Joined: 17 Jan 2007 00:14

Re: NotRoadTypes

Post by Eddi » 05 May 2019 01:54

Andrew350 wrote:openttd_version < version_openttd(1, 10, 0) => grf fails in 1.9.1 and master
this is because master is "1.10-alpha", "1.10.0" is a future stable version that is not released yet. to refer to the unstable version you need to give a 4th argument:

Code: Select all

version_openttd(1, 10, 0, 0)
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
Andrew350
Route Supervisor
Route Supervisor
Posts: 484
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: NotRoadTypes

Post by Andrew350 » 05 May 2019 03:11

Eddi wrote:
Andrew350 wrote:openttd_version < version_openttd(1, 10, 0) => grf fails in 1.9.1 and master
this is because master is "1.10-alpha", "1.10.0" is a future stable version that is not released yet. to refer to the unstable version you need to give a 4th argument:

Code: Select all

version_openttd(1, 10, 0, 0)
Oh, I didn't know you could just throw a zero in there to make that work, I thought it had to be an actual revision number (which there isn't one). I guess that's a slightly better way to do it then, thanks. :)

I don't think that explains the other ones though.
kamnet wrote:Yes, I'm asking if it is possible for a vehicle to be coded for both roadtypes and tramtypes simultaneously, so that a vehicle can transition from running on one to the other.
No, that isn't possible. A road vehicle has to set a special flag to tell the game it is a tram, which makes it run on tram tracks. There's no way to have it be both a tram and not a tram at the same time.

User avatar
andythenorth
Tycoon
Tycoon
Posts: 4888
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NotRoadTypes

Post by andythenorth » 05 May 2019 06:26

Kamnet, would your pipe goal alternatively be solved if you could have a third type on the tile?

(That's not an available solution, but I'm curious about your goal).

Eddi
Tycoon
Tycoon
Posts: 7396
Joined: 17 Jan 2007 00:14

Re: NotRoadTypes

Post by Eddi » 05 May 2019 07:57

Andrew350 wrote:I don't think that explains the other ones though.
you could try to check "openttd -d grf=7" to look for what it's actually checking against (warning: might be spammy)
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
stefino_cz
Traffic Manager
Traffic Manager
Posts: 186
Joined: 02 Jul 2015 08:05
Location: Czech Republic
Contact:

Re: NotRoadTypes

Post by stefino_cz » 05 May 2019 07:57

Hi
I tried to code roadtypes yesterday and I have to say - Good job guys. But I have one question about ELRD or about roadtypes in general. Is possible to code road vehicles like trains in case of track_type? Tracks/roads where can the vehicle goes. In case of ELRD - if I have trolleybuses which can go only under the trolley - only on ELRD roadtype or any next roadtype which will have catenary and will be allowed in vehicle's "road_type" list?

And what about bus stops? Do you plan to allow new graphics for each roadtype?
ELRD.jpg
(588.84 KiB) Not downloaded yet

Thanks a lot :)
Image

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

Re: NotRoadTypes

Post by peter1138 » 05 May 2019 14:17

Should be possible by setting the powered road types property properly.
He's like, some kind of OpenTTD developer.

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

Re: NotRoadTypes

Post by wallyweb » 05 May 2019 14:57

Any changes to:
Road-/Tramtype
- Properties
- Variables
- Graphics
published here?

If yes, is there an up-to-date document that we can access?

User avatar
Erato
Route Supervisor
Route Supervisor
Posts: 386
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: NotRoadTypes

Post by Erato » 05 May 2019 15:50

Is it possible to block the building of tramtypes on roads?
No pics no clicks. Seriously.
ImageImageImageImageImageImage

User avatar
kamnet
Moderator
Moderator
Posts: 6641
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: NotRoadTypes

Post by kamnet » 05 May 2019 17:39

andythenorth wrote:Kamnet, would your pipe goal alternatively be solved if you could have a third type on the tile? (That's not an available solution, but I'm curious about your goal).
Effectively it would. I'm sure there could be other applications, but the idea I'm thinking of is to basically have a means of transporting cargo that we don't always see, such as water/oil/fuel/alcohol in pipes or electricity in cables, and do do that in parallel with current infrastructure like roads and tram lines.

I can see a work-around for what I want, build a station on the side of a network where cargo is transferred from roadtype to tramtype. Not perfect, but definitely a "good enough" solution.

Now, if only we could get independent station graphics for each road/tramtype. ;)

Diesel Power
Traffic Manager
Traffic Manager
Posts: 136
Joined: 18 Jun 2016 19:05

Re: NotRoadTypes

Post by Diesel Power » 09 May 2019 07:25

CRASH!!!!!!
Not sure what's to blame. It happened when I held ctrl to copy the waypoint (from auz waypoints and more freight stations V3). I've included a shot of the grf window too as there is rather a lot of them. If it's a grf problem I"ll post it in the relevant thread. I've tried to recreate this in a clean game with just the 3 relevant grfs but to no avail.
I'm using Open TTD 20190426-pr6811-g6c248538b3

I also have the crash.log, but I can't seem to upload it.
Attachments
crash.sav
(2.03 MiB) Downloaded 12 times
crash.png
(183.73 KiB) Not downloaded yet
crash grfs.png
(367.34 KiB) Not downloaded yet

Eddi
Tycoon
Tycoon
Posts: 7396
Joined: 17 Jan 2007 00:14

Re: NotRoadTypes

Post by Eddi » 09 May 2019 07:47

crash logs go over here: https://github.openttd.org

also, since it is now in master/trunk, you should check again in an official nightly
You might not exactly be interested in Ferion, but if you are, have fun :)

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 7 guests