This page is all about adding new/additional foliage types and fruit types to a mod map.
There are effectively two different kinds of foliage types in the game:
- Decorational foliage types - foliage like eg bushes that does not grow and cannot be planted/sown
- Fruit types - foliage that can be planted/sown, grows and can eventually be harvested
Adding them to the map is very similar for both, though the foliage xml requires more information for fruit types and fruit types also need to be added to the fruitTypes xml which is optional for decorational foliage.
Additionally fruit types also require a matching fill type with the same name as the fruit type (see Adding Fill Types for information on how to add that).
Fruit types will also need custom effects for harvesting etc. This page does not cover effects! There will be a separate page for the effects in the future.
Foliage types require multiple different files to be created to add them to a map. The following are the important files that this tutorial focuses on, but additionally to them texture files for all the foliage types and potential growth stages are required as well.
- foliage xml - the xml file for your foliage type (eg wheat.xml for wheat)
- foliage i3d - the i3d file for your foliage type (eg wheat.i3d for wheat)
- map.i3d - the i3d file for your map
- densityMap_fruits - the density map file for foliage on your map (this is located in the data folder of your map)
- maps_fruitTypes.xml - the xml that tells the game about fruit types you have added
- map.xml - the xml file for your map (this will only need a minor edit when you do not have a custom maps_fruitTypes.xml yet)
To organise all the files properly you should create (unless you already have it) a folder called "foliage" in your mod. Inside of this folder now create a new folder with the name of the new foliage type (eg "millet") in all lower case letters. When your foliage type has more then one word the convention for naming the folder is to make the first letter of every word except for the first word capital and no spaces in the name (eg a folder for a foliage type called "wild forest flowers" would be named "wildForestFlowers"). This folder will ultimately contain the foliage xml, the foliage i3d and all textures for that foliage type.
The following sections of this tutorial will handle one of the files and its contents or changes to it at a time.
Foliage i3d
The foliage i3d is a i3d file (with accompanying i3d.shapes) in the folder of your specific foliage type and is named like your foliage type (eg wheat.i3d).

This i3d contains the shapes for all growth stages or different plants in this foliage type and LODs for each. These shapes have the fruitGrowthFoliageShader and have the relevant foliage textures assigned. This includes a alphaMap which is a grayscale texture that tells the game which parts of the texture should be transparent and which should not. This is necessary as foliage diffuse textures do not contain an alpha channel.
For some custom foliage types, like new grain types like triticale or millet, you can copy the i3d from a basegame foliage type thats similar, like wheat or barley and then just change the textures for your new foliage type. For other new foliage types, especially when it is something very different from any basegame foliage type, you may need to create your own shapes for it in a 3d modeling program like blender.
For fruit types, the foliage i3d contains only one type of foliage (the fruit type - eg millet), but all of the growth stages of this fruit type.
For decorative foliage types, since it does not grow, it does not have growth stages. Instead a single foliage xml can contain multiple different plants (eg all the basegame bushes are in the same foliage i3d).
The screenshot shows the structure of a foliage i3d as seen in GE.
Foliage xml
The foliage xml is the second most important file for a custom foliage type. The file should be named with the name of your foliage type in lower case letters (eg millet.xml) and should be located in the folder for your specific foliage type, next to the foliage i3d.
The foliage xml is also quite different between decorational foliage types and fruit types (crops). Follow the applicable subsection below.
Decorational foliage types
The foliage xml for a decorational foliage type contains the information about all separate foliages included in the foliage i3d. As stated above, the foliage i3d for decorational foliage types can contain more then one foliage type. For decorational foliage a single foliage type can even consist of multiple shapes from the i3d. All of this is defined in the foliage xml.
Foliage Type
The foliage xml begins with a opening foliageType tag, which can have a optional distanceTexturePath parameter, in case the distance textures are located in a different folder. Here is an example of this line:
<foliageType distanceTexturePath="distance">
Foliage Layer
Inside the foliageType tag is a foliageLayer tag, the opening tag of which contains the parameters densityMapChannelOffset, which you would basically always want to set to 0, numDensityMapChannels which is usually set to 4, numBlocksPerUnit which sets a default for the rest of the file and specifies how often the shapes from the i3d are repeated in a fixed area (higher number = individual plants are closer together) and shapeSource which takes the name of the foliage i3d and, if the foliage i3d is in a different folder then the xml, the path to the i3d.
This is an example of this line:
<foliageLayer densityMapChannelOffset="0" numDensityMapChannels="4" numBlocksPerUnit="2.5" shapeSource="decoFoliageEU.i3d">
FoliageStateDefaults
Next is the foliageStateDefaults tag with the following parameters:
- distanceMapLayer, should usually be set to 0
- width, this is the width of a single plant of your foliage in meters. it should be approximately equal to the width of the foliage shape in the i3d. if you copied a basegame i3d and just gave it new textures, look at the xml for the basegame foliage type that you copied the i3d from and take the value used there.
- height, this is the height of a single plant of your foliage in meters. Analog to the width it should match the size of the shape in the i3d and you can get a value from a basegame foliage xml if you copied the basegame foliage i3d earlier.
- widthVariance, this determines how much the game is allowed to increase or decrease the width of individual plants randomly to make the foliage look more realistic. Setting this to 0 will effectively disable this random scaling that the game does otherwise, but it may make the foliage look very repetitive.
- heightVariance, similar to widthVariance, but effecting the height of the individual plants rather then the width.
- horizontalPositionVariance, determines how much at maximum the game may deviate from its internal grid when positioning each individual plant. The game places plants on a fixed grid, but applies a random small offset to this grid to each individual plant to make it look realistic. This value determines how large at most this offset may be. Setting this to 0 makes all plants of this foliage type line up exactly on the grid.
This an example of a foliageStateDefaults line:
<foliageStateDefaults distanceMapLayer="0" width="1.0" height="1.0" widthVariance="0.25" heightVariance="0.35" horizontalPositionVariance="0.3" />
FoliageLodDefaults
After this we have the foliageLodDefaults of which there are usually 2, one for lod0 and one for lod1. You will most likely keep these at their default parameters, though you may change the viewDistance for the lods depending on your foliage type. For example a large bush should probably have greater view distances then a bit of grass on its lods.
Here are the foliageLodDefaults for basegame decoFoliage:
<foliageLodDefaults lod="0" viewDistance="18" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1" />
<foliageLodDefaults lod="1" viewDistance="80" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1" />
FoliageStates
Now follows the main part of the foliage xml: The foliageState definitions.
Each different type of plant and/or mix of plants has a foliageState definition. The maximum number of these that you can have depends on the numDensityMapChannels property of the foliageLayer tag, with the maximum number of foliageStates being 2^numDensityMapChannels - 1. For the default numDensityMapChannels value of 4 this gives a maximum number of foliageStates of 15.
Each foliageStage has a name and optionally can have a custom numBlocksPerUnit, width, height, widthVariance and heightVariance values if they should be different from the ones specified in the foliageLayer tag. Inside the foliagStage tag a number of foliageShapes can be specified. At least one foliageShape is required.
Each foliageShape contains 2 foliagLod tags with each a blockShape property which takes the index path to one of the shapes in the foliage i3d.
Here is an example of a foliageState from basegame decoFoliageEU:
<foliageState name="apera" >
<foliageShape>
<foliageLod blockShape="1>0|0" />
<foliageLod blockShape="1>0|1" />
</foliageShape>
</foliageState>
Finally the xml file ends with the closing of the foliageLayer and foliageType tags.
Here are the contents of the entire basegame decoFoliageEU.xml file as an example:
<foliageType distanceTexturePath="distance"> <foliageLayer densityMapChannelOffset="0" numDensityMapChannels="4" numBlocksPerUnit="2.5" shapeSource="decoFoliageEU.i3d"> <foliageStateDefaults distanceMapLayer="0" width="1.0" height="1.0" widthVariance="0.25" heightVariance="0.35" horizontalPositionVariance="0.3" /> <!-- default LOD distances etc --> <foliageLodDefaults lod="0" viewDistance="18" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1" /> <foliageLodDefaults lod="1" viewDistance="80" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1" /> <!-- smallDenseMix --> <foliageState name="smallDenseMix" numBlocksPerUnit="5.0"> <foliageShape> <foliageLod blockShape="0>0|0" /> <foliageLod blockShape="0>0|1" /> </foliageShape> <foliageShape> <foliageLod blockShape="0>1|0" /> <foliageLod blockShape="0>1|1" /> </foliageShape> <foliageShape> <foliageLod blockShape="0>2|0" /> <foliageLod blockShape="0>2|1" /> </foliageShape> <foliageShape> <foliageLod blockShape="0>3|0" /> <foliageLod blockShape="0>3|1" /> </foliageShape> <foliageShape> <foliageLod blockShape="0>4|0" /> <foliageLod blockShape="0>4|1" /> </foliageShape> </foliageState> <!-- small rumex --> <foliageState name="smallRumex" > <foliageShape> <foliageLod blockShape="0>5|0" /> <foliageLod blockShape="0>5|1" /> </foliageShape> </foliageState> <!-- apera --> <foliageState name="apera" > <foliageShape> <foliageLod blockShape="1>0|0" /> <foliageLod blockShape="1>0|1" /> </foliageShape> </foliageState> <!-- chaerophyllum --> <foliageState name="whiteTallWeed" width="1.0" height="0.75" widthVariance="0.25" heightVariance="0.5" numBlocksPerUnit="2.25"> <foliageShape> <foliageLod blockShape="1>1|0" /> <foliageLod blockShape="1>1|1" /> </foliageShape> </foliageState> <!-- chenopodium --> <foliageState name="greenTallWeed" width="1.0" height="0.75" widthVariance="0.25" heightVariance="0.5" numBlocksPerUnit="2.25"> <foliageShape> <foliageLod blockShape="1>2|0" /> <foliageLod blockShape="1>2|1" /> </foliageShape> </foliageState> <!-- cirsium --> <foliageState name="cirsium" heightVariance="0.45" > <foliageShape> <foliageLod blockShape="1>3|0" /> <foliageLod blockShape="1>3|1" /> </foliageShape> </foliageState> <!-- apaverRhoeas --> <foliageState name="papaverRhoeas" heightVariance="0.45" > <foliageShape> <foliageLod blockShape="1>4|0" /> <foliageLod blockShape="1>4|1" /> </foliageShape> </foliageState> <!-- rumex --> <foliageState name="rumex"> <foliageShape> <foliageLod blockShape="1>5|0" /> <foliageLod blockShape="1>5|1" /> </foliageShape> </foliageState> <!-- grassSmall --> <foliageState name="grassSmall" heightVariance="0.5" numBlocksPerUnit="2.7"> <foliageShape> <foliageLod blockShape="4>0|0" /> <!-- <foliageLod blockShape="4>1|0" /> --> <foliageLod blockShape="4>1|0" /> </foliageShape> </foliageState> <!-- grassMedium --> <foliageState name="grassMedium" heightVariance="0.5" numBlocksPerUnit="2.2"> <foliageShape> <foliageLod blockShape="4>0|1" /> <!-- <foliageLod blockShape="4>1|1" /> --> <foliageLod blockShape="4>1|1" /> </foliageShape> </foliageState> <!-- 1 1 0 1 - grassCut --> <foliageState name="grassCut" numBlocksPerUnit="3.2"> <foliageShape> <foliageLod blockShape="4>0|3" /> <foliageLod blockShape="4>1|3" /> </foliageShape> </foliageState> </foliageLayer> </foliageType>
Fruit types (crops)
The foliage xml for fruit types (crops), so types of foliage that can be planted/sown and can grow, contains a lot of the same sections as the foliage xml for decorational foliage, but some of their content is a bit different and the xml for a fruit type contains several additional section that are not needed for decorational foliage.
For anyone coming from FS 22: All the information that used to be in the maps_fruitTypes.xml in FS 22 is now (in FS 25) included in the foliage xml! Some things have basically stayed the same, others have been slightly renamed and some things have changed quite a bit!
Foliage type
Similarly to the xml for decorational foliage, the foliage xml for fruit types begins with a foliageType tag like this:
<foliageType>
Fruit type
Here is the first difference to decorational foliage, as next in the xml is the fruitType tag. The opening fruitType tag has three parameters: name (the name of the fruit type eg "barley"), shownOnMap (a boolean, if true this fruit type is visible on the ingame map, if false it is not shown on the map) and useForFieldMissions (a boolean, if true field missions with this fruit type can be generated by the game, if false there will be no field missions for this fruit type).
Inside the fruitType tag are several other tags which are explained below.
mapColors - this tag sets the color used to show this crop on the ingame map. There are two attributes on this tag: default and colorBlind. Both of these take a color in 4 values between 0 and 1, representing R, G, B and Alpha channels respectively. A . is used as the decimal point and a space is used to separate values. Normally the default setting is used, but if the game is set to color blind mode, the colorBlind setting is used instead.
<mapColors default="0.2502 0.1683 0.0612 1" colorBlind="0.6795 0.6867 0.7231 1"/>
windrow - this tag specifies windrow fill types for the crop. The fill type is usually straw for any crop that produces straw, but would be eg grass_windrow for grass. The attributes this tag has are:
- fillType (the regular windrow fillType eg straw)
- litersPerSqm (how much of eg straw per square meter harvested crop should be created)
- cutFillType (the fillType used for swathers, eg BARLEY_CUT for barley)
- windrowCutFactor (multiplier applied to the litersPerSqm value to get the amount of the cutFillType to create per square meter of harvested crop). If the fruitType does not have straw, dont specify a fillType
If the fruitType has neither straw nor swather support (should not be able to be harvested with a swather), you can completely omit the windrow tag.
<windrow fillType="straw" litersPerSqm="3.68" cutFillType="BARLEY_CUT" windrowCutFactor="1.25"/>
harvest - this tag provides information about harvesting the fruitType. Possible attributes are:
- litersPerSqm (required. specifies how many liters of output (eg grain) is created per square meter of harvested crop. this is the baseline value. fertilizer, plowing and other bonuses get added to this and weed reduction gets subtracted from this)
- cutHeight (specifies the preferred height for a cutter, like a combine header, to cut this fruitType. eg "0.25" = cut it 0.25 meters above the ground)
- chopperType (specifies a type of chopper that can be used. mostly "CHOPPER_STRAW" for most cereal crops. leave this attribute out if a chopper is not supported)
- groundType (specify a ground type to change the ground to when harvesting. Leave this attribute out if there should be no change to the ground type or if the groundType is specified in foliageState)
- Additionally harvest transitions can be specified in child tags under the harvest tag if multiple different harvest ready growth stages exist. An example of this is basegame maize, which has 3 different harvest ready growth stages. These specific transitions are specified using transition tags, where each transition tag has a src attribute, specifying the source harvest ready stage by name and a target attribute specifying the target harvested stage by name.
<harvest litersPerSqm="0.96" cutHeight="0.15" chopperType="CHOPPER_STRAW"/>
<harvest litersPerSqm="0.92" cutHeight="0.20" chopperType="CHOPPER_MAIZE" forageCutHeight="0.15" >
<transition src="harvestReadyGreen" target="harvestedGreen" />
<transition src="harvestReadyGreen2" target="harvestedGreen" />
<transition src="harvestReady3" target="harvested" />
</harvest>
growth - this tag sets growth related information. The attributes for this tag are:
- resetsSpray (boolean. if set to true the fertilizer or herbicide texture on the ground gets removed when the growth stage changes. this does NOT remove the effect, only the visiual texture. eg the darker ground where its fertilized. This is set to true for almost every fruitType)
- growthRequiresLime (boolean. if set to true, provided the lime requirement setting ingame is enabled, requires regular lime application for the fruitType to grow. Actual exact effects ingame are unknown at this point)
<growth resetsSpray="true" growthRequiresLime="true"/>
soil - this tag specifies soil related information. The attributes are:
- lowDensityRequired (boolean. whether or not with the plowing setting enable ingame, plowing is actually needed)
- increasesDensity (boolean. if set to true and the plowing requirement is enabled ingame growing this fruitType will eventually require plowing the field again. if set to false one could always grow this fruitType on the same field and after plowing once, the plowing requirement would not return)
- consumesLime (boolean. If this fruitType consumes lime. If set to false and lime setting enabled ingame, would not require putting lime again after once fulfilling the requirement. Grass has this set to false, so even with lime requirement enabled ingame, grass fields only have to get lime once and will then never need it again)
- startSprayLevel (number. sets if this fruitType always starts off with a fertilizer stage regardless of how its seeded - seeders also fertilizing add to this. For most fruitTypes set this to 0)
<soil lowDensityRequired="true" increasesDensity="false" consumesLime="true" startSprayLevel="0"/>
seeding - this tag provides information about seeding this fruitType. The available attributes are:
- directionSnapAngle (the angle in which to snap when seeding. 0 means no snapping angle - seeding available in every angle. Some crops like potato, carrot, etc have this set to 90, causing them to always snap to 0, 90, 180 or 270 degrees when seeding)
- needsRolling (boolean. if set to true rolling the seedbed is possible/has a positive effect on yield. if set to false, rolling the seedbed has no effect)
- litersPerSqm (sets how many liters of seed are used for seeding 1 square meter of field)
- isAvailable (boolean. if set to false, this fruitType cannot be seeded at all. in that case the only ways to add this fruitType would be via the landscaping mode ingame or through GE)
- plantsWeed (boolean. defaults to true. if set to false, no weeds will ever grow in this fruitType. Grass for example has this set to false. You can omit this attribute if you dont want to set it to false, as if the attribute is not provided it will be assumed to be true)
<seeding directionSnapAngle="0" needsRolling="true" litersPerSqm="0.0265" isAvailable="true"/>
cultivation - this tag provides information about cultivating this fruitType after seeding it. The only attribute available is:
- isAllowed (boolean. if set to true, this fruitType can be cultivated over)
<cultivation isAllowed="true"/>
mulcher - this tag sets information about mulching this fruitType. If mulching should not be allowed, do not provide this tag at all. The available attribute is:
- chopperType (specifies the chopper type to use when mulching this fruitType. eg CHOPPER_STRAW for most cereal crops)
<mulcher chopperType="CHOPPER_STRAW"/>
Foliage Layer
Inside the foliageType tag is a foliageLayer tag, the opening tag of which contains the parameters densityMapChannelOffset, which you would basically always want to set to 0, numDensityMapChannels which is usually set to 4, numBlocksPerUnit which sets a default for the rest of the file and specifies how often the shapes from the i3d are repeated in a fixed area (higher number = individual plants are closer together), shapeSource which takes the name of the foliage i3d and, if the foliage i3d is in a different folder then the xml, the path to the i3d and alignsToSun which takes a boolean and determines wheter or not this fruitType alings itself to the sun (eg sunflowers).
This is an example of this line:
<foliageLayer densityMapChannelOffset="0" numDensityMapChannels="4" numBlocksPerUnit="1.8" shapeSource="barley.i3d" alignsToSun="false">
FoliageStateDefaults
Next is the foliageStateDefaults tag with the following parameters:
- distanceMapLayer, should usually be set to 1
- width, this is the width of a single plant of your foliage in meters. it should be approximately equal to the width of the foliage shape in the i3d. if you copied a basegame i3d and just gave it new textures, look at the xml for the basegame foliage type that you copied the i3d from and take the value used there.
- height, this is the height of a single plant of your foliage in meters. Analog to the width it should match the size of the shape in the i3d and you can get a value from a basegame foliage xml if you copied the basegame foliage i3d earlier.
- widthVariance, this determines how much the game is allowed to increase or decrease the width of individual plants randomly to make the foliage look more realistic. Setting this to 0 will effectively disable this random scaling that the game does otherwise, but it may make the foliage look very repetitive.
- heightVariance, similar to widthVariance, but effecting the height of the individual plants rather then the width.
- horizontalPositionVariance, determines how much at maximum the game may deviate from its internal grid when positioning each individual plant. The game places plants on a fixed grid, but applies a random small offset to this grid to each individual plant to make it look realistic. This value determines how large at most this offset may be. Setting this to 0 makes all plants of this foliage type line up exactly on the grid.
This an example of a foliageStateDefaults line:
<foliageStateDefaults distanceMapLayer="1" width="1.0" height="1.0" widthVariance="0.2" heightVariance="0.2" horizontalPositionVariance="0.5"/>
FoliageLodDefaults
After this we have the foliageLodDefaults of which there are usually 2, one for lod0 and one for lod1. You will most likely keep these at their default parameters, though you may change the viewDistance for the lods depending on your foliage type. For example a large bush should probably have greater view distances then a bit of grass on its lods.
Here are the foliageLodDefaults for basegame decoFoliage:
<foliageLodDefaults lod="0" viewDistance="18" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1" />
<foliageLodDefaults lod="1" viewDistance="80" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1" />
FoliageStates
Now follows the main part of the foliage xml: The foliageState definitions.
Each growth stage of the fruit type has a foliageState definition. The maximum number of these that you can have depends on the numDensityMapChannels property of the foliageLayer tag, with the maximum number of foliageStates being 2^numDensityMapChannels - 1. For the default numDensityMapChannels value of 4 this gives a maximum number of foliageStates of 15.
Each foliageStage has a name and optionally can have a custom numBlocksPerUnit, width, height, widthVariance and heightVariance values if they should be different from the ones specified in the foliageLayer tag. Aach foliageState also has a distanceMap attribute containing the path to a distance texture and a fieldCourseLineHeight attribute which specifies the height in meters above the ground that the lines for the ingame GPS functionality should be at. Additionally the boolean attributes isGrowing, isWithered, isCut, isForageReady, isHarvestReady, allowsWeeding, allowsHoeing, isDestructibleByWheel and isDestructibleByDisaster, which all default to false unless otherwise specified, can be specified on every foliageState and the groundType attribute can be used to specify a specific ground type that is different from the default to be used for that specific foliageState.
- isGrowing - fruit type is in growth at this stage. This should be true for all foliageStates except withered and cut ones.
- isWithered - fruit type in this stage is withered. when the fruit type withers it goes to this state.
- isCut - this is a state where the fruit type has been harvested
- isForageReady - the fruit type at this state can be harvested with a forager
- isHarvestReady - the fruit type at this state can be harvested
- allowsWeeding - a weeder can be used at this state to remove weeds
- allowsHoeing - a hoe can be used at this state to remove weeds
- isDestructibleByWheel - the fruit type can be destroyed by driving over it (if crop destruction is enabled in the game settings) at this state
- isDestructibleByDisaster - the fruit type can be destroyed by natural disaster (if enabled in the game settings) at this state
- groundType - the ground type to you for this state. most often used to change the ground type to "HARVEST_READY" on harvest ready growth states
Inside the foliagStage tag a number of foliageShapes can be specified. At least one foliageShape is required.
Each foliageShape contains 2 foliagLod tags with each a blockShape property which takes the index path to one of the shapes in the foliage i3d.
Here is an example of a foliageState from basegame barley:
<foliageState name="harvestReady" numBlocksPerUnit="2.2" width="1.3" distanceMap="distance/foliage_barley_distance5_diffuse.png" isGrowing="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" isHarvestReady="true" groundType="HARVEST_READY" fieldCourseLineHeight="1">
<foliageShape>
<foliageLod blockShape="0>0|3" />
<foliageLod blockShape="0>1|3" />
</foliageShape>
</foliageState>
Seasonal Growth
After the end of the last foliageState, the closing foliageLayer tag </foliageLayer>
follows. After that the final section of the xml begins: the growth tag.
The opening growth tag is followed by a opening seasonal tag, in which the settings for the seasonal growth of this fruit type are specified.
FS 25 specifies seasonal growth with 12 periods, each of which is specified here with a period tag with a name attribute. The names for the periods are:
- EARLY_SPRING
- MID_SPRING
- LATE_SPRING
- EARLY_SUMMER
- MID_SUMMER
- LATE_SUMMER
- EARLY_AUTUMN
- MID_AUTUMN
- LATE_AUTUMN
- EARLY_WINTER
- MID_WINTER
- LATE_WINTER
For the periods in which the fruit type can be planted/sown, the additional attribute plantingAllowed="true"
is added to the period tag.
All 12 period tag should be present in the xml, even if some of them are not used.
Each period tag can contain a number of update tags and each update tag specifies one growth state change to happen in that period. Each update tag has two attributes:
- startState - the state at which the fruit type needs to be for this update to apply
- endState - the state at which the fruit type will be after the growth update
Example from basegame barley:
<period name="EARLY_SPRING">
<update startState="greenSmall2" endState="greenMiddle" />
<update startState="greenMiddle" endState="greenBig" />
</period>
This means that any barley that is in the greenSmall2 growth state at the start of early spring will change to the greenMiddle state in this period. Additionally any barley that is in the greenMiddle state at the start of early spring will change to the greenBig state in this period.
Note that even though greenSmall2 changes to greenMiddle and greenMiddle changes to greenBig, this does not mean that greenSmall2 will change all the way to greenBig, as during each growth update, every plant will get at most ONE change. So in case the barley is at state greenSmall2 when the growth update happens, it will update to greenMiddle, but then will NOT immediately update to greenBig, as it already had a change in this growth update.
It is also possible to have no updates in a period, if eg in the winter the fruit type should not grow at all.
Finally the closing seasonal and growth tags and then the final closing foliageType tag follow at the end of the xml file.
</seasonal>
</growth>
</foliageType>
Here is are two examples of basegame fruit type foliage xml files:
<?xml version="1.0" encoding="utf-8"?> <foliageType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../shared/xml/schema/foliageType.xsd"> <fruitType name="barley" shownOnMap="true" useForFieldMissions="true"> <mapColors default="0.2502 0.1683 0.0612 1" colorBlind="0.6795 0.6867 0.7231 1"/> <windrow fillType="straw" litersPerSqm="3.68" cutFillType="BARLEY_CUT" windrowCutFactor="1.25"/> <harvest litersPerSqm="0.96" cutHeight="0.15" chopperType="CHOPPER_STRAW"/> <growth resetsSpray="true" growthRequiresLime="true"/> <soil lowDensityRequired="true" increasesDensity="false" consumesLime="true" startSprayLevel="0"/> <seeding directionSnapAngle="0" needsRolling="true" litersPerSqm="0.0265" isAvailable="true"/> <cultivation isAllowed="true"/> <mulcher chopperType="CHOPPER_STRAW"/> </fruitType> <!-- barley 0 1 2 3 1 0 0 0 - invisible 0 1 0 0 - green small 1 1 0 0 - green small 2 0 0 1 0 - green middle 1 0 1 0 - green big 0 1 1 0 - green big 2 1 1 1 0 - harvest ready 0 0 0 1 - dead 1 0 0 1 - harvested (cut) --> <foliageLayer densityMapChannelOffset="0" numDensityMapChannels="4" numBlocksPerUnit="1.8" shapeSource="barley.i3d" alignsToSun="false"> <foliageStateDefaults distanceMapLayer="1" width="1.0" height="1.0" widthVariance="0.2" heightVariance="0.2" horizontalPositionVariance="0.5"/> <!-- default LOD distances etc --> <foliageLodDefaults lod="0" viewDistance="18" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1"/> <foliageLodDefaults lod="1" viewDistance="80" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1"/> <!-- 1 0 0 0 - invisible --> <foliageState name="invisible" isGrowing="true" allowsWeeding="true" allowsHoeing="true"/> <!-- 0 1 0 0 - green small --> <foliageState name="greenSmall" numBlocksPerUnit="3.2" distanceMap="distance/foliage_barley_distance2_diffuse.png" isGrowing="true" allowsWeeding="true" allowsHoeing="true" fieldCourseLineHeight="0.3"> <foliageShape> <foliageLod blockShape="0>0|0"/> <foliageLod blockShape="0>1|0"/> <!-- <foliageLod blockShape="0>1|0" /> --> </foliageShape> </foliageState> <!-- 1 1 0 0 - green small --> <foliageState name="greenSmall2" numBlocksPerUnit="3.2" distanceMap="distance/foliage_barley_distance2_diffuse.png" isGrowing="true" allowsWeeding="true" allowsHoeing="true" fieldCourseLineHeight="0.3"> <foliageShape> <foliageLod blockShape="0>0|0"/> <foliageLod blockShape="0>1|0"/> <!-- <foliageLod blockShape="0>1|0" /> --> </foliageShape> </foliageState> <!-- 0 0 1 0 - green middle --> <foliageState name="greenMiddle" numBlocksPerUnit="2.2" distanceMap="distance/foliage_barley_distance3_diffuse.png" isGrowing="true" allowsWeeding="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" fieldCourseLineHeight="0.5"> <foliageShape> <foliageLod blockShape="0>0|1"/> <foliageLod blockShape="0>1|1"/> <!-- <foliageLod blockShape="0>1|1" /> --> </foliageShape> </foliageState> <!-- 1 0 1 0 - green middle 2 --> <foliageState name="greenMiddle2" numBlocksPerUnit="2.2" distanceMap="distance/foliage_barley_distance3_diffuse.png" isGrowing="true" allowsWeeding="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" fieldCourseLineHeight="0.5"> <foliageShape> <foliageLod blockShape="0>0|1"/> <foliageLod blockShape="0>1|1"/> <!-- <foliageLod blockShape="0>1|1" /> --> </foliageShape> </foliageState> <!-- 0 1 1 0 - green big --> <foliageState name="greenBig" numBlocksPerUnit="2" distanceMap="distance/foliage_barley_distance4_diffuse.png" isGrowing="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" fieldCourseLineHeight="0.85"> <foliageShape> <foliageLod blockShape="0>0|2"/> <foliageLod blockShape="0>1|2"/> <!-- <foliageLod blockShape="0>1|2" /> --> </foliageShape> </foliageState> <!-- 1 1 1 0 - green big 2 --> <foliageState name="greenBig2" numBlocksPerUnit="2" distanceMap="distance/foliage_barley_distance4_diffuse.png" isGrowing="true" isForageReady="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" fieldCourseLineHeight="0.85"> <foliageShape> <foliageLod blockShape="0>0|2"/> <foliageLod blockShape="0>1|2"/> <!-- <foliageLod blockShape="0>1|2" /> --> </foliageShape> </foliageState> <!-- 0 0 0 1 - harvest ready--> <foliageState name="harvestReady" numBlocksPerUnit="2.2" width="1.3" distanceMap="distance/foliage_barley_distance5_diffuse.png" isGrowing="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" isHarvestReady="true" groundType="HARVEST_READY" fieldCourseLineHeight="1"> <foliageShape> <foliageLod blockShape="0>0|3"/> <foliageLod blockShape="0>1|3"/> <!-- <foliageLod blockShape="0>1|3" /> --> </foliageShape> </foliageState> <!-- 1 0 0 1 - dead --> <foliageState name="dead" numBlocksPerUnit="1.4" distanceMap="distance/foliage_barley_distance6_diffuse.png" isWithered="true" isDestructibleByWheel="true" isDestructibleByDisaster="true" fieldCourseLineHeight="0.85"> <foliageShape> <foliageLod blockShape="0>0|4"/> <foliageLod blockShape="0>1|4"/> <!-- <foliageLod blockShape="0>1|4" /> --> </foliageShape> </foliageState> <!-- 0 1 0 1 - harvested (cut) --> <foliageState name="harvested" numBlocksPerUnit="2.2" distanceMap="distance/foliage_barley_distance7_diffuse.png" isCut="true" isDestructedByWheel="true" isDestructibleByDisaster="true"> <foliageShape> <foliageLod blockShape="0>0|5"/> <foliageLod blockShape="0>1|5"/> <!-- <foliageLod blockShape="0>1|5" /> --> </foliageShape> </foliageState> <!-- --> </foliageLayer> <growth> <seasonal> <period name="EARLY_SPRING"> <update startState="greenSmall2" endState="greenMiddle" /> <update startState="greenMiddle" endState="greenBig" /> </period> <period name="MID_SPRING"> <update startState="greenMiddle" endState="greenBig" /> <update startState="greenBig" endState="greenBig2" /> </period> <period name="LATE_SPRING"> <update startState="greenBig" endState="greenBig2" /> <update startState="greenBig2" endState="harvestReady" /> </period> <period name="EARLY_SUMMER"> <update startState="greenBig2" endState="harvestReady" /> </period> <period name="MID_SUMMER"> <update startState="harvestReady" endState="dead" /> </period> <period name="LATE_SUMMER"/> <period name="EARLY_AUTUMN" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> </period> <period name="MID_AUTUMN" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="greenSmall" endState="greenSmall2" /> </period> <period name="LATE_AUTUMN" /> <period name="EARLY_WINTER" /> <period name="MID_WINTER" /> <period name="LATE_WINTER" > <update startState="greenSmall" endState="greenSmall2" /> <update startState="greenSmall2" endState="greenMiddle" /> </period> </seasonal> </growth> </foliageType>
<?xml version="1.0" encoding="utf-8"?> <foliageType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../shared/xml/schema/foliageType.xsd"> <fruitType name="grass" shownOnMap="true" useForFieldMissions="false"> <mapColors default="0.0423 0.1221 0.0252 1" colorBlind="1.0000 0.9473 0.0369 1"/> <harvest litersPerSqm="4.37" groundType="GRASS_CUT"/> <windrow fillType="grass_windrow" /> <growth resetsSpray="true" growthRequiresLime="false"/> <soil lowDensityRequired="false" increasesDensity="false" consumesLime="false" startSprayLevel="1"/> <seeding directionSnapAngle="0" litersPerSqm="0.012" isAvailable="true" plantsWeed="false"/> <cultivation isAllowed="true"/> </fruitType> <!-- grass 0 1 2 3 1 0 0 0 - invisible 0 1 0 0 - green small 1 1 0 0 - green middle 0 0 1 0 - harvest ready 1 0 1 0 - cut 0 1 1 0 - cut 2 --> <foliageLayer densityMapChannelOffset="0" numDensityMapChannels="4" numBlocksPerUnit="4.5" shapeSource="grass.i3d" alignsToSun="false"> <foliageStateDefaults distanceMapLayer="1" width="1.0" height="1.2" widthVariance="0.3" heightVariance="0.7" horizontalPositionVariance="0.3"/> <!-- default LOD distances etc --> <foliageLodDefaults lod="0" viewDistance="18" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1"/> <foliageLodDefaults lod="1" viewDistance="80" blendOutDistance="2" atlasSize="1" atlasOffset="1 0" texCoords="0 0 1 1"/> <!-- 1 0 0 0 - invisible --> <foliageState name="invisible" isGrowing="true" /> <!-- 0 1 0 0 - green small --> <foliageState name="greenSmall" numBlocksPerUnit="3.5" distanceMap="distance/foliage_grass_distance2_diffuse.png" isGrowing="true" regrowthStart="true" groundType="GRASS" groundTypeMask="GRASS GRASS_CUT SOWN DIRECT_SOWN ROLLER_LINES" isDestructibleByDisaster="true"> <foliageShape> <foliageLod blockShape="0>0|0"/> <foliageLod blockShape="0>1|0"/> </foliageShape> </foliageState> <!-- 1 1 0 0 - green middle --> <foliageState name="greenMiddle" distanceMap="distance/foliage_grass_distance3_diffuse.png" isGrowing="true" isHarvestReady="true" yieldScale="0.5" isDestructibleByDisaster="true" fieldCourseLineHeight="0.3"> <foliageShape> <foliageLod blockShape="0>0|1"/> <foliageLod blockShape="0>1|1"/> </foliageShape> </foliageState> <!-- 0 0 1 0 - green big (harvest ready) --> <foliageState name="harvestReady" distanceMap="distance/foliage_grass_distance4_diffuse.png" isGrowing="true" isHarvestReady="true" isDestructibleByDisaster="true" fieldCourseLineHeight="0.5"> <foliageShape> <foliageLod blockShape="0>0|2"/> <foliageLod blockShape="0>1|2"/> </foliageShape> </foliageState> <!-- 1 0 1 0 - cut --> <foliageState name="cut" numBlocksPerUnit="3.0" distanceMap="distance/foliage_grass_distance5_diffuse.png" isCut="true" isDestructedByWheel="true" isDestructedByDisaster="true" isMulched="true"> <foliageShape> <foliageLod blockShape="0>0|3"/> <foliageLod blockShape="0>1|3"/> </foliageShape> </foliageState> <!-- 0 1 1 0 - cut rolled --> <foliageState name="cutRolled" numBlocksPerUnit="2.3" distanceMap="distance/foliage_grass_distance5_diffuse.png" isRolledCut="true"> <foliageShape> <foliageLod blockShape="0>0|4"/> <foliageLod blockShape="0>1|4"/> </foliageShape> </foliageState> </foliageLayer> <growth> <seasonal initialState="greenMiddle"> <period name="EARLY_SPRING" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="greenMiddle" endState="harvestReady" /> <update startState="cut" endState="greenSmall" /> <update startState="cutRolled" endState="greenSmall" /> </period> <period name="MID_SPRING" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="greenSmall" endState="greenMiddle" /> <update startState="greenMiddle" endState="harvestReady" /> <update startState="cut" endState="greenSmall" /> <update startState="cutRolled" endState="greenSmall" /> </period> <period name="LATE_SPRING" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="greenSmall" endState="greenMiddle" /> <update startState="greenMiddle" endState="harvestReady" /> <update startState="cut" endState="greenSmall" /> <update startState="cutRolled" endState="greenSmall" /> </period> <period name="EARLY_SUMMER" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="greenSmall" endState="greenMiddle" /> <update startState="greenMiddle" endState="harvestReady" /> <update startState="cut" endState="greenSmall" /> <update startState="cutRolled" endState="greenSmall" /> </period> <period name="MID_SUMMER" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="greenSmall" endState="greenMiddle" /> <update startState="greenMiddle" endState="harvestReady" /> <update startState="cut" endState="greenSmall" /> <update startState="cutRolled" endState="greenSmall" /> </period> <period name="LATE_SUMMER" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="greenSmall" endState="greenMiddle" /> <update startState="greenMiddle" endState="harvestReady" /> <update startState="cut" endState="greenSmall" /> <update startState="cutRolled" endState="greenSmall" /> </period> <period name="EARLY_AUTUMN" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="greenSmall" endState="greenMiddle" /> <update startState="greenMiddle" endState="harvestReady" /> <update startState="cut" endState="greenSmall" /> <update startState="cutRolled" endState="greenSmall" /> </period> <period name="MID_AUTUMN" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="greenSmall" endState="greenMiddle" /> <update startState="greenMiddle" endState="harvestReady" /> <update startState="cut" endState="greenSmall" /> <update startState="cutRolled" endState="greenSmall" /> </period> <period name="LATE_AUTUMN" plantingAllowed="true"> <update startState="invisible" endState="greenSmall" /> <update startState="harvestReady" endState="greenMiddle" /> <!-- knock back due to winter --> </period> <period name="EARLY_WINTER" /> <period name="MID_WINTER" /> <period name="LATE_WINTER"> <update startState="greenSmall" endState="greenMiddle" /> </period> </seasonal> </growth> </foliageType>
Map i3d and densityMap_fruits
Now that the foliage i3d and xml is complete, the new foliage type can be added to the map i3d!
Adding foliage types to the map i3d is identical for both decorational foliage types and fruit types.
To add the foliage type to the map i3d, first use the GRLE-Converter from Giants to convert the densityMap_fruits.gdm file in your maps data folder to a png. Rename or delete the old densityMap_fruits.gdm file and leave the newly created densityMap_fruits.png file in its place.
Now open the map i3d in a TEXT-Editor, not in GE. At the beginning of the file, in the <Files>
section, find the line that contains densityMap_fruits
and ensure that it says densityMap_fruits.png
and not .gdm.
Then go to the end of the files section and create a new <File fileId="" filename="" />
line. Put the path to your foliage xml into the filename attribute. Note that the path here is relative to the map i3d file.
Put a very large number in the fileId attribute (eg "999999999") and copy or note down that number.
Now find the FoliageMultiLayer tag in the map i3d. In this tag there are multiple FoliageType tags. Underneath the last FoliageLayer tag, but above the closing FoliageMultiLayer tag, insert a new <FoliageType name="" foliageXmlId="" />
tag and put the number you noted above into the foliageXmlId attribute. Put the name of your foliage type into the name attribute of this new tag.
Then go back a few lines further up in the file to the FoliageMultiLayer tag. This tag has numChannels, numTypeIndexChannels and compressionChannels. These need to be changed depending on the total number of foliage types.
Basegame FS 25 has 30 foliage types.
If you know how many fruitTypes you have/are adding to that, just add 30 to those to get the total number of foliage types, otherwise just count them. Then set the values in the <FoliageMultiLayer .....>
tag to the corresponding values in the table below, based on the total number of foliage types.
For example: if the total number of foliage types is 48, the table below tells us to set numChannels to 11 and numTypeIndexChannels to 6.
num foliage types | numChannels | numTypeIndexChannels |
---|---|---|
1-31 | 10 | 5 |
32-63 | 11 | 6 |
64-127 | 12 | 7 |
128-255 | 13 | 8 |
Now save the map i3d file and open it in GE, saving it straight away again. This will cause GE to generate a new densityMap_fruits.gdm file in your maps data folder. You can now delete the PNG file you created earlier again.
This concludes the changes to the map i3d and densityMap_fruits.gdm files.
maps_fruitTypes.xml
The next step is to work on a custom maps_fruitTypes.xml. This is a xml file that, if it does not exist yet, you want to create in your map.
This step and the last step about the map xml are not required for decorational foliage types. If you added a decorational foliage type you are aldready done!
Create an empty file named maps_fillTypes.xml and then open it in a text editor.
The first line should be this: <?xml version="1.0" encoding="utf-8" standalone="no" ?>
Below that follows a opening map tag like this: <map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../shared/xml/schema/fruitTypes.xsd">
There are three sections in this file that we need to create with the correct information: fruitTypes, fruitTypeCategories and fruitTypeConverters.
fruitTypes
The fruitTypes section is where we tell the game about our new fruit types. This section begins with a opening <fruitTypes>
tag.
For each fruit type you want to add, add a <fruitType filename="" />
tag below the opening fruitType tag and put the path to the respective foliage xml in the filename attribute.
Close this section with a closing </fruitTypes>
tag.
fruitTypeCategories
The fruitTypeCategories section is mostly used to add your fruit types to machines, by adding your new fruit types to the relevant categories.
This section looks like this:
<fruitTypeCategories>
<fruitTypeCategory name="GRAINHEADER" >YOURCROP</fruitTypeCategory>
<fruitTypeCategory name="MAIZEHEADER" ></fruitTypeCategory>
<fruitTypeCategory name="MAIZECUTTER" ></fruitTypeCategory>
<fruitTypeCategory name="DIRECTCUTTER" ></fruitTypeCategory>
<fruitTypeCategory name="SOWINGMACHINE" ></fruitTypeCategory>
<fruitTypeCategory name="SUGARCANE_PLANTER" ></fruitTypeCategory>
<fruitTypeCategory name="PLANTER" ></fruitTypeCategory>
<fruitTypeCategory name="PLANTER_SMALL"></fruitTypeCategory>
<fruitTypeCategory name="WEEDER" ></fruitTypeCategory>
<fruitTypeCategory name="TOPLIFTINGHARVESTER"></fruitTypeCategory>
<fruitTypeCategory name="MOWER"></fruitTypeCategory>
<fruitTypeCategory name="COMBINE_MOWER"></fruitTypeCategory>
</fruitTypeCategories>
These are all the basegame fruitTypeCategories and you want to add your crop to all relevant categories. As an example I have added the crop "YOURCROP" to the "GRAINHEADER" category. The category names are pretty self explanatory as to what they are for.
(Make sure to remove "YOURCROP" from the above, if you are copy/pasting it directly into your xml.)
To add your crop to a category just write the name of your crop in all caps between the opening and closing fruitTypeCategory tags, like is shown above with the imaginary crop YOURCROP. If you want to add multiple crops to the same category, separate the two crop types with spaces. For example: <fruitTypeCategory name="GRAINHEADER" >WHEAT BARLEY</fruitTypeCategory>
fruitTypeConverters
The last section of the maps_fruitTypes.xml file is the fruitTypeConverters section. This is used for some machines like mowers, forage harvesters and swathers to convert a fruitType to a different fillType. For example a forage harvester harvesting wheat will produce chaff and not wheat.
This section may not be needed for your fruit type at all, in which case you can leave it out entirely.
The section begins with a opening <fruitTypeConverters>
tag.
Basegame FS 25 has 3 different fruitTypeConverters: FORAGEHARVESTER, MOWER and COMBINE_MOWER (this last one is for swathers).
You only need to add those that you actually need for your specific crops, but you can also add all three and just leave the unused ones empty.
Each fruitTypeConverter begins with a opening tag which also has a name attribute which takes the name of the converter. For example: <fruitTypeConverter name="FORAGEHARVESTER">
Then follow the individual converters for this type of converter. Each converter is a tag with a from, as to, a factor and an optional windrowFactor attribute: <converter from="WHEAT" to="CHAFF" factor="4.0" windrowFactor="1.0" />
The from attribute specifies the fruitType for which this converter works. The to attribute specifies the fillType to which this fruitType gets converted and the factor attribute is a multiplier for how much of the "to" fillType to create for a given amount of the "from" fruitType. In the above example, you get 4 times as much chaff out as wheat goes in.
The windrow factor is a multiplier for a windrow fillType. In the example above, since the "from" fruitType is wheat, the windrow for wheat is straw.
The fruitTypeConverter ends with a closing </fruitTypeConverter>
tag, after which the next fruitTypeConverter can follow.
The fruitTypeConverters section finally ends with a closing </fruitTypeConverters>
tag.
Finally the maps_fruitTypes.xml file ends with a closing </map>
tag.
After all changes to the file are complete, dont forget to save it!
Here is an example of the basegame maps_fruitTypes.xml:
<?xml version="1.0" encoding="utf-8" standalone="no" ?> <map xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../shared/xml/schema/fruitTypes.xsd"> <fruitTypes> <fruitType filename="$data/foliage/wheat/wheat.xml"/> <fruitType filename="$data/foliage/barley/barley.xml"/> <fruitType filename="$data/foliage/canola/canola.xml"/> <fruitType filename="$data/foliage/oat/oat.xml"/> <fruitType filename="$data/foliage/maize/maize.xml"/> <fruitType filename="$data/foliage/sunflower/sunflower.xml"/> <fruitType filename="$data/foliage/soybean/soybean.xml"/> <fruitType filename="$data/foliage/potato/potato.xml"/> <fruitType filename="$data/foliage/rice/rice.xml"/> <fruitType filename="$data/foliage/riceLongGrain/riceLongGrain.xml"/> <fruitType filename="$data/foliage/sugarbeet/sugarbeet.xml"/> <fruitType filename="$data/foliage/sugarcane/sugarcane.xml"/> <fruitType filename="$data/foliage/cotton/cotton.xml"/> <fruitType filename="$data/foliage/sorghum/sorghum.xml"/> <fruitType filename="$data/foliage/grape/grape.xml"/> <fruitType filename="$data/foliage/olive/olive.xml"/> <fruitType filename="$data/foliage/poplar/poplar.xml"/> <fruitType filename="$data/foliage/beetRoot/beetRoot.xml"/> <fruitType filename="$data/foliage/carrot/carrot.xml"/> <fruitType filename="$data/foliage/parsnip/parsnip.xml"/> <fruitType filename="$data/foliage/greenBean/greenBean.xml"/> <fruitType filename="$data/foliage/pea/pea.xml"/> <fruitType filename="$data/foliage/spinach/spinach.xml"/> <fruitType filename="$data/foliage/grass/grass.xml"/> <fruitType filename="$data/foliage/oilseedRadish/oilseedRadish.xml"/> </fruitTypes> <fruitTypeCategories> <fruitTypeCategory name="GRAINHEADER">WHEAT BARLEY OAT CANOLA SOYBEAN SORGHUM RICELONGGRAIN</fruitTypeCategory> <fruitTypeCategory name="MAIZEHEADER">MAIZE SUNFLOWER</fruitTypeCategory> <fruitTypeCategory name="MAIZECUTTER">MAIZE WHEAT BARLEY OAT CANOLA SORGHUM SOYBEAN SUNFLOWER</fruitTypeCategory> <fruitTypeCategory name="DIRECTCUTTER">GRASS WHEAT BARLEY OAT CANOLA SORGHUM SOYBEAN SUNFLOWER</fruitTypeCategory> <fruitTypeCategory name="SOWINGMACHINE">WHEAT BARLEY OAT CANOLA RICELONGGRAIN OILSEEDRADISH GRASS PEA SPINACH</fruitTypeCategory> <fruitTypeCategory name="SUGARCANE_PLANTER">SUGARCANE</fruitTypeCategory> <fruitTypeCategory name="PLANTER">MAIZE SORGHUM SUNFLOWER SOYBEAN SUGARBEET COTTON GREENBEAN</fruitTypeCategory> <fruitTypeCategory name="PLANTER_SMALL">CARROT PARSNIP BEETROOT SPINACH</fruitTypeCategory> <fruitTypeCategory name="WEEDER">OILSEEDRADISH GRASS</fruitTypeCategory> <fruitTypeCategory name="TOPLIFTINGHARVESTER">CARROT BEETROOT PARSNIP</fruitTypeCategory> <fruitTypeCategory name="MOWER">GRASS WHEAT BARLEY OAT CANOLA SOYBEAN</fruitTypeCategory> <fruitTypeCategory name="COMBINE_MOWER">WHEAT BARLEY OAT CANOLA SOYBEAN</fruitTypeCategory> </fruitTypeCategories> <fruitTypeConverters> <fruitTypeConverter name="FORAGEHARVESTER"> <converter from="MAIZE" to="CHAFF" factor="7.8"/> <converter from="GRASS" to="GRASS_WINDROW" factor="1.0"/> <converter from="WHEAT" to="CHAFF" factor="4.0"/> <converter from="BARLEY" to="CHAFF" factor="4.0"/> <converter from="OAT" to="CHAFF" factor="4.0"/> <converter from="CANOLA" to="CHAFF" factor="4.0"/> <converter from="SUNFLOWER" to="CHAFF" factor="6.0"/> <converter from="SOYBEAN" to="CHAFF" factor="4.0"/> <converter from="SORGHUM" to="CHAFF" factor="4.0"/> <converter from="POPLAR" to="WOODCHIPS" factor="3.0"/> </fruitTypeConverter> <fruitTypeConverter name="MOWER"> <converter from="GRASS" to="GRASS_WINDROW" factor="1.0"/> <converter from="MEADOW" to="GRASS_WINDROW" factor="1.0"/> <converter from="WHEAT" to="STRAW" factor="1.0"/> <converter from="BARLEY" to="STRAW" factor="1.0"/> <converter from="OAT" to="STRAW" factor="1.0"/> <converter from="CANOLA" to="STRAW" factor="1.0"/> <converter from="SOYBEAN" to="STRAW" factor="1.0"/> </fruitTypeConverter> <fruitTypeConverter name="COMBINE_MOWER"> <converter from="WHEAT" to="WHEAT_CUT" factor="1.0"/> <converter from="BARLEY" to="BARLEY_CUT" factor="1.0"/> <converter from="OAT" to="OAT_CUT" factor="1.0"/> <converter from="CANOLA" to="CANOLA_CUT" factor="1.0"/> <converter from="SOYBEAN" to="SOYBEAN_CUT" factor="1.0"/> </fruitTypeConverter> </fruitTypeConverters> </map>
Map xml
Finally, the last step is to tell the game to load the custom maps_fruitTypes.xml. This is done by adding a fruitTypes tag in the map xml.
Open your map xml and first of all check if there is an existing <fruitTypes ... /> tag.
If a fruitTypes tag already exists and it has fruitType child tags in it, remove these fruitType tags and add them to the maps_fruitTypes.xml. Then remove the now empty fruitTypes tag.
If the above was done or there was no fruitTypes tag, proceed with the below.
Add a fruitTypes tag with a single filename attribute like this: <fruitTypes filename="map/maps_fruitTypes.xml" />
Change the path in the filename attribute to point to your custom maps_fruitTypes.xml.
Then save the map xml and you are done!
Your new fruit types should now be available ingame and in GE!