Installing RealLifeNumbers

The process of installation is very simple. However, you need to
know, what to do. So please read these instructions.

Overall concept.

This mod is a collection of independent scripts.

If there are scripts, you do not want to use, they should be commented out in
the file modDesc.xml. 

Here are two lines in modDesc.xml

	<sourceFile filename="RealNumbersLoans.lua"/>		
<!--	<sourceFile filename="myTest.lua" />	-->	

In the first line the script RealNumbersLoans.lua is in use.
In the second line the script myTest.lua is commented out. It will not 
be loaded into the game when the mod starts.

Many of the scripts (lua files) read parameters from an associated xml file.
Some of those scripts can instead use parameters defined inside the script. In this case
the script does not need the xml file.

The advantage of using xml files rather than internal parameters is that you can use 
different parameters values on different maps. If you only use the parameters stored 
internally in the script file, you will use the same parameters values on all maps.

The mod is not designed for multiplayer games. However, some users report that some 
scripts work, and others don't. 

In version 1.0.1.1 an attempt has been made to make the mod more useful in multiplayer mode. 

The host player must place the xml files in a folder modSettings/RealLifeNumbers/savegamex, 
where x is the number of the savegame. The client player must place the same xml files in a 
folder modSettings/RealLifeNumbers/savegame0. Savegame number 0 is not used by other savegames.


Step 1

In your main game directory, typically called FarmingSimulator2022 you 
may see a folder called modSettings. If you don't have it already, make one.

Step 2

Move inside the modSettings folder. Create a folder named RealLifeNumbers.
Make sure you use capital letters as shown.

Step 3

Move inside the RealLifeNumbers folder. Create a new folder named savegamex,
where the "x" is to be a number corresponding to your savegame. If you play a game
which is stored in savegame3, then create a folder in RealLifeNumbers with the 
name savegame3.

Step 4 

Unzip the downloaded zip-file in a folder OUTSIDE the FarmingSimulator2022 folder.

Step 5

Go inside the folder named XML files. You will find folders named after countries,
states or regions. If you want to play a map situated in the UK (or any other map
and pretend it is located in the UK) use the xml files in the UK folder. 

For other countries, states or regions use the xml files in that folder. More 
countries, states and regions will be added in future updates. See step 12.

Open the xml files in an editor such as Notepad++ to get an idea what it contains.
(Notepad++ recognizes the syntax of xml files and makes reading and editing xml files
a lot easier than with standard Notepad program.)

There might be some additional information at the top of the file pertaining to 
this particular script and xml file.

All prices defined in the xml files are given in the currency of the country.

Step 6

One file requires some attention, that is my_cropGrowth.xml

In this file, the seed month and harvest month are defined for all crops. The xml file
is already customized to the country, state or region. However, you may have
more accurate information and would like to customize the growth cycles yourself.
For this to take effect on game start, you need to make your personal customization
before using the mod for the first time. 

When a crop is seeded, you cannot change its crop cycle, not even by reloading the game
with a new crop cycle. 

When a new game is started, FS generates crops in the fields and set their growth state 
for August according to the current crop calendar. If the in-game crop calendar is used
during start of a new game, you will get August crop growth states according to the 
in-game crop calendar and the RealLifeNumbers script will not have any effect until you 
seed new crops yourself.

If you have the RealLifeNumbers xml files in place, before starting a new game, the 
automatically defined crops will have growth states according to the customized crop calendar.

WARNING. This script alters the crop calendar and may alter the growth state of crops
in an existing game. As a result, some crops may become withered. This is a transitional
effect. When you seed the crops yourself, the new crop cycles should work as intended.

WARNING. There are an infinite number of possible crop cycles. Only a few have been tested.
I'm certain that it is possible to create crop cycles that will result in failure on 
game launch. If that happens to you, try to redefine the crop cycle so it looks a bit
like one that works. 

Do not make crop cycles longer than 10 month. If the crop cycle were set to 11 months, 
the withered state would be superimposed on the seed month.

Crops seeded in the fall are expected to have a dormant winter period starting in december 
or earlier and finishing at the end of january or thereafter. By default the winter dormant 
period is set to be from November to January, both months included.

-----   Handling disabled crops   -----

Some maps have certain crops disabled in the seed/harvest calendar because that crop is 
incompatible with the local climate. In this case you must either delete that crop 
from my_cropGrowth.xml or cut it out and paste it in the comment section at the bottom
of the file.

Step 7

Copy the xml files you want to use to the newly created RealLifeNumbers/savegame folder.
The script are supposed to survive without the xml file. If no xml file is present in 
RealLifeNumbers/savegame, the script will use internal values.

Read more in the Readme.txt file in the xml folder.

Step 8

If you want to use the xml files in other savegames, make additional copies, e.g.
RealLifeNumbers/savegame1, RealLifeNumbers/savegame2, etc.

Step 9

Move the zip file FS22_RealLifeNumbers.zip to your mod folder.

Step 10

TEST THE MOD ON A NEW GAME.

The scripts alters game parameters and may have undesirable effects on exisiting games.
The script RealNumbersCropGrowth.lua alters the growth patterns for some of the crops.
This is a complex process impossible to test all outcomes of. 
When you start a new game, a crop cycle has already been defined. Some crops
may already be withered, when the game starts.

Step 11

The values in the xml files have been set for different countries, states and regions,
but the idea is that you adjust the values to the map you play. 

As time goes, you may have many sets of xml files suitable for maps in various regions
around the world.

Step 12

When you have a set of xml files you like a lot, add your name to the files and send them to me, 
so they can be included in the next mod update.

Step 13

RealLifeNumbers and DynamicFieldPrices are not 100% compatible.
To improve this to some degree, you may need to change a line in DynamicFieldPrices.lua:

old line 71			newPrice = field.areaInHa * pph * field.priceFactor
new line 71			newPrice = field.price * field.priceFactor