Community Forum

Editing Buyable land

Forum Overview >> Editor

CategoryEditor
Created06.01.2019 00:14


T Walton (Unknown) 06.01.2019 00:14
I'm trying to setup a map where its basically a blank farmland map. I want to designate farm area that the player can purchase in small chunks and then after they have their lands purchased (which is basically a grass field) they can then use their own plows and create their farmland.

I'm having issues finding how to configure where the "buyable" land is located and setup, and separated for the player to purchase in the editor and how I can draw those areas up. Where exactly is that in 8.1.0?

Also, is there a way to configure how much the land is or is that pre-defined by the area purchased based on the drawn area (IE $1000/acre or something)?

Thanks

Bilbo Beutlin (BBeutlin) 06.01.2019 02:11
Basics:
The farmlands are defined by an "infoLayer". In GE enable infoLayer paint mode, select info layer "farmland". Since GE 8.1 you may select farmland number easily by pull-down menu. The bitmask in binary represents the decimal number. Unluckily the bitmask is displayed in reverse order, with bit 0 first, but in binary bit 0 is the right, lowest bit.
The highest number represents non-buyable land and is depending on depth/channels of layer, usually numChannels=6 -> highest=63. It is calculated by 2 ^ (numChannels) - 1.

This farmland infoLayer is saved as "mapXX_farmland.grle" (in subfolder mapXX). You can use the GRLE converter to get a PNG, which you can edit with usual paint program. If you save it after editing, simply delete the old GRLE to force using the PNG instead.

To each layer number n you have painted, must exist the appropriate entry <farmland id="n" .. in the "mapXX_farmlands.xml". Here you can also define the price by
<farmlands .. pricePerHa="x" > <!-- this is the global price x (per hectar) -->
and
<farmland id=".." priceScale="y" .. /> <!-- this is the individual price factor y -->

Though you can name the files arbitrary, you should use the habitual notations, else you must change a lot of entries in other files (xml and i3d).


Note: Log in to post. Create a new account here.