Cities: Skylines – How to Paste RTT-Scripts

This guide shows how you can add vehicle-scripts to your existing RTT-XML-file.

Long story short: If you want to randomize multi-trailer trains, you have to make a bit more of a complicated script since the game doesn’t know what a multi-trailer is. I will include a script in the workshop description for all of my multi-trailer train assets.

This process is fairly easy but for people who are not that tech-savvy it can be a bit complicated at first.

Why?

I could simply include the scripts into the asset, but the big downside to this is that you cannot change the length of the train anymore if i do this. I like to keep things more modular, so people who want trains with a length that fits vanilla cargo stations can use them aswell to their full extent.

Getting Started

Things You Need

First of all you (obviously) need to subscribe to Acc3ss Violation’s RTT-Mod.

I don’t know when the mod will create the local file, but i think loading into a savegame with the mod activated is a good step to get it to be generated.

I recommend getting a good text editor like Notepad++.

It makes editing XML and other files much easier.

File Location

If it is generated, this is where you can access your local RTT-XML-file:

<LocalDrive>\Users\<YourUser>\AppData\Local\Colossal Order\Cities_Skylines

This path might differ from user to user so i put them in “<>”-brackets.

The local drive is usually C: but i dont know how your computer is set up…

If you don’t see the “AppData”-folder, it’s probably because this is usually hidden by Windows.

Theres 2 workarounds to this issue:

Either you can type %AppData% into your Windows Explorer, or you can tell Windows to show hidden folders in the Explorer in general, following these steps:

  1. Open File Explorer from the taskbar.
  2. Select View > Options > Change folder and search options.
  3. Select the View tab and, in Advanced settings, select Show hidden files, folders, and drives and OK.

Pasting a Script

XML-Basics

Before you make any changes to your RTT-XML-file, please make a backup as you might do some mistakes at first and i dont know how RTT deals with mistakes in the syntax. (Maybe it will be autocorrected, maybe nothing will happen, maybe it will get deleted I DON’T KNOW).

If you’ve never used RTT before and haven’t made any trains with it yet the contents of your file should look like this:

<?xml version="1.0" encoding="utf-8"?>
<TrailerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Vehicles>
  </Vehicles>
  <Collections/>
</TrailerDefinition>

XML is a tag-based language, which means (in layman’s terms) that these tags just describe what the underlying text is. For example: everything that comes after the -Tag is part of a vehicle (or in this case; part of a train).

Tags always need to be closed so that the mod knows where the vehicle “description” ends.

Tags are closed with a slash “/” as you can see above with the -Tag.

Where To Put The Script

My scripts will always be ready for pasting so its very simple.

For safety i recommend leaving a bit of space between tags so that you’re 100% sure you’re within the tags borders, like this:

<?xml version="1.0" encoding="utf-8"?>
<TrailerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Vehicles>

PUT YOUR VEHICLE SCRIPT HERE

  </Vehicles>
  <Collections/>
</TrailerDefinition>

And then you just simply paste the script that you or I made.

After this step you just go ingame, open the RTT-mod-panel and click on LOAD and you should be good to go!

Multiple Scripts

If you want to paste multiple scripts in there you can put them like this:

<?xml version="1.0" encoding="utf-8"?>
<TrailerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Vehicles>

VEHICLE SCRIPT 1

VEHICLE SCRIPT 2

VEHICLE SCRIPT 3

...

  </Vehicles>
  <Collections/>
</TrailerDefinition>

Please note that all the vehicles (or trains) need to be within the <Vehicles>-tag one after another always opened and closed by the <Vehicle>-tag!

...
   <Vehicles>
      <Vehicle name="TRAIN1" useDefault="false"> //opening tag
         VEHICLECONTENTS
      </Vehicle> //closing tag
      <Vehicle name="TRAIN2" useDefault="false"> //opening tag
         VEHICLECONTENTS
      </Vehicle> //closing tag
      <Vehicle name="TRAIN3" useDefault="false"> //opening tag
         VEHICLECONTENTS
      </Vehicle> //closing tag
   </Vehicles>
...

Editing The Length Of A Train

Editing Ingame

I will usually check the “override trailer count” checkbox in my finished scripts so you just have to assign a Min trailer count and a Max trailer count.

In this case the train has a minimum length of 54 trailers and a maximum length of 54 trailers. Since my multi-trailers are made up of 3 trailers (Trailer A, Connection Bogie and Trailer B), this train has 18 multi-trailers (54 divided by 3), which can carry 36 containers (18 mutiplied by 2 for Trailer A and Trailer B).

It is best if you choose a length that is a integer multiple of 3, which means minimum or maximum of:

  • 3
  • 6
  • 9
  • 12
  • 15
  • 18

Is the correct setting for this value. (I honestly don’t know what happens when you don’t choose a multiple of 3. I never tried it… what can i say… i’m basically german so i overengineer alot…)

Editing In The Script

Somewhere in the script (at the very beginning of a vehicle script) you can assign a minimum (min=”54″) and maximum (max=”54″) length:

<Vehicle name="2846759388.TRAXX2 &quot;RheinCargo&quot; with SGGRSS_Data" useDefault="false">
      <TrailerCount min="54" max="54" />
      <Trailers>
        <Trailer...

More Editing

Obviously you can edit the Vehicle-Script as you like but it’s not very easy since submeshes are not shown in the preview windows. If you want specific container setups you need to know which trailer name corresponds to which container. I named my multi-trailers so you can just check for the trailer number.

A multi-trailer setup usually looks like this:

  • Trailer A: 1st in the multi-trailer list. (Invert Probability: 0)
  • Bogie: 2nd in the multi-trailer list. (Invert Probability: 0)
  • Trailer B: 3rd in the multi-trailer list. (Invert Probability: 100)

It is very important that Trailer B has an Invert Probability of 100! Otherwise the trailer will not be “rotated” and doesn’t look as intended!

You May Also Like


Be the first to comment

Leave a Reply

Your email address will not be published.


*