[Patch] Remove Trees [r20180]

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
ReisRyos
Engineer
Engineer
Posts: 11
Joined: 27 Apr 2010 08:50

[Patch] Remove Trees [r20180]

Post by ReisRyos »

Hi,

I viewed the source code of OpenTTD and equal to try to write my first simple patch.
It's a button that removes all trees from the map.
Is visible only in the scenario editor.
Attachments
trees_gui.png
trees_gui.png (12.91 KiB) Viewed 9344 times
remove-trees-v1-r20180.patch
(3.27 KiB) Downloaded 537 times
remove-trees-v1-r20180-win32.rar
(3.85 MiB) Downloaded 325 times
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: [Patch] Remove Trees [r20180]

Post by petert »

ReisRyos wrote:Is visible only in the scenario editor.
Why not in regular gameplay? I would find such a button very useful.
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: [Patch] Remove Trees [r20180]

Post by Arie- »

Well, in regular gameplay there are two reasons to consider when not wanting to see trees:
- Trees unvisible: is possible already
- No trees in the game for real: this would cost money, I haven't looked at the source, but a small test shows something like

Code: Select all

clear_tile_cost = delete_cost + ((num_trees) - 1 * trees_delete_cost)
. Where delete_cost is the cost for clearing a clean tile, num_trees is the number of trees on a tile and the trees_delete_cost is the cost for deleting a single tree. Rocks or rough terrain were not considered in my small test.
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: [Patch] Remove Trees [r20180]

Post by belugas »

petert wrote:
ReisRyos wrote:Is visible only in the scenario editor.
Why not in regular gameplay? I would find such a button very useful.
Well.. You may have all the money required to do so, but I really doubt ALL towns would let you do that.
Remember, your rating decrease on each destruction you do.
Imagine now all the trees available ;)

Plus... well... it's really not something that can be justified by any reasons apart:
crazy scientist wrote:Hey, Look mom! I've developed a weapon of mass destruction! Look what I just did! No more trees!!!
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: [Patch] Remove Trees [r20180]

Post by petert »

belugas wrote:Well.. You may have all the money required to do so, but I really doubt ALL towns would let you do that.
Remember, your rating decrease on each destruction you do.
Imagine now all the trees available ;)
Well, you're right about that. I guess you can just save the game and then convert it to a scenario then remove trees then make it a save again.
belugas wrote:Plus... well... it's really not something that can be justified by any reasons apart:
crazy scientist wrote:Hey, Look mom! I've developed a weapon of mass destruction! Look what I just did! No more trees!!!
Does it really need to be justified?
Arie-
Director
Director
Posts: 593
Joined: 20 Jan 2009 16:07

Re: [Patch] Remove Trees [r20180]

Post by Arie- »

If you call removing all trees "weapon of mass destruction" then the OpenTTD objective #3 as stated in the wiki comes into play:
http://wiki.openttd.org/Objectives wrote:# Provide a game that is free from war themes and conflict; hence suitable for all age groups
JonScaife
Engineer
Engineer
Posts: 17
Joined: 17 Mar 2007 15:34
Location: Sheffield, UK
Contact:

Re: [Patch] Remove Trees [r20180]

Post by JonScaife »

I can offer a "justification"
I've spent ages creating very detailed scenarios (maps). Some of these I did at a time when the scenario editor had no pause option. Now the map is completely full of trees. I would love to be able to remove all the trees as with them there is is both expensive and bad for town ratings to build almost anything.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests