The modDesc.xml
The modDesc.xml is the entrypoint for Farming Simulator mods. This file MUST be at the root of your mod folder.
Read this XML Tutorial to understand the basics of XML.
<modDesc>
This is the root element of your modDesc.xml, all elements described further on should be put inside this element.
Attributes
- REQUIRED
- Name
descVersion
- Type
- integer
- Description
The descVersion corresponds to the version of the game.
modDesc.xml
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="75">
...everything below in here.
</modDesc>
<author>
This can be your stage name, the name of your modding group, or whatever you like.
No special characters allowed.
modDesc.xml
<author>Mod Your Farm</author>
<version>
modDesc.xml
<version>1.0.0.0</version>
<title>
English and German are mandatory.
If the titles are identical in English and German, you can omit the German title.
modDesc.xml
<title>
<en>English Mod Name</en>
<de>German Mod Name</de>
</title>
<description>
TODO: Short text + link to full article on descriptions.
modDesc.xml
<description>
<en><![CDATA[This is my mod description in English]]></en>
<de><![CDATA[This is my mod description in German]]></de>
</description>
<iconFilename>
Place the filename of your mod icon between the tags.
This file should be in the root of your mod folder.
modDesc.xml
<iconFilename>icon_ModFolderName.dds</iconFilename>
<multiplayer>
Tdfdf
- Name
supported
- Type
- boolean
- Description
The descVersion corresponds to the version of the game.
- Name
only
- Type
- boolean
- Description
The descVersion corresponds to the version of the game.
modDesc.xml
<multiplayer supported="true" only="false" />
<dependencies>
If your mod requires other mods to function, this is how you make them required.
modDesc.xml
<dependencies>
<dependency>FS22_OtherModFilename</dependency>
<dependency>FS22_AnotherModFilename</dependency>
</dependencies>
<storeItems>
Each <storeItem> represents an item for the shop. (vehicles and placeables)
- REQUIRED
- Name
xmlFilename
- Type
- string
- Description
The path to the item its XML file
modDesc.xml
<storeItems>
<storeItem xmlFilename="path/to/your/item.xml" />
</storeItems>
<storePacks>
TODO: TEST THIS INGAME.
- REQUIRED
- Name
name
- Type
- string
- Description
Name of the pack, all uppercase.
- REQUIRED
- Name
title
- Type
- string
- Description
Human-readable name of the pack, can be a l10n_ string.
- REQUIRED
- Name
image
- Type
- string
- Description
Path to the pack image. Format should be 512x512 ? DXT3 format.
modDesc.xml
<storePacks>
<storePack name="CARROTS" title="$l10n_storePack_carrots" image="storePack_carrots.dds" />
</storePacks>
<splitTypes>
Seems to work.
- REQUIRED
- Name
name
- Type
- string
- Description
Name of the pack, all uppercase.
- REQUIRED
- Name
l10nKey
- Type
- string
- Description
Human-readable name of the pack, can be a l10n_ string.
- REQUIRED
- Name
splitTypeIndex
- Type
- integer
- Description
Index for the splitType.
- Name
pricePerLiter
- Type
- float
- Description
The price per liter of this splitType.
- Name
woodChipsPerLiter
- Type
- float
- Description
The amount of woodChips this splitType gives per liter of wood.
- Name
allowsWoodHarvester
- Type
- boolean
- Description
true
if a wood harvester can chop this splitType.
modDesc.xml
<splitTypes>
<splitType name="PALM" l10nKey="treeType_palm" splitTypeIndex="20" pricePerLiter="1.0" woodChipsPerLiter="1.0" allowsWoodHarvester="false" />
</splitTypes>
<fillTypes>
Register custom fillTypes.
- REQUIRED
- Name
filename
- Type
- string
- Description
The path to your fillTypes.xml
modDesc.xml
<fillTypes filename="path/to/your/fillTypes.xml" />
<bales>
Register custom bales.
- REQUIRED
- Name
filename
- Type
- string
- Description
The path to your bale.xml
- Name
isAvailable
- Type
- boolean
- Description
true/false. defaults to
true
modDesc.xml
<bales>
<bale filename="path/to/your/bale.xml" isAvailable="true" />
</bales>
<brands>
Register your brand
- REQUIRED
- Name
name
- Type
- string
- Description
The path to your fillTypes.xml
- REQUIRED
- Name
title
- Type
- string
- Description
The path to your fillTypes.xml
- REQUIRED
- Name
image
- Type
- string
- Description
The path to your fillTypes.xml
- Name
imageOffset
- Type
- float
- Description
The path to your fillTypes.xml
modDesc.xml
<brands>
<brand name="MODYOURFARM" title="Mod Your Farm" image="brand_ModYourFarm.dds" imageOffset="0.0" />
</brands>
xml/storeItem.xml
<storeData>
<brand>MODYOURFARM</brand>
</storeData>
<brandColors>
Register brandColors.
- REQUIRED
- Name
name
- Type
- string
- Description
The path to your fillTypes.xml
- REQUIRED
- Name
value
- Type
- vector4
- Description
The path to your fillTypes.xml
modDesc.xml
<brandColors>
<color name="GIANTS_RED1" value="0.7379 0.0070 0.0044 1" />
</brandColors>
<extraSourceFiles>
Register your lua scripts.
- REQUIRED
- Name
filename
- Type
- string
- Description
The path to your script file.
modDesc.xml
<extraSourceFiles>
<sourceFile filename="path/to/your/script.lua" />
</extraSourceFiles>
<specializations>
Register a new specialization for VEHICLE storeItems.
- REQUIRED
- Name
name
- Type
- string
- Description
Name of your specialization
- REQUIRED
- Name
className
- Type
- string
- Description
Name of your Lua class.
- REQUIRED
- Name
filename
- Type
- string
- Description
The path to your script file.
modDesc.xml
<specializations>
<specialization name="skateboard" className="Skateboard" filename="path/to/your/script.lua" />
</specializations>
<vehicleTypes>
- REQUIRED
- Name
name
- Type
- string
- Description
Name of your specialization
- Name
parent
- Type
- string
- Description
Parent specialization of your custom specialization
- REQUIRED
- Name
className
- Type
- string
- Description
Name of your Lua class
- REQUIRED
- Name
filename
- Type
- string
- Description
The path to your script file
modDesc.xml
<vehicleTypes>
<type name="skateboard" className="Skateboard" filename="path/to/your/script.lua" />
</vehicleTypes>
<placeableSpecializations>
Register a new specialization for PLACEABLE storeItems.
- REQUIRED
- Name
name
- Type
- string
- Description
Name of your specialization
- REQUIRED
- Name
className
- Type
- string
- Description
Name of your Lua class.
- REQUIRED
- Name
filename
- Type
- string
- Description
The path to your script file.
modDesc.xml
<placeableSpecializations>
<specialization name="ramp" className="Ramp" filename="path/to/your/script.lua" />
</placeableSpecializations>
<placeableTypes>
- REQUIRED
- Name
name
- Type
- string
- Description
Name of your specialization
- Name
parent
- Type
- string
- Description
Parent specialization of your custom specialization
- REQUIRED
- Name
className
- Type
- string
- Description
Name of your Lua class
- REQUIRED
- Name
filename
- Type
- string
- Description
The path to your script file
modDesc.xml
<placeableTypes>
<type name="skateboard" className="Skateboard" filename="path/to/your/script.lua" />
</placeableTypes>
<jointTypes>
Register a custom jointType.
- REQUIRED
- Name
name
- Type
- string
- Description
The name of the jointType
modDesc.xml
<jointTypes>
<jointType name="CUSTOM_JOINTTYPE" />
</jointTypes>