Suggestion for Bridges
Moderator: OpenTTD Developers
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Suggestion for Bridges
I have no experience in making patches and I don't expect anyone to take up this idea just because I propose it. That being said...
Is it possible to have more than 19 13 bridges by separating bridges by the NewGRF that provides the bridges?
Is it possible to have more than 19 13 bridges by separating bridges by the NewGRF that provides the bridges?
Last edited by SimYouLater on 02 Nov 2019 00:11, edited 2 times in total.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Re: Suggestion for Bridges
Why not? What's preventing a patch from allowing multiple instances of bridges, defined by whichever NewGRF the bridges are from?
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Re: Suggestion for Bridges
Each bridge in a set has a unique ID between 0x00 and 0x0C inclusive.SimYouLater wrote: ↑02 Nov 2019 00:09 Why not? What's preventing a patch from allowing multiple instances of bridges, defined by whichever NewGRF the bridges are from?
A patch to extend that number is possible. JGR and cirdan gave us three extra bridge IDs: 0x0D, 0x0E and 0x0F.
16 is hard set in OpenTTD's code and that set of 16 is not repeatable.
To complicate the situation, each of those 16 IDs has four types: RAIL, ROAD, MONOrail and MAGLev. so in reality one could say there are 48 bridges to a set.
It is possible for each of those 16 IDs to have its own NewGRF, but depending upon the placement of that GRF in your GRF load sequence, it will either overwrite or be overwritten by any other bridge set using the same ID.
So now the question becomes: Is it possible to patch the code to allow multiple bridge sets such that one set won't overwrite all or part of another set?
The short answer would be yes. It is, after all, only code, but the task would be fraught with peril. The code for bridges touches upon so many other features of the game that it would probably require a complete rewrite of OpenTTD's code and that's the simplistic "no" answer to your question.
I do stand to be corrected on this.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Re: Suggestion for Bridges
Ah. Okay, that makes sense and it's too bad that's the case. Is it possible to add more types that appear only with railtype and roadtype NewGRFs?wallyweb wrote: ↑02 Nov 2019 06:54Each bridge in a set has a unique ID between 0x00 and 0x0C inclusive.SimYouLater wrote: ↑02 Nov 2019 00:09 Why not? What's preventing a patch from allowing multiple instances of bridges, defined by whichever NewGRF the bridges are from?
A patch to extend that number is possible. JGR and cirdan gave us three extra bridge IDs: 0x0D, 0x0E and 0x0F.
16 is hard set in OpenTTD's code and that set of 16 is not repeatable.
To complicate the situation, each of those 16 IDs has four types: RAIL, ROAD, MONOrail and MAGLev. so in reality one could say there are 48 bridges to a set.
It is possible for each of those 16 IDs to have its own NewGRF, but depending upon the placement of that GRF in your GRF load sequence, it will either overwrite or be overwritten by any other bridge set using the same ID.
So now the question becomes: Is it possible to patch the code to allow multiple bridge sets such that one set won't overwrite all or part of another set?
The short answer would be yes. It is, after all, only code, but the task would be fraught with peril. The code for bridges touches upon so many other features of the game that it would probably require a complete rewrite of OpenTTD's code and that's the simplistic "no" answer to your question.
I do stand to be corrected on this.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Re: Suggestion for Bridges
In a manner, that happens now. railtypes and roadtypes define bridge surfaces that are applied as overlays to a bridge deck as long as the bridge is built from within a railtype/roadtype's GUI. The limitation is that the superstucture of a bridge is not addressable from within a railtype/roadtype's code.SimYouLater wrote: ↑02 Nov 2019 06:59 Ah. Okay, that makes sense and it's too bad that's the case. Is it possible to add more types that appear only with railtype and roadtype NewGRFs?
You might want to refer to this page of my tutorial (W.I.P.)
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
- Emperor Jake
- Tycoon
- Posts: 3427
- Joined: 24 Apr 2007 09:37
- Skype: Discord: Emperor Jake #4106
- Location: Not Actually Japan
- Contact:
Re: Suggestion for Bridges
Are there any other bridge GRFs that make use of these extra IDs? Just found out about your bridge set but it would also be possible to create an extension for TBRS or something.
Re: Suggestion for Bridges
Not that I am aware of.Emperor Jake wrote: ↑11 Nov 2019 22:18 Are there any other bridge GRFs that make use of these extra IDs?
One could have a standalone set of one, two or three extra bridges. It would work alongside any bridge set.Just found out about your bridge set but it would also be possible to create an extension for TBRS or something.
At the moment my set replaces three bridges and adds one.
It will grow eventually.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Suggestion for Bridges
NewGRFs tend to not use this kind of custom modifications, because it's not really possible to test if you're in a version that has them or not.
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Suggestion for Bridges
Wasn't there a special "platform" type number (action 7/9, var 8B) of "2" for cirdan's NMF? And probably another one for JGRPP as well? (At least it had been discussed for the latter).
regards
Michael
Re: Suggestion for Bridges
There is a feature test for this in JGRPP.michael blunck wrote: ↑15 Nov 2019 08:45Wasn't there a special "platform" type number (action 7/9, var 8B) of "2" for cirdan's NMF? And probably another one for JGRPP as well? (At least it had been discussed for the latter).
regards
Michael
See "more_bridge_types" in this document
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Who is online
Users browsing this forum: Google [Bot] and 16 guests