KB Update [1573] [ENG] - Creating Custom DBus World Lines


Last update: 19 Jan 21:26 UTC
Short link to this article: https://686031.w2zdp.group/kb/79



This guide will help you through the process of creating custom DBus World lines for use on our servers. Read through this entire article to get you set up with everything necessary.

1. Notes
2. Create lines folder
3. Accessing available stations
4. Editing lines.xml, lines.xml variables, Example line
5. Starting the game
6. Share your lines! (Optional)
7. Getting Support


1. Notes

  • You must already have DBus World installed for TruckersMP. You can follow our article here to learn how to download and install DBus World.
  • You can only collect passengers from bus depots/stations within cities. You may not use bus stops in TruckersMP.
  • You can find a full list of available bus stations within the stops.xml file provided by the latest TruckersMP bus lines you downloaded.
  • Reworked cities will often have bus stations completely removed from the map. You must remove use of these stations from the lines.xml file to ensure your custom lines continue to work.
  • You edit your lines at your own risk. We do not provide guarantee that damage wont be caused to your DBus World setup. We can only provide limited support to assist you in fixing issues with custom bus lines.

2. Create lines folder

The first thing you will need to do is create a duplicate of the latest TruckersMP lines file you downloaded and installed inside of your lines folder \Documents\DBus Client\maps. In this example, we copied the TruckersMP v1.53 and renamed the copy to TruckersMP Lines by ChrisPatrol.

TruckersMPDupLine

Inside of your duplicated folder, you will have two files named lines.xml and stops.xml.

TMPLines


3. Accessing available stations

By opening the stops.xml file in a program such as Notepad++, you will be able to view what stations are available to be added to a route. Below is an example of a bus stop in Hannover with the ID 0. You should not edit this file, other than to remove bus stations that no longer exist on the base map.

Hannover


4. Editing Lines.xml

To add a route to DBus World, you are required to edit the lines.xml file.

linesxml

To add a new bus line, inside the lines.xml file you will need to make a copy of the <line></line> block. If you wish to start afresh, you may also delete all <line></line> blocks except one, as highlighted in the below example image. This will allow you to start yourself off with a new route. You must ensure you still have </lines> at the end of the file.
Deletedall

4a. lines.xml variables

You will need to edit most of these values for each line you wish to create.

  • lines map_type="tmp" is the map ID. This must not be edited, otherwise the line will not work in TruckersMP.
  • line uid="1" is the line's ID and must be unique for each entry.
  • number="Liverpool - London (831 km)" is the line name.
  • route uid="1" is the route's ID and should be unique for each route.
  • name="Liverpool - London" is the route's name and can be reversed for the return journey.
  • busstop uid="86" is the unique ID of the bus stops from the stops.xml file mentioned above.
  • passengersMin="5" and passengersMax="20" generates at least 5, and at most 20 numbers between 0 and 100 and then those are passed those through the coefOn filter. Numbers lower than the filter means boarding passengers. Any number higher than the coef0n filter means leaving those passengers behind.
  • nextStopTime="33" is the time in minutes until you are due at the next stop.
  • nextStopPrice="1" is the price per passenger to the next stop.

4b. Example line

In this example, I am going to create a route Carlisle > Birmingham > London.

First off, we need to adjust the uids of the line and route. These can start at 1 and increment for each line and route you add. You may also change the name and number variables to anything you like.

Next, we need to find the IDs of the stops in which we wish to include in this route. We can do this by searching for the names of the stops in the stops.xml file and noting down the IDs of each stop.

  • Carlisle's id is 3
  • Birmingham's id is 49
  • London's id is 70

Carliseuid

Next we need to calculate the time it takes to travel between each stop. Using the in-game map, We can set way-points to get the time it takes to make the drive between each city and convert it into minutes. In the below example, Carlisle -> Birmingham takes 4 hours and 29 minutes.
mappingctob

To convert 4 hours and 29 minutes into minutes we can do 60 x 4 to get 240 minutes and then add the extra 29 minutes on to get 269 minutes. This is your nextStopTime.

We can then repeat this process for Birmingham to London to get a total of 168 minutes. The last entry has nextStopTime set to 0 because you won't be going to another stop.

Here is an example of a completely filled in line setup. Ensure you save this file when you have finished editing it.

lineexample


5. Starting the game

You should now have a fully functioning bus line! When you load into TruckersMP, you should have the option to start your bus route.

Busrouteselect

routeready


6. Share your lines! (Optional)

If you wish to share your lines with your friends and colleagues, all you need to do is to package up the folder you created in \Documents\DBus Client\maps. In our example we created above, we would zip up the TruckersMP Lines by ChrisPatrol folder. This can then be uploaded to share it with friends!

If you receive a zip package for DBus World routes, all you need to do is unzip the folder into \Documents\DBus Client\maps!


7. Getting Support

If you are experiencing issues with the DBus World on the TruckersMP Servers, please get into contact with our Support Team. If you also experience the same issues within Singleplayer, please do not hesitate to contact DBus World support.

TruckersMP Support: https://truckersmp.com/support
DBus World Documentation: https://dbusworld.com/docs
DBus World Support: https://discord.gg/KtQCeaX

Tags

    No tags have been found.

Author