Balrond-balrond_runerails icon

balrond runerails

Adds working trains and signal automation

Last updated 3 days ago
Total downloads 1710
Total rating 3 
Categories Mods Crafting Server-side Client-side Utility Vehicles Transportation Building Bog Witch Update
Dependency string Balrond-balrond_runerails-1.0.7
Dependants 6 other packages depend on this package

README

🚂 BALROND RUNE RAILS

Overview

RUNE RAILS is a modular railway, train, cargo and automation system for Valheim.

Features:

  • 🚃 Functional trains and wagons
  • 🛤 Modular railway construction
  • ⚙️ Signal automation system
  • 🚪 Automated doors, lift gates and drawbridges
  • 🔀 Runtime rail switching
  • 📦 Cargo transfer and unloading
  • 🚦 Signal emitters and receivers
  • ⚡ Speed rails (Boost / Slow)
  • 🔋 Powered wagons
  • 🏗 Builder Workstation
  • 🔨 Railway Hammer
  • 🌐 Multiplayer synchronization

IMPORTANT

To spawn a functional wagon on rails you must use a Wagon Bundle on a Control Rail.

Building wagons directly with the hammer may be used on the rails, but positioning and automatic coupling with other carts may not work correctly and future usage of a Control Rail might be required.


Unlock Progression

All Rune Rails content becomes available after defeating:

🐉 Moder

The system unlocks during the Artisan progression tier.


Railway Tools

Railway Hammer

Contains all Rune Rails categories and build pieces.

All pieces are also available in the Vanilla Hammer under Misc.


Builder Workstation

Universal railway construction station.

Temporarily replaces:

  • Workbench
  • Forge
  • Stonecutter

for BUILDING only.

It does not replace crafting stations.


Crafting Items and Recipes

Rune Rails uses crafted bundles for railway construction, wagons and tools.

Railway Hammer

Prefab:

  • RailwayHammer_bal

Recipe:

Resource Amount
Iron 3
FineWood 4
BronzeNails 10

Rail Parts Bundle

Prefab:

  • RailPartsBundle_bal

Recipe:

Resource Amount
IronNails 4
FineWood 2
BronzeNails 4
GreydwarfEye 2

Wagon Parts Bundle

Prefab:

  • WagonPartsBundle_bal

Recipe:

Resource Amount
Iron 2
FineWood 10
BronzeNails 16
Tin 2

Builder Workstation Bundle

Prefab:

  • BuilderWorkstationBundle_bal

Recipe:

Resource Amount
Bronze 6
FineWood 20
Flint 10
Iron 6

Uncharged Thunderstone

Prefab:

  • UncharedThunderstone_bal

Output amount:

  • 6

Recipe:

Resource Amount
Flint 6
HardAntler 1
Crystal 3

Wagon Bundle Cargo

Prefab:

  • WagonBundleCargo_bal

Recipe:

Resource Amount
WagonPartsBundle_bal 1
FineWood 10

Wagon Bundle Table

Prefab:

  • WagonBundleTable_bal

Recipe:

Resource Amount
WagonPartsBundle_bal 1
BuilderWorkstationBundle_bal 1
Crystal 4

Wagon Bundle Power

Prefab:

  • WagonBundlePower_bal

Recipe:

Resource Amount
WagonPartsBundle_bal 1
SurtlingCore 2
Thunderstone 1

Wagon Bundle Personnel

Prefab:

  • WagonBundlePersonel_bal

Recipe:

Resource Amount
WagonPartsBundle_bal 1
Wood 5

Available Wagons

RailPowerWagon_bal

Build Cost:

Resource Amount
WagonBundlePower_bal 1

RailCargoWagon_bal

Build Cost:

Resource Amount
WagonBundleCargo_bal 1

RailTableWagon_bal

Build Cost:

Resource Amount
WagonBundleTable_bal 1

RailPersonelWagon_bal

Build Cost:

Resource Amount
WagonBundlePersonel_bal 1

Available Rails

Standard

Prefab Build Cost
railtrack1m_bal 1 RailPartsBundle_bal
railtrack_bal 2 RailPartsBundle_bal
railtrack4m_bal 3 RailPartsBundle_bal
railtrack8m_bal 4 RailPartsBundle_bal

Ramps

Prefab Build Cost
railtrackRamp26short_bal 1 RailPartsBundle_bal
railtrackRamp45short_bal 1 RailPartsBundle_bal
railtrackRamp_bal 2 RailPartsBundle_bal
railtrackRamp45_bal 2 RailPartsBundle_bal
railtrackRamp64_bal 2 RailPartsBundle_bal

Turns

Prefab Build Cost
railtrackTurnLeft15_bal 2 RailPartsBundle_bal
railtrackTurnLeft30_bal 2 RailPartsBundle_bal
railtrackTurnLeft45_bal 2 RailPartsBundle_bal
railtrackTurnRight15_bal 2 RailPartsBundle_bal
railtrackTurnRight30_bal 2 RailPartsBundle_bal
railtrackTurnRight45_bal 2 RailPartsBundle_bal

Switches

Prefab Build Cost
railtrackSwitchLeft_bal 3 RailPartsBundle_bal, 1 Crystal
railtrackSwitchMid_bal 3 RailPartsBundle_bal, 1 Crystal
railtrackSwitchRight_bal 3 RailPartsBundle_bal, 1 Crystal

Special Rails

Prefab Build Cost
railtrackCross_bal 2 RailPartsBundle_bal
railtrackControl_bal 2 RailPartsBundle_bal, 1 Thunderstone, 1 Crystal
railtrackStop_bal 1 RailPartsBundle_bal, 2 Wood
railtrackSignalStopReceiver_bal 2 RailPartsBundle_bal, 1 Crystal
railtrackContainer_bal 2 RailPartsBundle_bal, 1 Thunderstone, 4 Iron, 20 FineWood
railtrackUnload_bal 2 RailPartsBundle_bal, 2 Iron, 1 SurtlingCore, 5 FineWood
railtrackSpeed_bal 3 RailPartsBundle_bal, 1 Thunderstone
railtrackJump4m_bal 2 RailPartsBundle_bal, 1 SurtlingCore
railtrackJump6m_bal 3 RailPartsBundle_bal, 1 SurtlingCore
railtrackJump8m_bal 4 RailPartsBundle_bal, 1 SurtlingCore
railtrackDrop8m_bal 4 RailPartsBundle_bal, 1 SurtlingCore
railtrackDrawbridge10m_bal 8 RailPartsBundle_bal, 1 Thunderstone, 4 Iron, 20 FineWood

Signal System

A signal network consists of:

  • Signal Emitters
  • Signal Receivers

Receivers react only to emitters using the same Signal Name.


Receiver Controls

Most receivers follow the same interaction scheme.

Basic Controls

  • E = Default object action
  • Shift + E = Set Signal Name
  • Alt + E = Event State value (depends on Receiver)
  • Shift + Plus/Minus = Delay Event Duration
  • Alt + Plus/Minus = Uphold Event Duration

Delay Event Duration

How long the receiver waits after receiving a signal before executing its Event State.

Example:

Delay = 3 seconds

Signal arrives → wait 3 seconds → execute Event State

Uphold Event Duration

How long the receiver keeps the Event State after the signal disappears.

Example:

Signal lost → keep Event State for configured duration → return to Default State

Duration = 0 means the Event State only exists while the signal is present.


Signal Emitters

Presence Signal Emitter

Prefab:

  • pressenceSignalEmitter_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 1
Thunderstone 1
Crystal 1

Supports:

  • Players
  • Monsters
  • Tamed Creatures
  • All Targets

Events:

  • Present
  • Enter
  • Exit
  • Stop

Shapes:

  • Zone
  • Directional

Day Cycle Signal Emitter

Prefab:

  • daycycleSignalEmitter_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 1
Thunderstone 1
Crystal 1

Modes:

  • Day
  • Night
  • Daylight

Rail Signal Emitter

Prefab:

  • railtrackSignalEmitter_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 1
Thunderstone 1
Crystal 1

Events:

  • Running
  • Stopped
  • Enter
  • Exit
  • In Sensor

Signal Receivers

Door Receiver

Prefab:

  • railSignalDoor_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 5
Crystal 2

Lift Gate Receiver

Prefab:

  • railSignalLiftGate_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 7
Crystal 2
RoundLog 10

Lamp Receiver

Prefab:

  • railtrackLampReciver_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 2
Tin 3
Crystal 2

Speaker Receiver

Prefab:

  • railtrackSpeakerReciver_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 2
Tin 3
Crystal 2

Stop Rail Receiver

Prefab:

  • railtrackSignalStopReceiver_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 2
Crystal 1

Switch Receivers

Prefab Build Cost
railtrackSwitchLeft_bal 3 RailPartsBundle_bal, 1 Crystal
railtrackSwitchMid_bal 3 RailPartsBundle_bal, 1 Crystal
railtrackSwitchRight_bal 3 RailPartsBundle_bal, 1 Crystal

Drawbridge Receiver

Prefab:

  • railtrackDrawbridge10m_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 8
Thunderstone 1
Iron 4
FineWood 20

Speed Rail Receiver

Prefab:

  • railtrackSpeed_bal

Build Cost:

Resource Amount
RailPartsBundle_bal 3
Thunderstone 1

Modes:

  • Boost
  • Slow

Speed Rails can operate as standard interactive rails or as signal receivers.


Speed Rails

Speed Rails support two modes:

Boost

Applies a strong acceleration impulse to passing trains.

Slow

Applies a braking impulse to passing trains.

Visual state changes based on the currently selected mode.


Cargo Automation

Cargo Automation allows trains to automatically move items between wagons, containers and unloading stations.

Both Container Rails and Unload Rails support advanced filtering, train stop control and automated transfer operations.


Container Rail

Prefab:

  • railtrackContainer_bal

Container Rails can operate in three modes:

Mode Description
Disabled Rail is inactive and performs no transfer operations.
Load Pulls items from a nearby container into train cargo wagons.
Unload Moves items from train cargo wagons into a nearby container.

During transfer operations the target container becomes temporarily locked to prevent players from modifying its contents while the transfer is in progress.

When a container is locked:

  • Players cannot open it.
  • The container displays a locked state.
  • The container remains visually open while being used.
  • Access is automatically restored after the transfer is completed.

Unload Rail

Prefab:

  • railtrackUnload_bal

Unload Rails transfer items from cargo wagons directly into the world as dropped items.

Unload Rails can operate in two modes:

Mode Description
Disabled Rail is inactive.
Enabled Rail unloads matching items from cargo wagons.

Transfer Filters

Both Container Rails and Unload Rails support item filtering.

All

Transfers every supported item.

Materials

Building and crafting materials.

Examples:

  • Wood
  • Fine Wood
  • Stone
  • Iron
  • Copper
  • Tin
  • Coal

Consumables

Items that can be consumed by the player.

Examples:

  • Food
  • Mead
  • Potions

Ammo

Ranged weapon ammunition.

Examples:

  • Arrows
  • Bolts

Weapons

Combat weapons.

Examples:

  • Swords
  • Axes
  • Clubs
  • Spears
  • Bows

Armor

Wearable armor pieces.

Examples:

  • Helmet
  • Chest Armor
  • Leg Armor
  • Cloak

Equipables

Any item that can be equipped.

Includes:

  • Weapons
  • Armor
  • Tools
  • Utility Equipment

Non Equipables

Items that cannot be equipped.

Includes:

  • Materials
  • Consumables
  • Trophies
  • Resources

Misc

Miscellaneous items.

Examples:

  • Trophies
  • Quest Items
  • Decorative Items
  • Other uncategorized objects

Unique Item

Filters a single specific item.

A Unique Item filter is configured by using the desired item directly on the rail.

The item is NOT consumed.

The rail stores the selected item's prefab identifier and uses it for future filtering operations.

Hover text displays the localized in-game item name for easier identification.

Example:

Filter: Unique Item (Iron)

Only Iron will be transferred.


Stop Modes

Container Rails and Unload Rails support automatic train stopping.

Mode Description
None No stop requested.
Both Stop train from either direction.
Side A Stop trains approaching from Side A.
Side B Stop trains approaching from Side B.

Stop Duration

Stop Duration determines how long a train remains stopped while transfer operations are performed.

Minimum value:

3 seconds

The duration cannot be reduced below 3 seconds.

This guarantees enough time for transfer operations to complete safely.

Higher values may be used for large cargo operations or heavily loaded trains.


Multiplayer

The following systems are synchronized:

  • Train movement
  • Wagon traversal
  • Signals
  • Doors
  • Lift Gates
  • Drawbridges
  • Cargo Automation
  • Rail State Changes

Synchronization uses:

  • ZDO
  • ZNetView
  • RPC

Important Notes

  • Tracks must be snapped correctly.
  • Wagon Bundles should be used to spawn runtime wagons.
  • Wagons built using the hammer may not work correctly if they are not built directly on the track and may still require usage of a Control Rail.
  • If testing new functionality, place a fresh object after updating the mod.
  • Signal receivers display their configuration through hover text and visual indicators.

FAQ

Is there a config?

No.

Does it support multiplayer?

Yes.

Can trains run without a nearby player?

Yes.

Can carts be linked together?

Yes.

Can powered carts handle slopes?

Yes.


Developer Information

Runtime Debug Helper

Rune Rails contains a built-in debug helper:

BalrondRuneRails.debugvariabelcall();

This helper prints:

  • All registered Rune Rails ZDO Keys
  • Stable Hash Codes
  • Enum Values
  • Runtime identifiers used by the railway system

Useful for:

  • Expand World Prefabs
  • World Edit
  • Server Administrators
  • Mod Developers
  • Custom Integrations

ZDO Keys

Field ZDO Key Stable Hash
RailId hl_rail_id 1934816099
RailType hl_rail_type 1998845808
RailIsPlatform hl_is_platform 507312349
NeighborA hl_neighbor_a 1709629103
NeighborB hl_neighbor_b 1709629104
NeighborC hl_neighbor_c 1709629105
NeighborD hl_neighbor_d 1709629106
RailForcedStop hl_rail_forced_stop 59748338
RailSwitchDirection hl_rail_switch_direction -763416782
RailStopMode hl_rail_stop_mode -1779730730
StopTimerSeconds hl_stop_timer_seconds -938800861
StopTimerEndTime hl_stop_timer_end_time 1877591417
RailSpeedDefaultMode hl_rail_speed_default_mode 1575759369
RailSpeedCurrentMode hl_rail_speed_current_mode -1939458101
Halting hl_halting -1247811048
CartId hl_cart_id -765978659
CartType hl_cart_type -414559190
FrontCartId hl_front_cart_id -1322036093
BackCartId hl_back_cart_id -738044215
CurrentRailId hl_current_rail_id 1311665293
DistanceOnRail hl_distance_on_rail -1139094329
ReversedOnRail hl_reversed_on_rail -1544419608
TravelReversedOnRail hl_travel_reversed_on_rail 896595807
Running hl_running 48829582
ActiveEngineId hl_active_engine_id 460719104
FuelAmount hl_fuel_amount 1435072936
LastDriverId hl_last_driver_id 622145058
RailUnloadEnabled hl_rail_unload_enabled 2112945573
RailUnloadFilter hl_rail_unload_filter -2093381670
RailUnloadShowFilterIcon hl_rail_unload_show_filter_icon 1489979460
SignalSwitchDefaultDirection hl_signal_switch_default_direction 308030428
SignalSwitchEventDirection hl_signal_switch_event_direction 1640428373
SignalEmitterActive hl_signal_emitter_active 1078821723
SignalName hl_signal_name -980804387
SignalEmitterMode hl_signal_emitter_mode -80602132
SignalEmitterRange hl_signal_emitter_range -207671832
SignalDefaultState hl_signal_default_state 878506097
SignalEventState hl_signal_event_state 1730005294
SignalEventDuration hl_signal_event_duration 1050461299
SignalDoorEventState hl_signal_door_event_state -754268517
SignalReceiverActive hl_signal_receiver_active 1833858728
RailContainerTransferMode hl_rail_container_transfer_mode 2102940621
RailContainerTransferEnabled hl_rail_container_transfer_enabled -1167035585
RailContainerTransferFilter hl_rail_container_transfer_filter -1343447162
RailDrawbridgeState hl_rail_drawbridge_state -1955429243
RailDrawbridgeAnimStartTime hl_rail_drawbridge_anim_start_time 229130226
PresenceSignalActive hl_presence_signal_active 441293886
PresenceSignalName hl_presence_signal_name -364472905
PresenceSignalTarget hl_presence_signal_target 1743780257
PresenceSignalShape hl_presence_signal_shape -1205593401
PresenceSignalEvent hl_presence_signal_event 18262636
PresenceSignalRange hl_presence_signal_range 1503345287

Enumerations

BCSRailStopMode

Name Value
None 0
Both 1
SideA 2
SideB 3

BCSDriverCameraMode

Name Value
Off 0
FirstPerson 1
ShoulderRight 2
ShoulderLeft 3
CloseFollow 4

BCSRailPieceType

Name Value
Platform 0
Straight 1
Slope26 2
Slope45 3
Turn45 4
Turn90 5
Crossroad 6
Control 7
Turn15 8
Turn30 9
Jump 10
Slope64 11
Speed 12
Drawbridge 13

BCSRailSwitchDirection

Name Value
Left 0
Right 1

BCSCartType

Name Value
Powered 0
Cargo 1
Utility 2
Passenger 3

BCSSignalEmitterMode

Name Value
TrainOnSensor 0
TrainEntered 1
TrainExited 2
TrainStopped 3
TrainMoving 4

BCSSignalDoorState

Name Value
Closed 0
Open 1

BCSDrawbridgeState

Name Value
Lowered 0
Raising 1
Raised 2
Lowering 3

BCSPresenceSignalTarget

Name Value
Players 0
Monsters 1
Tamed 2
Everything 3

BCSPresenceSignalShape

Name Value
Zone 0
Directional 1

BCSPresenceSignalEvent

Name Value
Present 0
Entered 1
Exited 2
Stopped 3
Moving 4

BCSDrawbridgeSignalState

Name Value
Lowered 0
Raised 1

BCSDayNightSignalMode

Name Value
Day 0
Night 1
Daylight 2

BCSRailSpeedModifierMode

Name Value
Boost 0
Slow 1

Community & Support

Discord: https://discord.gg/Jfp8T5N7Pv

Ko-fi: https://ko-fi.com/balrond1020