More about weeds.

User avatar
theSeb
Posts: 646
Joined: Tue Mar 07, 2017 8:16 pm

Re: More about weeds.

Post by theSeb » Tue Dec 04, 2018 12:09 pm

Please look at my last post just above.

In a nutshell, when planting crops with plantsWeeds == true, then plant weeds

harvesting removes visible weeds, but also replants them
cultivating replants weeds

subsoiling and ploughing does not replant weeds
536561736f6e732031393a20636f6d696e67207768656e206974e2809973207265616479
http://www.realismusmodding.com

User avatar
Guil
Moderator
Posts: 4445
Joined: Fri Aug 21, 2015 8:43 pm

Re: More about weeds.

Post by Guil » Tue Dec 04, 2018 12:24 pm

So is it a case that cutting the crop drops weeds back into the soil and only ploughing or subsoiling removes them completely until a crop is planted again? Interesting.

User avatar
theSeb
Posts: 646
Joined: Tue Mar 07, 2017 8:16 pm

Re: More about weeds.

Post by theSeb » Tue Dec 04, 2018 12:33 pm

Guil wrote:
Tue Dec 04, 2018 12:24 pm
So is it a case that cutting the crop drops weeds back into the soil and only ploughing or subsoiling removes them completely until a crop is planted again? Interesting.
Indeed, but as soon as you or the AI plant anything that isn't grass, poplar or oilseedradish, then weeds will be replanted.
536561736f6e732031393a20636f6d696e67207768656e206974e2809973207265616479
http://www.realismusmodding.com

User avatar
Guil
Moderator
Posts: 4445
Joined: Fri Aug 21, 2015 8:43 pm

Re: More about weeds.

Post by Guil » Tue Dec 04, 2018 12:33 pm

Good to know, thanks.

User avatar
PoggleBox
Posts: 147
Joined: Tue Nov 20, 2018 10:00 am
Location: UK

Re: More about weeds.

Post by PoggleBox » Tue Dec 04, 2018 12:43 pm

@ Guil - I don't think that's the case entirely. Like I said before, from observation, weeds progress down the map at a set time. I think that depending on the soils state (either plantWeeds=true or Plantweeds=false) then weeds will either germinate or not. Planting crops other than those specified by theSeb above will set the state to true. Harvesting sets it to true as well. I'd suspect ploughing and cultivating must remove any existing weeds but also set the state of the field to true. So that the next infestation can start weeds off growing again.

For me the infestation process starts around 0500 every game day. I don't know if this is the case for every game or every player. I play at mostly 1x speed.
Platform : PC

User avatar
theSeb
Posts: 646
Joined: Tue Mar 07, 2017 8:16 pm

Re: More about weeds.

Post by theSeb » Tue Dec 04, 2018 12:58 pm

I think I explained badly. plantsWeed is per fruit type not per field. That's not how the game works at all. Whether weed germinates or not has nothing to do with plantsWeed. Weed is planted by the actions I mentioned above. It then germinates to the first visible little weeds based on growthStateTime

Fruit type is how crops are defined in the game. Each fruit type has loads of pre-defined data, such as number of growing states, growing time and so forth. One of those parameters is plantWeed.

Code: Select all

2018-11-29 19:11 table: 0x0212ad4b1c58 {
2018-11-29 19:11   [groundTypeChangeGrowthState] => 1
2018-11-29 19:11   [destroyedByRoller] => false
2018-11-29 19:11   [useForFieldJob] => false
2018-11-29 19:11   [alignsToSun] => false
2018-11-29 19:11   [shownOnMap] => true
2018-11-29 19:11   [groundTypeChangeMask] => 62
2018-11-29 19:11   [needsSeeding] => false
2018-11-29 19:11   [directionSnapAngle] => 0
2018-11-29 19:11   [minHarvestingGrowthState] => 2
2018-11-29 19:11   [minForageGrowthState] => 2
2018-11-29 19:11   [witheringNumGrowthStates] => 3
2018-11-29 19:11   [literPerSqm] => 4.3699998855591
2018-11-29 19:11   [minPreparingGrowthState] => -1
2018-11-29 19:11   [startSprayState] => 1
2018-11-29 19:11   [allowsPartialGrowthState] => true
2018-11-29 19:11   [allowsSeeding] => true
2018-11-29 19:11   [numStateChannels] => 4
2018-11-29 19:11   [regrows] => true
2018-11-29 19:11   [numGrowthStates] => 3
2018-11-29 19:11   [windrowLiterPerSqm] => 4.3699998855591
2018-11-29 19:11   [destruction] => table: 0x0212ad4b1c58 {
2018-11-29 19:11                      [state] => 2
2018-11-29 19:11                      [filterEnd] => 4
2018-11-29 19:11                      [filterStart] => 3
2018-11-29 19:11                      [onlyOnField] => false
2018-11-29 19:11                    }
2018-11-29 19:11   [seedUsagePerSqm] => 0.029999999329448
2018-11-29 19:11   [lowSoilDensityRequired] => false
2018-11-29 19:11   [startStateChannel] => 0
2018-11-29 19:11   [fillType] => table: 0x0212ad4b1c58 {
2018-11-29 19:11                   [maxPhysicalSurfaceAngle] => 0.87266462599716
2018-11-29 19:11                   [hudOverlayFilenameSmall] => "dataS2/menu/hud/fillTypes/hud_fill_grass_sml.png"
2018-11-29 19:11                   [previousHourPrice] => 0.045000001788139
2018-11-29 19:11                   [pricePerLiter] => 0.045000001788139
2018-11-29 19:11                   [showOnPriceTable] => false
2018-11-29 19:11                   [fillPlaneColors] => table: 0x0212b10d09a0 {
2018-11-29 19:11                                          [1] => 1
2018-11-29 19:11                                          [2] => 1
2018-11-29 19:11                                          [3] => 1
2018-11-29 19:11                                        }
2018-11-29 19:11                   [totalAmount] => 50000
2018-11-29 19:11                   [title] => "Grass"
2018-11-29 19:11                   [index] => 14
2018-11-29 19:11                   [hudOverlayFilename] => "dataS2/menu/hud/fillTypes/hud_fill_grass.png"
2018-11-29 19:11                   [startPricePerLiter] => 0.045000001788139
2018-11-29 19:11                   [massPerLiter] => 0.00021999999880791
2018-11-29 19:11                   [name] => "GRASS"
2018-11-29 19:11                 }
2018-11-29 19:11   [increasesSoilDensity] => false
2018-11-29 19:11   [plantsWeed] => false
2018-11-29 19:11   [preparedGrowthState] => -1
2018-11-29 19:11   [maxPreparingGrowthState] => -1
2018-11-29 19:11   [missionMultiplier] => 1
2018-11-29 19:11   [consumesLime] => false
2018-11-29 19:11   [resetsSpray] => true
2018-11-29 19:11   [maxHarvestingGrowthState] => 3
2018-11-29 19:11   [name] => "GRASS"
2018-11-29 19:11   [windrowName] => "GRASS_WINDROW"
2018-11-29 19:11   [hasWindrow] => true
2018-11-29 19:11   [index] => 13
2018-11-29 19:11   [groundTypeChanged] => 5
2018-11-29 19:11   [useSeedingWidth] => false
2018-11-29 19:11   [growthRequiresLime] => true
2018-11-29 19:11   [growthStateTime] => 36000000
2018-11-29 19:11   [defaultMapColor] => table: 0x0212ad4b1c58 {
2018-11-29 19:11                          [1] => 0.0423
2018-11-29 19:11                          [2] => 0.1221
2018-11-29 19:11                          [3] => 0.0252
2018-11-29 19:11                          [4] => 1
2018-11-29 19:11                        }
2018-11-29 19:11   [firstRegrowthState] => 1
2018-11-29 19:11   [colorBlindMapColor] => table: 0x0212ad4b1c58 {
2018-11-29 19:11                             [1] => 1
2018-11-29 19:11                             [2] => 0.9473
2018-11-29 19:11                             [3] => 0.0369
2018-11-29 19:11                             [4] => 1
2018-11-29 19:11                           }
2018-11-29 19:11   [layerName] => "grass"
2018-11-29 19:11   [cutState] => 4
2018-11-29 19:11 }
How fields actually work in the game is based on the magic of density maps. This is where the info what crop is in there, what state it is currently in and so forth is stored. The density maps are basically the biggest thing and most unique thing about the FS engine. When you are doing anything to the ground, the density map is modified and synced to all other players, if playing in MP.

The sowing function that is called constantly when you are planting modifies the density map at that world location with info such as seed type and state (a seeder modifies the state to 1, which is planted in the game - the first growth state for any fruit, except for poplar, but I digress). This function also checks plantsWeed for the fruit type selected to be sown and then will set weed to state 1 as well as the actual fruit that you are planting.

Cultivating sets the weed to state 1 and also removes the other fruits

Harvesting removes grown weeds and the crop that you are harvesting and sets the weed state back to 1

I hope that is clearer.
536561736f6e732031393a20636f6d696e67207768656e206974e2809973207265616479
http://www.realismusmodding.com

User avatar
Guil
Moderator
Posts: 4445
Joined: Fri Aug 21, 2015 8:43 pm

Re: More about weeds.

Post by Guil » Tue Dec 04, 2018 1:53 pm

That's fascinating really.

User avatar
PoggleBox
Posts: 147
Joined: Tue Nov 20, 2018 10:00 am
Location: UK

Re: More about weeds.

Post by PoggleBox » Tue Dec 04, 2018 2:09 pm

Yes very interesting. I've just played through 24 hours on a virgin map using accelerated time where possible. I ploughed a field, cultivated a field, Had all the crops planted in strips running north/south. I also had various growth and harvest states spread across the map. Then I fastforward time waiting for the weeds to appear. They started their infestation at 1800 on day 1. Progressing as I've observed before. The only state that wasn't infested was the ploughed field. Cultivated field was infested! As were planted areas in all 4 growth states including grass and oilseed radish! Ready to harvest areas in all 3 states were infested and withered fields were too.

The ONLY area untouched was the ploughed area. I've recorded it and will make a video later.
Each 10x10 sq metre infestation lasts ~ 1 second. The whole map took roughly 6 hours to infest from top to bottom.
Last edited by PoggleBox on Tue Dec 04, 2018 2:11 pm, edited 1 time in total.
Platform : PC

User avatar
PoggleBox
Posts: 147
Joined: Tue Nov 20, 2018 10:00 am
Location: UK

Re: More about weeds.

Post by PoggleBox » Tue Dec 04, 2018 2:18 pm

So you did. Then what is the purpose of plantWeeds=false for oilseed radish, grass and poplar? Planting them on cultivated land results in the area getting weeds anyway.

Edit: replying to a post that has since been removed.
Platform : PC

User avatar
theSeb
Posts: 646
Joined: Tue Mar 07, 2017 8:16 pm

Re: More about weeds.

Post by theSeb » Tue Dec 04, 2018 2:38 pm

plantWeeds makes the difference to what happens when you are actually planting/seeding and nothing else. It does not remove the weed planted if it's already there and that's a bug.

In fact if you have a cultivated field and you let it grow weeds and run over it with a seeder, it just plants right into the weeds. Don't forget, cultivating and harvesting puts weeds in. Harvesting should respect plantsWeed flag for the fruit it's harvesting. So if harvesting grass, weeds will not be replanted. But if harvesting barley, weeds will be replanted.

Image

Ploughing does not replant and it removes the visible weeds. So if you plough after a harvest and then plant something with plantsWeeds = false, then you should not have weeds. But if you cultivate, then you will have weeds because it plants them back in. Planting a fruit with plantWeeds = false should remove the weeds from the weeds density map, but it does not.

I've checked and it's a known issue
Last edited by theSeb on Tue Dec 04, 2018 2:42 pm, edited 1 time in total.
536561736f6e732031393a20636f6d696e67207768656e206974e2809973207265616479
http://www.realismusmodding.com

User avatar
PoggleBox
Posts: 147
Joined: Tue Nov 20, 2018 10:00 am
Location: UK

Re: More about weeds.

Post by PoggleBox » Tue Dec 04, 2018 2:43 pm

Great. That clears it up. Thanks for your very interesting contribution.

That must be a massive amount of information being synced on multiplayer. I'd imagine the density maps must be pretty big structures.
Last edited by PoggleBox on Tue Dec 04, 2018 2:48 pm, edited 1 time in total.
Platform : PC

User avatar
theSeb
Posts: 646
Joined: Tue Mar 07, 2017 8:16 pm

Re: More about weeds.

Post by theSeb » Tue Dec 04, 2018 2:45 pm

Thank you for bringing up the point. It's helpful to the current development of our mod.
536561736f6e732031393a20636f6d696e67207768656e206974e2809973207265616479
http://www.realismusmodding.com

User avatar
Miketeg
Posts: 259
Joined: Tue Nov 01, 2016 1:06 pm

Re: More about weeds.

Post by Miketeg » Tue Dec 04, 2018 2:45 pm

Wow TheSeb, thanks for taking time to post all these information!

User avatar
theSeb
Posts: 646
Joined: Tue Mar 07, 2017 8:16 pm

Re: More about weeds.

Post by theSeb » Tue Dec 04, 2018 2:48 pm

No worries. I am working on weeds in Seasons 19 right now, so it was useful to see what's going on in the base game, vs what I am doing.
536561736f6e732031393a20636f6d696e67207768656e206974e2809973207265616479
http://www.realismusmodding.com

User avatar
PoggleBox
Posts: 147
Joined: Tue Nov 20, 2018 10:00 am
Location: UK

Re: More about weeds.

Post by PoggleBox » Tue Dec 04, 2018 2:52 pm

re: the bug. I would guess that the cultivation status is being updated after the planted seed status. i.e. The grass or whatever is setting plantWeeds=false and then the cultivation is saying plantWeeds=true. If that's any help.
Platform : PC

Post Reply