Language
Search Docs
Documentation
Document Info
Navigation
This guide explains how to create custom maps for DBus World using XML configuration files. A map consists of bus stops, lines connecting them, optional ticket pricing, and time-based passenger variations.
Patreons can now create their own lines using the DBus World Line Creator easily!
File Structure Overview
A complete map requires at minimum two files:
- stops.xml (mandatory) - Defines all bus stops
- lines.xml (mandatory) - Defines bus lines and routes
Optional files:
- city.xml - Defines ticket types and pricing for city-based fare systems
- times.xml - Controls passenger flow based on time of day (Patreon feature)
All files must be named exactly as shown and placed in the same directory.
stops.xml - Bus Stop Definitions
This file contains all bus stops available on your map.
Basic Structure
<code><busstops>
<busstop>
<id>1</id>
<name>Nordspitze Bauernhof</name>
<zone></zone>
<requestStop>false</requestStop>
<location>-359.743;8.24964;520.188;0.146129;-0.163294</location>
</busstop>
</busstops>
</code>Parameters Explained
- id: Unique numerical identifier for the stop. Each stop must have a different ID.
- name: Display name shown in schedules and game UI.
- zone: Zone classification (currently unused, can be left empty).
- requestStop: Whether passengers need to request the stop (currently unused, set to
false). - location: Coordinates in format
X;Y;Z;RotX;RotZdefining the stop's position in the game world.
Creating Multiple Stops
Simply repeat the <busstop> block for each stop, ensuring unique IDs:
<code><busstops>
<busstop>
<id>1</id>
<name>Central Station</name>
<zone></zone>
<requestStop>false</requestStop>
<location>-100.0;5.0;200.0;0.0;0.0</location>
</busstop>
<busstop>
<id>2</id>
<name>Market Square</name>
<zone></zone>
<requestStop>false</requestStop>
<location>150.0;5.0;300.0;0.0;0.0</location>
</busstop>
</busstops>
</code>lines.xml - Line and Route Definitions
This file defines bus lines and their routes through the stops.
Basic Structure
<code><lines map_type="base">
<line uid="0" number="A2" adultCoef="75" reducedRate="15" city="true">
<route uid="1" name="B1" time="0">
<busstop uid="1" passengersMin="5" passengersMax="20"
coefOn="100" nextStopTime="1" nextStopPrice="1"/>
<busstop uid="5" passengersMin="0" passengersMax="0"
coefOn="0" nextStopTime="0" nextStopPrice="0"/>
</route>
</line>
</lines>
</code>Map Type Attribute
The map_type attribute specifies which game map you're configuring:
base- SCS Base Europe and its DLCspromods- ProMods mapgrundorf- DBus' Grundorf maptmp- TruckersMP (reserved)- Custom values or leave blank to default to
base
Line Parameters
- uid: Unique numerical identifier for the line. Cannot have duplicates.
- number: The line designation displayed in-game (e.g., "A2", "15", "North Route").
- adultCoef: Percentage of adult passengers on this line (e.g.,
75= 75% adults). - reducedRate: Discount percentage for reduced-price tickets (e.g.,
15= 15% of full price). - city: Set to
trueto use city ticket system (requires city.xml),falsefor per-stop pricing.
Route Parameters
Each line can have multiple routes (different directions or variants).
- uid: Unique numerical identifier for the route within this line.
- name: Route name/designation shown to players.
- time (optional): References a time profile in times.xml for passenger flow variations.
Bus Stop Parameters in Routes
Each stop in a route defines passenger behavior:
- uid: References a stop ID from stops.xml.
- passengersMin/Max: Generates this many random numbers (0-100) representing potential passengers.
- coefOn: Threshold for boarding vs. alighting. Values below this number = boarding passenger, above = alighting passenger (typically
100means all board,0means all alight). - nextStopTime: Travel time to next stop in game minutes.
- nextStopPrice: Fare to travel to next stop (ignored if
city="true"is set).
Important: The last stop in every route must have all values set to 0 (except uid) to function correctly.
Example: Complete Line with Two Routes
<code><line uid="0" number="12" adultCoef="70" reducedRate="20" city="false">
<!-- Outbound route -->
<route uid="1" name="To Airport">
<busstop uid="1" passengersMin="10" passengersMax="25"
coefOn="100" nextStopTime="3" nextStopPrice="2"/>
<busstop uid="2" passengersMin="5" passengersMax="15"
coefOn="50" nextStopTime="5" nextStopPrice="2"/>
<busstop uid="3" passengersMin="0" passengersMax="0"
coefOn="0" nextStopTime="0" nextStopPrice="0"/>
</route>
<!-- Return route -->
<route uid="2" name="To Downtown">
<busstop uid="3" passengersMin="8" passengersMax="20"
coefOn="100" nextStopTime="5" nextStopPrice="2"/>
<busstop uid="2" passengersMin="5" passengersMax="15"
coefOn="50" nextStopTime="3" nextStopPrice="2"/>
<busstop uid="1" passengersMin="0" passengersMax="0"
coefOn="0" nextStopTime="0" nextStopPrice="0"/>
</route>
</line>
</code>city.xml - Ticket System (Optional)
When city="true" is set on a line, this file defines available ticket types.
Structure
<code><city>
<ticket uid="0" name="20min" price="5" probability="35" upsell="25"/>
<ticket uid="1" name="60min" price="8" probability="55" upsell="8"/>
<ticket uid="2" name="24h" price="20" probability="5" upsell="2"/>
<ticket uid="3" name="7d" price="150" probability="1" upsell="0"/>
</city>
</code>Ticket Parameters
- uid: Unique numerical identifier for each ticket type.
- name: Ticket name displayed in-game.
- price: Cost of the ticket.
- probability: Percentage chance a passenger will purchase this ticket type.
- upsell: Percentage chance the passenger will upgrade to the next ticket type.
Important Rules
- List tickets from cheapest to most expensive.
- Sum of all
probabilityvalues must be less than 100%. - Each ticket must have a unique uid.
times.xml - Time-Based Passenger Flow (Optional, Patreon)
This feature allows passenger numbers to vary based on in-game time of day.
Structure
<code><times>
<time uid="0">
<hour uid="0" percentage="70"/>
<hour uid="6" percentage="60"/>
<hour uid="8" percentage="100"/>
<hour uid="16" percentage="120"/>
<hour uid="22" percentage="60"/>
</time>
</times>
</code>Parameters
- time uid: References the
timeattribute in a route definition. - hour uid: Hour of day in 24-hour format (0-23).
- percentage: Multiplier for passenger generation (100% = normal, 50% = half, 200% = double).
Rules
- Requires at least two hour entries per time profile.
- Hours not specified are interpolated between the nearest defined hours.
- Percentage is applied to both boarding and alighting passengers, rounded to nearest whole number.
- Only available to Patreon supporters.
Linking to Routes
In lines.xml, reference the time profile:
<code><route uid="1" name="Morning Rush" time="0">
<!-- This route uses time uid="0" from times.xml -->
</route>
</code>Complete Example: Small Map
Here's a complete working example of a simple two-stop, one-line map:
stops.xml:
<code><busstops>
<busstop>
<id>1</id>
<name>Town Center</name>
<zone></zone>
<requestStop>false</requestStop>
<location>0.0;0.0;0.0;0.0;0.0</location>
</busstop>
<busstop>
<id>2</id>
<name>Industrial Park</name>
<zone></zone>
<requestStop>false</requestStop>
<location>500.0;0.0;0.0;0.0;0.0</location>
</busstop>
</busstops>
</code>lines.xml:
<code><lines map_type="base">
<line uid="0" number="1" adultCoef="80" reducedRate="15" city="false">
<route uid="1" name="Outbound">
<busstop uid="1" passengersMin="10" passengersMax="20"
coefOn="100" nextStopTime="5" nextStopPrice="3"/>
<busstop uid="2" passengersMin="0" passengersMax="0"
coefOn="0" nextStopTime="0" nextStopPrice="0"/>
</route>
<route uid="2" name="Inbound">
<busstop uid="2" passengersMin="8" passengersMax="18"
coefOn="100" nextStopTime="5" nextStopPrice="3"/>
<busstop uid="1" passengersMin="0" passengersMax="0"
coefOn="0" nextStopTime="0" nextStopPrice="0"/>
</route>
</line>
</lines>
</code>Tips and Best Practices
Start Simple: Begin with 2-3 stops and a single line, then expand.
Test Incrementally: After adding each line, test it in-game before continuing.
Passenger Flow Balance:
- Use
coefOn="100"at starting terminals (all boarding) - Use
coefOn="50"at middle stops (mixed boarding/alighting) - Use
coefOn="0"at final stops (all alighting)
Realistic Timing: Consider realistic travel times between stops when setting nextStopTime.
City vs. Per-Stop Pricing: Use city tickets for urban networks with frequent transfers, per-stop pricing for longer routes.
UID Management: Keep a spreadsheet of your UIDs to avoid duplicates as your map grows.
Location Coordinates: Use in-game tools or map editors to determine accurate stop locations.
Troubleshooting
Incorrect fares: If using city tickets, ensure city="true" is set on the line.
Time variations not working: Confirm you have Patreon access and at least two hour entries.