Tutorial written using MS2 v2020.10

Note: All images and hyperlinks open in a new tab or window (depending upon your browser settings).

What are Vehicle XML Templates?

In simple terms, vehicle XML templates are what Mod Studio 2 (MS2) uses, in order to list the specific vehicle in the MS2 options when creating a vehicle mod.

The vehicle database stores all vehicle XML templates within MS2.
These templates are accessed when users create a mod for that specific vehicle.

What is a XML file?

An XML file is an extensible mark-up language file. It is used to structure data for storage and transfer. In an XML file, there are both tags and text. The tags provide the structure to the data. The text in the file that you wish to store is surrounded by these tags, which adhere to specific syntax guidelines. At its core, an XML file is a standard text file that utilizes customised tags, to describe the structure of the document and how it should be stored and transferred. (source: indeed, Oct 2020)

For MS2, the tags represent certain key variables and the text in-between these tags represents the data required in order to produce a vehicle mod template in MS2. See the example below for a better understanding.

How to Create a Vehicle XML Template file?

There are two ways in which you can create a vehicle XML template:

1. Write the XML file manually in a text editor such as Notepad++ (found on a this page here)
2. Use the graphical user interface in Mod Studio 2 (found below on this page)

You can use which ever process you feel most comfortable with.

How to Create a Vehicle XML Template using MS2?

When it comes to creating a Vehicle XML Template using Mod Studio 2 (MS2), there are a couple of ways you can do this:

1. Use "Load vehicle from mod" or "Load from extracted folder" if the former fails.

2. Use "Add new vehicle" using the Vehicle Editor (skip to now).

The first two options will add all accessories for a vehicle mod into the template (whether they are paintable parts or not). You can remove unwanted accessories afterwards using the Vehicle Editor.

However, if you choose to add the vehicle using "Add new vehicle", then you only add the accessories that are paintable from the very start, saving you time searching through a rather large list of accessories added which are not required.

You can use which ever process you feel most comfortable with. We recommend using the "Add new vehicle (Vehicle Editor)" option for trailers and advanced trucks.

All the above options can be found in MS2 > SCS Tools (tab) > Vehicles.

Clicking on "Vehicles" opens the Vehicle Database within MS2.

The vehicle database stores all vehicle XML templates within MS2.
These templates are accessed when users create a mod for that specific vehicle.

Screen shot of Vehicle Database in MS2

Load vehicle from mod

1. Within the Vehicle Database window, click on the "Load vehicle from mod" button:

Screen shot showing the load vehicle from mod window in MS2

2. Select the vehicle mod that you wish to create a vehicle XML template for. In this example, I am selecting Pendragon's Volvo FH2012 mod (based upon ohaha's original Volvo mod).

3. Click on "Open".

Now for this mod, we get an error message:

Screen shot showing the error that pops up. It states, could not find any vehicles. Did you select the correct mod or folder?

This error can occur for possibly more than the reason we have below.
If it happens to you, please report it to the developers as we haven't come across your reason yet.
Please report it to developers via the discord server or via Reporting Issues (found on this page)

This has happened because the mod is missing a definition file. Specifically, data.sii due to the mod using the default SCS Volvo 2012 data.sii file; credit: m1keY.

The vehicle definition file is usually located in: e.g.

Truck = base_game \ def \ vehicle \ truck \ volvo.fh16_2012

Trailer =base_game \ def \ vehicle \ trailer_owned \ scs.box

So to fix this, we have to get the default SCS Volvo 2012 data.sii file and include it in the mod in order for MS2 to create a vehicle xml template properly.

Then we can use the feature "Load from extracted folder".

If you have successfully loaded a mod, please read onwards from step 3 in the next section "Load from extracted folder".

Load from extracted folder

You can also extract a mod archive file (.scs or .zip) to a temporary directory and then create a vehicle XML template using MS2.

Using the same example from before (Pendragon's Volvo FH2012 mod), I have extracted the mod and copied over the missing file that was causing the error above.

1. This time, within the Vehicle Database window, click on the pointing downward arrow to the right of the "Load vehicle from mod" button and select "Load from extracted folder" option.

2. Navigate to the extracted mod folder, highlight it and click on "Select Folder":

Screen shot showing the select folder window in MS2

3. Select the vehicle(s) to you wish to create a vehicle XML template for (so that they are ticked) and click on "Select":

Screen shot showing the select vehicles window in MS2

4. This will cause MS2 to create a vehicle XML template (including all accessories). MS2 will then present you with the Vehicle Editor. Once you save the vehicle XML template, it is added to the Vehicle Database within MS2. 

From the Vehicle Editor, you can edit your vehicle xml template's basic information such as vehicle name, as well as add or remove accessories etc. You can learn how to do this in the next section, "How to use the Vehicle Editor (Add New Vehicle)?".

It is best to save a new vehicle template xml file within the following directory; this is because when you update MS2 to a new version, these files do not get replaced.


C:\Users\[username]\Documents\Mods Studio 2\UserVehicles


If the "UserVehicles" folder doesn't exist, create it but make sure to name it exactly as seen here!

How to use the Vehicle Editor (inc. Add New Vehicle)?

The Vehicle Editor is what you use to either:

a) Create a New Vehicle XML Template from scratch

b) Edit a current existing Vehicle Template

 

The Vehicle Editor interface

If creating a new vehicle XML template, you will need to first fill out the Basic vehicle information including: internal name, vehicle author and vehicle name. Then select the Vehicle Classification information using the drop down menus.

Otherwise only vehicle author and vehicle name may just need editing here (see the screenshot below for Pendragon's Volvo mod example default values).

You can learn more about the data items (e.g. vehicle name, game etc) here.

If you require help on obtaining internal name values, please read here.

Note: Images in this section will look slightly different in future versions.

Screen shot showing the vehicle editor window in MS2

Adding or Editing Vehicle Accessory Items

To add or edit the vehicle XML template accessories, within the Vehicle Editor, click on the downward facing arrow to the right of Accessory items (see screenshot above).

Using Pendragon's Volvo mod as an example, you can see that there a lot of accessories which are included. Not all of these are required as the screenshot illustrates below (i.e. plastic is not a painted part).

So for the example below you would delete that accessory item (i.e. select it in the left hand window pane, then click on button 2).

Screen shot showing the accessory items window in MS2

Button 1 = Create a new accessory item (in the left hand pane), then you fill out the properties on the right hand side.

Button 2 = Deletes a selected item.

Button 3 = This copies the currently selected item which you can edit the properties for. This is useful when adding several list items that are a part of the same "group" (e.g. trailer side skirts).

If you need aid understanding the different properties, please refer to this table.

If you require help on obtaining internal name values, please read here.

 

Once you are happy that all vehicle accessories that need to be included in the XML template are present in the list, simply click on "OK".

We recommend saving your template before adding or editing vehicle variants.

 

Adding or Editing Vehicle Variant(s)

To add or edit the vehicle XML template variant(s), within the Vehicle Editor, click on the downward facing arrow to the right of Vehicle variants.

This is exactly the same process as with adding or editing vehicle accessories; except this time you need to add either truck cabins or trailer body types.

The example below is of Pendragon's Volvo mod, which has slightly more than the default SCS model.

Screen shot showing the vehicle variants window in MS2

Add Button = Create a new variant item (in the left hand pane), then you fill out the properties on the right hand side.

Delete Button (red cross) = Deletes a selected item.

Copy Button = This copies the currently selected item which you can edit the properties for. This is useful when adding several list items that are a part of the same "group" (e.g. trailer side skirts).

If you need aid understanding the different properties, please refer to this table.

If you require help on obtaining internal name values, please read here.

 

Once you are happy that all vehicle variants that need to be included in the XML template are present in the list, simply click on "OK".

 

Now SAVE your vehicle XML template by clicking on "Save" within the Vehicle Editor.

It is recommended to save to the default location shown:

Screen shot showing the save as window in MS2

This completes the tutorial on how to create a vehicle XML template using MS2.

Please share your work with others through our discord server (politely ask a member of staff to upload it).