Community Forum

define Fruit variant for missions

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created01.02.2021 22:06


Ludovic Boudehen (lboudehen) 01.02.2021 22:06
Hello
I search where define the variant of the different fruits used in missionVehicle.xml file:
For example:
I have new fruit onion or carrot in fruitTypes.xml as:

<fruitType name="onion" shownOnMap="true" useForFieldJob="true" >
<general startStateChannel="0" numStateChannels="4" />
<cultivation needsSeeding="true" allowsSeeding="true" useSeedingWidth="false" directionSnapAngle="0" alignsToSun="false" seedUsagePerSqm="0.07" />
<harvest minHarvestingGrowthState="9" maxHarvestingGrowthState="9" cutState="8" allowsPartialGrowthState="false" literPerSqm="4.5" />
<growth witheringNumGrowthStates="8" numGrowthStates="7" growthStateTime="24000000" resetsSpray="true" groundTypeChangeGrowthState="-1" groundTypeChanged="NONE" growthRequiresLime="true" />
<preparing outputName="onion_haulm" minGrowthState="4" maxGrowthState="6" preparedGrowthState="9" />
<options lowSoilDensityRequired="true" increasesSoilDensity="false" consumesLime="true" startSprayState="0" />
<destruction filterStart="2" filterEnd="7" state="8" />
<mapColors default="0.4001 0.1001 0.7401 1" colorBlind="0.3864 0.3396 0.0340 1"/>
</fruitType>

I want to define the variant type for ONION for use in missionVehicle.xml
Like this:

<missionVehicles>
<mission type="harvest">
<!-- ONION -->
<group fieldSize="large" variant="ROOT">
<vehicle filename="import/vehicles/terraDosT4_40.xml" /><!-- combine -->
<vehicle filename="import/vehicles/holmerHR12.xml" /> <!-- header -->
<vehicle filename="$data/vehicles/tatra/tatraPhoenix/tatraPhoenix.xml" /> <!-- tractor -->
<vehicle filename="$data/vehicles/krampe/SB3060/SB3060.xml" /> <!-- trailer -->
</group>
</mission>
</missionVehicles>

Define somewhere:
ROOT = onion; carrot

but how and where?

Thank for your help.

Bilbo Beutlin (BBeutlin) 01.02.2021 23:28
For 'variant' you can specify a single fruitType or probably (not tested) a fruitTypeCategory defined in the map's "fruitTypes.xml".
I'd guess the variant "GRAIN" is assumed as default since not specified otherwhere.

Ludovic Boudehen (lboudehen) 02.02.2021 15:43
thank for responding but, it does not work for me.

I test for use single fruitType for onion.

<group fieldSize="small" variant="onion">
<vehicle filename="import/vehicles/terraDosT4_40.xml" /><!-- combine -->
<vehicle filename="import/vehicles/holmerHR12.xml" /> <!-- header -->
<vehicle filename="$data/vehicles/tatra/tatraPhoenix/tatraPhoenix.xml" /> <!-- tractor -->
<vehicle filename="$data/vehicles/krampe/SB3060/SB3060.xml" /> <!-- trailer -->
</group>

But I have vehicle of grain mission.

I test for fruitTypeCategory, I add root
<fruitTypeCategories>
<fruitTypeCategory name="GRAINHEADER" >MILLET WHEAT BARLEY OAT CANOLA SOYBEAN</fruitTypeCategory>
<fruitTypeCategory name="MAIZEHEADER" >HEMP HOPS CORN MAIZE SUNFLOWER</fruitTypeCategory>
<fruitTypeCategory name="MAIZECUTTER" >HEMP HOPS CORN MAIZE</fruitTypeCategory>
<fruitTypeCategory name="DIRECTCUTTER" >MILLET ALFALFA GRASS WHEAT BARLEY OAT CANOLA SOYBEAN</fruitTypeCategory>
<fruitTypeCategory name="PICKUP" >HEMP ALFALFA GRASS DRYGRASS</fruitTypeCategory>
<fruitTypeCategory name="SOWINGMACHINE" >ONION CARROT MILLET ALFALFA WHEAT BARLEY OAT CANOLA SOYBEAN OILSEEDRADISH GRASS</fruitTypeCategory>
<fruitTypeCategory name="SUGARCANE_PLANTER" >SUGARCANE</fruitTypeCategory>
<fruitTypeCategory name="PLANTER" >HEMP HOPS CORN MAIZE SUNFLOWER SOYBEAN SUGARBEET COTTON</fruitTypeCategory>
<fruitTypeCategory name="WEEDER" >OILSEEDRADISH GRASS</fruitTypeCategory>
<fruitTypeCategory name="ROOT" >ONION CARROT</fruitTypeCategory>
</fruitTypeCategories>

And I change in missionVehicle

<group fieldSize="small" variant="ROOT">
<vehicle filename="import/vehicles/terraDosT4_40.xml" /><!-- combine -->
<vehicle filename="import/vehicles/holmerHR12.xml" /> <!-- header -->
<vehicle filename="$data/vehicles/tatra/tatraPhoenix/tatraPhoenix.xml" /> <!-- tractor -->
<vehicle filename="$data/vehicles/krampe/SB3060/SB3060.xml" /> <!-- trailer -->
</group>

Same thing, onion have grain mission.

Do you know of a card for which personalized fruits are used in missions that I could download as an example?


Bilbo Beutlin (BBeutlin) 02.02.2021 18:31
Then a fruitTypeCategory is not supported. You have to use variant="ONION". This is since all fruit names are internally converted to uppercase for index.
Pay attention that you have defined for all 'fieldSize' groups. Undefined will fall back to "GRAIN".

As map with custom "missionVehicle.xml" I just remember "Hopfach", but there should be some more.

Ludovic Boudehen (lboudehen) 02.02.2021 21:50
Thank a lot for responding.
I write this in missionVehicle.xml:
<mission type="harvest">
<!-- ONION -->
<group fieldSize="small" variant="ONION">
<vehicle filename="import/vehicles/terraDosT4_40.xml" /><!-- combine -->
<vehicle filename="import/vehicles/holmerHR12.xml" /> <!-- header -->
<vehicle filename="$data/vehicles/tatra/tatraPhoenix/tatraPhoenix.xml" /> <!-- tractor -->
<vehicle filename="$data/vehicles/krampe/SB3060/SB3060.xml" /> <!-- trailer -->
</group>
<group fieldSize="medium" variant="ONION">
<vehicle filename="import/vehicles/terraDosT4_40.xml" /><!-- combine -->
<vehicle filename="import/vehicles/holmerHR12.xml" /> <!-- header -->
<vehicle filename="$data/vehicles/tatra/tatraPhoenix/tatraPhoenix.xml" /> <!-- tractor -->
<vehicle filename="$data/vehicles/krampe/SB3060/SB3060.xml" /> <!-- trailer -->
</group>
<group fieldSize="large" variant="ONION">
<vehicle filename="import/vehicles/terraDosT4_40.xml" /><!-- combine -->
<vehicle filename="import/vehicles/holmerHR12.xml" /> <!-- header -->
<vehicle filename="$data/vehicles/tatra/tatraPhoenix/tatraPhoenix.xml" /> <!-- tractor -->
<vehicle filename="$data/vehicles/krampe/SB3060/SB3060.xml" /> <!-- trailer -->
</group>

But same result
I have test hopfach but no harvest mission or sow appear.
I don’t know where I have wrong.
Thank again.


Bilbo Beutlin (BBeutlin) 02.02.2021 22:22
Make sure, the paths to your mod vehicles are correct. Unluckily you can't use $mapdir$, so you must use relative paths.
Let's say, the "missionVehicle.xml" is in your map's root folder "maps", the mod vehicles in "mods". So you must write the path like
<vehicle filename="../mods/thisMod/thisVehicle.xml"

Just to go sure: the entry in "map.xml" is right and points to your custom "missionVehicle.xml"?

Ludovic Boudehen (lboudehen) 02.02.2021 23:41
Yes, missionVehicle.xml works correctly.

If I add <vehicle filename="import/vehicles/terraDosT4_40.xml" />
Like
<group fieldSize="large" variant="HAY">
<vehicle filename="import/vehicles/terraDosT4_40.xml" />
<vehicle filename="$data/vehicles/fendt/fendt900/fendt900.xml" > <!-- tractor -->
<configuration name="motor" id="3" />
</vehicle>
<vehicle filename="$data/vehicles/poettinger/poettingerNovaCatX8/poettingerNovaCatX8.xml" /> <!-- mower -->
<vehicle filename="$data/vehicles/poettinger/poettingerNovaCat301/poettingerNovaCat301.xml" /> <!-- mower -->
<vehicle filename="$data/vehicles/agco/weight650/weight650.xml" /> <!-- weight -->
<vehicle filename="$data/vehicles/lely/hibiscus1515CdProf/hibiscus1515CdProf.xml" /> <!-- windrower -->
<vehicle filename="$data/vehicles/kuhn/kuhnLSB1290D/kuhnLSB1290D.xml" /> <!-- baler -->
<vehicle filename="$data/vehicles/poettinger/poettingerHit1214T/poettingerHit1214T.xml" /> <!-- tedder -->
<vehicle filename="$data/vehicles/arcusin/arcusinFSX6372/arcusinFSX6372.xml" /> <!-- flatbed -->
</group>

I find my terra holmer in first position of vehicle
in case of error their not vehicle in mission but in my case mission choose grain vehicle.


Ludovic Boudehen (lboudehen) 02.02.2021 23:42
i was on CantabriaInfinita map

Bilbo Beutlin (BBeutlin) 03.02.2021 00:15
hmm .. curious.
I have no idea what should be wrong at yours.
However, I've noticed in a few cases that today some methods related to external map.xml files don't work anymore (like before).
Looks to me that something was changed in several path resolving and/or order of processing. But instead of improvement it was only made worse. So it seems custom fruitTypes like your "ONION" are unknown at time of missionVehicles processing and can't be assigned.
And IMO the FS path resolving is partially buggy, at least complete inconsistent. Just when using cross-references default $data vs. custom map files.

Alright - all things are going worse nowadays. *g*

Ludovic Boudehen (lboudehen) 03.02.2021 19:18
Hello
I have test for POPLAR and with, I have no harvest mission.
Do you think dev teams can help us?
I don't like to give up so easily.
Thank for your help.


Bilbo Beutlin (BBeutlin) 03.02.2021 22:36
Are you sure, you have set in the map's "fruitTypes.xml" for the wanted fruit useForFieldJob="true"?

If so, then my suspect seems right and the missionVehicles.xml is processed before the fruitTypes.xml. That was of course a bug.

Ludovic Boudehen (lboudehen) 03.02.2021 23:05
yes i have change useForFieldJob="true" and add mission for POPLAR to all size of field and all my field was poplar, but never have harvest mission.

I think like you, there is a bug but I would have really liked to make contracts with new cultures especially for new games starting from scratch. do you think this will be fixed in the near future?

Bilbo Beutlin (BBeutlin) 03.02.2021 23:16
For reporting the bug you can use the official Giants bugtracker, see
https://forum.giants-software.com/viewtopic.php?f=964&t=168424
Perhaps the affair is notified already.


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