Community Forum

Field vs Farmland - Clarification needed

Forum Overview >> Editor

Created29.06.2021 21:04

Cory Rentz (coryrentz) 29.06.2021 21:04
I am completely new to modding, especially with GE/FS. I have been reading a lot of documentation, watching tutorials, and just playing around in GE. I am currently working on the "Loan Oak 19" mod by Bulletbill83 & Oxygendavid. I'd like to do some updating to the field & farmland definitions, as well as some other tweaks.

One of the things that I cannot seem to find a lot of information on is the difference between "fields" & "farmland" and what the mechanics of each one do. Here is what I have gathered so far, and please correct me if I'm wrong:

Farmland - Defines what is shown, or highlighted when selected, in the PDA. It also defines what can be "owned" and "plowable" by the player. It may also define what the AI will see as workable space. When editing or creating a map, 100% of the map must be attributed to an info channel.

Field - Defines what the game engine will auto-create as visible field when the game launches. When editing or creating a map, these only need to be "roughly" defined to the approximate shape of the field.

I had to do some playing around to even figure out all of that as I could not find definitions anywhere. What confuses me is what the game engine decides to put down in the "field" when it's auto-generated. Is that based on what textures are placed? Random? Script? Other? If you can do things outside of the "field" area, but within the "farmland" area, does it even matter if "fields" are defined? Or if maybe only 75% of it is defined (making corners a lot easier to define)?

As for farmlands, they seem fairly straight-forward. However, I do still have some questions. Does info channel "0" equate to farmland "1"? So then info channel "63" is really farmland "64"? How do I define the "neutral" zone in the game? (The space that cannot be bought by the player.) In the current "Loan Oak 19" mod, it would appear that what they meant for the "neutral" zone can actually be purchased for $0. Seems a little odd to be able to purchase all the areas not otherwise defined as farmland. From the videos I watched, it was recommended to use info channel 63 for the "neutral" zone, but the "Loan Oak 19" mod has it as 0... not sure if that's why it's purchasable?

Thank you in advance to everyone that can shine some light on my questions!

Bilbo Beutlin (BBeutlin) 29.06.2021 22:29
Your conclusions concerning fields/farmlands are right.
Keep in mind that fields are not fixed forever, but can be expanded by a player.

The farmland index refers directly to the bitmask. So if you have 'painted' with bitmask ..0001 the index in "farmlands.xml" is <farmland id="1"
The total number of farmlands is determined by the map's <InfoLayer name="farmland" numChannels=.. />
So 2^numChannels - 1 is the maximum. The index/bitmask 0 as well as maximum should be reserved for system purposes like "common to all" or "unbuyable". All other is bad style (though it's possible).

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