Patch to buy an area of land

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

xZise
Engineer
Engineer
Posts: 57
Joined: 19 Mar 2009 16:52
Location: Bad Schwartau

Re: Patch to buy an area of land

Post by xZise » 07 Jun 2009 13:04

Great patch for the patch :) I love it :P

Is it possible to implement it into trunk? It is a small feature without big changes in GUI :)

Sincerely
xZise

User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch to buy an area of land

Post by pavel1269 » 07 Jun 2009 13:50

They dont want to see this aptch in trunk, because it will make blocking even easier.

Auge
Route Supervisor
Route Supervisor
Posts: 388
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Patch to buy an area of land

Post by Auge » 07 Jun 2009 15:17

Hello
xZise wrote:
micomico wrote:[...]I think he meant this[...]
Jep I meant this :) Not the border of a tile (did you mean this Auge?)
Yes, but that was clarified by the screenshots from micomico.
pavel1269 wrote:Just wondering, but, whats the difference between buying whole 11x10 lot (not sure if this is the size) or just its borders?
xZise wrote:You don't have to pay for the 9x8 tiles in the borders?
Yes and no. At this moment you only pay for the border tiles. When you build an airport (i.e.) at this place later in the game, you also have to pay for the other tiles inside the rectangle. :-)

Tschö, Auge

xZise
Engineer
Engineer
Posts: 57
Joined: 19 Mar 2009 16:52
Location: Bad Schwartau

Re: Patch to buy an area of land

Post by xZise » 07 Jun 2009 19:00

pavel1269 wrote:They dont want to see this aptch in trunk, because it will make blocking even easier.
And with an option to deactivate this patch? So the admins of the server can shutdown the option, but on private servers the option could be enabled?
Auge wrote:[...]
xZise wrote:
micomico wrote:[...]I think he meant this[...]
Jep I meant this :) Not the border of a tile (did you mean this Auge?)
Yes, but that was clarified by the screenshots from micomico.[...]
Ah okay ;)
Auge wrote:[...]Yes and no. At this moment you only pay for the border tiles. When you build an airport (i.e.) at this place later in the game, you also have to pay for the other tiles inside the rectangle. :-) [...]
I didn't know, that you have to pay for the tile when you build something on it. But there is an other advantage: At the beginning you maybe have not enough money to buy the complete rectangle?

Sincerely
xZise

2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06

Re: Patch to buy an area of land

Post by 2007Alain2007 » 07 Jun 2009 19:12

Its looking better all it realy needs is the setting to turn it on and off
For Community Integrated Version http://code.google.com/p/civopenttd/

SHADOW-XIII
Tycoon
Tycoon
Posts: 13748
Joined: 09 Jan 2003 08:37

Re: Patch to buy an area of land

Post by SHADOW-XIII » 07 Jun 2009 20:48

got an idea for this but might be more difficult to implement:

- no more land buy tags
- buying land creates a fence around it, on area of bought land fence is created around the area, not around each tile
- trees/rocks/other features stays inside tile when tile is bought, but fence is created around the tile (or area)
- land is not destroyed to bare(brown) land, it stays the way it was before buying.
- can use fence from railway for that
what are you looking at? it's a signature!

2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06

Re: Patch to buy an area of land

Post by 2007Alain2007 » 07 Jun 2009 21:42

You can use a railway fence for most of this

Or

You can change how the buy land is set up in other words do it as if you buy railway track just dont lay the track becuse that all redy has the fence that move
For Community Integrated Version http://code.google.com/p/civopenttd/

User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch to buy an area of land

Post by pavel1269 » 08 Jun 2009 06:55

Well, buying the land is currently implemented in that way, you buy land, which you plan to build at, then building there is cheaper. If we would buy land, and only fences around it ... Well, sounds like for a switch for it "Buy land mod: Original/improved (this patch)/sth which will describe fences in one/two words :-P Or make them cooperate in game, the fence one is pure blocking :-) .....

Auge
Route Supervisor
Route Supervisor
Posts: 388
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: Patch to buy an area of land

Post by Auge » 08 Jun 2009 12:14

Hello
xZise wrote:
Auge wrote:[...]Yes and no. At this moment you only pay for the border tiles. When you build an airport (i.e.) at this place later in the game, you also have to pay for the other tiles inside the rectangle. :-) [...]
I didn't know, that you have to pay for the tile when you build something on it.
How to explain ...?

Aaahhyes: Build a railtrack at one tile and keep the costs in mind. You paid for the ownership of the tile and the building costs itself. If you build a additional railtrack on the same tile (i.e. orthogonal to the first railtrack) you will only pay for the building costs.

Tschö, Auge

Eddi
Tycoon
Tycoon
Posts: 7424
Joined: 17 Jan 2007 00:14

Re: Patch to buy an area of land

Post by Eddi » 09 Jun 2009 01:14

Auge wrote:Hello
xZise wrote:
Auge wrote:[...]Yes and no. At this moment you only pay for the border tiles. When you build an airport (i.e.) at this place later in the game, you also have to pay for the other tiles inside the rectangle. :-) [...]
I didn't know, that you have to pay for the tile when you build something on it.
How to explain ...?

Aaahhyes: Build a railtrack at one tile and keep the costs in mind. You paid for the ownership of the tile and the building costs itself. If you build a additional railtrack on the same tile (i.e. orthogonal to the first railtrack) you will only pay for the building costs.

Tschö, Auge
no, that is the clearing cost. you can see the same effect if you bulldoze the land before building the rail, before the grass grows back.
You might not exactly be interested in Ferion, but if you are, have fun :)

micomico
Engineer
Engineer
Posts: 18
Joined: 25 Apr 2007 01:19
Location: Portugal

Re: Patch to buy an area of land

Post by micomico » 15 Jun 2009 18:47

Hello all.

I've been on vacations and unable to comment until now, so here it is:
xZise wrote:[...]
Auge wrote:[...]Yes and no. At this moment you only pay for the border tiles. When you build an airport (i.e.) at this place later in the game, you also have to pay for the other tiles inside the rectangle. :-) [...]
I didn't know, that you have to pay for the tile when you build something on it. But there is an other advantage: At the beginning you maybe have not enough money to buy the complete rectangle?[...]
IMO, the greatest use of buying the border tiles only is blocking city growth, while allowing it to grow inside the borders. I imagine several people do this - be it square by square or with this patch. I think the later is easier and it is a step to reduce this game's tendency to cause RSI.
2007Alain2007 wrote:Its looking better all it realy needs is the setting to turn it on and off
Will see what can be done about that.
SHADOW-XIII wrote:[...]
- no more land buy tags
- buying land creates a fence around it, on area of bought land fence is created around the area, not around each tile
- trees/rocks/other features stays inside tile when tile is bought, but fence is created around the tile (or area)
- land is not destroyed to bare(brown) land, it stays the way it was before buying.
- can use fence from railway for that
Doesn't this all belong in GRF land?

I don't do NFO... yet. I've only done some small changes in existing GRFs for personal use, like changing cargos in vehicles. I won't even talk about my superb art skills. :wink:

User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch to buy an area of land

Post by Bilbo » 15 Jun 2009 20:02

pavel1269 wrote:They dont want to see this aptch in trunk, because it will make blocking even easier.
There are other easy way if you want to block (like using the rail, which have no limitations on length), and even single well-placed "buy land" square can block very annoyingly.

For these purposes, server could be able to limit maximal number of squares (reasonable default would be something like 12x12, which is enough to reserve for intercontinental airport) taken at once (as it is done with trees, you can't place trees in larger chunks than 20x20)

Servers which consider blocking a big problem can set the limit to 1 to get "old" behavior.
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)

micomico
Engineer
Engineer
Posts: 18
Joined: 25 Apr 2007 01:19
Location: Portugal

Re: Patch to buy an area of land

Post by micomico » 16 Jun 2009 01:47

Hello again.
Bilbo wrote:[...]
For these purposes, server could be able to limit maximal number of squares (reasonable default would be something like 12x12, which is enough to reserve for intercontinental airport) taken at once (as it is done with trees, you can't place trees in larger chunks than 20x20)

Servers which consider blocking a big problem can set the limit to 1 to get "old" behavior.
Bilbo's suggestion seemed right to me, so I've made a new version of the patch. There's now an advanced setting under 'Construction': Limit for buying land tiles.

It defines the maximum size of each side of the area that can be bought. The default is 1 - the typical behavior - only one tile can be bought.

The limit can also be disabled, allowing to purchase land at will. If a value is defined, the maximum is 12.

EDIT: Updated patch with German translation.
EDIT2: Fixed bug with selection when limit=1
Attachments
better_buy_area_v071.diff
Patch for v.0.7.1
(10.35 KiB) Downloaded 74 times
better_buy_area_r16616.diff
Patch for rev.16616
(10.4 KiB) Downloaded 93 times
Last edited by micomico on 21 Jun 2009 19:27, edited 2 times in total.

xZise
Engineer
Engineer
Posts: 57
Joined: 19 Mar 2009 16:52
Location: Bad Schwartau

Re: Patch to buy an area of land

Post by xZise » 16 Jun 2009 21:51

Great Idea!

If you want the German translation:

Code: Select all

STR_CONFIG_SETTING_BUYAREALIMIT                                 :{LTBLUE}Limit beim Kauf von Feldern: {ORANGE}{STRING1}
STR_CONFIG_SETTING_BUYAREALIMIT_DISABLED                        :{LTBLUE}Limit beim Kauf von Feldern: {ORANGE}Deaktiviert
Sincerely
xZise

micomico
Engineer
Engineer
Posts: 18
Joined: 25 Apr 2007 01:19
Location: Portugal

Re: Patch to buy an area of land

Post by micomico » 17 Jun 2009 00:25

Hello.
xZise wrote:Great Idea!

If you want the German translation [...]
I've updated the patch with your translation in my previous post.

Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch to buy an area of land

Post by Terkhen » 21 Jun 2009 12:08

I have a bug to report: when the limit is set to one tile and you try to buy dragging the mouse, the game is still waiting for you to release the mouse. This should be ignored to have the same behaviour as trunk when the limit is one. Also, a question. Why does the patch bumps the savegame version?. It does not alters the savegame format in any way.

To finish, I would like to make a suggestion. When pushing CTRL to buy only the borders of the area, the game still highlights all tiles inside even if they won't be bought. Only the border tiles should be highlighted.

micomico
Engineer
Engineer
Posts: 18
Joined: 25 Apr 2007 01:19
Location: Portugal

Re: Patch to buy an area of land

Post by micomico » 21 Jun 2009 19:29

Terkhen wrote:I have a bug to report: when the limit is set to one tile and you try to buy dragging the mouse, the game is still waiting for you to release the mouse. This should be ignored to have the same behaviour as trunk when the limit is one.
I've fixed it. See this post for the new version. The only change is in terraform_gui.cpp, PlaceProc_BuyArea().
Terkhen wrote:Also, a question. Why does the patch bumps the savegame version?. It does not alters the savegame format in any way.
Because there's now a setting that needs to be saved? It seemed the right thing to do. Are you saying it is not needed? What happens when you load a savegame with this setting, in a OTTD without the patch?
Terkhen wrote:To finish, I would like to make a suggestion. When pushing CTRL to buy only the borders of the area, the game still highlights all tiles inside even if they won't be bought. Only the border tiles should be highlighted.
I'll have to look into that. It doesn't seem to be as simple as it sounds.

Yexo
Tycoon
Tycoon
Posts: 3653
Joined: 20 Dec 2007 12:49

Re: Patch to buy an area of land

Post by Yexo » 21 Jun 2009 19:36

micomico wrote:
Terkhen wrote:Also, a question. Why does the patch bumps the savegame version?. It does not alters the savegame format in any way.
Because there's now a setting that needs to be saved? It seemed the right thing to do. Are you saying it is not needed? What happens when you load a savegame with this setting, in a OTTD without the patch?
If you add a new setting that has to be saved, you have to bump the savegame version indeed.

Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch to buy an area of land

Post by Terkhen » 21 Jun 2009 19:49

Okay, now I understand now why the savegame version is bumped. I know that changing the highlighting is not simple: keep it as a low-priority suggestion. And thanks for the quick fix ;)

User avatar
pavel1269
Route Supervisor
Route Supervisor
Posts: 473
Joined: 03 Dec 2006 13:22
Location: Czech Republic
Contact:

Re: Patch to buy an area of land

Post by pavel1269 » 16 Dec 2009 20:54

Here is an update. Not the "better" version, the one without any settings.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests