Desert tiles patch

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Desert tiles patch

Post by Gigigonzalez »

Does anyone have the desert tile patch from chills patch pack as a seperate diff?

Thanks
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Desert tiles patch

Post by ChillCore »

There you go. ;)

The patch needs a good bump though.

As for the Todo"s ...
They are not critical tho the functioning of the patch at all, they are just some cosmetict that could be aplied to the Gui. Read: using stacked widgets for snow- and desertline, instead of showing both options at the same time as is the case at the moment.
Attachments
desert_amount.diff
(20.79 KiB) Downloaded 72 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Desert tiles patch

Post by Gigigonzalez »

ChillCore wrote:There you go. ;)

The patch needs a good bump though.

As for the Todo"s ...
They are not critical tho the functioning of the patch at all, they are just some cosmetict that could be aplied to the Gui. Read: using stacked widgets for snow- and desertline, instead of showing both options at the same time as is the case at the moment.
Thanks dude, i read your remark.
Ill try to patch this again recent trunk.

Does this patch also work with heightmaps? Well i kinda of assume it does :)
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Desert tiles patch

Post by Gigigonzalez »

Bump.


kinda have trouble applying it to recent trunk :(

I cant find some entries where the code needs modifying, and im not experienced enough to know how to put the pieces together :(
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Desert tiles patch

Post by ChillCore »

The patch was a bit harder to bump then I assumed it would be yes.
Attached is the bumped version. ;)

Your question about heightmaps is a good one to which I can not give you the answer right now because of ... untested. ;)
Please let me know if you encounter any issues as apart from generating a few maps I have not tested much at all.



Also,
After giving it a tiny amount of thought I have removed the Todos as it may become to confusing for new players if a widget, in this GUI, only changes it's label and nothing else when switching between climates.


@Devs:
Is it accepable to let the generate button resize in the way shown in the attached screenshot or is a spacer prefered/required to keep it at it's original size?
Attachments
desert_amount_v2_r26766.diff
(15.57 KiB) Downloaded 70 times
screenshot.png
screenshot.png (45.81 KiB) Viewed 2194 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Desert tiles patch

Post by planetmaker »

ChillCore wrote: @Devs:
Is it accepable to let the generate button resize in the way shown in the attached screenshot or is a spacer prefered/required to keep it at it's original size?
I don't see a problem with the 'Generate' button as shown.

But there seems to be an issue in the left column where the labels and the buttons do not align properly, especially for 'Variety distribution' and below, maybe slightly for the buttons above, too.
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Desert tiles patch

Post by Gigigonzalez »

Oh nice chill, ill test it out.

I wonder if something like this could eventually reach it into the main game or trunk.

Edit: Also works when loading heightmaps :)

On another question:

Code: Select all

+static const uint MIN_DESERT_AMOUNT = 4;  ///< Minimum allowed desert amount.
+static const uint DEF_DESERT_AMOUNT = 4;  ///< Default desert amount.
+static const uint MAX_DESERT_AMOUNT = 10; ///< Maximum allowed desert amount.
Is the limit with a reason? Or can they be adjusted without reprecussions
Last edited by Gigigonzalez on 02 Sep 2014 16:08, edited 1 time in total.
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Desert tiles patch

Post by ChillCore »

planetmaker wrote:
ChillCore wrote: @Devs:
Is it accepable to let the generate button resize in the way shown in the attached screenshot or is a spacer prefered/required to keep it at it's original size?
I don't see a problem with the 'Generate' button as shown.

But there seems to be an issue in the left column where the labels and the buttons do not align properly, especially for 'Variety distribution' and below, maybe slightly for the buttons above, too.
Thank you for spotting that. ;)

I knew something was off but could not put my finger on it ...
I see now that the generate button is pushed down rather than being resized.
I forgot to remove the spacer between "rivers" and "generate" which in turn caused the missalignment on the other side.


New patch attached.
For the person that dowloaded the previous version, it is line 142 in genworld_gui.cpp that needs to go. ;)


EDIT:
Gigigonzalez wrote: Edit: Also works when loading heightmaps :)
Thank you for testing, much apreciated.
On another question:

Code: Select all

+static const uint MIN_DESERT_AMOUNT = 4;  ///< Minimum allowed desert amount.
+static const uint DEF_DESERT_AMOUNT = 4;  ///< Default desert amount.
+static const uint MAX_DESERT_AMOUNT = 10; ///< Maximum allowed desert amount.
Is the limit with a reason? Or can they be adjusted without reprecussions
You can play with the numbers but I would advise against doing so (except perhaps lowering the upper limit a bit ... maybe.)
See the game assumes there to be desert and tropic zones and by removing all the tropic or desert zones you may end up with broken industry chains due to certain industries not being able to be placed down, etc.

Note that desert tiles become those at minimum 4 tiles away from a water tile and below the heightlevel specified in the settings ... it is not between two specified heighltevels. ;)


ps:
Ofcourse if you combine this patch with the moreheightlevelspatch then the upper limit can go up too with no problems at all.
I never tested with a lower minimum level so I can not give you any info on what will happen if you do try.
Attachments
desert_amount_v2_1_r26766.diff
(15.84 KiB) Downloaded 72 times
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Desert tiles patch

Post by Gigigonzalez »

Yeah for fun i tried 1 and 15, both seem to work fine, other than a message that there werent any suitable places for the water towers.

So all in all it seems to work as intended :)
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Desert tiles patch

Post by Gigigonzalez »

So this patch works pretty much flawlessly, bring it into trunk! Its been around for years and nobody ever seemed to have issues with it :o
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 26 guests