Replacing river graphics
Moderator: Graphics Moderators
Replacing river graphics
Hi all,
Is it possible to use Action-5 to replace the river graphics from OpenGFX-extra?
If so, what is the type number?
Is it possible to use Action-5 to replace the river graphics from OpenGFX-extra?
If so, what is the type number?
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Re: Replacing river graphics
As far as i know, since you can replace tram tracks from opengfx-extra, you may use the same action than for tram track replacement.
Re: Replacing river graphics
Do you even know how Action-5 works?acs121 wrote:As far as i know, since you can replace tram tracks from opengfx-extra, you may use the same action than for tram track replacement.
You need to specify a type to replace, the tramtracks indeed have their own type-number (0B,8B), so can be replaced using Action-5, but the rivers have no type-number of their own (at least none I could find in the Wiki).
Are they part of the Canal type number (08,88)?
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Re: Replacing river graphics
Rivers should indeed be a part of canals type 08/88. I believe they might not be. The specifications say that Type 08 has 65 real sprites and looking at the OpenGFX_extras sprite sheet we can count the 65 sprites from sprite number 276 to number 341. That range does not include the river sprites. Those are further down on the sheet starting at number 3011 to 3981 (4007 with buoys?). Note that there are more canal sprites from number 2785 to 3001.Quast65 wrote: ... the rivers have no type-number of their own (at least none I could find in the Wiki).
Are they part of the Canal type number (08,88)?
Perhaps the question should be whether those extra canal sprites (2785 to 3001) and the river sprites (3011 to 3981) are supported in nforenum and GrfCodec and if so, beginning with which versions?
Note that OpenGFX+Landscape (which is not a base set) has even more canal/river sprites.
Note that Canals (and rivers) are supported by the Action1-2-3 triplet.
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
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Replacing river graphics
I don´t know about OpenGFX-extra, but o/c it is possible to replace the canal/river graphics from any base set. My River graphics does that since 2007.Quast65 wrote: Is it possible to use Action-5 to replace the river graphics from OpenGFX-extra?
Rivers and canals are the same. They only differ by their c-IDs in action3 (like railtypes do).Quast65 wrote: Do you even know how Action-5 works?
You need to specify a type to replace, the tramtracks indeed have their own type-number (0B,8B), so can be replaced using Action-5, but the rivers have no type-number of their own (at least none I could find in the Wiki).
Are they part of the Canal type number (08,88)?
As Wally said, rivers/canals are using the standard 0-1-2-3 scheme, but they have only a very small number of properties, flags, callbacks and varAction2s.
BTW, there´s even a module for coding rivers/canals in m4nfo.
regards
Michael
Re: Replacing river graphics
I am assuming you are using the 0-1-2-3 scheme to completely replace all the river sprites which are defined in ttdbase or OpenGFX_extra but what if one only wishes to replace one or two sprites? For the regular base sets one can use ActionA, but for the extended base sets one must use Action5 which only accesses a limited number of sprites as set out in the type chart. Action5 only allows the 65 canal sprites. The river sprites are beyond that 65 limit. Can the 0-1-2-3 scheme be used to modify only one or two real sprites?michael blunck wrote:I don´t know about OpenGFX-extra, but o/c it is possible to replace the canal/river graphics from any base set. My River graphics does that since 2007.
Regards,
Wally
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
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Replacing river graphics
Yes, the above mentioned rivers&canals grf uses the 0-1-2-3 scheme, but not action5.wallyweb wrote: I am assuming you are using the 0-1-2-3 scheme to completely replace all the river sprites which are defined in ttdbase or OpenGFX_extra but what if one only wishes to replace one or two sprites? For the regular base sets one can use ActionA, but for the extended base sets one must use Action5 which only accesses a limited number of sprites as set out in the type chart. Action5 only allows the 65 canal sprites. The river sprites are beyond that 65 limit. Can the 0-1-2-3 scheme be used to modify only one or two real sprites?
I´ve never tested replacement of only a smaller number of sprites by that scheme, but it could well be that only sprites defined in the action1 would be replaced, keeping the base set sprites from action5. Just try it!
regards
Michael
Re: Replacing river graphics
Ok, but hopefully I won't see river water pouring out of the fan on my computer. Maybe I can get Quast65 to try it on his computer. Heh.michael blunck wrote:I´ve never tested replacement of only a smaller number of sprites by that scheme, but it could well be that only sprites defined in the action1 would be replaced, keeping the base set sprites from action5. Just try it!
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
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Replacing river graphics
Just tested it (removing one of the straight river borders, to be overwritten by action5/base set). Looks silly. Not recommended.wallyweb wrote: Ok, but hopefully I won't see river water pouring out of the fan on my computer. Maybe I can get Quast65 to try it on his computer. Heh.
regards
Michael
Re: Replacing river graphics
Seems that breaks the algorithm.michael blunck wrote:Just tested it (removing one of the straight river borders, to be overwritten by action5/base set). Looks silly. Not recommended.wallyweb wrote: Ok, but hopefully I won't see river water pouring out of the fan on my computer. Maybe I can get Quast65 to try it on his computer. Heh.
ugly-rivers.png
regards
Michael
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: Replacing river graphics
Thanks Wally and Michael for your input!
Action-1-2-3 is likely going to do the trick for me at the moment, so I can start testing out an idea I have.
Still, is it definitely not possible to use Action-5 (by defining the type and offset to the rivergraphics I want to change)?
Because Action-1-2-3 does mean you need to replace all of the rivergraphics (even those you want to keep the same), to avoid that strange thing that Michael had shown.
Not that big of a problem, as I can just refer to the Opengfx-extra graphics for the ones that I want to stay the same (or to Opengfx+landscape), but its a lot more code/graphics and having it done via Action-5 keeps the GRF a lot smaller
By the way, if Action-5 is not possible, then a change to the Wiki would be handy, as the way its written now, I have the assumption that Action-5 can be used for Openttd…
Action-1-2-3 is likely going to do the trick for me at the moment, so I can start testing out an idea I have.
Still, is it definitely not possible to use Action-5 (by defining the type and offset to the rivergraphics I want to change)?
Because Action-1-2-3 does mean you need to replace all of the rivergraphics (even those you want to keep the same), to avoid that strange thing that Michael had shown.
Not that big of a problem, as I can just refer to the Opengfx-extra graphics for the ones that I want to stay the same (or to Opengfx+landscape), but its a lot more code/graphics and having it done via Action-5 keeps the GRF a lot smaller
By the way, if Action-5 is not possible, then a change to the Wiki would be handy, as the way its written now, I have the assumption that Action-5 can be used for Openttd…
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Re: Replacing river graphics
Refer to the Version icons. OTTD 0.6 is not crossed out.Quast65 wrote:By the way, if Action-5 is not possible, then a change to the Wiki would be handy, as the way its written now, I have the assumption that Action-5 can be used for Openttd…
According to the wiki Action5 can be used for OTTD canals. Just not beyond to the first 65 sprites, and there are more than 65 OTTD canal sprites.
Last edited by wallyweb on 10 Jul 2018 16:09, edited 1 time in total.
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: Replacing river graphics
Yes, meaning that it should be possible to use Action-5 with offsets, right?
But how? And what type and especially offsets to get to the rivers?
But how? And what type and especially offsets to get to the rivers?
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Re: Replacing river graphics
Use type 88.Quast65 wrote:Yes, meaning that it should be possible to use Action-5 with offsets, right?
But how? And what type and especially offsets to get to the rivers?
The first canal sprite (an icon) is offset 00, therefor the 65th sprite is offset \d 64.
Then go down the sprite sheet to the next canal/river sprite which will be offset \d 65 and continue counting until you arrive at the sprite you want to change.
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
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Replacing river graphics
This is weird. I really forgot about action5 had been abandoned by TTDPatch, years ago!
I think the reason for the change to a 0-1-2-3 scheme is that you can´t use varAction2s for canals/rivers (terrain type, height) with only an action5 layout. I.e., you can´t mix both schemes. And o/c, you can´t skip some of the needed sprites when being in 0-1-2-3 since then the fixed rank of sprites gets corrupted. See screenshot above.
regards
Michael
I think the reason for the change to a 0-1-2-3 scheme is that you can´t use varAction2s for canals/rivers (terrain type, height) with only an action5 layout. I.e., you can´t mix both schemes. And o/c, you can´t skip some of the needed sprites when being in 0-1-2-3 since then the fixed rank of sprites gets corrupted. See screenshot above.
regards
Michael
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Replacing river graphics
Yes, rivers are canals in a NewGRF sense.Quast65 wrote:Do you even know how Action-5 works?acs121 wrote:As far as i know, since you can replace tram tracks from opengfx-extra, you may use the same action than for tram track replacement.
You need to specify a type to replace, the tramtracks indeed have their own type-number (0B,8B), so can be replaced using Action-5, but the rivers have no type-number of their own (at least none I could find in the Wiki).
Are they part of the Canal type number (08,88)?
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Replacing river graphics
Ok, I did a test.planetmaker wrote:Yes, rivers are canals in a NewGRF sense.
I used this Action-5 with 65 realsprites:
Code: Select all
6 * 4 05 88 41 00
I did another test, with this code and just 1 realsprite:
Code: Select all
6 * 4 05 88 01 40
Meaning that the icon of the lock is at offset 64 (40 in Hexadecimal).
So this quote is incorrect:
The Icon is the LAST of the 65 canal-sprites!!wallyweb wrote:The first canal sprite (an icon) is offset 00
Now, please take a look at this graphicsfile (decoded from OpenGFX-Extra): So, the canal-sprites are Spritenr 287 (a sloped watertile) to 351 (the lock icon) = 65 realsprites.
But much further down the graphicsfile you can see many more canal and rivergraphics, starting from Spritenr 2948 (a canal-side with snow on the grass at the outer end) to Spritenr 4052 (a corner with snow)
My assumption is that these override 64 of the 65 "original" canal-sprites (as there are no icons for the locks being changed) and also add the graphics for rivers/various-snow-stages/various-climates).
The action-5s I used are therefor useless (except if I wanted to change the lock-icon).
My question then again is, can Action-5 be used to change those "new" canal/river-graphics? If so, how?
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Replacing river graphics
Why don´t you take a look into that OGFX code? And check if it is using action5? And how? And if it is not using action5, but actions 0-1-2-3, there might be a reason for it?Quast65 wrote: My question then again is, can Action-5 be used to change those "new" canal/river-graphics? If so, how?
regards
Michael
Re: Replacing river graphics
I don't know what the heck I was looking at. Lesson: Don't work on this stuff at 3:00 AM.Quast65 wrote:The Icon is the LAST of the 65 canal-sprites!!wallyweb wrote:The first canal sprite (an icon) is offset 00
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: Replacing river graphics
I already did that and it does indeed use Action-1-2-3. This I also already tested to change those graphics, that works.michael blunck wrote:Why don´t you take a look into that OGFX code? And check if it is using action5? And how? And if it is not using action5, but actions 0-1-2-3, there might be a reason for it?
But I want to be absolutely sure that action-5 cant be used for those sprites.
Because if that is the case then this thread can also be usefull for future GRF-developers who want to change canal- and/or river- and/or lock-graphics and run into the same issue I have.
Also a small change/update of the Wiki might be handy (via an extra footnote), something like:
Code: Select all
When using OpenGFX-extra version XX.XX and newer, Action-1-2-3 is needed to change Canal-graphics and not Action-5.
Except for the Lock-Icon, for that you still need to use Action-5 (type 88, offset 40).
I hope you understand that at the moment this all is a bit confusing to me. There is still no clear Yes or No to my question (or even: Partly, some things Yes, some things No).
I just dont want to waste my time using the Action-1-2-3 option, if Action-5 is also possible, as that means a much smaller code and graphicsfile (so less work/time and also means less chance for mistakes, or mistakes being spotted easier).
No worries, just wanted to avoid any extra/future confusionwallyweb wrote:I don't know what the heck I was looking at.
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604
Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Who is online
Users browsing this forum: No registered users and 18 guests