Adding a cowzone to an FS11 map that doesn't have one

Game Version: FS11
GE Version: ? and later


Modding Index | Map Making Tutorials


[center]How to add a standard default cowzone to an FS11 map that doesn't have one.[/center]

This Tutorial does not apply to any FS version other than FS11.

Adding a cowzone can be quite an involved process, although basically the reverse of deleting one from a map…

Always Backup your map (preferably the zip file) by saving a copy somewhere before you start editing

[center]www.ls-uk.info_forum_gallery_84448_06_12_11_3_32_52_2.jpeg[/center]

[hr]

Software required: [list] [li]Notepad++[/li] [li]Winzip, 7zip, jZip or Winrar[/li] [li]Giants Editor (GE) 4.1.7 or 4.1.9[/li] [/list]

Knowledge required: [list] [li]able to use Windows Explorer (file manager) to move files to other folders[/li] [li]able to unzip zip files to a specific place[/li] [li]able to edit text (xml and lua) documents using Notepad++[/li] [li]able to load a map into GE[/li] [li]able to export objects from a map to the correct locations[/li] [li]able to edit an i3d to correct texture paths[/li] [li]able to import into and manipulate objects in GE[/li] [li]able to zip mods to the correct standard[/li] [/list]

Associated Documents: [list] [li][b][color=blue][Tutorial] How to zip up maps properly for LS11/FS11[/color][/b][/li][/list] [br] [list][li][b][color=blue][Tutorial] Adding a working cow area to your custom map[/color][/b][/li][/list] [br] [list][li][b][color=blue][TUTORIAL] all you need to know about map's[/color][/b][/li] [/list]

[hr] A complete default cowzone consists of the following:

[list] [li]Milk Robot[/li] [li]3 bathtubs of water and triggers[/li] [li]Feeding triggers[/li][/list] [br] [list][li]Feeding Trough, plane and grass tip trigger[/li] [li]Manure Tank and trigger[/li] [li]Manure Clamp and triggers [/li] [li]silage clamp and triggers[/li] [li]cow fencing [/li] [li]Milk Tank[/li] [li]Cowshed [/li] [li]Open Stable [/li] [li]Single bath tub[/li][/list] [br] [list][li]Milk Truck Fill trigger[/li] [li]Milk Truck Start trigger[/li] [/list]

The first three items including any textures are loaded by the game to a predetermined place on a standard map from the game's internal directory.

You do not need the CattleMeadow.i3d in the Missions folder for a working cowzone… Nor do you need the Milk Robot folder in the models/objects folder.

It is possible (but not easy) to move the cowzone to a custom area on a custom map - see the second tutorial listed above.

A cowzone is required to make a map MultiPlayer compatible, however, you may just leave the Animal Husbandry lines in the .lua file and hide the Milk Robot and bath tubs under the terrain or a building, leaving out everything else

listed above; and adding a note in the upload that the map is MP but do not buy cows…

The cows will follow predetermined paths and will expect the Milk Robot, bath tubs of water and the feeding triggers to be in certain locations for correct animation.

Depending on your hardware profile you may not see all the cows you have purchased, the game will selectively reduce the numbers to prevent lagging the game.

The Feeding Trough and plane should remain where they are imported to, for correct animation.

Everything else can be moved to other locations if you wish and/or you can substitute mods for the middle set of items.

[hr]

If you do not have milk truck splines and/or traffic splines then you do not need the Milk Truck triggers - the milk will automatically get sold at midnight at the current (fluctuating) price.

The milk tank is non-working and can also be substituted.

There is a mod to [b][color=blue]Avoid Auto-selling Milk at Midnight[/color][/b]  if you wish.

[hr]

If you are adding a complete working default cowzone then you will need the following:

In the Missions folder, you will need a cattleMeadow.i3d for testing/placement purposes

Navigate to your models\objects folder and make sure you have all the folders and files required both i3d and texture files:

models\objects\bathtub\bathtub.i3d

models\objects\feedingTrough\feedingTrough.i3d

models\objects\manureTank\manureTank.i3d

models\objects\manureHeap\manureHeap.i3d

models\objects\silage\maizeSilage.i3d

models\objects\fences\cowFences.i3d

models\objects\milktank\milkTank.i3d

models\objects\milktruckTriggers\milktruckFillTrigger.i3d

models\buildings\shed\cowshed.i3d

models\buildings\openStables\openStable01.i3d

models\buildings\smallShed\smallShed02.i3d

Not strictly part of the cowzone; if you have a milktruckFillTrigger you will need a milktruckStartTrigger.i3d at a/the dairy.

If any of the above are missing, you will need to copy them from either the sampleModMap, the default map or another map that still has all these folders intact.

Traps for young players… in the sampleModMap as extracted/unzipped: The Feeding Trough, (grassSilage) and maizeSilage clamps have old 09 triggers that will not work in FS11

You will need to open the default map and export selection all those items to get proper working FS11 triggers, or from another map, or substitute mods that hopefully have fully working triggers…

The default map can be found by default in C:\Program Files\Farming Simulator 2011\data\maps\map01.i3d unless as below.

Never edit the default map or save it after exporting something from it- you will break your game and will have to reinstall…

The sampleMod Map can be found as a zip file in the sdk folder in your game install folder usually in Program Files on C drive unless you installed it somewhere else or unless you have Steam or a Mac then it may be in another folder somewhere else…

[hr]

So to begin:

First unzip the map either to your desktop or the mods folder.

Delete the original map zip file from the mods folder.

For testing and single player you do not need a mod/map to be in zip format to play it. However, under certain circumstances, FS11 does have some quirks/idiosyncrasy's so it is best to only run zipped mods/maps.

By default the Game will use a zip file rather than an unzipped folder of the same name in the mods folder. Leaving the zip file in will result in much frustration as your edits will not be seen ingame…

The Game calls part but not all of the cowzone and its textures from its own internal folders. The game will only load the milk robot, the three bath tubs of water and the feeding triggers.

Note: The Feeding Trough requires two sets of triggers, the feeding triggers on the cow side and the tip triggers on the other side.

If you import the cowzone from the Missions folder of the map you are editing for testing/placement purposes, delete it before saving your map - failure to do this will result in errors ingame, you can only have one cowzone per map, either default or custom.

[hr]

If you are simply making the map MP compatible:

Open the map in GE by double clicking on the map01.i3d, this should open the map in GE.

Import the CattleMeadow.i3d

Got to where it has been placed and either build terrain over the milk robot, bath tubs and feeding triggers, place buildings or objects over them or hide them in some way that suits your needs.

You may need to check or tick the visibility box to see things.

Delete the cattleMeadow.i3d, save your map, zip it up, move the zip if required to your mods folder and test it.

Remember to include a note if you upload it not to buy cows, that the map is not setup for them…

[hr]

To add a fully working default cowzone to a map:

Open the map in GE by double clicking on the map01.i3d, this should open the map in GE. Some creative people have renamed the map i3d to another name, in FS11 it *should* be the only i3d file in the root directory.

If there is a test.i3d file in the root directory: [list] [li]then you may have either an FS09 map or one that has been converted from FS09[/li] [li]If it is an FS09 converted to FS11 it can be deleted…[/li] [li]If it is an FS09 map more work is required and this procedure does not apply to FS09 maps[/li] [/list]

Navigate to the Missions folder and import the CattleMeadow.i3d - remember to delete it when finished.

Either import all the other items listed above from your map folder, these should appear on the map in their default locations, fully textured if not see below.  

Or if you have mods to substitute for the optional items, then unzip them to a folder within your map folder - usually buildings go into models\buildings and objects got into models\objects.

However, you may choose to unzip them into a folder of your choice ie. models\New Models folder to keep track of new items for credits when uploading.

Import and place any optional mods as required.

Should any mods appear untextured after importing, then you will need check the i3d file and/or texture file(s) are in the correct folders.

Do this by opening the mod i3d file in Notepad and look at line 6 onwards for texture paths, the texture files will be found between the <files> </files> tags.

Correct as required, either moving the textures to the required folder, or editing the texture path to point where the textures are.

In most cases, the textures should either be in the same folder as the mod, or in a sub folder of the mods' folder.

Save the file.

[hr]

Editing the .lua

Open the map .lua file - this may be called sampleModMap.lua if made from the sample map or another name if the map maker was talented enough to change it…

In most cases, this will be the only lua file in the root directory.

If the map maker commented out the Animal Husbandry lines, then it will look like this:

[center]www.ls-uk.info_forum_gallery_84448_06_12_11_3_32_52_1.jpeg[/center]

Simply delete the dashes so the text turns black like so:

[center]www.ls-uk.info_forum_gallery_84448_06_12_11_3_32_52_0.jpeg[/center]

If the lines are missing then find a map with a cowzone and copy the lines then paste into the exact areas as seen - probably better/safer than trying to type them in manually…

Save the file…

I would suggest you now zip up the map folder, move it to your mods folder as required and test it ingame, buy some cows and test all the triggers as necessary.

You can run the map unzipped if you wish taking into account all the precautions I have described.

[hr]

For the advanced modder…

You can export the entire default cowzone in one hit from the default map.

However, all the object/building/tree folders must be in place and have all the required textures else all/some things may be white…

You will probably have to edit the texture paths in the i3d file anyway…

Be very wary when using mod grass and silage clamps and manure heaps and tanks, the triggers and planes may need editing to work correctly with FS11, either because they are FS09 triggers or because they are basically incorrect.

Static Actor errors may be attributed to incorrectly formatted planes.

[hr] Thanks to Sniper214 for reviewing this procedure. [hr]


Original Author: sandgroper | Date: December 06, 2011

Modding Index | Map Making Tutorials