Editing Mod Mass and Weight plus the Collision Box

Game Version: For FS2011-2013
Programs required: Giants Editor 4.1.7 upwards, also Winzip, Jzip, 7zip or WinRar

Modding Index | Vehicle Tutorials

This Tutorial was written for FS11 but also applies to FS13.

This Tutorial will show you basically step by step, how to change the weight of a mod. How to change the weight of a loaded mod. and my thoughts on The Collision Box - this is applicable to modders (mod makers).

Software required: * Winzip, Jzip, 7zip or WinRar *Giants Editor

Knowledge required:

* able to unzip zip files to a specific place * able to load a mod into GE * able to edit Attributes in GE

Advanced Knowledge required:

* How to make a Mod * Editing Mods in GE

Associated Documents: nil

Section (1)

The Weight or Mass of a mod is measured in metric tonnes.

If you unzip your mod and then load the i3d file into GE; you can then note the Mass of the mod in the Attributes window - usually on the right hand side of GE, unless you have moved it.

After loading the Mod, click on to select and highlight the very first object of the mod, this will always be a blue cube. In GE 4.1.7 the pic below appears in the Attributes window, in GE 4.1.9 click on the Rigid Body tab in the Attributes window.

Note below: the Mass of this mod is 5.72449 (metric tonnes) Fig:1

Technically, this figure is determined by the size of the collision box.

Giants have built in a fudge factor to allow a prototypical weight to be given to a Mod.

The fudge factor parameter is the Density attribute as below in this case 0.1 Fig:2

You can increase or decrease the weight of a Mod by inputting different numbers into the Density box.

Below, we have changed the Density to 0.15 and the Mass has risen to 8.58422 Metric tonnes. Fig3

Obviously inputting a smaller number will decrease the Mass of a Mod.

No change will be seen in the Mass until you save the Mod and reload it.

Mod makers see Section (3)

Section (2)

The Mass of a mod is actually its Tare or its weight when empty, it does not take into account the weight of any product in the mod.

There is (an optional) line in the mods XML file: <massScale value=“n” />

Not all mods may have this line, you can copy and paste the above line if necessary. The n is a number usually 1 (by default) and is a multiplier of the mods Mass.

So if a trailer holds 30 tonnes, and has a Mass(tare) of 6 tonnes, then in the mod xml: <massScale value=“6” />

This makes the Mod when loaded 36 tonnes fully loaded.

In real life, vehicles have three weight specifications:

Tare = the weight of just the vehicle empty in working condition

Mass = how much product it can carry

Gross Combination Mass = Tare + Mass

In FS11:

Tare = Mass

Mass = capacity

GCM = massScale

Section (3)

The Collision Box.

My knowledge on this subject is minimal at best, however converting a lot of FS09 mods to FS11 as well as building quite a few mods for FS11, coupled with knowledge from building mods for other 3D Games has led me to providing the following information.

The Collision Box can be quite a complicated animal to understand properly, fortunately to a point, we don't have to completely understand it to get a proper one working for us.

In other 3D games, the collision box is a virtual box that encloses a mod and drives the interaction between the mod and external influences.

In Giants FS, as well as providing a collision between the mod and all the trigger boundary's it might encounter, like fuel triggers, loading/selling points, buildings and ingame vehicles; it also sets how the mod behaves in situations and provides a container for the mod to be parented to. Most importantly for FS11, it is a real physical object rather than a virtual one in other 3D games.

Most mods I look at seem to have a minimal Collision Box, sometimes even a multishape part. I don't believe this is necessary and from a recent conversion experience, it actually worked against the mod being successful…

A recent project to convert the Miller Nitro from 09 to 11 highlighted the downfall of a minimal Collision Box.

See below the original Collision Box after splitting the mod off it. Fig:4

It was so high it would not collide with the default fuel trigger on the default map…

As a note, these minimal collision boxes seem to be a feature of FS09 mods; most I have seen will suffer from the problem of not activating the refuelling trigger.

I made a new one 7 metres long by 3 metres wide and 4 metres high, when used instead of the original, the mod could be refuelled… Fig:5

If you need to make a new Collision Box for a mod, then make sure you adjust the axis centre to be the same as the one you are replacing.

In the case of the Miller Nitro I also needed to move the axis centre to match the original one, so when the mod was placed back in, it stayed relative to the original axis. This was achieved in Blender before exporting it as an i3d file. If I had not made the axis the same, then I would have had to move each child part to get the mod to be in the correct place in the Collision Box. Best do one fiddly thing than try to move and get all the children in their correct place.

If the original Collision Box has its axis at “World Centre” ie. 0 0 0 then you would make your new Collision Box with its axis at World Centre…

To get the proper attributes (Collision Mask etc) for it, I simply opened up the default Lizard Self-propelled Sprayer and used its attributes. Here is where you do not need to know the ins and outs of the collision box settings, just copy them from a similar default mod.

Collision boxes cannot be a Transform Group, they must be Dynamic and cannot be scaled.

By default GE calculates the Mass of a Mod by cubing the dimensions of the Collision Box. The Nitro's new box massed out at 84 tonnes. This is where the fudge factor mentioned in Section (1) comes into play. I simply made the density 0.2 which brought the mass back to approx 18 tonnes.

My advice if building an vehicle mod is to make a Collsion Box to the outside dimensions of the mod (Overall Length, Overall Width, Overall Height) and use the density attribute to bring the Mass back to real world data…

In the interests of Low Poly modding:

You might think that a tractor Collision Box would look like this: Fig:6

This Collision Box has 22 triangles.

A cube only has 12 triangles and in my opinion will serve the same purpose.

It is possible to delete the top and bottom polys (quads) bringing it down to 8 triangles, I have tested this and routinely make minimal collision boxes that do not appear to adversely affect the mods physics.

Additions, corrections of fact and flames always welcome Edit: spelling corrected…

Original Author: sandgroper | Date: November 23, 2012

Modding Index | Vehicle Tutorials