Page 1 of 2
[patch] disable/limit terraform
Posted: 03 Oct 2009 03:36
by thepalm
This patch adds a setting in the advanced settings menu to disable/enable terraforming.
I like this because I play without using any terraforming as an extra challenge.
The patch modifies about 7 lines of code in total.
Patch + win32 binary attached
edit:added copying to zip file - is this all that is needed?
edit2:added patch for 0.7.3
Re: [patch] disable terraform
Posted: 03 Oct 2009 08:02
by tsjook
Good idea for an extra challenge.
Will one still be able to plant trees?
Re: [patch] disable terraform
Posted: 03 Oct 2009 08:05
by thepalm
Will one still be able to plant trees?
This should still work
Re: [patch] disable terraform
Posted: 03 Oct 2009 08:14
by planetmaker
I like the general idea and once wrote a similar patch which restricts terraform to one tile at most:
http://www.openttdcoop.org/files/pm/pat ... 13397.diff
Maybe you want to generalise the idea a bit and change the patch such that it allows to set the maximum area to concurrently terraform with a single action (line 84 of the linked patch)? E.g. introduce an int patch setting instead of a boolean.
EDIT: and please don't just post exe files but complete bundles or at least also the copying information. Your zip is a violation of the GPL.
Re: [patch] disable terraform
Posted: 03 Oct 2009 16:48
by deepblue2k8
I like the idea, too!
What about a time based terraforming constraint? Like you are only allowed to terraform 10 tiles per year.
Without any terraforming I think it would be hard to place large airports especially on rough terrain. So with a limited amount of tiles per year you would have to plan your bigger stations like airports oder train stations very carefully.
I would very like an option like this, because I find myself often in a position, that I am to lazy to build bridges over an sea but instead terraform my way through it...
Re: [patch] disable terraform
Posted: 04 Oct 2009 02:07
by thepalm
Im trying to convert this to having a monthly limit on terraforming, except I am getting asserts in line 902 of settings_gui.cpp when advanced settings is opened. Obviously this patch doesn't quite work.
Any help?
patch:
http://paste.openttd.org/217117
Re: [patch] disable terraform
Posted: 04 Oct 2009 03:36
by Frostregen
Just a suggestion:
Make it per year, as deepblue2k8 suggested.
TPM = Allowed Terraforms per Year
You could add 1/12 TPM each month, up to a maximum of TPM.
This way you do not have to wait a full year for this damn last terraform you need.
Also you do not have to jump every month to your construction site just to terraform the next few tiles before you loose this months terraform budget.
For values which are not divisable through 12:
January to November: Add (TPM / 12)
December: Add (TPM / 12) + (TPM % 12)
-Frostregen
Re: [patch] disable/limit terraform
Posted: 05 Oct 2009 05:05
by thepalm
New version of patch which allows for limited terraforming per month.
If in a given month the full terraforming limit is not reached it will carry over to a maximum of 12*the monthly limit.
Re: [patch] disable/limit terraform
Posted: 05 Oct 2009 16:11
by deepblue2k8
Seems to work. Astonishing to see how little you can do with 10 terraforms / month

.
I dont know how or where, but a display of your terraforming count, would be nice.
One suggestion for the "text" of the advanced option? I didn't really get, wheter 1000 = DISABLED means, that I can do no terraforming at all. Or that the limit is disabled?
Maybe (1000 = unlimited) would be a better wording.
And the language file you included did not match the executable file, so I had to compile my own language file
Great work so far!

Re: [patch] disable/limit terraform
Posted: 05 Oct 2009 16:46
by Expresso
errrr... how about making a patch which makes the user able to set the cost of terraforming, instead of is simply limiting terraforming? That would make everyone happy.
This won't make it annoying (translation: fun reducing) to get to a town on the top of a mountain (for example), like this patch will.
Another idea could be to block terraforming the moment the local authorities find you 'appalling', due to you devestating the environment. This is a much more natural solution then providing the player with X terraforms per month.
Re: [patch] disable/limit terraform
Posted: 05 Oct 2009 17:42
by SirkoZ
Nice patch, thepalm, though perhaps it would be better named disable/limit landscaping.
And, no, I don't agree with Expresso here because for costs there are already available at least two new .grf's. So again - nice patch. Perhaps it even gets included and prevents those pesky kids from flooding server maps so often.

Re: [patch] disable/limit terraform
Posted: 05 Oct 2009 17:55
by Bilbo
Expresso wrote:errrr... how about making a patch which makes the user able to set the cost of terraforming, instead of is simply limiting terraforming? That would make everyone happy.
This can be done by newGRF. Unfortunately, NewGRF that changes cost of terraforming changes cost of foundations (those half-tiles that gets automatically built under your construction when the land is not exactly flat) as well. But some patch that will allow controlling these two base costs separately with a NewGRF would be nice :)
Re: [patch] disable/limit terraform
Posted: 05 Oct 2009 18:34
by CommanderZ
Bilbo wrote:Expresso wrote:errrr... how about making a patch which makes the user able to set the cost of terraforming, instead of is simply limiting terraforming? That would make everyone happy.
This can be done by newGRF. Unfortunately, NewGRF that changes cost of terraforming changes cost of foundations (those half-tiles that gets automatically built under your construction when the land is not exactly flat) as well. But some patch that will allow controlling these two base costs separately with a NewGRF would be nice

Increasing cost doesn't really help (unless you increase it like million times), because late-game you always end up with billions of money (whatever currency you use).
Re: [patch] disable/limit terraform
Posted: 06 Oct 2009 08:51
by thepalm
Patch updated: The company screen now shows the amount of terrraforming remaining, also fixed the text so that it says 1000 = unlimited
Re: [patch] disable/limit terraform
Posted: 06 Oct 2009 20:45
by petert
Is this the type of patch that is able to be applied to 0.7.3 and run as a No Terraforming server?
Re: [patch] disable/limit terraform
Posted: 07 Oct 2009 09:52
by thepalm
Is this the type of patch that is able to be applied to 0.7.3 and run as a No Terraforming server?
I had a quick look, most functions have been renamed / are working differently, so I might give this a try on the weekend
Re: [patch] disable/limit terraform
Posted: 07 Oct 2009 19:19
by petert
Great. Thank you.
Re: [patch] disable/limit terraform
Posted: 12 Oct 2009 09:54
by boekabart
Another option, of course, though a lot harder to implement: Make terraforming a slow process, allowing only so much 'sand' to be (re)moved/added per tick...
Re: [patch] disable terraform
Posted: 12 Oct 2009 09:58
by Kogut
planetmaker wrote:EDIT: and please don't just post exe files but complete bundles or at least also the copying information. Your zip is a violation of the GPL.
Why?
//Thanks for answer!
Re: [patch] disable/limit terraform
Posted: 12 Oct 2009 12:08
by Roujin
OpenTTD is licensed under the
GPL. That means you may make copies and derivated works of it, as long as you put them under the same license. This means you have to include the file that says "this is under the GPL license [etc.etc.]".