Page 29 of 32

Re: NotRoadTypes

Posted: 04 May 2019 12:32
by Eddi
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?

Re: NotRoadTypes

Posted: 04 May 2019 12:42
by wallyweb
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:

Re: NotRoadTypes

Posted: 04 May 2019 20:48
by Andrew350
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 :)

Re: NotRoadTypes

Posted: 04 May 2019 21:53
by kamnet
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.

Re: NotRoadTypes

Posted: 04 May 2019 22:12
by acs121
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.

Re: NotRoadTypes

Posted: 04 May 2019 23:09
by wallyweb
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.

Re: NotRoadTypes

Posted: 04 May 2019 23:24
by kamnet
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. :)

Re: NotRoadTypes

Posted: 05 May 2019 00:36
by wallyweb
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.

Re: NotRoadTypes

Posted: 05 May 2019 01:10
by kamnet
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.

Re: NotRoadTypes

Posted: 05 May 2019 01:54
by Eddi
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)

Re: NotRoadTypes

Posted: 05 May 2019 03:11
by Andrew350
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.

Re: NotRoadTypes

Posted: 05 May 2019 06:26
by andythenorth
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).

Re: NotRoadTypes

Posted: 05 May 2019 07:57
by Eddi
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)

Re: NotRoadTypes

Posted: 05 May 2019 07:57
by stefino_cz
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 :)

Re: NotRoadTypes

Posted: 05 May 2019 14:17
by peter1138
Should be possible by setting the powered road types property properly.

Re: NotRoadTypes

Posted: 05 May 2019 14:57
by wallyweb
Any changes to:
Road-/Tramtype
- Properties
- Variables
- Graphics
published here?

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

Re: NotRoadTypes

Posted: 05 May 2019 15:50
by Erato
Is it possible to block the building of tramtypes on roads?

Re: NotRoadTypes

Posted: 05 May 2019 17:39
by kamnet
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. ;)

Re: NotRoadTypes

Posted: 09 May 2019 07:25
by Diesel Power
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.

Re: NotRoadTypes

Posted: 09 May 2019 07:47
by Eddi
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