Python scripts to create modified versions of Norbert Rieger's Bahntrasse 2.1 shapes with ATracks-like railheads.
This repository is an advanced example of how to build new geometry into existing track shapes using the shapeedit and trackshape-utils Python modules.
The script handles straight and curved track sections, as well as shapes that have multiple parallel tracks.
The before/after comparison below shows how the shapes are changed to have ATracks-like railheads.
The package contains modified versions of Norbert Rieger's Bahntrasse 2.1 shapes where the railheads are modified to be compatible with ATracks.
The modified shapes with ATracks-like railheads can be downloaded from trainsim.com.
Naming of the modified shapes are as follows:
| Original version | Modified version |
|---|---|
| NR_Emb_* | NR_Emb_AT_* |
| NR_EmbBase_* | NR_EmbBase_AT_* |
| NR_Ramp_* | NR_Ramp_AT_* |
| NR_RWall_* | NR_RWall_AT_* |
| NR_WallEmb_* | NR_WallEmb_AT_* |
For a full of shapes list see this document.
In addition, by request, modified NR_Emb and NR_EmbBase shapes for the Monon2 route have also been created. These shapes have had textures swapped and been renamed, so that they can be dropped directly into the route's Tracks-ND directory. The Monon2-adapted shapes can also be downloaded from trainsim.com.
- Python 3.7 or newer
- The following DBTracks packages from the-train.de:
- NR_Zubehoer.zip
- Utility programs:
- ffeditc_unicode.exe (found in the utils folder of an MSTS installation)
Create a virtual env. You only need to do this once.
python -m venv nremb-atracksTo activate the virtual env:
- Linux / macOS:
source nremb-atracks/bin/activate - Windows (powershell):
nremb-atracks\Scripts\Activate.ps1 - Windows (cmd):
nremb-atracks\Scripts\activate.bat
Install the dependencies using pip:
pip install -r requirements.txtConfigure the scripts/config.ini file with the appropriate paths to ffeditc_unicode.exe, the NR_Zubehoer.zip file, and to the input/output-folders.
For example:
[utilities]
ffeditc_path = C:/path/to/ffeditc_unicode.exe
[dbtracks]
nrzubehoer_zip_path = C:/path/to/NR_Zubehoer.zip
[shapes]
input_path = C:/path/to/NR_Emb_AT/input/folder/Shapes
output_path = C:/path/to/NR_Emb_AT/input/folder/Shapes
[monon2]
output_path = C:/path/to/monon2/output/folder/ShapesNow extract the zip-file packages using the extract_zip.py script:
python ./scripts/extract_zip.pyThis will take all .s and .sd files necessary from the zip-file and put them into the input folder.
Now you can run each .py script to generate the modified shapes. Run the commands from the project root directory.
For example:
python ./scripts/NR_Emb_AT/change_nrembrails_to_atracksrails.pyYou can also run all scripts at once:
python ./scripts/run_all.pyContributions of all kinds are welcome. These could be suggestions, issues, bug fixes, documentation improvements, or new scripts.
For more details see the contribution guidelines.
The scripts are licensed under GNU GPL v3.
All shapes and textures referenced in the scripts are the original work of Norbert Rieger, and all rights to them belong to him.
