> For the complete documentation index, see [llms.txt](https://hiveminddocs.gitbook.io/hivemind/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hiveminddocs.gitbook.io/hivemind/code-systems/ultimate-train-system/dokumentation.md).

# Dokumentation

## <mark style="color:blue;">Usage Guide</mark>

### **Step1 - Use BP\_Rails to create your track**

![Locomotive setup examples available in TrainTest level](/files/qJohBPlL5vcaFQZYPGlb)

{% hint style="info" %}
If you're building a closed loop system, you'll have to toggle **Closed Loop** setting, otherwise the train will not loop the track and stop moving after a single lap
{% endhint %}

![](/files/dSvARn2gah9FLDmGNqgK)

{% hint style="info" %}
Spacing variable essentially just tweaks the Cell size when extruding and duplicating the mesh along the spline, tune it to whichever value yields best looking results.
{% endhint %}

### **Step 2 Add the Locomotive**

![](/files/FrKcTCsXxmeQv2yN4Ofd)

Drag the **BP\_Train blueprint** into the level and place it over the rail track you want it to roll on. ( Train blueprint scans for nearest Rail Track and initializes the spline path at runtime )

![](/files/JyQzHjF3OMWripZTuyaU)

{% hint style="info" %}
**Animation speed** variable controls both speed of the animation and actual travel speed along the spline and is perfectly synchronized to the animation.

**Starting position** controls the starting offset on the spline when you hit Simulate/Play.\
At 0, train will always begin from starting point of the spline.
{% endhint %}

### **Step 3 - Setting up chain of carts**

![](/files/qJZephKNDz4sjGYcik5w)

Next step is to drag as many carts as you need into the level and assign the desired Locomotive reference for each cart (it's not automatic in case there are several trains in the level)

![](/files/CuejwSdQQ2ypZF1Frf9a)

Then, those exact same carts need to be added to the **Attached Carts array** within **BP\_Train\_Blueprint** itself

![](/files/eVdGZhvDNSE3J1vOM9o0)

And you are done. Hit simulate / play and your train should be taking off.

### **Emergency Stop Brick**

![](/files/o06UuHROAWEER0wuULii)

This package doesn't come with station stops logic, however it does come with emergency stop brick.\
**BP\_StopPoint** functions basically like a collision check.\
Whenever train runs past this brick, it enters into emergency breaking mode, decelerating over 15 seconds until it comes to a full halt.<br>

### **Making long chains of carts**

Although there is no limit on how many carts you can add, due to the nature of how the connecting hinges on these carts work, they are not great at taking strong turns.\
More carts joined on a chain result in more inaccurate looking line when taking turns.

![](/files/7tZPcCHCWAvxuEgabdBR)

{% hint style="info" %}
Strong turns like the ones in the example picture above work with 4-5 carts before the chain starts to visually break apart.

If your Track is far more straight and smooths out turns over longer distances, you can get away by making longer chains.
{% endhint %}

### **Using the BP\_rails spline blueprint in the level**

When Dropping the Rails prefab into the level, it may be difficult to select the spline points.

![](/files/rfKCyhBk0jjuTbzyLr3o)

To circumvent that, select the spline component inside blueprint details panel

![](/files/v7EWNNEJvCvclD4JLgwm)

And Click on spline point selector to switch to last spline point

![](/files/obOFzXry38nGhJFSIKzc)

Then, modify the location value of that spline point to move it further from the blueprint

![](/files/eNTWGeCUlAbrwGVMBjmp)

This will result in Bigger and easily selectable Spline point, which then you can select with your cursor and modify freely

![](/files/RkWtTcIindwrCZ0UFWjS)

### **Improving Performance when Assembling long spline networks**

When making big spline networks, there's a good chance your preview of the spline will slowdown significantly. Especially more when you add a lot of spline points. It may take a while to recalculate the spline and reconstruct the mesh each time you make even a slight modification.

To make this process smoother, it is recommended to a use a simplified **Preview Mesh** for the spline until you are happy with its general shape and size.

![](/files/oe50Pxc4kLJAyIZ5o4Jf)

For example, you could select Existing **SM\_Rails** mesh and downscale its complexity within the **mesh reduction settings**

![](/files/6fZUEw3bj8lhA1nuqEob)

Using this approach, you can downscale the original geometry of the rail segment down to as little **as 3%** , which takes it down from **11k Triangles to 440** and that will significantly speed up spline generation process when testing it in the level.

![](/files/DwQD7869rFt9ZJwFsYKp)

Once you're happy with your spline layout, you can **Undo the Reduction settings > back to 100%** Triangles and it will recreate your spline with a high quality topology and smooth turns.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hiveminddocs.gitbook.io/hivemind/code-systems/ultimate-train-system/dokumentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
