Go to file
Ciaran Gultnieks 843ec6d206 Fix a few accidental globals 2015-05-04 19:21:10 +01:00
models Initial commit 2014-03-26 19:10:30 +00:00
textures Initial commit 2014-03-26 19:10:30 +00:00
README.md Minor documentation improvements 2014-11-11 21:29:09 +00:00
boringcart.lua Fix laying on falling nodes 2014-04-29 07:57:32 +01:00
cargocart.lua Initial commit 2014-03-26 19:10:30 +00:00
cart.lua Initial commit 2014-03-26 19:10:30 +00:00
cartbase.lua Digilauncher, plus a few tweaks 2015-04-20 22:32:09 +01:00
controlrail.lua Protection support on digicontrol and controlrail 2014-10-30 18:21:58 +00:00
defaultrail.lua Missed some postostr calls 2014-03-28 08:54:02 +00:00
depends.txt Initial commit 2014-03-26 19:10:30 +00:00
description.txt Initial commit 2014-03-26 19:10:30 +00:00
detector.lua Stop duplicating built in functions 2014-03-27 22:01:55 +00:00
digicontrol.lua Protection support on digicontrol and controlrail 2014-10-30 18:21:58 +00:00
direction.lua Initial commit 2014-03-26 19:10:30 +00:00
hopper.lua Don't depend on pipeworks.clone_node - no longer exists 2014-11-08 14:10:57 +00:00
init.lua Digilauncher, plus a few tweaks 2015-04-20 22:32:09 +01:00
items.lua A few fixes and tweaks 2014-05-21 18:30:31 +01:00
launchers.lua Digilauncher, plus a few tweaks 2015-04-20 22:32:09 +01:00
rail.lua Fix a few accidental globals 2015-05-04 19:21:10 +01:00
screenshot.png Initial commit 2014-03-26 19:10:30 +00:00

README.md

Railcarts Mod

NOTE: Not currently compatible with stock minetest. Requires at least the current git version, plus these:

This is a Minetest mod for rails and carts, which is inspired by the Monorail mod by Sapier, and also the Carts mod by PilzAdam, yet completely different to both. The design goals of this mod are different and there are also various fundamental differences, such as the player interaction controls and default behaviours of rails and other components. In particular, note the absence of "power rails".

Additionally, this mod will allegedly generate FAR MORE network traffic than those two mods. (it uses setpos, always). You have been warned.

It is also incompatible with both of those mods - you can run it at the same time, but each of the three mods will only recognise its own carts and specialised rail/control items.

Author: Ciaran Gultnieks License: LGPL

Textures/Models (both in big need of improvement): WTFPL - PilzAdam, Sapier, Ciaran Gultnieks

Requirements

You need the following mods:

The github links are my forks, which all have changes that are important. (Although some are already merged).

Potentially, these could be soft dependencies. However, if you aren't using these, you probably don't really want this particular cart mod.

Optionally, if you want debug logging support, use:

Cart

Carts are placed on the rails with right-click. Right-clicking a cart lets you board it. When you're in a cart, right-clicking it lets you get out.

If a situation arises where the cart is going to continue, but the player will collide with a block above the track, the player is automatically ejected from the cart.

Left-clicking a cart pushes it. Left-clicking with the sneak key held down removes it from the rails (back into your inventory).

The whole cart system is really intended to be fully automated - i.e. you select a destination and board a cart, and get dropped out when you arrive at your destination. However, the standard move of pushing the cart and jumping in is supported, as is punching the cart while you're in it to control its movement.

Cargo Cart

A Cargo Cart is effectively a chest on wheels. You can't ride in it.

When below a Hopper, the cart will get loaded with items until it's full, unless it's above an AutoLauncher, in which case it will unload into the hopper, unless that's full.

Boring Cart

A boring cart is for boring tunnels, laying rails, building bridges, etc. It's mostly like a cargo cart, but it has two inventories - one for stuff it digs up, and one for materials it uses.

In the materials inventory go:

  • rails
  • wood for bridging
  • a mese pickaxe if you want it to dig

Additionally on the right-click form you will find controls for setting the direction (level, down or up), and enabling/disabling the various functions.

When 'safe dig' is enabled, only a select range of non-man-made materials will be dug. Anything else will stop the cart. This is intended as an extra failsafe feature to prevent unintended destruction - but don't bank on it!

If 'dig' and 'bridge' are both enabled, the cart will not lay rails on failling nodes (e.g. sand, gravel) - it will dig and bridge them instead.

It operates when it reaches the end of the rails it's on. Be careful with that! Generally, it's a good idea to have failsafe limits of operation set up. Some options - use one or more:

  • safe dig mode (see above)
  • using digital control rails (see below) and lua controllers, such that boring carts are restricted from leaving the particular part of the rail network they're working on.
  • loading them with a limited number of rails
  • removing the mese pick when not in use

Switching Rails

Rail switch junctions are changed from their default direction to the opposite with the application of a mesecons signal.

To permanently switch a junction, burying a mesecons:switch beside it and turning it on is a good option. Covering the switch with a slab to prevent it being accidentally changed is also a good idea.

If using automated rail switching (a common example is with the combination of a digital control rail to detect and identify a cart, and a lua controller wired to the switch to change it) be aware that if MESECONS_GLOBALSTEP is set to true (the default) there can be a significant delay before the rail actually switches - sometimes after the cart has gone past. I just set it to false.

Control Rail

Control rails alter the behaviour of a cart that passes over. They are normally switched on, but can be switched off with a mesecons signal.

Right-clicking brings up a dialog where you can set what they do. Any of the following are valid:

  • "none" - has no effect
  • "maxspeed" - set the cart to its maximum possible speed
  • "speedup" - go faster (1m/s more)
  • "slowdown" - go slower
  • "stop" - these are quite obvious
  • "reverse" - aren't they
  • "tag " - set the 'tag' on the cart - each cart has one tag, which can be read back by Digital Control Rails. They're good for many things, including setting cart destinations when they will travel over a large network with many junctions.
  • "speed " - set the cart's speed to the given value

Digital Control Rail

A digital control rail is a digilines-compatible rail, that sets cart controls to the same specification as a Control Rail, but via a digiline message rather than being a fixed setting.

In addition, it sends a digilines event when a cart passes over it, which includes the speed, direction, type of cart, and tag.

Right-click to set the channel.

Cart Detector

A cart detector emits a mesecons signal for two seconds when a cart passes by. It is only ever triggered once per cart.

It can be placed below the rail, in which case it will trigger for carts passing both ways, or it can be placed to the side of the rail, in which case it will only trigger for carts who pass with the detector on their left.

Launcher

Launchers are intended to be placed at the end of a track. Applying mesecons power will cause an adjacent cart to be accelerated away down the track.

Note that a cart (particulary a stationary one waiting for loading under a hopper) may be in a 'wait' state, to reduce required processing. To be sure of a launch, it is advisable to switch on the launcher for some time - 8 seconds is suggested.

Autolauncher

An autolauncher a) operates like a chest, although it only makes sense to put carts in it, b) when there are rails leading away from it, or below it, (with no cart there) and there is a cart inside, puts a cart on the rails, c) when there is a cart adjacent to it, and there is a player on board, accelerates that cart away down the track, d) grabs a cart when is stationary with no player or cargo inside, on top of it, or below and adjacent, e) if there is one below the rails, and the cart has a player in, the player is ejected (and cargo is unloaded, see Hoppers/Cargo Carts)

Hopper

A hopper is for loading and unloading cargo carts. It should be placed above the rails, with either:

  • An Autolauncher below the rails, for unloading (after which, the cart will be grabbed by the Autolauncher, and can then be sent elsewhere)
  • An Autolauncher adjacent, for loading. In which case, once the cart is loaded, it will set off, to be replaced with another for the next batch of goods. Additionally, if a cart is partially loaded, it will set off if it sits for a long time without any further loading, even when not completely full. This might not make sense until you try it.

Pipeworks tubes connect to the top for filling the hopper. Filters are used to empty it.