Page 14 of 32

Re: NotRoadTypes

Posted: 30 Jan 2018 20:03
by andythenorth
wallyweb wrote:Rather than opening up and tinkering with an existing RV GRF, would it be possible to write a property modifying GRF?
Yes but more work than:
- checkout the HEQS repo (GPL license)
- add the roadtypes table, and set the roadtype for each vehicle
- update the changelog

Then either
- ask me for access to push to the repo
- commit and push
- get it released on the coop account on bananas

Or
- commit and push to new repo (forked)
- release on own bananas account

Re: NotRoadTypes

Posted: 30 Jan 2018 22:42
by wallyweb
andythenorth wrote:
wallyweb wrote:Rather than opening up and tinkering with an existing RV GRF, would it be possible to write a property modifying GRF?
Yes but more work than:
- checkout the HEQS repo (GPL license)
- add the roadtypes table, and set the roadtype for each vehicle
- update the changelog

Then either
- ask me for access to push to the repo
- commit and push
- get it released on the coop account on bananas

Or
- commit and push to new repo (forked)
- release on own bananas account
My mind is in a haze. :? What if a player wishes to use a road type GRF that does not have a HAUL type? Will the modified HEQS found on Bananas be the only one, or will it be in addition to the original unmodified version? Will it have to be modified every time someone creates a new road type? I would have no problem with using a HAUL modified HEQS as long as it remains compatible with non-HAUL road types.

Re: NotRoadTypes

Posted: 30 Jan 2018 22:52
by andythenorth
wallyweb wrote:What if a player wishes to use a road type GRF that does not have a HAUL type?
Then most likely one doesn't get the vehicles that need HAUL.

There is a thing about fallback types, but I don't understand it to be honest :)

Re: NotRoadTypes

Posted: 30 Jan 2018 23:04
by wallyweb
andythenorth wrote:
wallyweb wrote:What if a player wishes to use a road type GRF that does not have a HAUL type?
Then most likely one doesn't get the vehicles that need HAUL.

There is a thing about fallback types, but I don't understand it to be honest :)
A solution of course would be that HEQS in its current form remains available while mods are identified as such and are given a unique GRF iD (HEQS_Haul ?)

Re: NotRoadTypes

Posted: 30 Jan 2018 23:36
by supermop
wallyweb wrote:
andythenorth wrote:
wallyweb wrote:What if a player wishes to use a road type GRF that does not have a HAUL type?
Then most likely one doesn't get the vehicles that need HAUL.

There is a thing about fallback types, but I don't understand it to be honest :)
A solution of course would be that HEQS in its current form remains available while mods are identified as such and are given a unique GRF iD (HEQS_Haul ?)
The putative HEQ update author has a few options available:
1) Define HAUL within HEQs, as Road Hog does now,
2) Define a different but compatible type within HEQs, which could be used as a fallback
3) Write the grf such that if no HAUL compatible type is found, have heavy vehicles use ROAD
4) Use parameters
5) Simply assume A user who selects HEQs will also choose an appropriate road set, and make Heavy vehicles only available on HAUL. Much like Playing Iron Horse without a 3rd rail railtype grf, only the ROAD, ELRD, RAIL and ELRL vehicles will be available if the user choses not to use a roadtype set with HAUL. (I actually favor this approach)


I plan on updating Unspooled soon to use some new flags - are those in the NRT specs yet?

Re: NotRoadTypes

Posted: 31 Jan 2018 00:05
by wallyweb
supermop wrote:3) Write the grf such that if no HAUL compatible type is found, have heavy vehicles use ROAD
3alternate) Write the grf such that if no HAUL (or any other) compatible type is found, the grf skips that potion of the code and behaves as originally designed with all its vehicles functional and available.

Re: NotRoadTypes

Posted: 31 Jan 2018 11:45
by andythenorth
wallyweb wrote:3alternate) Write the grf such that if no HAUL (or any other) compatible type is found, the grf skips that potion of the code and behaves as originally designed with all its vehicles functional and available.
That's not supported in the spec. For whatever reason, railtypes isn't supposed to work that way. All compatibility is determined by the railtype grf, not the vehicle. Roadtypes follows the same approach.

If a player wants to use HAUL vehicles, they have to add a roadtype that supports HAUL. :)

Re: NotRoadTypes

Posted: 31 Jan 2018 13:21
by acs121
supermop wrote:
wallyweb wrote:Rather than opening up and tinkering with an existing RV GRF, would it be possible to write a property modifying GRF?
I'm sure that would be technically possible, but seeing as HEQs (and many other sets) are written in NFO from years before NRT was even conceived, writing such a grf would probably be more difficult than either rewriting the original grf in NML, or just figuring out what bits need to be added to set road types in NFO and pasting those into the code.

I also thought about rewriting egrvts for NRT, but ultimately decided that someday Zephyris would get around to it, and in the meantime it would be faster to make OGFX++RVs for NRT. That got way out of hand with scope creep etc leading to a grf that still has no good name.
eGRVTS would only have separation between non-electric tramways and electric tramways, otherwise maybe some trolleybuses but it doesn't have vehicles that would go on HAUL.

Also, i dunno how to code an NRT grf, neither do i know how to have refits that give more articulations to the RV. That would kinda a "Road Train" thing, a refittable vehicle for HAUL.

Re: NotRoadTypes

Posted: 31 Jan 2018 15:03
by supermop
andythenorth wrote:If a player wants to use HAUL vehicles, they have to add a roadtype that supports HAUL.
I'm with Andy on this one - same as with metro trains, you need a metro type track to use them in game, or a parameter to make them run on electric rail. The grf can't change the active code for each vehicle based on what types it does or doesn't find. If one really wants to use RVs that someone has encoded as being HAUL type on regular ROAD, then could use a roadtype grf that sets ROAD as being compatible with HAUL.

Currently only one RV set uses HAUL - the NRT fork of Road Hog, which adds a few new very heavy trucks with a gameplay concept of 'increased capacity at the cost of incompatibility with the ROAD network'. If someone does decide to update HEQs, they will have to make that determination themselves. Up to this point I have generally been of the conviction that I neither want to add a HAUL type to my Road grfs, nor that I want to add HAUL vehicles to my RV grf - as I typically just build a tram or train for loads larger than a Road train. I might change this in the future.
acs121 wrote:eGRVTS would only have separation between non-electric tramways and electric tramways, otherwise maybe some trolleybuses but it doesn't have vehicles that would go on HAUL.
As you have stated, it doesn't need to use HAUL to benefit from a NRT re-write. HAUL is just one niche use case for NRT. I've long been most excited by the prospect of using steam trams without needing wires overhead.
acs121 wrote:Also, i dunno how to code an NRT grf,
Road Hog Fork, Trolleybi, and Mop Generic Vehicles are all GPL with NML code posted online. Start with one of those.
acs121 wrote:neither do i know how to have refits that give more articulations to the RV.
To be honest, I am not really sure this is worth is, as it can mess with station refits. As long as RVs are built as single units, It's probably best to just have 'truck' and 'road train' as separate vehicles.

Re: NotRoadTypes

Posted: 31 Jan 2018 16:20
by acs121
I mean, you know the industrial trams in the HEQS, where you can adjust the tram's length ? Same thing for my road train.

Re: NotRoadTypes

Posted: 31 Jan 2018 16:25
by Erato
supermop wrote:I'm with Andy on this one - same as with metro trains, you need a metro type track to use them in game, or a parameter to make them run on electric rail. The grf can't change the active code for each vehicle based on what types it does or doesn't find. If one really wants to use RVs that someone has encoded as being HAUL type on regular ROAD, then could use a roadtype grf that sets ROAD as being compatible with HAUL.
I'm not sure if this works for NRT, but for railtypes you can have a railtype table like:

Code: Select all

railtypetable {
	RAIL,
	ELRL,
	NARROW_NON: [NAAN, RAIL],
	NARROW_3RD: [NAA3, RAIL],
	NARROW_OVER: [NABE, NAAE, ELRL],
	STANDARD_NON: [SAAN, RAIL],
	STANDARD_3RD: [SAB3, SAA3, RAIL],
	STANDARD_OVER: [SAAE, ELRL],
}
So I wonder if NRT allows or will allow you to define something like:

Code: Select all

roadtypetable {
	ROAD,
	HEAVY_ROAD: [HAUL, ROAD],
}
Which basically means that every RV defined as "HEAVY_ROAD", then it will go on HAUL, unless HAUL doesn't exists, then it goes on roads. This is a decision to be made in vehicle NewGRFs and not road NewGRFs.

Re: NotRoadTypes

Posted: 31 Jan 2018 16:51
by andythenorth
Erato wrote:So I wonder if NRT allows or will allow you to define something like:

Code: Select all

roadtypetable {
	ROAD,
	HEAVY_ROAD: [HAUL, ROAD],
}
Thanks :) That's the fallback solution I mentioned in an earlier post. It's implemented in NRT afaik.

I don't understand it, but it's used in Iron Horse (copy-paste from somewhere else) http://dev.openttdcoop.org/projects/iro ... able.pynml

That would probably work for HAUL vehicles, if someone wanted to use it.

I don't test for this stuff in my grfs, I have no interest in it :)

Re: NotRoadTypes

Posted: 31 Jan 2018 16:57
by wallyweb
andythenorth wrote:If a player wants to use HAUL vehicles, they have to add a roadtype that supports HAUL. :)
I think there is a misunderstanding.
My concern is with a currently existing RV set that is widely used where neither NRT nor roadsets exist, said RV set being modified to a roadtype at the expense of a selected group of RV's becoming unavailable in a non-NRT/Roadset game. The word is ugly but hijacked comes to mind. :P

Re: NotRoadTypes

Posted: 31 Jan 2018 18:20
by andythenorth
wallyweb wrote:My concern is with a currently existing RV set that is widely used where neither NRT nor roadsets exist, said RV set being modified to a roadtype at the expense of a selected group of RV's becoming unavailable in a non-NRT/Roadset game.
I see the point, but it's a straw man. HEQS has no active maintainer currently, and nobody has volunteered to take it over. So let's not put the cart before the horse. Or bulldozer. ;)

Re: NotRoadTypes

Posted: 31 Jan 2018 22:58
by acs121
Though, HEQS is one of the most downloaded files of Bananas ;)

Re: NotRoadTypes

Posted: 31 Jan 2018 23:41
by SilverSurferZzZ
The list that you seen, with the number of downloads, only corresponds to the latest version of the set. Obviously, a set published years ago has more downloads than one from 2 days ago :lol:

Re: NotRoadTypes

Posted: 04 Feb 2018 13:42
by andythenorth
Compile farm has updates for NRT OpenTTD: https://www.openttd.org/en/download-ratt

- fix for flashing company colour pixels on catenary when the catenary is on town roads, or roads with no owner (CC pixels will always be grey)
- flag for 'no houses' on roadtypes, towns won't grow along roadtypes with this flag set (off by default)
- flag for 'allow houses' on tramtypes, towns will grow along tramtypes with this flag set (off by default)
- various fixes to scenario editor
- various fixes to overbuilding of roadtype/tramtype
- fixes to availability of roadtypes/tramtypes

Thanks to Wolf01 for these.

There is also an updated nml with support for the new flags https://github.com/andythenorth/nml-and ... tRoadTypes

'ROADTYPE_FLAG_NO_HOUSES'
'TRAMTYPE_FLAG_ALLOW_HOUSES'

Re: NotRoadTypes

Posted: 04 Feb 2018 13:56
by Wolf01
Hello people.

This night, as andythenorth already said, we changed some stuff in NRT: added support for no-houses flag, a fix for checking the roadtypes buildability, some other fixes, and removed canals like every release, but they keep coming back.
I'm asking everyone (both users and grf authors) to do extensive testing about roadtypes introduction dates, specially:
  • Not being to be able to build a roadtype without any compatible vehicle to purchase: the dropdown choice should be greyed out (as it happens with railtypes)
  • Must be able to build a roadtype expired (no available vehicles to purchase) if you still have running vehicles compatible with it
  • Tramtypes should work in the editor now, must check the conversion in game
  • Multiplayer
  • AIs, some of them seem to not work
PS: we just noticed that we forgot to bump the savegame when 1.7.x was released, trunk savegames will load fine but they have uninitialized roads and might not work... but that's not a problem since you want to activate the NRT GRFs and you can't do it on an old save anyway, so make new games and play without worries :)

Re: NotRoadTypes

Posted: 04 Feb 2018 22:03
by Kruemelchen
Great to see a new update, thanks for the effort :D

I have a small bug report, though:

1. The REAR poles of catenary is drawn ontop of vehicles (both RVs and trams):
Carnway Transport, 10. Okt 1953.png
Carnway Transport, 10. Okt 1953.png (38.75 KiB) Viewed 3689 times
2. About the convertability of town owned roads:
  • I cannot change back from a road with catenary to a road without.
  • I am still able to convert a town owned road to HAUL by first converting to a road-type which supports both ROAD and HAUL

Re: NotRoadTypes

Posted: 04 Feb 2018 22:58
by acs121
On Cindini, i was able to convert some town-owned roads directly to HAUL, specifically in Enero Francés.
Also, we should be able to cross ROAD and HAUL, and disallow laying tramways on HAUL except to cross the road. The fact that ROAD can't cross HAUL is literally the thing that takes off all motivation from me to build these roads. The two options you have are :
1 - destroy 90% of the town to bridge or tunnel through
2 - use Kruemelchen's fantastic Country Roads GRF, set the speed limit to whatever you want and convert everything.
Sadly though, Unspooled gives no HAUL roadtype. However, i'll have to admit i'm in love with the Unspooled light-rail.