Page 1 of 1

how to change traffic?

Unread postPosted: Fri Mar 22, 2024 12:18 am
by cbq882
Hi all. Recently I started route building and laid down a bunch of roads with traffic on them. I didnt realize until recently that these roads have a car with a (very obvious) broken texture and some older vehicles from the original railworks. Is there anyway I can edit the roads to spawn specific traffic? If so, how would I do that? Thanks in advance.

Re: how to change traffic?

Unread postPosted: Tue Mar 26, 2024 2:53 pm
by jlms48
OK here goes-

You will need to read and edit blueprint files (.bin) I use TS Tools for this. Or you can use serz.exe and an editor like Notepad++.
I hope this gives you some idea of what's involved.

Find the road section with the traffic you want to edit. You will usually find these in the scenery\procedural folder for your route

As an example, suppose it is one of the original Kuju roads, you look for it here.

G:\SteamLibrary\steamapps\common\Railworks\Assets\Kuju\RailSimulator\scenery\Procedural
and select the road section blueprint (.bin)
2L_Conc_Heavy_1970s.bin ( this example happens to be a road section used in Kuju British routes and many third party routes but same sytem applies to US , or German roads)

Inspect the blueprint file to find the traffic manager used by that road section and the line which points to the traffic manager
Code: Select all
[b]<TrafficManagerBpID d:type="cDeltaString">Scenery\Vehicles\Newc_York_Traffic_2L_Heavy.xml</TrafficManagerBpID>
[/b]


Open the traffic manager file called Newc_York_Traffic_2L_Heavy.bin( note it is in the scenery/ vehicles folder and the .bin file extension rather than .xml)
and you will find a vehicle section like this:
Code: Select all
<VehicleModel>
            <iTrafficControllerBlueprint-cVehicleModel d:id="69520736">
               <BlueprintID d:type="cDeltaString">Scenery\Vehicles\Newc_York_Vehicle01.xml</BlueprintID>
            </iTrafficControllerBlueprint-cVehicleModel>
            <iTrafficControllerBlueprint-cVehicleModel d:id="16705152">
               <BlueprintID d:type="cDeltaString">Scenery\Vehicles\Newc_York_Vehicle02.xml</BlueprintID>
            </iTrafficControllerBlueprint-cVehicleModel>
            <iTrafficControllerBlueprint-cVehicleModel d:id="15520328">
               <BlueprintID d:type="cDeltaString">Scenery\Vehicles\Newc_York_Vehicle03.xml</BlueprintID>
            </iTrafficControllerBlueprint-cVehicleModel>
            <iTrafficControllerBlueprint-cVehicleModel d:id="15890136">
               <BlueprintID d:type="cDeltaString">Scenery\Vehicles\Newc_York_Vehicle04.xml</BlueprintID>
            </iTrafficControllerBlueprint-cVehicleModel>
            <iTrafficControllerBlueprint-cVehicleModel d:id="23460392">
               <BlueprintID d:type="cDeltaString">Scenery\Vehicles\Newc_York_Vehicle05.xml</BlueprintID>
            </iTrafficControllerBlueprint-cVehicleModel>
            <iTrafficControllerBlueprint-cVehicleModel d:id="26020672">
               <BlueprintID d:type="cDeltaString">Scenery\Vehicles\Newc_York_Vehicle06.xml</BlueprintID>
            </iTrafficControllerBlueprint-cVehicleModel>
            <iTrafficControllerBlueprint-cVehicleModel d:id="15646096">
               <BlueprintID d:type="cDeltaString">Scenery\Vehicles\Newc_York_Vehicle07.xml</BlueprintID>
            </iTrafficControllerBlueprint-cVehicleModel>
         </VehicleModel>


This is a list of all the vehicles spawned on that road section.
Choose the vehicle file you want to edit :
e.g. Scenery\Vehicles\Newc_York_Vehicle02.bin ( Note the change from .xml to .bin. The files are the same for our current purpose)

This contains the pointer to the 3d geometrical model of the vehicle which will be spawned on the road

Look for the geometry line like this
Code: Select all
<GeometryID d:type="cDeltaString">Kuju\RailSimulator\Scenery\Vehicles\[00]BATH_TEMP_WP33_04</GeometryID>


This is a 1950s Sports Car. You can edit this line to show a different vehicle
Code: Select all
<GeometryID d:type="cDeltaString">INSERT PATH TO VEHICLE HERE</GeometryID>

The new vehicle can be from any route, or a third-party vehicle in your assets folder. Just specify the path to the geometry (.geopcdx) file.
e.g.
To insert School bus from Soldier Summit
G:\SteamLibrary\steamapps\common\Railworks\Assets\DTG\SoldierSummit\Vehicles\PC_schoolBus
Edit <GeometryID as follows:
Code: Select all
<GeometryID d:type="cDeltaString">DTG\SoldierSummit\Vehicles\[00]PC_schoolBus
</GeometryID>

To insert a Lamborghini Countach by jpetersjr
G:\SteamLibrary\steamapps\common\Railworks\Assets\jpetersjr\Asset\Lamborghini Cars\1985 lamborghini countach v1

Edit <GeometryID as follows:
Code: Select all
<GeometryID d:type="cDeltaString">jpetersjr\Asset\Lamborghini Cars\[00]1985 lamborghini countach v1
</GeometryID>

Note: you only need to edit one line in a .bin file to swap a road traffic vehicle. All the preamble is to find the correct .bin and line to edit.

Re: how to change traffic?

Unread postPosted: Thu Apr 04, 2024 10:40 am
by jlms48
Hi cbq882 I have sent you a PM.