Patch: Forbid rocks terraforming
Moderator: OpenTTD Developers
Patch: Forbid rocks terraforming
I made a new patch that can be used to make some challenging games where you cannot terraform/build on some areas.
Basically it forbids you to do anything that removes rocky tiles (as clearing the tiles, building something on them, terraforming them up/down).
It comes with a patch option to enable/disable.
I've also made a second patch option to forbid tunnelling under rocky tiles (makes most sense in combination with the first option).
edit: removed, see some posts below.
Basically it forbids you to do anything that removes rocky tiles (as clearing the tiles, building something on them, terraforming them up/down).
It comes with a patch option to enable/disable.
I've also made a second patch option to forbid tunnelling under rocky tiles (makes most sense in combination with the first option).
edit: removed, see some posts below.
Last edited by Roujin on 17 May 2008 18:08, edited 1 time in total.
Re: Patch: Forbid rocks terraforming
Yay! Multiplayer lame-all-map-levellers stopper!
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: Patch: Forbid rocks terraforming
what a great idea! Roujin you are truly extraordinary
I don't know how to compile, so I cannot test it, but I have a few questions that come to mind: are each of the restrictions configurable (forbid each listed action separately, e.g only terraform, only tunnels, or only building and tunnels but not terraform). But in all cases the buy land shouldn't be allowed on them, neither should the dynamite tool. And make it so that when anything built on it is removed, the rock reappears (or else it would allow "cheating" to overcome the patch restriction)
Is this already done? If not, is it doable, or too complicated/not worth it?
I don't know how to compile, so I cannot test it, but I have a few questions that come to mind: are each of the restrictions configurable (forbid each listed action separately, e.g only terraform, only tunnels, or only building and tunnels but not terraform). But in all cases the buy land shouldn't be allowed on them, neither should the dynamite tool. And make it so that when anything built on it is removed, the rock reappears (or else it would allow "cheating" to overcome the patch restriction)
Is this already done? If not, is it doable, or too complicated/not worth it?
I am little, ugly, and nasty. How do you do?
Re: Patch: Forbid rocks terraforming
The two things "tunnel under" and "remove rocks" are completely independant. Everything that removes rocks though (= build something on it; dynamite; terraform; buy land) is either allowed or forbidden.cmoiromain wrote:what a great idea! Roujin you are truly extraordinary
I don't know how to compile, so I cannot test it, but I have a few questions that come to mind: are each of the restrictions configurable (forbid each listed action separately, e.g only terraform, only tunnels, or only building and tunnels but not terraform). But in all cases the buy land shouldn't be allowed on them, neither should the dynamite tool. And make it so that when anything built on it is removed, the rock reappears (or else it would allow "cheating" to overcome the patch restriction)
Is this already done? If not, is it doable, or too complicated/not worth it?
It is not really doable with moderate effort to have rock reappear when removing something that was built on it. That is because currently no information is stored what kind of clear land there was before something was built on it. In fact, it is implicitly cleared before building something on it.
And due to that, it doesn't really make sense to seperate "build on it", "dynamite", "terraform" and "buy land" (and whatever more functions there might be that I haven't thought about. Because you could abuse building something on it then removing it again to make it clear.
Thanks for your ideas though

Oh, something that came to my mind: should I maybe limit it to players? Because right now towns arent't allowed to remove them either, which could restrict them in their growth... don't know if that's desirable or not...
edit: yes, definately need to restrict it a bit.. just checked, and you can't remove them in scenario editor either, should fix that ^^
AND not even water is able to remove rocks if it tries to flood them. Now that's what I call some sturdy rocks

Re: Patch: Forbid rocks terraforming
While this is a nice patch and all it doesn't at all mean that flooding is not possible because of position of the rocks is not on hill/mountain-tops.Mchl wrote:Yay! Multiplayer lame-all-map-levellers stopper!
Roujin - could you instead make a non-flooding patch by limiting how many tiles in depth and how many tile area a player is allowed to modify _only_ around his infrastructure = road/rail/airport. Could also be configurable per infrastructure type.
As an avid anti-flooder I would appreciate such a patch very much.
Oh


S/Z
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Patch: Forbid rocks terraforming
Nice patch. But the patch part concerning the tunnels doesn't compile:
Code: Select all
/Users/ingo/ottd/trunk/src/tunnelbridge_cmd.cpp: In function 'CommandCost CmdBuildTunnel(TileIndex, uint32, uint32, uint32)':
/Users/ingo/ottd/trunk/src/tunnelbridge_cmd.cpp:518: error: 'tile' was not declared in this scope
/Users/ingo/ottd/trunk/src/tunnelbridge_cmd.cpp:518: error: 'CLEAR_ROCKS' was not declared in this scope
/Users/ingo/ottd/trunk/src/tunnelbridge_cmd.cpp:518: error: 'IsClearGround' was not declared in this scope
make[1]: *** [tunnelbridge_cmd.o] Error 1
make: *** [all] Error 2
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Patch: Forbid rocks terraforming
heh, seems I didn't make a new .diff after fixing
here's the right one now...

- Attachments
-
- forbid_rocks_terraform_v2.diff
- forbid rocks terraforming v2
- (5.13 KiB) Downloaded 130 times
Re: Patch: Forbid rocks terraforming
I think prohibiting destruction of rocks is good but could it not be too prohibitive. There are many routes built through very mountainous areas that are blasted through a rock face. I'm not sure what I'm getting at here but maybe you are being too prohibitive*.
*Within the confines of the current set up of TTD I'm not sure how you could make it less extreme than either total destruction or no building whatsoever.
*Within the confines of the current set up of TTD I'm not sure how you could make it less extreme than either total destruction or no building whatsoever.
Re: Patch: Forbid rocks terraforming
Being from Norway, I find this patch sort of strange... Almost every means of transport in this country are built in or on rocky land, which illustrates that this is both possible and quite common in Norway. I'd say the same goes for Switzerland... Building on rocks requires heavier tooling and more time and money than building on dirt or sand, but is not downright impossible. I don't think it should be in the game either...
Re: Patch: Forbid rocks terraforming
I understand that this is neither realistic, nor a candidate for trunk inclusion. It is rather a "hack" to be able to make games where it is forbidden to alter certain areas.
Once I made a scenario myself with pseudo-realistic mountains with rocks placed on them and I thought "now these shouldn't be flattenable by the player in game"... that's where the idea for this patch originally came from.
I have talked to the guys planning the next WWOTTDGD and they were interested in this behavior, so I contribute this patch to their event. And of course anyone who would like to use it is free to, as well. But I'm not forcing anyone - if you don't want this, don't use it...
(even if it were to go in trunk, it still has a switch to turn on/off..
)
Ameecher: The only way to make it "a bit prohibitive, but not completely" in my opinion is raising the costs. This can be done without problems with a .grf if I'm not mistaken. I think I've even seen .grfs to make terraforming actions expensive...
Once I made a scenario myself with pseudo-realistic mountains with rocks placed on them and I thought "now these shouldn't be flattenable by the player in game"... that's where the idea for this patch originally came from.
I have talked to the guys planning the next WWOTTDGD and they were interested in this behavior, so I contribute this patch to their event. And of course anyone who would like to use it is free to, as well. But I'm not forcing anyone - if you don't want this, don't use it...
(even if it were to go in trunk, it still has a switch to turn on/off..

Ameecher: The only way to make it "a bit prohibitive, but not completely" in my opinion is raising the costs. This can be done without problems with a .grf if I'm not mistaken. I think I've even seen .grfs to make terraforming actions expensive...
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Patch: Forbid rocks terraforming
These approaches are also included in our wwottdgd patch; look at the wwottdgd wiki page to find both, grf and patch. But as money is no issue after some time, we would like some possibility to make sure that mountain ranges remain mountain ranges without big channels blasted through them.Roujin wrote:The only way to make it "a bit prohibitive, but not completely" in my opinion is raising the costs. This can be done without problems with a .grf if I'm not mistaken. I think I've even seen .grfs to make terraforming actions expensive...
As for Roujin, the reasons to include it in our patch, are just the same. And choosing rocks as an undestructible tile, just like light houses, makes for more realistically looking landscapes

OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Who is online
Users browsing this forum: No registered users and 4 guests