Making a mod from a default item -- Part 2. -- The modDesc

Game Version: FS11 and later
GE Version: ? and later


Modding Index | General Modding Tutorials


Making a mod from a default item – Part 2. – the modDesc

This Tutorial has been written for FS11 and may not apply to previous versions.

This Tutorial will show you basically step by step, how to find, extract and copy the modDesc from the sampleMod.zip This Tutorial does not and will not cover converting an FS09 mod to FS11 – although it does have valuable information to help you do that, if you look for it. I have used the word item here to universally cover all things like tractors, implements, vehicles etc

Software required

  • Unordered List ItemWinzip, Jzip, 7zip or WinRar

Knowledge required

  • Unordered List Itemable to use Windows Explorer (file manager) to move files to other folders
  • able to unzip zip files to a specific place

Associated Documents:

http://www.ls-uk.info/forum/index.php?topic=99606.0 Making a mod from a default item – Part 1.  – getting it all together http://www.ls-uk.info/forum/index.php?topic=99609.0 Making a mod from a default item – Part 3.  – Making a custom modDesc http://www.ls-uk.info/forum/index.php?topic=99932.0][b][color=blue]Making a mod from a default item – Part 4.  – adding specializations

All mods require a certain number and specific named files to work in FS11, and of course other versions and even other games…

From a previous tutorial:

modDesc (file) = Mod Description - the initial file of a mod that outlines the basic operating features, description, price etc most importantly it calls the XML file and any specialization lua files

XML (file) = Extensible Markup Language - this file basically contains the physics of the mod and most importantly calls the i3d file

i3d (file) = the file format of the shape or mesh file of the mod

additionally mods can include:

Lua (file) = A fast, lightweight scripting language - it is not an acronym for anything - Portuguese for Moon… used to add extra functionality eg. animations to a mod

A default item or anything found in the game install folder(s) can hardly be called a mod; as a mod is:

Mods = apparently short for Modifications - in general any map, vehicle, implement, building or object that is either an edit of a default item or a completely new item - in most other games would be called an Addon (Add-on)

Default items do not have a modDesc, the functions of the modDesc are handled internally by the game.

Luckily default items do have an xml file which provides valuable information if you want to make a mod from a default item.

Why would you want to do this:

  • To reskin it to a different colour or brand,
  • To add extra animations or functionality,
  • To learn how mods are put together and provide a base of knowledge for further mod making,
  • Because you can…

FS11 has certain built in functions that can be called by a either standard single line command or a standard set of lines.

These functions can be applied to a mesh or shape file you have made in a 3D modelling program therefore not requiring any Black Art lua scripting.

One of the first lines in an xml is: <vehicle type=“XXX”>

This isn't actually a command as much as letting the game know the items' game “name” - this is important later.

Another line in the xml file of an item you will sometimes find, is the line: <typeDesc>$l10n_TypeDesc_XXXX</typeDesc>

This is an example of a single line command. This line tells the game to show a number of Key function commands in the F1 Help Box as below for a cultivator.

http://www.fs-uk.com/forum/gallery/84448_03_02_12_11_20_19_1.jpeg

Inportant Note: If you use standard names or typeDesc descriptions you will not be able to add custom scripts/specializations. These will block any extras you have added.

The XXXX in the line above can be any one of the following:

tractor frontloader telehandler combine combine_cylindered selfPropelledSprayer implement shovel plough trailer baler forageWagon cultivator cultivator_animated mower sowingMachine sprayer sprayer_animated manureSpreader cutter cutter_animated windrower tedder trafficVehicle milktruck baleLoader

This is handy to know when converting items to mods.

From this line you can then cross reference the listing below to get the specializations for a custom ModDesc.

The following sections can be highlighted and then copied directly to your custom modDesc in the appropriate section as required

<vehiclesTypes>
    <type name="tractor" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="motorized" />
        <specialization name="steerable" />
        <specialization name="hirable" />
        <specialization name="aiTractor" />
        <specialization name="honk" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="frontloader" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="motorized" />
        <specialization name="steerable" />
        <specialization name="mouseControlsVehicle" />
        <specialization name="cylindered" />
        <specialization name="hirable" />
        <specialization name="aiTractor" />
        <specialization name="honk" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="telehandler" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="motorized" />
        <specialization name="steerable" />
        <specialization name="mouseControlsVehicle" />
        <specialization name="cylindered" />
        <specialization name="hirable" />
        <specialization name="aiTractor" />
        <specialization name="honk" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="combine" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="motorized" />
        <specialization name="steerable" />
        <specialization name="combine" />
        <specialization name="hirable" />
        <specialization name="aiCombine" />
        <specialization name="honk" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="combine_cylindered" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="motorized" />
        <specialization name="steerable" />
        <specialization name="cylindered" />
        <specialization name="combine" />
        <specialization name="hirable" />
        <specialization name="aiCombine" />
        <specialization name="honk" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="selfPropelledSprayer" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="motorized" />
        <specialization name="steerable" />
        <specialization name="foldable" />
        <specialization name="fillable" />
        <specialization name="sprayer" />
        <specialization name="hirable" />
        <specialization name="aiTractor" />
        <specialization name="honk" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="implement" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
    </type>
</vehiclesTypes>
<vehiclesTypes>
    <type name="shovel" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="shovel" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="plough" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="plough" />
        <specialization name="foldable" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="trailer" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="animatedVehicle" />
        <specialization name="cylindered" />
        <specialization name="fillable" />
        <specialization name="trailer" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="baler" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="animatedVehicle" />
        <specialization name="cylindered" />
        <specialization name="fillable" />
        <specialization name="baler" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="forageWagon" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="animatedVehicle" />
        <specialization name="cylindered" />
        <specialization name="fillable" />
        <specialization name="trailer" />
        <specialization name="forageWagon" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="cultivator" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="cultivator" />
        <specialization name="foldable" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
   <type name="cultivator_animated" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="animatedVehicle" />
        <specialization name="cylindered" />
        <specialization name="cultivator" />
        <specialization name="foldable" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="mower" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="mower" />
        <specialization name="foldable" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="sowingMachine" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="fillable" />
        <specialization name="sowingMachine" />
        <specialization name="foldable" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="sprayer" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="fillable" />
        <specialization name="sprayer" />
        <specialization name="foldable" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="sprayer_animated" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="animatedVehicle" />
        <specialization name="cylindered" />
        <specialization name="fillable" />
        <specialization name="sprayer" />
        <specialization name="foldable" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="manureSpreader" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="animatedVehicle" />
        <specialization name="cylindered" />
        <specialization name="fillable" />
        <specialization name="sprayer" />
        <specialization name="manureSpreader" />
        <specialization name="foldable" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="cutter" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="cutter" />
    </type>    
</vehiclesTypes>

<vehiclesTypes>
   <type name="cutter_animated" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="animatedVehicle" />
        <specialization name="cylindered" />
        <specialization name="cutter" />
        <specialization name="foldable" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="windrower" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="windrower" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="tedder" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="foldable" />
        <specialization name="tedder" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="trafficVehicle" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="motorized" />
        <specialization name="pathVehicle" />
        <specialization name="trafficVehicle" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="milktruck" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="motorized" />
        <specialization name="pathVehicle" />
        <specialization name="trafficVehicle" />
        <specialization name="milktruck" />
    </type>
</vehiclesTypes>

<vehiclesTypes>
    <type name="baleLoader" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
        <specialization name="attachable" />
        <specialization name="animatedVehicle" />
        <specialization name="cylindered" />
        <specialization name="fillable" />
        <specialization name="baleLoader" />
    </type>
</vehiclesTypes>

So to make a custom modDesc file, the best option is to copy the modDesc from the sampleMod.zip which can be found (on a standard install on a Windows machine - it will be in a different location if you have the Steam version or a Mac) at:

C:\Program Files\Farming Simulator 2011\sdk\sampleMod.zip

http://www.ls-uk.info/forum/gallery/84448_03_02_12_11_20_20_3.jpeg

Unzip/unpack/unstuff/uncompress this file to another folder of choice on your hard-drive.

http://www.ls-uk.info/forum/gallery/84448_03_02_12_11_20_20_4.jpeg

Copy the modDesc.xml either to another folder or an existing mod you are working on, or a folder where you will be assembling a mod.

http://www.ls-uk.info/forum/gallery/84448_03_02_12_11_22_15_0.jpeg

Then you can begin to edit the modDesc file to suit your needs…

See: Making a mod from a default item – Part 3. – Making a custom modDesc

more to follow…


Original Author: sandgroper | Date: February 04, 2012

Modding Index | General Modding Tutorials