DeckerMMIV / FarmSim_Mod_SoilMod

Farming Simulator modification - SoilMod
25 stars 14 forks source link

Crops production more then 100% #61

Open damsoc opened 9 years ago

damsoc commented 9 years ago

Maybe add enhancement to make more then 100% yield for crops. Say 115% -125% crop yield if all conditions met (ph, npk, moist etc...). If not all conditions, then yields drop rapidly if more then 2% deviation from optimal. For instance look below. pH soil moisture N PK 6.8 57% x5 x4 = 115-125% (depends if weeds exist or not on field, again only possible if these values true at harvest time) 6.6 57% x5 x4 = 95% (again if weeds exist at time of harvest) 6.6 47% x5 x4 = 95% (again if weeds exist at time of harvest) 6.8 60% x6 x4 = 91% (again if weeds exist at time of harvest) Larger deviation in yield just based on slight change in pH and moisture at time of harvest) This would add something to achieve on crops/fields, have perfect harvest and yield.

Also not sure if you can add detection of previous crop planted on field before or after harvest. "Crop Rotation" more information can be found here. https://en.wikipedia.org/wiki/Crop_rotation Lets say you plant wheat on field 1 and harvest accordingly. If you sow wheat on field 1 more then 2 times consecutively the pH/N/PK and moisture on field 1 is used more per growth cycle then before. Maybe 1.2 times more of each. Think this may add some more depth and realism. From all the discussion i saw that you can not affect individual crop based on soil types (yet)

maybe something to add in future are more fruit types or another layer to soilmod be easier not sure. Genetically modified crops (GMCs, GM crops, or biotech crops) may be added helps reduce pests/weeds/hail etc... however, they may use double NPK, triple water/liquid/higher pH need to produce 100+% yields, a lot more work but the benefits pay off if you manage properly.

Just some thoughts i had while playing your great mod, thanks for all the hard work and please continue your great efforts with this mod. Sorry for the long post, just had this on my mind and wanted to write before i forgot. Happy Farming!!!

DeckerMMIV commented 9 years ago

It is possible already to get more than 100% yield (I hope). Please take a look at these two posts:

For the 'crop rotation', it has been suggested before, but I have yet to figure out a "good method" of implementing it, with the limitations that the game-engine and scripts has. (_I ain't as brilliant as this guy - maybe I can borrow his cap for a while?_ :wink:)

The main problem is; storing/retrieving the past N crops information (i.e. keeping a history) of every square of the terrain. - There is no "terrain history" in the game-engine as of now.

The 'more fruit types with other effects' could however be more easily implemented. Though I would leave that up to the community, to produce the foliage- and crop-graphics needed and also explain how they want that fruit/crop to behave in SoilMod... still within the limits of what SoilMod is currently capable of.

damsoc commented 9 years ago

"The main problem is; storing/retrieving the past N crops information (i.e. keeping a history) of every square of the terrain. - There is no "terrain history" in the game-engine as of now."

How does FS know what crop is planted on which field when viewed by information menu? FS knows what crop is there already, same info maybe applies to "create fields", knows/remembers area that was ploughed to create a field or portion of field i believe. cultivator_density.grle...? How does soilmod detect cultivate vs plough?

Maybe create a "terrain history" like the weeds grle and herbicide/NPK. Or just sheet with few columns for each field. columns maybe. call fieldcrop.grle or CurrentCrop.grle? Associate with a table with "cropfactor". Cropfactor range from highest 1.2 - 0.1 - 1.0 - 0.9 etc...

So lets say we start a new map, with soilmod and all fun stuff. Currentcrop.grle is all black, all cropfactor start 1.2. Now only way to change "reset" field is to plough+NPK+manure using existing soilmod detection. If cultivate, change currentcrop.grle and cropfactor.

Sample scenario You harvest field 1 and field 2, field 3 => currentcrop.grle no change cropfactor Field 1 you plough and add NPK.... => currentcrop,grle field 1 stay black cropfactor=1.2 Field 2 you cultivate + NPK..... => currentcrop.grle field 2 = red, cropfactor =1.1 Field 3 you cultivate + NPK.... => currentcrop.grle field 2 =red , cropfactor =1.0

detect if field is ploughed or cultivate + NPK + manure with current soilmod. ploughed = change field grle to black and reset cropfactor, not plough or cultivate only = grle red and cropfactor reduce 0.1

Advance growth +++days and harvest fields
Field 1 yield 120+% (if current soilmod optimal values exist) (black) Field 2 yield 110+% (if current soilmod optimal values exist) (red) Field 3 yield 110+% (if current soilmod optimal values exist) (red)

2nd harvest and work Field 1 you plough and NPK... - no change to grle, cropfactor 1.2 Field 2 cultivate and sow + NPK - soilmod show only cultivate so grle stay red and cropfactor move up or down this case 1.1 Field 3 cultivate and sow + NPK - soilmod show only cultivate so grle stay red and cropfactor move up or down this case 1.1

detect if field is ploughed or cultivate + NPK + manure with current soilmod. ploughed = change field grle to black and change cropfactor, not plough or cultivate =grle red and cropfactor reduce 0.1

3rd harvest and work Field 1 you cultivate/NPK... - grle =>red , cropfactor 1.1 Field 2 plough/NPK - soilmod show plough so grle black and cropfactor reset to 1.2 Field 3 cultivate and sow + NPK - soilmod show only cultivate so grle stay red and cropfactor move up or down this case to 1

So now based on the "cropfactor" you have history of previous crop if number below 1.2 and is either increase or decrease based on change in colour in currentcrop.grle after soilmod checks for field plough or cultivate. Cropfactor would be less memory calculation.

Using above, player must plough after every harvest (IRL), wait "wait for growth cycle from soilmod to make change to field" then sow for optimal harvest or whatever crop is planted.

Logic sound ok? Not sure sounds "ok" in my mind.

DeckerMMIV commented 9 years ago

"a few columns for each field" is not going to do it, for "crop history/rotation" :wink:

The .GRLE files are actually very huge bit-arrays, containing; terrain_width * terrain_height * numChannels bits. - There is a limit of 16 layers (numChannels) per .GRLE file (i.e. a <FoliageMultiLayer>), so each "square" in the terrain can only hold 16 bits of information at a time.

A "field" will occupy many many "squares" in the terrain, as can be seen when enabling the development controls in FS and going into the wireframe graphics-mode (using F4 or F5, I can't remember exactly).

If I would use the .GRLE files (density) - as I do with the current method for SoilMod's effects - then the memory-requirement would increase even more, with very little gameplay added. - I could attempt at making only a half or quarter width*height .GRLE, but that could potentially make the "grid pattern"-problem reoccur.