Patch: Tree line height

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

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

Re: Patch: Tree line height

Post by ChillCore »

loclahost wrote: I haven't made any changes to settings_gui, so I guess you mean genworld_gui .
It was genworld_gui.cpp indeed, my misstake, sorry about that.
Anyway; fixed all three of them and updated the diff in the first post.
There is one more thing I am not sure about.
MAX_TREELINE_HEIGHT ... should it be MAX_TILE_HEIGHT or MAX_TILE_HEIGHT - 2 ? Devs?
I had forgotten how space-happy the coding style is (myself being more of a tab person :wink: ).
@see my location. :)
Tabs only for indenting new lines or double tabs for breaking up long lines ... all the rest is spaces.
You have read the sticky have you?
Thank you ChillCore for pointing out my silly misstakes. I bow in your general direction :bow:.
I am just doing to you what other people have done to me ... it must be a virus.
I am learning just like you are.
Hopefully I remember to read my own diff file next time.
I'm sure you will.
loclahost wrote:
CommanderZ wrote:Did you consider implementing the gradual tree line?
CommanderZ:
Not yet. I'm lacking in IDE (and linux skills) so my traversal of the code is quite slow. But if that is something you want, I'll increase my efforts in finding where to make it work. Maybe I'll have some more time this weekend than the ten minutes I had today. Stay tuned.
I agree it would be a nice additional feature, however you can always do that as a seperate patch if you lack time at the moment or if devs include it in trunk before you had the chance to figure out what where, I can not help you there. (I guess I could, but not without searching myself.)

ps:
Sorry for breaking up your post the way I did, it seemed like the easiest way to reply.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.

loclahost
Engineer
Engineer
Posts: 46
Joined: 18 Dec 2008 07:39
Location: Sweden

Re: Patch: Tree line height

Post by loclahost »

I'm sorry to say that I will not have the time to make the transition gradual at the moment so it will have to become a separate patch, as ChillCore said. But an updated version can be found in the first post, addressing the issue of the patch applying itself to all climates, not just arctic (which is the only climate where the treeline can be changed :wink: ).

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

Re: Patch: Tree line height

Post by ChillCore »

Hello loclahost,
is there a reason for limiting this patch to the artic climate?
Does allowing it for all climates breaks something?

If it is simply developer's choice that is fine.
I just can not figure it out by myself. ;)
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.

loclahost
Engineer
Engineer
Posts: 46
Joined: 18 Dec 2008 07:39
Location: Sweden

Re: Patch: Tree line height

Post by loclahost »

ChillCore wrote: is there a reason for limiting this patch to the artic climate?
Does allowing it for all climates breaks something?
Well, not really. It's just that since there's no snow in the other climates it doesn't make sense limiting the height at which trees can grow.

Although I'm aware of grfs that put snow in other climates, it's my guess that most players don't use them, at least not on a regular basis. Maybe it can be done with some kind of switch in the advanced settings... I'll take a look when I've time; After I begun my new job, most of my spare time seems to have disappered. At least the spare time involving computers :wink:

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

Re: Patch: Tree line height

Post by ChillCore »

I have seen treelines without the need for snow to be present on national geographic. I think thin air is enough or the lack of water on mountain tops with clouds never reaching some altitudes.
Thank you for the answer.

When you do find some time again maybe you could have a look on forcing industries that need trees(or produce them) below the treeline.

I think your patch is getting closer to being acceptable for trunk. Desired is something else but you should ask Devs if they want it or not.
Good luck with your new job.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

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.

loclahost
Engineer
Engineer
Posts: 46
Joined: 18 Dec 2008 07:39
Location: Sweden

Re: Patch: Tree line height

Post by loclahost »

Well ChillCore, then I will ask the devs.

Developers of OpenTTD, is this patch something you think can be included in trunk or are there still things you consider missing?

User avatar
kyosuke1989
Transport Coordinator
Transport Coordinator
Posts: 273
Joined: 24 Mar 2008 13:04
Location: Finland

Re: Patch: Tree line height

Post by kyosuke1989 »

Since more heightlevels is on the trunk, this patch would come in handy. Trees wouldn't grow above 4500 metres or so :)

EDIT: This was already here: http://www.tt-forums.net/viewtopic.php?f=33&t=72502

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Vetteman06 and 5 guests