Adding Lock Load to a farming simulator 2015 mod

Game Version:
Programs required:

Modding Index | Vehicle Tutorials

going to show how to add a lock load script to a truck

Today I am going to be adding a lock load script to a truck. Open your vehicle i3d . Now go to a mod that has the locking script working. Find “fixArea” click on the “fixArea” in the Scenegraph Now go to file Export Selection with files so you have the files under the fixArea. Some mods might say Bale Lock or fixArea The first two have to be the same as in where they are same goes for the back two

Please note that I did use some scripts from offspring gaming f650 rollback v2

Let’s start editing the modesc.xml so open the modesc in notepad++ you can get that for free

In the <l10n> add this <text name=“universalAttacher”><en>Lock</en><de>Sperre Load</de></text>

    <text name="universalAttacherAttach"><en>Load Lock</en><de>Load Sperre</de></text>
    <text name="universalAttacherDetach"><en>Load UnLock</en><de>Load Entsperren</de></text>

Now let’s do the specializations

You will need this specializations

<specialization name=“universalAttacher” className=“universalAttacher” filename=“scripts/universalAttacher.lua”/>

	<specialization name="selectable" className="selectable" filename="scripts/selectable.lua" />

You also need extraSourceFiles

Don’t forget to add this right after specializations Just go down one line and add this

	<sourceFile filename="scripts/SetAttachEvent.lua" />	

Now go to this area


      <type name="KenW900" className="Vehicle" filename="$dataS/scripts/vehicles/Vehicle.lua">
      <specialization name="animatedVehicle" />
      <specialization name="motorized" />
      <specialization name="steerable" />
      <specialization name="drivable" />
      <specialization name="cylindered" />
      <specialization name="bunkerSiloCompacter" />
      <specialization name="honk" />
      <specialization name="indoorHud" />
      <specialization name="mountable" />
<specialization name="fillable" />
<specialization name="universalAttacher"/>
<specialization name="selectable" />
<specialization name="triAxle" />
<specialization name="Fenster" />

just look at these and compare them to your mod

the main ones you need are universal Attacher Selectable BunkerSiloCompacter motorized steerable drivable cylindered fillable

Now let’s go to the inputbindings

<input name=“universalAttacher” category=“VEHICLE” key1=“KEY_z” button=“” /> you just need that one inputbinding

that input binding calls universal Attacher

That’s all for the moddesc don’t forget to save the file

now go into the vehicle.xml add these lines in below dynamicMountTrigger

<!– object attacher –>

<baleCastPoints allowVehicleAttachment="true">
	<baleCastPoint frontRight="28|0" backLeft="28|2" attacherNode="0>"/>
	<baleCastPoint frontRight="28|1" backLeft="28|3" attacherNode="0>"/>

now open the vehicle i3d one more time to get the indexes for the bale cast points

you have to do the front right both first then do back Left Last now fix the fixArea Then on the left look for Attributes then look for index path example 0>28|0 do that 4 times and save the file and zip it back up and go test in game then when in game if you did this right you Should see a Lock Load Appear in the Controls menu here is the link to the scritps i am using here is the mod i am using to add the lock load to here the mod i am using to lock off to see how the locking script is done the mod link is in the video desc I forget to add this but the Programs you are going to need are Giants Editor i use 6.0.3 Notepad++ you can get that on the internet and Farming simulator going to add some images

Original Author: walker1234 | Date: June 24, 2016

Modding Index | Vehicle Tutorials