Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Railroads
Stone railroads for Valheim. A coal locomotive, wagons, stations and switches. Trains keep running when nobody is near.
| Date uploaded | 20 hours ago |
| Version | 0.2.6 |
| Download link | VladasZ-Railroads-0.2.6.zip |
| Downloads | 477 |
| Dependency string | VladasZ-Railroads-0.2.6 |
This mod requires the following mods to function
denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2351README
Railroads
Vikings had ships. Now they have trains.
You lay stone track with the hammer, put a station sign beside it, give the sign a name and send a locomotive there. Or sit on the bench and drive it yourself, like in Factorio.
You can play it alone, host a game for friends or run it on a dedicated server. Trains keep going when nobody is near, and the server plans the routes, so 2 trains never get the same track.
What you get:
- 24 track pieces: straights from 1 to 32 m, curves, slopes, switches, a crossing, a turning loop, a T and an X junction
- station signs with a name board, and train consoles that call a train to their sign
- supports for track and stations: press G to pick wood, core wood or iron poles, built down to the ground with the track
- a locomotive that burns coal, with a speed lever, a switch lever and a steam whistle
- an item stand on the front of the locomotive for a trophy or any other item
- wagons with 18 slots of storage, a bench for 2 and a sign you write yourself
- a wagon restaurant with a stone stove to grill meat on and rest at, and a table that shows the food you put on it
- a portal wagon, a portal that travels with the train
- a flatbed wagon, an empty deck of 4 by 6 m to build on
- a hand cart for 1 or 2 players that you pump with Space, it needs no coal and no workbench
- track, stations and trains on the map
Everything is in the Transport tab of the hammer. A train at full speed hits whatever stands on the track, so don't stand on the track.
Your first train
- Take the hammer and lay track from the Transport tab. Track snaps to track.
- Put a station sign up to 10 m from straight track and press E on it to give it a name. A sign with no name is not in the menu.
- Put a locomotive on the track. It needs a workbench near.
- Press E on a fire door of the locomotive to put coal in. Hold E to put in more.
- Press E on the locomotive and pick a station.
Controls
- E on the locomotive: the station menu
- Gamepad in the station menu: the stick or the D-pad picks a station, A sends the train, B closes the menu
- E on the bench of the locomotive: sit down and drive
- W and S: the speed lever, forward, stop and backward. One tap, you hold nothing
- A and D: the switch lever, which way the train goes at the next switch
- E while you sit on the bench: the station menu, you stay seated and ride along
- Space: get up, the train brakes
- H on the bench: the whistle
- a hotbar key on the iron knob at the front of the locomotive: hang that item there, hold E to take it back
- Shift + E on a wagon: couple it to the train or uncouple it
- E on the stove: under the table it takes coal, on top it takes raw meat and gives back cooked meat
- G with track on the hammer: the supports placed under it, none, wood, core wood or iron
- G with a station sign on the hammer: the side of the stop the ghost train shows its wagons on
- E on a train console: call a train to its station sign
- E on a handle of the hand cart: take it, E again lets go
- Space on the hand cart: hold to push the handle down, let go to pull it up
- W and S, A and D on the hand cart: the way lever and the switch lever, like on the locomotive
Install it with a mod manager, or copy the folder Railroads into BepInEx/plugins. The server and every player need the same version. With another version you get a message and no rail pieces.
Settings are in BepInEx/config/vladasz.railroads.cfg. The Server section counts only on the server:
TopSpeed, 2 to 40 m/s, default 10CoalPer1000Meters, 0 to 50, default 10. With 0 trains need no coalMaxCoal, 20 to 500, default 100MaxWagons, 0 to 8, default 4Hits:Everything,MobsOnlyorNothingSureKill: a train at 9.5 m/s kills any mob it hits, a boss tooSureKillPlayers: a train at 9.5 m/s kills a player it hits too, off by default. Only withHitsasEverythingPortalWagon: on or offMaxDeckPieces, 0 to 200, default 100. How many pieces fit on 1 flatbed wagonDeckHeight, 2 to 12 m, default 4. How high you can build over the deck of a flatbedDeckReachLeftRight,DeckReachFrontBack, 0 to 2 m, default 0.5. How far a piece can reach past the edges of the deckDeckPiecesIndestructible: what is built on a flatbed takes no damage, off by defaultDeckSmelters: smelters, kilns and the obliterator can be built on a flatbed, off by defaultDeckFires: campfires, hearths and braziers can be built on a flatbed, off by defaultMapTrack,MapStations,MapTrains: what players may see on the mapFreeSupports: supports cost nothing and give nothing back when removed, off by defaultTrackCost, 0 to 1000, default 100. The price of track in percent, 0 makes track free
The Build section is yours. A change in a config manager counts at once, a change in the file from the next start of a world:
PolesKey, default G. The key that picks the supports, one key or one with modifiers likeLeftShift + GPoles: which supports go under new track and stations,None,Wood,CoreWoodorIron. G changes it, and it is kept after a restartTrainSideKey: the key that flips the side of the ghost train, G by default
The Drive section is yours too, it counts the same way:
HornKey, default H. The key that blows the whistle on the benchHornSound: a WAV, OGG or MP3 of your own for the whistle, up to 2 MB and 10 s, an absolute path or one from theBepInExfolder. Every player hears it when you blow the horn or send a train
To translate the mod, copy Railroads.English.json from the mod folder to Railroads.<Language>.json anywhere under BepInEx, like Railroads.German.json, and translate the values. The mod uses it for the language you picked in the game. A key you leave out stays English. The mod comes with English and Portuguese Brazilian.
If something does not work, tell me on Discord:





CHANGELOG
Changelog
0.2.6
Every locomotive has an item stand on the front of its boiler, on the round iron knob. Look at the knob and press the hotbar key of an item to hang it there: a trophy, a weapon or anything a vanilla item stand takes. Hold E to take it back. Locomotives you built before get the stand too. A removed locomotive drops what hangs on it.
0.2.5
The station is now 2 pieces of its own, so you build the platform you need from your own pieces. The old station is off the hammer. Stations you built before stay and keep working.
The station sign is a named stop for trains. Place it up to 10 m from a straight track or the circle of a loop. While you place it, a ghost train shows where trains stop, with as many wagons as a train may pull. Press G to show the wagons on the other side of the stop. The sign turns with the hammer like a vanilla sign. It costs 5 wood.
The train console calls a train to its station sign. Place it up to 10 m from a station sign, a line shows which sign it belongs to. It costs 4 wood and 5 iron nails.
When the track at a sign is removed, the sign stays, but it leaves the station menu and the map until the track is back.
New setting TrainSideKey in the Build section, default G: the key that flips the side of the ghost train.
0.2.4
You walk on a moving train as fast as on a standing one. Before, you moved at about 2 thirds of your speed while the train drove.
Press the couple key on any wagon of a train to uncouple it together with every wagon behind it. On the first wagon this leaves the locomotive alone. The wagons stay where they stand, and you couple them again 1 by 1, starting with the one nearest the locomotive.
New server settings HandcartTopSpeed and HandcartTopSpeedTwo, default 6 and 10: the top speed of the hand cart in m/s with 1 player and with 2 players pumping.
0.2.3
A hand cart for 1 or 2 players, in the Transport tab. It needs no coal and no workbench, so you build it anywhere on the track from 20 wood and 10 stone that you carry. Press E on a handle to take it and E again to let go. Hold Space to push the handle down, let go to pull it up. W and S set the way lever to forward, brake or backward, A and D pick the next switch. 1 player pumps it up to 6 m/s, 2 players up to 10 m/s, but only in turns: when one pushes down, the other pulls up. It rolls a long way when you stop pumping, so you can rest. Pumping costs half the stamina that running the same distance costs. The mod has a Portuguese Brazilian translation. When your version differs from the server, the message says who has to update, you or the server.
0.2.2
The locomotive has a steam whistle. Press H on the bench to blow it, and a train you send blows it when it leaves and when it stops at the station. Everyone within 100 m hears it, the lever tilts and steam comes out of the whistle.
You can use a sound of your own: set HornSound in the Drive section to a WAV, OGG or MP3 file, up to 2 MB and 10 s, an absolute path or one from the BepInEx folder. Every player hears your file when you blow the horn or send a train, the file travels by itself. HornKey picks the key, default H.
The mod can be translated. Copy Railroads.English.json from the mod folder to Railroads.<Language>.json anywhere under BepInEx, like Railroads.German.json, and translate the values. The mod uses it for the language you picked in the game. A key you leave out stays English.
The switches are 8 m long now, so a straight of 8 m fits in the place of a switch. The branch ends 2 m to the side. The switches you built before stay and work.
A station does not go over a switch, a crossing or a junction with any part of its deck. Before, only the spot under the cursor counted.
Every food lies the right way up on the table of the restaurant.
Track and stations keep their exact turn over a restart of the server. Before, a piece could come back half a degree off, which opened a joint of a 16 m straight by 14 cm and put a station beside its track.
New server setting SureKillPlayers, off by default: a train at 9.5 m/s or faster kills a player it hits too, whatever the PvP setting. Only with Hits as Everything.
0.2.1
Every station has a console to call a train. The console lists every train on the same track that nobody drives: where it is, its wagons, the coal the trip needs and the coal it has. A train with too little coal is grey. Pick a train and it comes. You get a message when it leaves and another one when it stops at the station. You can also call a train that is on its way somewhere else.
0.2.0
Track and stations can stand on supports. With track or a station on the hammer, press G to pick none, wood, core wood or iron. The ghost shows the supports before you place.
Every 8 m a support of 2 vanilla poles goes down into the ground, with a 45 degree beam forward and back along the rails. The poles are as many as the height needs, only the bottom one goes into the ground.
They are vanilla pieces with vanilla strength: wood reaches about 12 m, core wood 18 m, iron 46 m. Where the ground is deeper, the ghost turns red and says which material reaches.
They cost what the vanilla pieces cost, shown after a + in the build menu. You remove them one by one with the hammer and get the materials back. Mobs and hits do not harm them.
A new station has no wooden legs. It has snap points at its 4 corners for your own legs, or gets supports with G. Stations you built before keep their legs.
New server settings in the Server section:
FreeSupports: supports cost nothing, and give nothing back when removed. Off by default.
TrackCost: the price of track in percent, 0 to 1000, default 100. 0 makes track free. A removed track piece gives back what it was paid with.
New settings of your own in the Build section, in a config manager they count at once:
PolesKey: the key that picks the supports, default G. One key, or one with modifiers like LeftShift + G.
Poles: which supports go under new track and stations, None, Wood, CoreWood or Iron. G changes it, and it is kept after a restart.
0.1.11
The wagon restaurant has a stone stove in the middle of its table. Put coal in at the fire mouths under the table and raw meat on the slab on top, it cooks like on a cooking station. 1 coal burns 10 minutes, the stove holds 10. While the stove burns, everyone in the wagon gets warm, and sitting on a bench at it gives you Rested with comfort 6. The food on the table stands around the stove now. A train stops at the end of the track. Before, a train that backed into a dead end pushed its wagons onto each other. A station close to the end of the track is in the station menu again. The train stops where the rails end.
0.1.10
The station menu works with a gamepad. The stick or the D-pad picks a station, A sends the train, B or the menu button closes it. On a Steam Deck a tap on Close closes the menu now. The locomotive and the wagons get frost in the mountains, like the other pieces.
0.1.9
New settings for the flatbed wagon, all in the Server section.
DeckHeight: how high you can build over the deck, 2 to 12 m, default 4.
DeckReachLeftRight and DeckReachFrontBack: how far a piece can reach past the edges of the deck, 0 to 2 m, default 0.5.
DeckPiecesIndestructible: what is built on a flatbed takes no damage. Off by default.
DeckSmelters: a smelter, a blast furnace, a kiln and an obliterator can be built on a flatbed. Off by default.
DeckFires: a campfire, a hearth and a brazier can be built on a flatbed. Off by default. Torches always can.
A cauldron on a flatbed keeps its fire after the train moved.
CoalPer100Meters is CoalPer1000Meters now, default 10. A value you set before is kept, 2 becomes 20.
TopSpeed goes from 2 to 40 m/s now.
0.1.8
The rail pieces are in the build menu right after you join. Before you had to pick something up first.
0.1.7
A new wagon, the flatbed. It is an empty deck and you build on it.
0.1.6
The settings of the mod show in a config manager in the game now. The 3 map settings count at once when you change them there. The others count from the next start of a world.
0.1.5
The portal wagon works with TargetPortal now. The torches of the locomotive are no longer pixelated.
0.1.4
In a hosted game the host can drive again while another player is near the train. A train you send no longer stops on the way when you go far from it, like through a portal. One popup for the new pieces, not 24. A few smaller fixes for trains with 2 players near.
0.1.3
No more warning in the log at the first use of the hammer when you don't have Craft From Containers.
0.1.2
Single player and hosted games work now, I tested both. Also a new icon and a Discord server for the mod.
0.1.1
A new icon and a new page text. The mod itself is the same.
0.1.0
The first version.