User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

dev:proposals:maintenence

This is an old revision of the document!


Maintenence

Note: Do not work on this yet; i might make it

Trains do not run without problems. Tubes get blocked, Electrics short-circuit, Power supplies break, and all sorts of other things cause inconvinience.

However, Advtrains trains always run spick-and-span, regardless of if it has had a crash at full speed with another train going full speed.

This can be fixed by creating a whole new system of maintenence. Trains need to be maintained or they will eventually breakdown.

By checking a integer value called “maintenence_height” (max value 1,000), a train can bias a random generator which runs every 1,000 m. As the value grows lower and lower (every 100 m the value decrements by 1, 2 if on a slope), the chances go up and eventually something has to pop.

Once the random generator returns a value of 1, the train suffers a random problem from the problems table, which contains info on:

  • The name of the problem, like “speed 16 bulb cracked”
  • The speed restriction, like 15
  • The bias for it to occur, like 10

Once a train develops a problem, it may only be fixed through a maintenance tool.

One tool is the spanner, which once clicking a broken train increases maintenance_height by 1. This tool can only be used 20 times.

Another tool is the maintenance track, which holds many spanner. Since the track is specialised, it increases maintenance_height by 10 each spanner which goes into it. The train must be stopped for the track.

For better identification, the coordinates of trains with problems can be found using a command and the broken trains's locomotives make loud noises, as well as having a burnt texture overlain over theirs.

dev/proposals/maintenence.1673963104.txt.gz · Last modified: 2023-01-17 14:45 by evictionbot