In this, the second blog post, we will set everything up for modding the Farming Simulator game. We will be using version 19 of the game since Farming Simulator 22 is not released yet. We will edit the game files, prepare save games, and more. I assume you've read the previous blog posts and are up to date with information.
You can also jump ahead to:
Preparing the game
What I mean by preparing the game, is setting up launch arguments, making save games, editing .xml files and making sure you can make mods as fast and as pain-free as possible.
To get started, make sure to read our wiki article on how to add launch arguments to the game. We are going to use the -cheats, -restart and -autoStartSavegameId arguments.
What this will do is enable cheat commands in-game, get rid of those annoying intro movies, and load the save game you select automatically. Nice!
But to be able to use the cheat commands to help you with testing, you will need to enable the in-game console. We have another Wiki page for that, which you can check out below.
Editing a save game
In order to be able to test your mods, you need an easy and fast way to do that. And unless you are creating a mod that makes new maps or character changes it is pointless to start a new game every time. It takes a while to select all the settings.
So let's start by creating a new savegame with a map of your choice and start it. Then, when in-game, set things up if needed (buy equipment, set up buildings) and save, then quit.
You should save your mod testing map in the first slot, so you can load it the fastest when in-game.
To give yourself an ever better starting position, you can change some things in the save folder, like giving yourself more money, more equipment, produce, ...
Start of by going into your game's user settings folder, and open the folder containing your savegame. (mine is savegame1)
You can find the location here for windows:
and for mac OS:
The save folders contain a lot of files, from cache files, to map and fruit helper files, and most importantly all the xml files. Now let's look at what each of these xml files do.
|careerSavegame.xml||Settings, most of which can be changed in-game and a list of all the mods.|
|densityMapHeight.xml||Fill type mappings.|
|economy.xml||List of "great demands" (crop sales) on the map.|
|environment.xml||Time, weather and forecast options.|
|farmland.xml||A list of lands to IDs and for multiplayer farms.|
|farms.xml||List of all the farms, their properties and finances. (Money)|
|fruit_density_growthState.xml||Crop indexes and growth timers.|
|items.xml||All the items on the map. Placeables, silos, sellpoints, etc.|
|missions.xml||A list of missions currently offered.|
|npc.xml||List of NPCs player has hired.|
|vehicles.xml||List of all the vehicles and tools, and their positions.|
|weed_growthState.xml||Growth state of weeds.|
<farm farmId="1" name="My farm" color="1" loan="0.000000" money="92197.000000" loanAnnualInterestRate="100.000000">
<instance typeName="SUN" variationIndex="4" duration="14.000000"/>
Preparing for our first mod
I know you are probably anxious to get started with modding, but there is one more hurdle we need to get over. There is a proper way to do this and it should be followed if you want to publish your mod to the modhub page.
Let's start with by preparing a folder to contain our mod. Go into your mods folder, and create a new folder. Let's call it "FS19_fendt500_mrbrutal". You can use your own name at the end to make it unique.
Mod names should always start with game version like so: "FS19_". They should be in english, and should not contain any spaces or weird symbols (You can use "_" as a delimiter). Examples: "FS19_Fendt1000_Vario", "FS19_Fendt1000Vario"
You do not have to zip up your mods until you are finished with making them. The game will treat the folder exactly the same as a .zip file if you have all the necessary files inside the folder. (But we will talk about that in the next blog post). This is how your mods folder should look like. (I also have some additional mods from the modhub)