Page 25 of 32

Re: NotRoadTypes

Posted: 06 Jan 2019 17:28
by ufiby
Hey! want to test your road-hog.tar But the problem with my travel kit is U&RaTT. You can remove the roads to connect the road sets. Want to test ROAD-HOG + U&RaTT :)

Re: NotRoadTypes

Posted: 06 Jan 2019 18:15
by Eddi
SimYouLater wrote:Is this still being worked on? It was so promising, and JGRPP is now only missing this one feature to make it perfect for my 500 year marathon run server!
from what i can tell, development has stalled for a bit over the last year, and current consensus is to concentrate on other things until the release of 1.9, then pick this up again.

Re: NotRoadTypes

Posted: 06 Jan 2019 18:17
by jfs
SimYouLater wrote:Is this still being worked on? It was so promising, and JGRPP is now only missing this one feature to make it perfect for my 500 year marathon run server!
Yes, the pull request was refreshed just a few days ago, updated to compile on the current development version again. However there are some bugs that haven't been ironed out and will probably require quite a bit more work. (An automated test crashed trying to access a tile index outside the map, for example.)

Re: NotRoadTypes

Posted: 07 Jan 2019 05:24
by stefino_cz
Nice to see that project is still alive. I have a question about trolleybuses.. is possible to make its own trolleys? If I tested it I got trams trolley graphics (one trolleey line instead two lines)

Re: NotRoadTypes

Posted: 07 Jan 2019 16:51
by Kruemelchen
stefino_cz wrote:Nice to see that project is still alive. I have a question about trolleybuses.. is possible to make its own trolleys? If I tested it I got trams trolley graphics (one trolleey line instead two lines)
You can draw and code your own trolley graphics for trolley buses :wink:
(if you don't define any trolley graphics, it falls back to the standard graphics, which are obviously tram trolley graphics)
However, you can't draw trolley graphics twice on one tile (yet?), so either bus or tram trolleys may be drawn on one tile, not both.

Re: NotRoadTypes

Posted: 08 Jan 2019 05:35
by stefino_cz
Kruemelchen wrote: You can draw and code your own trolley graphics for trolley buses :wink:
(if you don't define any trolley graphics, it falls back to the standard graphics, which are obviously tram trolley graphics)
However, you can't draw trolley graphics twice on one tile (yet?), so either bus or tram trolleys may be drawn on one tile, not both.
Okay. I thought it is tram trolley. I will try it. Can I choose what type of trolley will be used in case of tram an trolleybus on one road?

Re: NotRoadTypes

Posted: 08 Jan 2019 14:58
by Kruemelchen
stefino_cz wrote: Okay. I thought it is tram trolley. I will try it. Can I choose what type of trolley will be used in case of tram an trolleybus on one road?
As far as I am aware of, trolleybus catenary has a higher priority. However, I am not aware of a solution how to detect whether a tram is placed upon a road or not, so there is no way to adapt the graphics (yet?)

Re: NotRoadTypes

Posted: 07 Feb 2019 22:57
by kamnet
andythenorth wrote:OpenTTD builds and forked repo
https://www.openttd.org/en/download-ratt
This page is no longer found. Was this meant to be taken down, or an accident after the recent upgrades to the website and compile farm?

Re: NotRoadTypes

Posted: 08 Feb 2019 05:19
by stefino_cz
Still hope that roadtypes and trolleybuses will be add again into the game :? Roads are visible a lot and more types will make scenery more realistic ( like simple concrete road goes throw the factory - not road what looks like highway. )

Re: NotRoadTypes

Posted: 08 Feb 2019 07:49
by andythenorth
kamnet wrote:This page is no longer found. Was this meant to be taken down, or an accident after the recent upgrades to the website and compile farm?
It's a side effect of the move to the new compile farm. The NRT fork is not currently built by the farm.

I don't know if the old binaries are still there on the mirrors, it's plausible that they are and we might be able to find the links to them, but I don't know if that will get done.

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

Re: NotRoadTypes

Posted: 08 Feb 2019 13:54
by peter1138
Major detail left is how to create a sensible AI interface, and make it backwards compatible, and also to enhance towns a bit.

Re: NotRoadTypes

Posted: 08 Feb 2019 15:31
by kamnet
How much play testing needs to be done before it gets to 1.9.0? Would it be considered beneficial to put off release of 1.9.0 by a few months in order to get this in?

Re: NotRoadTypes

Posted: 08 Feb 2019 16:47
by stefino_cz
I have one question. What about railway crossings? If I have 1 road and 14 railtypes like now, I have 14 types of crossings. But if there will be X roadtypes, I have to combine X*14 crossings to get the best graphics result. So the question is if there will be X types of crossings foreach roadtype or the game will use only one type graphics what is defined in railtype graphics block? And similar question is about crossings tram track X rail. Tram track is in foreground and it loooks bad in 32 bpp.

Re: NotRoadTypes

Posted: 08 Feb 2019 22:44
by peter1138
Crossings are done by overlaying graphics from both the rail and road sets., so you would not need to define individual crossing graphics for each combination.

Re: NotRoadTypes

Posted: 09 Feb 2019 09:34
by stefino_cz
peter1138 wrote:Crossings are done by overlaying graphics from both the rail and road sets., so you would not need to define individual crossing graphics for each combination.
Nice :) Will be possible to code roadtypes in NML as well?

Re: NotRoadTypes

Posted: 09 Feb 2019 16:18
by andythenorth
stefino_cz wrote:Nice :) Will be possible to code roadtypes in NML as well?
See first post viewtopic.php?p=1180663#p1180663

Re: NotRoadTypes

Posted: 09 Feb 2019 19:02
by peter1138
Some AI support has now been implemented, and the compat stuff added for old AIs, which can only build ROADSUBTYPE_NORMAL.

Re: NotRoadTypes

Posted: 12 Feb 2019 21:20
by peter1138
Additional API stuff fiddled with. Current documentation (and changelog) is temporarily viewable online here:

http://fuzzle.org/~petern/wip-nrt-aidoc ... _8hpp.html

As I'm not an AI writer, it would be useful if AI authors could find obvious flaws or better ways to do things...

Re: NotRoadTypes

Posted: 14 Feb 2019 20:13
by Zuu
How does the AI discover which SubRoadType values that exist? Should they loop from 0 to 63 and query if the road type is available?

Usually the API solve this with lists. Ie AICargoList gives a list of cargoes that can be produced in the current game. If something is more flexible than being fixed/hard coded what types are available, then a list would be useful. Expecting the AI to know the min/max possible ID and loop all possible values and check if they are valid is not something we in general do in the API. If we do, then we should at least provide constants with the min/max value.

So I propose an AISubRoadTypeList which maybe should have RoadType as parameter to the constructor if the sub types are different to the different RoadTypes. (I haven't followed the discussion close enough to know if that is true)

You will need to update the compat-files so that if OpenTTD runs an AI that is declared it was written for API 1.8, you write squirrel code that handle the call for IsValidRoadType(road_type) which then have to call the new API and somehow using squirrel and the new API figure out which road sub type to pass on. It is not a problem if AIs need to be rewritten to support different sub types, but a road AI written for eg. OpenTTD 1.0 should preferable keep working in the default game without NewGRFs.

Re: NotRoadTypes

Posted: 15 Feb 2019 03:33
by peter1138
Good point, I missed duplicating the railtypelist calls. I will add them!

EDIT: This has now been added the docs updated.

Compatibility files are already included and are working fine, no problem there.