GEO for Multifruit Maps

Your forum for all discussions around Modding.
jmelvin
Posts: 24
Joined: Tue Jun 16, 2020 3:27 am

GEO for Multifruit Maps

Post by jmelvin »

I have experimented with putting together a GEO for Multifruit maps for my own use. I had to use extra values than what I thought necessary to get the growth patterns I was looking for because of the way the Seasons mod fills things in to spread out fruit growth since most fruits now are ready for harvest only at stage 7.

The GEO I built has values for the standard fruits: wheat, barley, oat, canola, maize, soybean, sunflower, potato, sugarbeet, poplar, grass, oilseedradish, and cotton. I did not include sugarcane. There are also entries for: lettuce, carrot, onion, rye, hops, poppy, spelt, sorghum, sudangrass, peanut, peanut, rice, millet, hemp, blackbean, tobacco, alfalfa, clover, cabbage, and red cabbage. The Seasons mod ignores fruits that aren’t included in a given map’s fruittypes.xml and any extra fruits do not generate log errors.

Rye, wheat, spelt, hops, canola, and poppy are set up as winter season crops (i.e., planting mid-summer or later for harvest the following year. These fruits are set to be frost resistant. Grass, clover, and alfalfa are set for mowing a couple of times a year for multiple years. Drought and frost can cause these three to die back to one of the early growth states but won’t kill the plants entirely. All other fruits are set for planting during various periods of the early part of the year from early spring to early summer. The following shows the planting/harvesting calendar for one of the multifruit maps:
Image

Fruits are set to use minimum soil temperatures for germination that generally match those I found listed for the various crops. I also have tried to set things so the fruits flower and ripen at appropriate seasons. I have set up growth patterns that allow for crops that get planted over the central to northern portion of the US. I know that it isn’t realistic that any given area would have all of the crops that are supported by this GEO but I liked the thought of my farms being able to use so much of the machinery that developers have modded. This also allows for the use of several of the production mods that people have developed.

I have never built a mod for use by others and have no way to test the various nuance of what I have put together. That being said, I would be willing to provide what I have to an experienced modder who knows what it takes to issue something like this.
User avatar
theSeb
Posts: 1517
Joined: Tue Mar 07, 2017 8:16 pm

Re: GEO for Multifruit Maps

Post by theSeb »

To test first use a mod like easy dev controls to "plant" fields, or if you are comfortable with it, use gsSetFieldFruit which is a built in command and does the exact same thing.

Growth manager in Seasons has a bunch of useful console commands to help test growth. rmQuickGrowth will be the most useful

rmQuickGrowth periodNumber


So imagine you are in early spring you can then use one of the methods above to set a bunch of fields to state 1 (germinated). Now instead of having to wait until mid spring and if you just want to test each period transition as quickly as possible type in

rmQuickGrowth 2

assuming you are currently at early spring

1 = early spring
2 = mid spring

and so forth.

Do not simply type in rmQuickGrowth 7 if you want to see what happens ahead of time. The command does not do all the things between where you are and that period

so you would need to type

rmQuickGrowth 2 (enter)
then
rmQuickGrowth 3 (enter)
and so forth until rmQuickGrowth 7

All of these commands take a few seconds for the entire map to update, depending on how speedy your computer is. I recommend to not just type them in in quick succession and hope for the best when you are testing your growth patterns. You can then use the field info to see what is going on in your fields, but even better is the built in field fruit debug viewer. Unfortunately I don't remember the exact command right now.

There isn't much to test for germination. As long as there are no errors and the germination temperatures that you set are showing up in the seasons calendar screen ,then things will germinate at those temperatures.
jmelvin
Posts: 24
Joined: Tue Jun 16, 2020 3:27 am

Re: GEO for Multifruit Maps

Post by jmelvin »

Thank you theSeb for the great information on testing. I had noticed some of the console commands when I was looking through the growth related lua's but was unaware of the gsSetFieldFruit console command and the EasyDevControls mod. I was thinking that I would have to test everything in a drawn out game setting where I would need to buy fields and equipment, plant the fields with various crops, and work through the years.

I've started my testing as you suggested and have seen that I could start various fields with a crop at the germinated state and then use the rmQuickGrowth command specifying the first growth period I think I have a given fruit set to advance to state 2. And, like you noted, there can be a few seconds delay before I see the state change visually.

Besides watching for the visual change, I was also checking the field info. I also purchased the MT-9 measurement tool so I could look at the expanded field info. That tool did provide extra crop info for the standard fruits but registered all the multifruit crops as weeds. I'm not sure if that is because of the way I was advancing states with the gsSetFieldFruit command. I can't remember if I've ever tried to use the MT-9 in a game situation for multifruits. I'll have to check that out when I get back to a regular game.

I do like your testing method where I can quickly walk a few fields with different crops through their paces. I especially liked that I could simulate planting a crop in July and then have it grow to stage 2 in mid-Summer to Late-Summer transition with the following sequence:
use EasyDevControls to set field 6 with rye at sate 1
rmQuickGrowth 6 (which advances rye from st1 to st2 in my GEO)
I could then advance through each transition and watch the field stay at st 2 as I expected until I made the advance from late-winter to early-spring and saw the change to st3 as expected.

I also noted that my GEO has canola working as a winter crop, blooming in late-spring and early-summer and ready to harvest in mid-summer like I hoped.

I'll be testing various fruits over the next couple of days.
User avatar
theSeb
Posts: 1517
Joined: Tue Mar 07, 2017 8:16 pm

Re: GEO for Multifruit Maps

Post by theSeb »

No worries. When you spend so much time writing this you also end up finding the best and quickest ways to test.

You are not the first person to note this with the MT9. We will take a look.
norfolk farmer
Posts: 2318
Joined: Sat Oct 13, 2018 3:36 pm
Location: United Kingdom

Re: GEO for Multifruit Maps

Post by norfolk farmer »

theSeb wrote: Tue Oct 27, 2020 12:09 pm

You are not the first person to note this with the MT9. We will take a look.
Is it sulking and not wanting to fully work because it is no longer called The Wopster :lol: :lol:
User avatar
Wopster
Posts: 163
Joined: Sun Feb 28, 2016 6:30 pm

Re: GEO for Multifruit Maps

Post by Wopster »

That name does not represent work by definition hehe :mrgreen:
jmelvin
Posts: 24
Joined: Tue Jun 16, 2020 3:27 am

Re: GEO for Multifruit Maps

Post by jmelvin »

I have been testing my GEO and run into a snag. I am trying to set up clover to be able to mow twice in a given year in 2nd and later years with 1 cutting during the first year if planted early enough.My GEO was set to allow for planting clover during early spring, advancing to state 2 in mid spring, advancing to state 3 in late spring, advancing to state 4 in early summer, jumping from st4 to st7 (ready for harvest) in mid-summer, taking cut state to st2 in late summer.

I used the following statements in the GEO to accomplish this:
<gt index="1"> <!--late winter to early spring-->
<crop name="CLOVER" incrementByOneRange="2" />

<gt index="2"> <!--early spring to mid spring-->
<crop name="CLOVER" incrementByOneRange="1-3" /> (the range 1-3 is used to allow for the 2nd year growth)

<gt index="3"> <!--mid spring to late spring-->
<crop name="CLOVER" incrementByOneRange="1-2" setRange="4" setTo="7" /> (ready to harvest during 2nd year)

<gt index="4"> <!--late spring to early summer-->
<crop name="CLOVER" incrementByOneRange="1-3" incrementByRange="4" incrementBy="3" setRange="CUT" setTo="2" />

<gt index="5"> <!--early summer to mid summer-->
<crop name="CLOVER" incrementByRange="4" incrementBy="3" incrementByOneRange="1-3" setRange="CUT" setTo="2" />

<gt index="6"> <!--mid summer to late summer-->
<crop name="CLOVER" incrementByRange="4" incrementBy="3" setRange="CUT" incrementByOneRange="1-3" setTo="2" />

<gt index="7"> <!--late summer to early autumn-->
<crop name="CLOVER" incrementByRange="4" incrementBy="3" incrementByOneRange="1-3" setRange="CUT" setTo="2" />

<gt index="8"> <!--early autumn to mid autumn-->
<crop name="CLOVER" incrementByOneRange="2-4" setRange="CUT" setTo="2" />

<gt index="9"> <!--mid autumn to late autumn-->
<crop name="CLOVER" setRange="4-7" setTo="3" /> (simulating die back with onset of cold weather)

<gt index="10"> <!--late autumn to early winter-->
<crop name="CLOVER" setRange="3-CUT" setTo="2" />

<gt index="11"> <!--early winter to mid winter-->
<crop name="CLOVER" setRange="1" setTo="WITHERED" /> (needed to stop planting anytime after late summer)

<gt index="12"/> <!--mid winter to late winter-->
<crop name="CLOVER" setRange="1" setTo="WITHERED" /> (needed to stop planting anytime after late summer)

Note: I have left out the </gt> parts to conserve space in this posting.

It is the late spring to early summer that is giving me trouble. The clover is jumping from st3 do st7. I did a little experimenting and deleted the incrementByRange="4" incrementBy="3" part of my statement and saw the clover advance to st4 as expected. I took a look at the dms_handleGrowth procedure within the seasons growth manager and it looks as if this procedure does the incrementByOne for range 1-3 then increments the new st4 to st7 for the same transition or am I reading the procedure wrong? If that is the case is there a way to accomplish what I am trying to do with clover? (Note: I am using the range 1-3 as part of the scheme to allow for planting clover anytime from early spring to late summer.)
User avatar
theSeb
Posts: 1517
Joined: Tue Mar 07, 2017 8:16 pm

Re: GEO for Multifruit Maps

Post by theSeb »

Yes, the method does indeed do that, so you need to find a different way of achieving your aim.

IncrementByOne is done first, then incrementByRange, then set

If you do something like increment [1] by 1, then increment [2-4] by 3, then set [5] to 6, you will indeed go from 1 to 7 in that period for that crop

in this

Code: Select all

<crop name="CLOVER" incrementByOneRange="1-3" incrementByRange="4" incrementBy="3" setRange="CUT" setTo="2" />
clover at stage 3 will be incrememented to 4 and will then jump to 7. Normally what I would do in this situation is reconsider the growth pattern and use "set" to change 3 to 4 and reconsider whether the setRange CUT can be moved to another period, or rethink the growth using a slightly different approach, if that regrowth from cut is particularly important

Changing the order in the xml won't affect anything. The code does not care what order you have and considering where we are with FS, I won't be changing that in Seasons19 at this late stage, because I just don't have the time and it would not be a trivial change
jmelvin
Posts: 24
Joined: Tue Jun 16, 2020 3:27 am

Re: GEO for Multifruit Maps

Post by jmelvin »

Thank you for the clarification,theSeb. I did figure out different schemes for handling clover and alfalfa allowing for the planting of clover from early spring through late summer and alfalfa from mid spring through late summer. These new schemes tested OK. One can get a single cutting of clover if planted anytime during the spring with 2 possible cuttings in the 2nd and subsequent years. One can get a single cutting of alfalfa planted in mid spring with 2 possible cuttings in the 2nd and subsequent years. I used different schemes because I read somewhere that alfalfa needs a higher minimum soil temperature for germination than clover.

As I look at the transition statements I have in my GEO for several of the crops, they seem to give the right look to the planting/harvesting schedule that I planned. But, I can see that the schemes will not work as intended because of the way the growth manager works. I'll have to go back and rethink things for those crops. It does look like some of the crops will work as intended the way they are set now. Further testing will tell.
jmelvin
Posts: 24
Joined: Tue Jun 16, 2020 3:27 am

Re: GEO for Multifruit Maps

Post by jmelvin »

I have been testing my multifruit GEO with some strange results. Some of the results align with what theSeb agrees is part of the design of the Seasons mod regarding how the growth manager handles the statements for a crop transition (i.e.,: handling incrementByOneRange statements then incrementByRange/incrementBy pairs then setToRange/setTo pairs). But, a given crop seems able to make transitions that don’t match up with the calendar.

I have barley and oat set up to follow the same transitions with planting from early-spring through late-spring and harvestable from mid-summer to early-autumn, unharvested fields withering in mid-autumn. And, the fields worked that way as I slowly walked them through their paces using the rmQuickGrowth command. But, the Seasons Calendar shows these two crops only plantable in early- to mid-spring and harvestable only late-summer to early-autumn. In other words, barley and oat used the pattern I hoped for during my test but this doesn’t match what the calendar shows.

The GEO has the following entries for barley and oat:
<gt index="1"> <!--late winter to early spring-->
(no entries)
<gt index="2"> <!--early spring to mid spring-->
<crop name="BARLEY" incrementByOneRange="1" />
<crop name="OAT" incrementByOneRange="1" />
<gt index="3"> <!--mid spring to late spring-->
<crop name="BARLEY" incrementByOneRange="1-2" />
<crop name="OAT" incrementByOneRange="1-2" />
<gt index="4"> <!--late spring to early summer-->
<crop name="BARLEY" incrementByOneRange="1-3" />
<crop name="OAT" incrementByOneRange="1-3" />
<gt index="5"> <!--early summer to mid summer-->
<crop name="BARLEY" incrementByOneRange="2-4" setRange="5" setTo="7" />
<crop name="OAT" incrementByOneRange="2-4" setRange="5" setTo="7" />
<gt index="6"> <!--mid summer to late summer-->
<crop name="BARLEY" incrementByOneRange="3-4" setRange="5" setTo="7" />
<crop name="OAT" incrementByOneRange="3-4" setRange="5" setTo="7" />
<gt index="7"> <!--late summer to early autumn-->
<crop name="BARLEY" incrementByOneRange="4" setRange="5" setTo="7" />
<crop name="OAT" incrementByOneRange="4" setRange="5" setTo="7" />
<gt index="8"> <!--early autumn to mid autumn-->
<crop name="BARLEY" incrementByOneRange="7" setRange="1-4" setTo="CUT" />
<crop name="OAT" incrementByOneRange="7" setRange="1-4" setTo="CUT" />
(note: used the setRange to make sure they couldn’t reach maturity if planted at other times)
<gt index="9"> <!--mid autumn to late autumn-->
(no entries)
<gt index="10"> <!--late autumn to early winter-->
(no entries)
<gt index="11"> <!--early winter to mid winter-->
<crop name="BARLEY" setRange="1-6" setTo="CUT" />
<crop name="OAT" setRange="1-6" setTo="CUT" />
<gt index="12"/> <!--mid winter to late winter-->
(no entries)

My Test:
1) I used the EasyDevControls to set my first field to have germinated barley.
2) I used rmQuickGrowth 2 to make the early- to mid-spring transition (field went to st2)
3) I used the EasyDevControls to set my second field to have germinated barley
4) I used rmQuickGrowth 3 ( first field to st3, second field to st2)
5) I used the EasyDevControls to set my third field to have germinated barley
6) I used rmQuickGrowth 4 ( first field to st4, second field to st3, third field to st2)
7) I used rmQuickGrowth 5 ( first field to st7, second field to st4, third field to st3)
8) I used rmQuickGrowth 6 ( first field still st7, second field to st7, third field to st4)
9) I used rmQuickGrowth 7 ( first field still st7, second field still st7, third field to st7)
10) I used rmQuickGrowth 8 ( all 3 fields withered)
11) I slowly used rmQuickGrowth 9, rmQuickGrowth 10, rmQuickGrowth 11, rmQuickGrowth 12,
and rmQuick Growth 1 to finish the cycle back through the early-spring transition (fields stayed withered)

Note: My GEO is set to jump the fields from st4 to st7 when I want them to be harvestable. Visually, st4 is an important flowering stage for most crops while stages 5-7 mostly show the same look for a ripe crop with possibly a minor difference in size of the plants.

I used the rmPrintGrowthData command to log pertinent growth data for my GEO. I collected the data for barley and oat from the log.txt file:

table: 0x01dc349ac9f0 {
[1] => table: 0x01dc349ac9f0 {
}
[2] => table: 0x01dc349ac9f0 {
[OAT] => table: 0x01dc63762be0 {
[fruitName] => "OAT"
[incrementByOneMin] => 1
}
[BARLEY] => table: 0x01dc63762be0 {
[fruitName] => "BARLEY"
[incrementByOneMin] => 1
}
[3] => table: 0x01dc349ac9f0 {
[OAT] => table: 0x01dc63763b88 {
[fruitName] => "OAT"
[incrementByOneMax] => 2
[incrementByOneMin] => 1
}
[BARLEY] => table: 0x01dc63763b88 {
[fruitName] => "BARLEY"
[incrementByOneMax] => 2
[incrementByOneMin] => 1
}
[4] => table: 0x01dc349ac9f0 {
[BARLEY] => table: 0x01dc63767a30 {
[fruitName] => "BARLEY"
[incrementByOneMax] => 3
[incrementByOneMin] => 1
}
[OAT] => table: 0x01dc63767a30 {
[fruitName] => "OAT"
[incrementByOneMax] => 3
[incrementByOneMin] => 1
}
[5] => table: 0x01dc349ac9f0 {
[BARLEY] => table: 0x01dc6376c098 {
[fruitName] => "BARLEY"
[incrementByOneMax] => 4
[setFromMin] => 5
[setTo] => 7
[incrementByOneMin] => 2
}
[OAT] => table: 0x01dc6376c098 {
[fruitName] => "OAT"
[incrementByOneMax] => 4
[setFromMin] => 5
[setTo] => 7
[incrementByOneMin] => 2
}
[6] => table: 0x01dc349ac9f0 {
[BARLEY] => table: 0x01dc63911f10 {
[fruitName] => "BARLEY"
[incrementByOneMax] => 4
[setFromMin] => 5
[setTo] => 7
[incrementByOneMin] => 3
}
[OAT] => table: 0x01dc63911f10 {
[fruitName] => "OAT"
[incrementByOneMax] => 4
[setFromMin] => 5
[setTo] => 7
[incrementByOneMin] => 3
}
[7] => table: 0x01dc349ac9f0 {
[BARLEY] => table: 0x01dc63916780 {
[fruitName] => "BARLEY"
[setTo] => 7
[setFromMin] => 5
[incrementByOneMin] => 4
}
[OAT] => table: 0x01dc63916780 {
[fruitName] => "OAT"
[setTo] => 7
[setFromMin] => 5
[incrementByOneMin] => 4
}
[8] => table: 0x01dc349ac9f0 {
[BARLEY] => table: 0x01dc46f41c20 {
[setFromMax] => 4
[setTo] => 200
[setFromMin] => 1
[fruitName] => "BARLEY"
[incrementByOneMin] => 7
}
[OAT] => table: 0x01dc46f41c20 {
[setFromMax] => 4
[setTo] => 200
[setFromMin] => 1
[fruitName] => "OAT"
[incrementByOneMin] => 7
}
[9] => table: 0x01dc349ac9f0 {
[10] => table: 0x01dc349ac9f0 {
[11] => table: 0x01dc349ac9f0 {
[BARLEY] => table: 0x01dc46f4d5a8 {
[fruitName] => "BARLEY"
[setTo] => 200
[setFromMax] => 6
[setFromMin] => 1
}
[OAT] => table: 0x01dc46f4d5a8 {
[fruitName] => "OAT"
[setTo] => 200
[setFromMax] => 6
[setFromMin] => 1
}
[12] => table: 0x01dc349ac9f0 {
[999] => table: 0x01dc349ac9f0 {
[OAT] => table: 0x01dc6392f990 {
[fruitName] => "OAT"
[setTo] => 200
[setFromMax] => 99
[setFromMin] => 1
}
[BARLEY] => table: 0x01dc6392f990 {
[fruitName] => "BARLEY"
[setTo] => 200
[setFromMax] => 99
[setFromMin] => 1
}
Plantable Data (note: this reflects what the calendar shows for oat and barley)
table: 0x01dc349aca80 {
[BARLEY] => table: 0x01dc349aca80 {
[1] => true
[2] => true
[3] => false
[4] => false
[5] => false
[6] => false
[7] => false
[8] => false
[9] => false
[10] => false
[11] => false
[12] => false
}
[OAT] => table: 0x01dc349aca80 {
[1] => true
[2] => true
[3] => false
[4] => false
[5] => false
[6] => false
[7] => false
[8] => false
[9] => false
[10] => false
[11] => false
[12] => false
}
Harvestable Data (note: this reflects what the calendar shows for oat and barley)
table: 0x01dc349acdc8 {
[OAT] => table: 0x01dc349acdc8 {
[1] => false
[2] => false
[3] => false
[4] => false
[5] => false
[6] => true
[7] => true
[8] => false
[9] => false
[10] => false
[11] => false
[12] => false
[13] => false
[14] => false
[15] => false
[16] => false
[17] => false
[18] => false
[19] => false
[20] => false
[21] => false
[22] => false
[23] => false
[24] => false
}
[BARLEY] => table: 0x01dc349acdc8 {
[1] => false
[2] => false
[3] => false
[4] => false
[5] => false
[6] => true
[7] => true
[8] => false
[9] => false
[10] => false
[11] => false
[12] => false
[13] => false
[14] => false
[15] => false
[16] => false
[17] => false
[18] => false
[19] => false
[20] => false
[21] => false
[22] => false
[23] => false
[24] => false
}

I’m not sure what the Seasons growth manager will do with these two crops in a game. The QuickGrowth test looks like my crops will do what I want but the calendar shows a conflicting planting/harvestable cycle.
Post Reply