Community Forum

Mowable custom fruit

Forum Overview >> Scripting

CategoryScripting
Created14.01.2019 15:30


Univerpix Studio (Unknown) 14.01.2019 15:30
Is there a way to make a custom fruit mowable? In FS17 I have to rewrite the processMowerAreas function in mower.lua. But in FS19 this function is not listed in the documentation. Is it possible anyway to mowing custom fruits? Thanks.

Jos Kuijpers (Unknown) 15.01.2019 10:16
If you have a map, and I assume you do, and you changed the fruitTypes.xml to add your fruit type: also add the fruit converter for MOWER and add your fruit. Then it will convert your fruit to whatever is configured. Now it does gras -> windrow, wheat -> straw, barley -> straw and oat -> straw


Univerpix Studio (Unknown) 15.01.2019 11:53
Yes, I did all of these. I made the foliage in the map.i3d. in the fruitTypes.xml I made a fruitType, I added it to the converter, but the mower still not cut my custom grass.
Here is the lines I added to the fruitTypes.xml
<fruitTypes>
...
<fruitType name="myGrass" showOnPriceTable="false" shownOnMap="false" useForFieldJob="false">
<general startStateChannel="0" numStateChannels="4" />
<cultivation needsSeeding="false" allowsSeeding="false" useSeedingWidth="false" directionSnapAngle="0" alignsToSun="false" seedUsagePerSqm="0.02" />
<harvest minHarvestingGrowthState="2" maxHarvestingGrowthState="3" cutState="4" allowsPartialGrowthState="true" literPerSqm="4.37" />
<growth witheringNumGrowthStates="4" numGrowthStates="4" growthStateTime="36000000" resetsSpray="true" groundTypeChangeGrowthState="-1" groundTypeChanged="NONE" growthRequiresLime="false" regrows="true" firstRegrowthState="1" />
<windrow name="grass_windrow" litersPerSqm="4.37" />
<options lowSoilDensityRequired="false" increasesSoilDensity="false" consumesLime="false" startSprayState="1" />
<mapColors default="0.0423 0.1221 0.0252 1" colorBlind="1.0000 0.9473 0.0369 1"/>
</fruitType>
...
</fruitTypes>

<fruitTypeCategories>
...
<fruitTypeCategory name="PICKUP" >GRASS DRYGRASS MYGRASS</fruitTypeCategory>
...
</fruitTypeCategories>

<fruitTypeConverters>
...
<fruitTypeConverter name="MOWER">
...
<converter from="MYGRASS" to="GRASS_WINDROW" factor="1.0" windrowFactor="1.0" />
...
</fruitTypeConverter>
</fruitTypeConverters>

The mower doesn't cut it.


Jos Kuijpers (Unknown) 15.01.2019 16:59
I see, you can't overwrite it... I'll see if I can make a change in the code there.
EDIT: do you have any Warnings in your log? I think it should work

Univerpix Studio (Unknown) 15.01.2019 19:11
Yes. There is an error.about missing fillType. I didn't notice it until now. So that was the problem. Now it works. Thank you.


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