How to Add In-Game Store Items to Your Farming Simulator Mod

By Jason van Gumster, Christian Ammann

After you have your modDesc.xml created, you need to make your Farming Simulator mod visible to the in-game store, which is why the storeItems section of the file exists. The convention is to put the storeItems tag just after multiplayer. Note that this tag is storeItems, plural. You can nest another tag, storeItems, within the storeItems section in order to have a mod that adds multiple items to the store.

For simplicity’s sake, however, assume for the time being that your mod only adds a single item to the store. In that case, quite a bit of the information you’ve already typed in the beginning of modDesc.xml is repeated within the storeItems section.

The first two tags of note in the storeItems section are name and functions. Generally speaking, you want to use the same basic information here that you use in the first half of your modDesc.xml, though you have a greater opportunity to have a longer description for the store.

That said, the storeItems section has two major differences pertaining to the name and functions tags when compared to the title and functions tags in the upper half:

  • Localization: Whereas in the first part of modDesc.xml, you have localized versions within the title and functions tags, the name and functions tags in the storeItems section are localized together; the language tags (such as en, de, fr, and so on) are parent sections that name and functions tags for each language are nested into.

  • CDATA functions: This one has the real potential for throwing you off. The functions in the storeItems section all appear to be wrapped in a strange tag that starts with <![CDATA[ and ends with ]]>. This just means that the text between those square brackets should be considered character data, which means that you can interpret this text as XML, but the XML reader shouldn’t.

Beyond the name and functions tags, you need to include a handful of other tags in the storeItems section:

  • <rotation>: The rotation of your mod when it’s bought and inserted in the game. For consistency with other mods, try to keep this at 0.

  • <image>: This tag is like the multiplayer tag in that it’s self-closing and only has attributes. In fact, it has two:

    • active: This is the path to an image you want to use as your mod’s icon in the store. It should be exactly the same as the image in the iconFilename tag. Even if it’s not the same file, it should follow the same rules (256×256 pixels, PNG or DDS format – DDS is preferred).

    • brand: Often a mod will be a known vehicle of a known brand. This attribute points to an image (256×128 pixels, PNG or DDS format — DDS is preferred) that represents that brand.

  • <price>: This is the amount of in-game money you expect the player to spend on purchasing your mod.

  • <dailyUpkeep>: This is the amount of daily in-game money that a player must spend to keep your mod on his or her farm.

  • <xmlFilename>: Complex mods, such as vehicles, have their own XML file that defines additional attributes. This tag is the path to that XML file. If you’re being properly organized, this file should be in the same folder as your modDesc.xml.

  • <brand>: If your mod is of a specific brand, you can include it here. If that brand is already used in the game, you can use Farming Simulator’s variable name for it (this is why the brand tag in the provided sample mod starts with a dollar symbol). You can also put any other brand name you want here.

  • <category>: If your mod is a machine or vehicle, you need to specify a type. The following lists all of the available machine types you can choose.

    • baling

    • beetHarvesting

    • cultivators

    • feeding

    • fertilerSpreaders

    • frontLoaders

    • harvesters

    • loaderWagons

    • manureSpreaders

    • mowers

    • plows

    • potatoHarvesting

    • slurryTanks

    • sowingMachines

    • sprayers

    • tedders

    • tippers

    • tractors

    • weights

    • windrowers

    • woodShredder

    • misc

At this point, your full modDesc.xml should look akin to the following:

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<modDesc descVersion="20">
 <author>My Name</author>
 <en>My Mod</en>
 <de>Mein Mod</de>
 <multiplayer supported="true"/>
  <name>My Mod</name>
  <name>Mein Mod</name>
<![CDATA[Dies ist der Beispielmod.]]>
  <image active="" brand=""/>

For the most part, that’s it. You should have enough to get started. Some specific tags are relevant if your mod is a map or does something really different. However, if you have a mod, you can easily find a mod that does something at least a little bit similar and look at its modDesc.xml for pointers on how to properly format yours.