tModLoader On A Rail - Your bed is now a train

hamstar

Terrarian

On A Rail

v1.2.1

Mirror (coming soon)


Note: Requires Mod Helpers




This mod introduces a deceptively simple concept: Your spawn point is now a rail-bound train. Think minecart, but you do not carry it with you. Dying, warping (Magic Mirror, Recall Potion, etc.), or (re)joining a game returns you to your train no matter what (or where).

To help you adjust to life on the move, you'll begin with some track rails to spare, and the merchant now sells them as well. Train Tunnel Kits are also available for traversing caves quickly (see the short video above).

Current features (subject to change before main release):
  1. Each player has their own train, per world. It now replaces your default spawn/recall point permanently. Must stay on rails to move.
  2. Trains give +20 defense while riding, and move faster than a basic minecart. You cannot jump high with them, though.
  3. Train tunnels can now be crafted. They allow quickly moving past dense terrain obstructions underground without tedious pickaxe excavating. Only usable by train. Must be placed on sections of wall, and require an area with walls for the exit tunnel to place.
  4. Extensible Inventory compatibility. Extended inventory pages now available only when mounted on your train.

Future features:
  1. Train requires fuel to move.
  2. Building and mining cannot occur if too far away from your train (maybe?).
  3. Trains can be upgraded and extended with cars for added abilities.
  4. All functions of a normal base (npcs, storage, defense, etc.) can be consolidated into the ultimate mobile base.

Since this is a work-in-progress, you won't find this beta on the mod browser yet. Also, this is only lightly tested in multiplayer.
 
Last edited:
v1.2.1
  • Fixed train tunnel direction
  • Added Encumbrance mod compatibility (disables effect when on train)
  • Corrected train tunnel direction indicator on inventory items
  • Reduced train tunnel distance settings
v1.2.0 (now with train tunnels!)
  • Added respawn train command (debug)
  • Implemented minecart icon mutual exclusivity with train icon
  • Removed map icon zooming
  • Updated to latest PacketProtocol
  • Fixed random premature dismount bug
  • Added better player initialization lockdown to prevent errors
  • Added defense boost when riding train
  • Added Extensible Inventory disabling when not riding train
  • Set SaveModSettingsChanges API command to require single player
  • Added inbox message
  • Added train tunnel tile and item
  • Added debug info output
  • Added debug mode for free tunnels
  • Refactored TrainBehaviorEntityComponent to not store its own player owner data
  • Refactored player Update code to fix various issues
  • Fixed minimap icon scale
v1.1.2
  • Added possible player load MP failsafe
  • Updated for MH v2.0.2.2 (promise validator contract updated)
v1.1.0
  • RC1 ready?
  • Added save behavior to better attribute ownership to trains
  • Fixed shared jumping animation bug
  • Fixed ghost train (hopefully?)
  • Fixed player-to-train warping
  • Assorted code improvements/bug preemption measures
  • Relocated entity components to subfolder
  • Updated net protocols for MH changes
  • Refactored for MH update to entity Update methods (fixes MP load issue)
  • Tweaked train alignment on and off tracks
  • Tweaked train sprite
  • Train entity is now made from a type
  • Train's name shown on mouse hover
  • Blocked attempts at mounting other players' trains
  • Set only one's own train to render on minimap
  • Attempted to fix player and train intially spawning inside the ground
  • Player auto-mounts train on warp
v1.0.0
  • Initial beta release.
 

Attachments

  • OnARail v1.0.0.zip
    52.6 KB · Views: 223
  • HamstarHelpers v2.0.1.zip
    549.4 KB · Views: 246
  • OnARail v1.1.0.zip
    57.6 KB · Views: 211
  • OnARail v1.1.2.zip
    42.5 KB · Views: 220
  • OnARail v1.2.0.zip
    67.2 KB · Views: 231
  • OnARail v1.2.1.zip
    67.7 KB · Views: 361
Last edited:
A few things in store for On A Rail:
  1. Rail coils. Like rope coils, only they unfurl rails horizontally, 25 at a time.
  2. Trains are heavy. Minecarts can traverse rails freely, but trains that traverse rails without a grounded support beam within 35 blocks risk causing the rail to collapse, and their train.
  3. Train cars do everything. As a train, expect to attach cars, which each do various things. Your train now hauls around your entire base, quite literally. Cars can each hold a crafting station, an interact-able mounted station (Chest, Extractinator, Cannon, etc.), and house a town NPC.
  4. NPCs must be rescued (unless configured otherwise). With the exception of the Guide, NPCs must all be rescued from the underground. They'll be found within underground houses tied up in sacks, but expect them to be guarded by gangs of souped-up goblins (or worse?).
  5. You start with 3 cars:
    1. A Cannon-mounted car with a furnace station.
    2. A Chest-mounted car with a crafting station.
    3. A blank car to customize freely.
  6. Your train now has a headlight, and it's special. This super-bright train light is great for revealing hidden stuff, and scaring away bats. May also do other things, later.
  7. To move, your train needs fuel. Maybe just gel (or some recipe based on it), but the bigger your train, the more fuel needed, so you'll likely need new fuel sources as the game progresses.
  8. New train tunnels may occasionally summon mini-bosses. Once one of these appear, your train is locked in place until you or it dies. They'll only spawn if your train is moving at top speed through a tunnel. Killing these are a great way to score PP and train parts, but they won't die easily. I may also make them demand a ransom to go away, if you're feeling under-equipped, or else impatient.
Also, to go along with On A Rail (optional, but highly recommended):
  1. A new mod called Kidnapped! will be created to implement the aforementioned rescue-able NPCs.
  2. Another mod called Mine Gasses will exist, and your train can be used to carry stations (Air Purifier) used for clearing away toxic fumes from caves.
  3. As usual, Rewards mod may come into play for mini-boss kills and other possible journey related things.
 
Last edited:
Doesn't Example Mod have a working minecart?
No, Unless I have missed it, There is none, I even asked on the tmodloader server but it seems no one has any idea about minecarts or knows of an example, They just told me to look in the terraria's source code for how they do it.
 
No, Unless I have missed it, There is none, I even asked on the tmodloader server but it seems no one has any idea about minecarts or knows of an example, They just told me to look in the terraria's source code for how they do it.
Well I haven't opened this mod's source yet. Maybe I will a bit later.

Meanwhile, here's a present:
 

Attachments

  • TrainMount_Front.zip
    4.7 KB · Views: 133
Back
Top Bottom