Convert rail

From OpenTTD

Jump to: navigation, search

The Image:Convert_rail.png convert rail button will activate a drag-and-drop tool that allows you to convert one type of rail to another (rail -> monorail -> maglev). This tool can be used on rail, depots, stations and checkpoints.

Trains you already have running should be sent to the depot and then destroyed completely.

Only empty depots can be converted.

Tip: To save time converting a train with lots of orders from one railtype to another, send your train to a depot of the old type and dismantle your train. While the depot window is still open, convert the depot to the new railtype, and the next train you build will have all the orders of your previous train. The depot window must remain open throughout this operation. Note that you can only convert one train at a time using this method, but you may also convert the depot back to the old railtype so you can convert another train using the same depot.

[edit] 0.5.0 and later

With the introduction of electrified railways in r4152, the convert rail tool offers this fourth option allowing you to convert normal rails to electrified rails.

For this conversion, updating trains is not immediately necessary as steam and diesel trains run perfectly on electrified rails. Electrified trains, however, will not pass over non-electrified tiles.

[edit] Easier converting of trains

For this method you have to compile from source, because a line of code must be commented out. You have to find the file rail_cmd.c and open it in an editor. Find the function

static int32 DoConvertRail(TileIndex tile, RailType totype, bool exec)

and change the third line of code from

if (!EnsureNoVehicleOnGround(tile) && (!IsCompatibleRail(GetRailType(tile), totype) || IsPlainRailTile(tile))) return CMD_ERROR;

to

//if (!EnsureNoVehicleOnGround(tile) && (!IsCompatibleRail(GetRailType(tile), totype) || IsPlainRailTile(tile))) return CMD_ERROR;

Now it's possible to convert depots, even if there are trains in it. You have to remove the old train and build a new electrified one, which will then have the orders from the old one automatically. But be warned, it's possible to convert rails with trains on it and these trains won't be able to drive on.

Personal tools