Halftile foundations (in trunk since r11321)
Moderator: OpenTTD Developers
Halftile foundations (in trunk since r11321)
Good evening.
Some of you were already unpatiently waiting for it, but now it is released. The patch features:
1) The halftile foundations: Build two horizontal/vertical tracks on (steep) slopes.
2) Acerbus' anti-zig-zag foundations.
Both can be seen in
Before you can start playing, you will have to know some things:
Most foundations hide something behind them. More intresting is: If you click on the overlapping areas, the mouse click will be associated to the hidden tile. This is also the behaviour of trunk, but there it is not that noticeable.
But here it is more critical. See the following situation (right hand side): The lower part of the steep slope is completely hidden by the foundation. Where do you now have to click to build track there?
Remember - the hidden part will always be preferred. So imagine there would be no foundation and click where the lower part of the slope must be. Note that the (auto-)rail highlight will also be hidden.
OTOH in the same situation: If you now want to build signals on the upper track, you will have to click near the lower border of the foundation. The clickable area is relative small.
And even more; in the left hand side situation: If you have two tracks on such a steep slope and want to build signals on one of the track, both click areas are on the upper foundation. If you click on the lower part of the foundation you will already get the next track behind it.
Okay a bit tricky, but I hope if you try it, you will figure it out.
Second you will notice, that only some pixels of the track on the lower part are visible. But with fences you will discover if there is track:
Now, how to install this:
1) Below (in the next post) you will find a zip with two graphic files: "halffndw.grf" and "halfselw.grf". Copy them into your "data" directory, where the original graphics are.
2) Second you will find the patch file. Read the sticky topics "Howto apply a patch" and "BuildOTTD" on how to apply it.
Savegame compatibility:
If you load a savegame from trunk, all foundations will switch to the new one. The halftiles near the coast will get flooded in the first seconds after load.
I did not increase the savegame version. By that all future versions of the patch will be compatible to this version. If you load a savegame from this patch in trunk, it will quietly do that. Previously flooded halftiles near the coast will convert back to grass. However, if you have built a track combination that is not valid in trunk (i.e. two tracks on slopes), it will fail. That means trunk will still load the savegame but will crash somewhen in between (e.g. when the invalid track combination should be drawn in a viewport, when a vehicle (even plain) will go over it, ...). However, if you remove all critical tracks, you can savely load the savegames from trunk.
If you do not like the new foundation graphics, you can load your own with an Action5 (see http://wiki.ttdpatch.net/tiki-index.php?page=Action5).
In the next post is an example grf: tmpfndw "Temperate foundations in all climates".
I extended Action5 Type 6 with a 90 sprites version. The 16 new sprites are appended at the end, so the grf is compatible with TTDP without any version checks. See "tmpfndw.grf" below for a example.
Now - enjoy it!
Some of you were already unpatiently waiting for it, but now it is released. The patch features:
1) The halftile foundations: Build two horizontal/vertical tracks on (steep) slopes.
2) Acerbus' anti-zig-zag foundations.
Both can be seen in
Before you can start playing, you will have to know some things:
Most foundations hide something behind them. More intresting is: If you click on the overlapping areas, the mouse click will be associated to the hidden tile. This is also the behaviour of trunk, but there it is not that noticeable.
But here it is more critical. See the following situation (right hand side): The lower part of the steep slope is completely hidden by the foundation. Where do you now have to click to build track there?
Remember - the hidden part will always be preferred. So imagine there would be no foundation and click where the lower part of the slope must be. Note that the (auto-)rail highlight will also be hidden.
OTOH in the same situation: If you now want to build signals on the upper track, you will have to click near the lower border of the foundation. The clickable area is relative small.
And even more; in the left hand side situation: If you have two tracks on such a steep slope and want to build signals on one of the track, both click areas are on the upper foundation. If you click on the lower part of the foundation you will already get the next track behind it.
Okay a bit tricky, but I hope if you try it, you will figure it out.
Second you will notice, that only some pixels of the track on the lower part are visible. But with fences you will discover if there is track:
Now, how to install this:
1) Below (in the next post) you will find a zip with two graphic files: "halffndw.grf" and "halfselw.grf". Copy them into your "data" directory, where the original graphics are.
2) Second you will find the patch file. Read the sticky topics "Howto apply a patch" and "BuildOTTD" on how to apply it.
Savegame compatibility:
If you load a savegame from trunk, all foundations will switch to the new one. The halftiles near the coast will get flooded in the first seconds after load.
I did not increase the savegame version. By that all future versions of the patch will be compatible to this version. If you load a savegame from this patch in trunk, it will quietly do that. Previously flooded halftiles near the coast will convert back to grass. However, if you have built a track combination that is not valid in trunk (i.e. two tracks on slopes), it will fail. That means trunk will still load the savegame but will crash somewhen in between (e.g. when the invalid track combination should be drawn in a viewport, when a vehicle (even plain) will go over it, ...). However, if you remove all critical tracks, you can savely load the savegames from trunk.
If you do not like the new foundation graphics, you can load your own with an Action5 (see http://wiki.ttdpatch.net/tiki-index.php?page=Action5).
In the next post is an example grf: tmpfndw "Temperate foundations in all climates".
I extended Action5 Type 6 with a 90 sprites version. The 16 new sprites are appended at the end, so the grf is compatible with TTDP without any version checks. See "tmpfndw.grf" below for a example.
Now - enjoy it!
Last edited by frosch on 22 Oct 2007 13:17, edited 3 times in total.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Halftile foundations :)
new version. The graphics slightly changed, so you also have to download the graphics again.
Further there is now a example how to use ActionA and Action5 to replace the foundation graphics. tempfndw.grf changes the foundations of all climates to those of the temperate climate. You may want to use this grf, if you are playing with a industry grf, that changes the foundations
Further there is now a example how to use ActionA and Action5 to replace the foundation graphics. tempfndw.grf changes the foundations of all climates to those of the temperate climate. You may want to use this grf, if you are playing with a industry grf, that changes the foundations
- Attachments
-
- halftile_graphics_ver2.zip
- (in trunk, only purposed for archive)
- (6.99 KiB) Downloaded 134 times
-
- Halftile11296.patch
- (in trunk, only purposed for archive)
- (63.63 KiB) Downloaded 117 times
-
- tempfndw.grf
- Example newgrf, that replaces the foundations of all climates with the temperate foundations.
- (39.42 KiB) Downloaded 135 times
Last edited by frosch on 22 Oct 2007 13:18, edited 2 times in total.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Halftile foundations :)
NAK. Action 5 loads one set of contiguous sprites. You may use it to load any number of sprites into this one set, but you may not use multiple action 5s to load multiple parts of one set. If you need non-contiguous loading, then you need multiple action 5 types.frosch wrote:2) Use 16 sprites, if you want to only load the new foundations. (see halffndw.grf for the order, though it contains the sprites for all climates)
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Halftile foundations :)
I hope it will make it into the trunk soon. It is a must. Good luck.
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Halftile foundations :)
Err, I forgot a point in the first post, so I clarified the NewGrf extentions.DaleStan wrote:Action 5 loads one set of contiguous sprites. You may use it to load any number of sprites into this one set, but you may not use multiple action 5s to load multiple parts of one set. If you need non-contiguous loading, then you need multiple action 5 types.
I somehow expected problems with method 3), but now there are problems with 2). I just took a look at the TTDP Action5 handler and agree that the current method won't work.
However as long as noone wants to replace the graphics, I am not in the mood to spend any work on this issues.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Halftile foundations :)
Wow, thanks to Frosch, I seem to have my very own anti zig-zag patch How many people can say that?
Will build and test right now!
EDIT: I seem to have found a bug: As you can see, the autorail button seems to be a bit off. This apparently only happens with the Canadian Trainset, though.
Will build and test right now!
EDIT: I seem to have found a bug: As you can see, the autorail button seems to be a bit off. This apparently only happens with the Canadian Trainset, though.
Re: Halftile foundations :)
Great idea!
Well, as for the trunk acceptance, often it can help to split the patch into several parts (one containing some code cleanup, another just improved graphics - Acerbus's antizigzag, and last patch containing the foundations itself). Once the smaller patches are already in, the last part is then smaller, easier to review or maintain, etc ...
So, if it is possible to split patch into some logical parts ... you can try it to have chance of accepting the patch sooner.
Well, as for the trunk acceptance, often it can help to split the patch into several parts (one containing some code cleanup, another just improved graphics - Acerbus's antizigzag, and last patch containing the foundations itself). Once the smaller patches are already in, the last part is then smaller, easier to review or maintain, etc ...
So, if it is possible to split patch into some logical parts ... you can try it to have chance of accepting the patch sooner.
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Re: Halftile foundations :)
3 is not an issue. There are many places where TTDPatch says, in essence:frosch wrote:I somehow expected problems with method 3),DaleStan wrote:Action 5 loads one set of contiguous sprites. You may use it to load any number of sprites into this one set, but you may not use multiple action 5s to load multiple parts of one set. If you need non-contiguous loading, then you need multiple action 5 types.
Code: Select all
if (num_FOO_sprites > BAR)
sprite = base_FOO_sprites + BAR;
else
sprite = TTD_PROVIDED_SPRITE;
// do something with sprite
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: Halftile foundations :)
very nice if only different tracktypes were allowed on one tile, we could build a nice trace for monorail/maglev
ok, we can, but not in curves with the new halftiles. only if it were the same track type
ok, we can, but not in curves with the new halftiles. only if it were the same track type
- Attachments
-
- Bielebach Transport, 18th Mar 2038.png
- example 1
- (669.08 KiB) Downloaded 278 times
-
- Bielebach Transport, 27th Oct 2038.png
- example 2
- (628.33 KiB) Downloaded 336 times
Re: Halftile foundations :)
Ok, the cause for this is: You have loaded a grf, that replaces the autorail icon. The new foundation sprites are inserted in a lower sprite number range, so all following spritenumbers got incremented by 16. A clean solution would be to finally create an Action5 for OTTD specific GUI icons (well actually perhaps there is already one, I am not sure).Acerbus wrote:I seem to have found a bug:
Method 3) is different. The new sprites are not appended at the end, but interleaved.DaleStan wrote:This is especially the case with type 04 (signals), for which any of 48, 112, or 240 is documented as valid, and type 07 (GUI) which has been growing new sprites one and two at a time for some time now.
I guess it will result in adding a new Action5 type.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Halftile foundations :)
Or just appending the new sprites to the end instead.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
- Digitalfox
- Chief Executive
- Posts: 708
- Joined: 28 Oct 2004 04:42
- Location: Catch the Fox if you can... Almost 20 years and counting!
Re: Halftile foundations :)
In trunk thanks to rubidium and froschr11319 -Add: halftile- and anti-zig-zag-foundations. Patch by frosch.
Re: Halftile foundations :)
hooray for frosch
another great contribution by you *bow*
another great contribution by you *bow*
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Halftile foundations :)
I can't wait till tomorrow for the nightly!
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Halftile foundations :)
Hooray for Frosch! I ain't gonna wait for the nightly, I'm gonna BOTTD myself a brand new build just to check it out!
Re: Halftile foundations :)
great
thank you frosh and rubidium (and why not to Acerbus?)
thank you frosh and rubidium (and why not to Acerbus?)
Re: Halftile foundations :)
Why me?Wolf01 wrote:and why not to Acerbus?
Re: Halftile foundations :)
maybe this?frosch wrote: 2) Acerbus' anti-zig-zag foundations.
Re: Halftile foundations :)
To tell you the truth, I've always been confused as to why Frosch chose to name the patch after me. I somehow never got around to asking, though :sWolf01 wrote:maybe this?frosch wrote: 2) Acerbus' anti-zig-zag foundations.
Not that I have anything against it though
Re: Halftile foundations :)
that would be because of this post by you: http://www.tt-forums.net/viewtopic.php? ... t=#p617983
and his reaction:
and his reaction:
Nice idea. I also did not like the zig-zag at the end, but I did not knew a way to remove it without drawing even more foundation-sprites. Thank you for pointing me on this way. I will definitely implement that.
Who is online
Users browsing this forum: No registered users and 31 guests