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\Proceduraland 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_schoolBusEdit <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.