Skip to content

pgroenbaek/nremb-atracks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nremb-atracks

Release v1.0.0 Python 3.7+ License GNU GPL v3

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.

Screenshots

The before/after comparison below shows how the shapes are changed to have ATracks-like railheads.

From XTracks to ATracks railheads

Shapes available from this package

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.

Generating the modified shapes

Prerequisites

  • 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)

Set up a virtual env

Create a virtual env. You only need to do this once.

python -m venv nremb-atracks

To 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 dependencies

Install the dependencies using pip:

pip install -r requirements.txt

Configure paths

Configure 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/Shapes

Run the zip extraction script

Now extract the zip-file packages using the extract_zip.py script:

python ./scripts/extract_zip.py

This will take all .s and .sd files necessary from the zip-file and put them into the input folder.

Run the scripts

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.py

You can also run all scripts at once:

python ./scripts/run_all.py

Contributing

Contributions of all kinds are welcome. These could be suggestions, issues, bug fixes, documentation improvements, or new scripts.

For more details see the contribution guidelines.

License

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.

About

Python scripts to customize Norbert Rieger's NR_Emb shapes with ATracks-like railheads.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages