In other languages:

User:Cardinal/sandbox

From Official Factorio Wiki
Revision as of 11:50, 18 February 2025 by Cardinal (talk | contribs) (WIP)
Jump to navigation Jump to search
官方预告片中展示的铁路系统。

关于同名科研项目,请参见Railway (research)

Railway是游戏中主要的运输方式之一。铁路建设是相当繁杂的过程,且需要大量的资源和空间,但其运输速度和效率远高于传送带和机器人物流系统,尤其是在长距离运输时,其优势会更加明显。此外,除了作为实用的运输方式,驾驶火车也是游戏中非常有趣的玩法之一。

铁路是一个非常复杂的系统,掌握它需要了解诸如自动化交通之类的基础知识,这需要一些时间和精力,管理和维护大规模的铁路网则更加考验玩家的游戏理解和经验。铁路可在地面上建设,也可以 - 在Space Age扩展包中 - 利用Rail rampRail support建设高架铁路,使火车得以跨越障碍物。

基础设施

建设铁路的第一步是铺设铁轨,这通常使用Rail planner进行,但也可以手动铺设。请注意,铁轨的占地面积为2,因此铁轨是无法逐格移动的,这往往是铁轨无法对齐(尤其是在环线铁路或改变铁路接入方向时)的原因。

最小规模手动铁路

手动运行的铁路至少需要包括以下部分:

玩家可以进入内燃机车并手动驾驶,只需站在机车旁边并按下ENTER键即可。

道岔

  • 道岔是用于更改火车行驶方向的铁轨交叉点。目前游戏中没有为道岔设置诸如动画之类的视觉效果,但它确实存在于游戏中。在使用规划工具铺设铁轨时,需要以现有铁路为起点,通过调整铺设方向来设置道岔。
  • 两条直线铁轨的交叉点并不能作为道岔使用,因为它小于火车的最小转弯半径。但这种交叉点可以连接铁路信号,以避免火车相撞。
  • 两条平行的铁轨之间不会相互干扰。然而,如果它们靠得太近,两条轨道间的连接可能会变得相当麻烦;连接线需要满足最小转弯半径,以一段弧形甚至环形延展后才能连接两条铁轨,这可能会导致区域内的铁路信号网络变得非常复杂。因此通常不推荐铺设间距过小的平行铁轨。(一般而言,间距为2条铁轨的宽度 - 即4格或5格 - 的间距可以适应大多数情况)
一个安全的铁路道口示例。(点击以放大图片)

穿越铁路

通过道口时务必小心!行驶中的火车是游戏中伤害最高的实体之一,在大多数情况下,与火车相撞会导致玩家当场重生。

穿越铁路时的安全守则:

  1. 拉远视角,以便提早看到驶来的火车。
  2. 沿线路方向左右观察。
  3. 观察附近的铁路信号,如果信号从绿色变为红色或黄色,说明火车即将通过,不要穿越。
  4. 避免在铁路附近行走,即使不完全位于铁轨上也有可能被撞击。
  5. 在火车行驶中上下车从理论上来说是可行的,然而一旦失误就会危及玩家生命。火车的侧面仍能造成伤害,且玩家有可能被夹在两节车厢之间。
  6. 坚固的护盾可以减少撞击伤害,在极端情况下,玩家有可能做到肉身停车。但这需要装备大量护盾模块才能实现,且会大量消耗装甲的能量。
  7. 所有具有生命值的实体在与火车相撞时都会受到伤害,因此应当注意不要将CarTank停在铁轨上。类似地,敌人也可能在穿越铁轨时被火车撞击,因此一般无需为行驶中的火车配备额外的防御。
  8. 火车在远离Train stop时通常会以最高速度(或接近最高速度)行驶,因此穿过远离车站的路段时需要格外小心,并进一步拉远视角做好观察。火车在接近车站或铁路信号时会减速行驶以至停车。不同配置的火车的行驶速度也是各不相同的。

可以建造如右图所示的铁路道口以保证安全通过,它通过Circuit network控制铁路信号和Gate动作以实现功能。当玩家位于铁轨上时,铁路信号会被信号网络占用,此时列车将停车等待,直至玩家离开轨道;当火车通过铁轨时,外围闸门会关闭,从而阻止玩家进入道口。这种道口能保证玩家安全通过,通常在多人游戏服务器上使用。

火车

在铁轨上放置Cargo wagon使其与机车连接。

组成火车的部件:

Locomotive
Cargo wagon
Fluid wagon
Artillery wagon
  • 一列火车最少由一台内燃机车组成。
  • 列车可以包含一台以上的机车和任意数量的车厢。
  • 机车可以手动驾驶以控制其前进或后退,但倒车速度通常较慢。左右移动键用于在道岔处改变行驶方向。
  • 自动模式下,机车只能向前行驶。如果在列车首尾各自连接方向不同的机车,它就可以自动双向行驶。
  • 火车需要消耗Fuel行驶。当列车处于手动模式或在车站停靠时,可以通过机械臂添加燃料,而在自动模式下或等待铁路信号时则不能。

内燃机车的物品栏仅用于储存Fuel。需要将Cargo wagonFluid wagon与机车连接才能运输各类货物。玩家可以将火车部件在铁轨上相邻放置以构建列车。如果距离合适,会在部件之间显示绿色图标,表示部件已连接到列车。如果车厢远离列车、玩家可以使用连接列车键(默认为J)将车厢手动连接到列车上,同样地,也可以使用断连列车键(默认为K)断开车厢与列车的连接。

车站

一个非常简单的车站。

Train stop是火车在自动模式下唯一可以装卸货物的地点。货运车厢可以通过最多12个相邻的Inserters(每侧6个)进行装卸,此外它还可以用于为机车装填燃料。液罐车厢的装卸则需要使用Pump进行,每节液罐车厢最多可同时连接3台管道泵。

车站只能在铁轨旁放置,且必须位于前进方向的右侧。除此之外,也可以通过打开机车界面,然后在界面的小地图上靠近铁轨使用CTRL + Left mouse button快捷键,或者在地图视图上靠近铁轨使用CTRL + Left mouse button快捷键来创建一个临时车站。临时车站无需放置车站,默认停留时间5秒,一旦火车离开临时车站,它就会从时刻表中被删除。

信号

Rail signal
Rail chain signal

铁路信号用于自动运行多列火车并避免它们相撞。铁路信号会将铁路划分为若干个区间,并确保在任何时候每个区间内只有一列火车存在,这类似于现实中铁路运行使用的闭塞区间。注意,手动驾驶火车不受铁路信号限制,因此玩家如果不注意观察附近的信号,就可能与自动行驶的火车相撞。在手动驾驶时,应始终注意自动行驶的火车,并让它们优先通过。

Tutorial:Train signals包含了对铁路信号,区间和阻塞的深入讨论。

基本信号规则

  • 每个区间内只能有一列火车存在,跨越多个区间的火车会占用所有区间,阻止其它火车进入。
  • 红灯表示下一个区间被占用,不能进入。
  • 黄灯表示火车正在接近,并获准进入下一个区间。
  • Rail signal用于划分区间并显示其状态:绿色=空闲、黄色=预留、红色=占用。
  • Rail chain signal用于划分区间,并显示相邻的下一个或多个区间的状态:绿色、黄色、红色见上文,蓝色=部分区间被占用,数量介于1~全部之间。
  • 火车只能通过其前进方向右侧的信号,如果铁轨两侧都有/都没有设置铁路信号,则允许火车双向通行。当然,手动驾驶不受此限制。

自动化运输

机车界面中的发车条件菜单。

当列车被设置为"自动"模式时,可在发车前选择目的车站和路线,它会在连锁信号处等待5秒。如果目的车站被信号网络禁用,列车将使用路径查找算法选择最短路线前往名称正确的已启用车站,同时将所有实时的延误纳入计算过程。如果不存在符合条件的车站,列车将跳过这一站,继续开往下一站。

要进行自动化铁路运输,玩家需要组建一个至少包含两座车站的铁路系统,这些车站需要放置在列车行驶方向的右侧。将鼠标悬停在车站上可以查看车辆的位置,方便玩家更好地建立车站(包括附属的装卸设施、燃料补充设施和维修设施等)。

当设置好时刻表(见下文)并为机车装填燃料后,即可将列车从手动驾驶模式切换到自动驾驶模式以启动列车,使其按照时刻表自动运行。

列车时刻表

玩家可以在机车界面中建立一个时刻表,包含列车将会停靠的车站。列车将按照时刻表顺序前往各车站并停靠,如果到达最后一个车站,列车会返回第一个车站,然后再次出发。可以通过在界面中点击"添加车站"将车站加入时刻表,点击后界面将显示当前所有车站的列表,玩家可以在其中选取需要加入时刻表的车站。然后点击选中时刻表内的某个车站,会弹出另一个列表,玩家可在此列表中设置选定车站的发车条件。此外,机车界面右侧的小地图可用于快速将车站加入列车时刻表(使用SHIFT + Left mouse button快捷键在小地图上点击车站),或快速添加临时车站(使用CTRL + Left mouse button快捷键点击小地图上的铁轨)。这些操作也允许列车内的玩家通过远程视图界面中的世界地图执行。

发车条件用于控制列车何时离开车站,游戏中提供了15种发车条件:

  • 信号条件 – 车站可以接入Circuit network,其信号可设置为发车条件。
  • 清空货物 – 列车中所有库存均被清空,不包含燃料库存。
  • 流体计数 – 列车中某种流体的库存总量达到设定值。
  • 燃料(所有机车) - 列车中所有机车的燃料库存总量达到设定值。
  • 燃料(任何机车) - 列车中任一机车的燃料库存量达到设定值。
  • 装满货物 - 列车中所有库存已满,不包括流体库存。
  • 燃料满载 - 列车中所有燃料库存已满,不包含货物/流体库存。
  • 留有货物 - 列车库存有货物或流体。
  • 停止装卸 – 在设定时间内列车没有装卸任何物品。
  • 货物计数 – 列车中某种货物的库存总量达到设定值,不包含燃料库存。
  • 乘客在场 - 列车上有至少一位Player
  • 乘客不在场 - 列车上没有任何玩家。
  • 停靠站已满 - 根据车站设置,指定的车站已满。如果车站未设置列车限制,则不会触发此条件。
  • 停靠站未满 - 根据车站设置,指定的车站未满。如果车站未设置列车限制,则可以触发此条件。
  • 定时停靠 - 在车站停靠设定的时间。

也可以不为列车设置发车条件,此时列车会直接通过车站,不做停留。

如果添加了多条发车条件,可以使用逻辑运算词"且"和"或"连接各条件。"且"会在所有发车条件满足时触发,而"或"会在至少一条发车条件满足时触发。

当"且"与"或"混合使用时,判定逻辑将根据"或"为发车条件分组。当判定发车条件时,首先判定第一个条件和与它用"且"连接的其它条件,直到出现下一个"或"条件(不包含)。如果所有"且"条件均满足,则输出发车信号,否则将继续判定下一个"或"条件和与它用"且"连接的其它条件,直到下一个"或"条件。判定逻辑会一直运行,直到触发发车信号,或所有发车条件均经过判定。

示例

列车编组界面示例。"Group A"组中有2列火车、"Group B"组中有1列火车。

展开查看

需求:装满列车,最多等待30秒。

装满货物
或
定时停靠 : 30秒

需求:装满列车,或原油库存>3000。

装满货物
或
信号条件 : 原油>3000

需求:清空列车,至少等待30秒,且预留5秒装卸时间:

清空货物
且
定时停靠 : 30秒
且
停止装卸 : 5秒

需求:卸载大部分铁矿或铜矿,至少等待30秒:

货物计数 : 铁矿<500
且
定时停靠 : 30秒
或
货物计数 : 铜矿<500
且
定时停靠 : 30秒

游戏中发车条件的逻辑组合是一种析取范式(缩写为DNF),因此最后一个例子也可以转写为(注意括号):

[(货物计数 : 铁矿<500 且 定时停靠 : 30秒) 或 (货物计数 : 铜矿<500 且 30 定时停靠 : 30秒)]

这与以下式子是相同的:

[(货物计数 : 铁矿<500 或 货物计数 : 铜矿<500) 且 定时停靠 : 30秒]

很遗憾,基于当前的游戏界面,逻辑条件的简化只能止步于此。

列车编组

可以为多列火车分配编组。点击"未指定编组"文字旁的编辑图标将显示当前地图上所有的列车编组。可以为列车选择一个编组加入,或者创建新的编组。一个编组会共用时刻表,编辑一列火车的时刻表会改变所有同编组火车的时刻表。

中断机制

机车界面中的中断机制菜单

Schedule interrupts allow a locomotive to override its current schedule when a certain condition is met. Selecting "Add interrupt" in the locomotive's GUI will bring up a list of existing interrupts in the current world. One can be selected from the list, or typing in a name will create a new one. Creating one will add it to the locomotive and all locomotives in the current locomotive group.

To work, an interrupt requires two parts: a condition and a target station. When a condition is met, the interrupt will activate and insert the target station as a temporary stop in the locomotive's schedule. The locomotive will route to the target station and wait there until the specified wait condition is met, at which point it will leave and resume its original schedule.

大部分中断机制的触发条件与发车条件相同,除了以下几种:

  • 在指定停靠站 - The train is waiting at a specific stop
  • 目的地已满或无路径 - The train's next stop is full, according to its train limit; or the train cannot physically reach its next station
  • 不在指定停靠站 - The train is stopped somewhere other than the specific stop

Multiple trains can have the same interrupt regardless if they are in the same locomotive group or not. Editing an interrupt will change it for all trains which have the interrupt in their system.

Interrupts can be reordered within the locomotive's GUI like normal stops. If a train has multiple interrupt conditions true at the same time, it will prioritize interrupts that are higher on the list. This is important if one wishes a train to behave a certain way when working with a particular suite of interrupts.

通配信号中断

四种特殊通配信号:物品、燃料、流体、信号。

Within interrupts, trains have access to four special "wildcard" signals located within the Unsorted tab, which are special logic signals that can only be used within interrupts. Wildcard signals come in four types: item, fuel, fluid, and signal. When used as a condition to trigger an interrupt, each one looks at a specific inventory within the train and will replace itself with the signal of the first item it finds. For example, if an interrupt is set to trigger if an item parameter is over 50, and 51 iron gear wheels are placed into a cargo wagon, the interrupt will trigger as if the condition was looking for over 50 iron gears. Item, fluid, and fuel wildcards each look at a specific inventory: cargo and artillery wagons, fluid wagons, and locomotives, respectively.

When used solely as a condition, wildcards act otherwise identically to the anything logic signal. What makes them special is their function when used in both the condition and the target.

Wildcards will also replace themselves with any rich text icons within the names of train stops. Instead of selecting a target stop from the list, instead click on the "icon" button next to the green confirm button and select the same type of wildcard as used in the condition. Then, type the name of the station. If the stop has a matching icon in its name, then the train will match the item it contains with that icon, and select that stop as the destination.

The final wildcard, Signal parameter, checks against any signals passed to the train while parked at a train stop. When combined with a signal parameter for a target station, this can make the train go to a stop which has an icon in its name matching the signal it received from the station. When combined with matching the target station based on its contents, this can be utilized to create a generic train system which can select its destination based on the item it receives.

故障排除

Below are some things to verify if a rail system or train is not working.

  • Is the train fueled? Ensure that the locomotive has fuel of some kind.
  • Misplaced or non-functional switches? Ensure that the train can plan a path through the switches.
  • Another train on the same 区间?Make sure the path of the train is unobstructed.
  • Train stops placed correctly? Make sure that the yellow arrows when hovering on the stop point towards the end or exit of the stop.
  • Is the train allowed to enter signals from the right direction? Are the signals set correctly?
  • If a track is supposed to be two-way, the rail signals should be opposite each other. You can verify they match up by hovering the cursor over one. For a matched pair, it will show the other.

找不到路径

When trains cannot reach the target, a "no path" symbol pops up over the locomotive. Check:

  • Can the train reach its current destination by only driving forward? Build turning slopes or place a locomotive at both ends of a train!
  • Are the train stops standing in the right direction? Train stops must be on the right-hand side of the track (from the forward-facing locomotive's perspective). If the train is traveling south, the stop must be on the west side of the track.
  • If you use rail signals, check that the signals are all allowing traffic in the correct direction.
  • Check for interruptions in the train tracks, drive to the station manually to check there are no rail parts missing. Especially near junctions, these can be hard to spot if missing.

If you are still having problems, consider:

  • Driving the train manually, and as you pass each switch, try switching to automatic. When it works, you will know the rough area of the problem.

A pictorial summary of typical problems.

行车中断

When a train is about to leave the last station in an interrupt's schedule, there is no inherent mechanism which prevents the same interrupt from re-triggering. Many interrupt conditions naturally prevent retriggering by the nature of their condition. A wildcard interrupt for unloading cargo cannot trigger if the train has no cargo. Other conditions may retrigger if something in the base has malfunctioned. For example, a refueling interrupt should only trigger when fuel is low. But if the train is at the fuel station, wants to leave, and still has low fuel, then either there is no inserter to load fuel or the refueling station has run out of fuel.

But there can be cases where the conditions for a trigger's desired conditions can still happen after executing the interrupt's schedule.

To force the train to always choose a station with a different name, add "Not at specified station" to the interrupt conditions, specifying the same target station. This way, the train will be forced to pick a different interrupt, or travel to a station in its main schedule.

If the train should travel to a different station of the same name, circuit logic can be used to disable the current station and lower its priority, as well as adding "Station is not full" to the interrupt condition. Note that only disabling the station is not enough to prevent this issue, the train will only choose a different destination with the same name if it has a higher priority. Once there are no other valid stations with the same name (i.e. all of them are disabled, so there is no higher-priority station), the "Station is not full" condition will prevent the train from getting stuck.

高架铁路

一座简单的高架铁路桥。

Space Age expansion exclusive feature.

高架铁路是一个单独的模组,可以独立于太空时代模组启用。它包含两种新建筑:Rail rampRail support,可以在Nauvis上的水中建造高架铁路以连通两岸。当与太空时代同时启用时,高架铁路是重要的游戏组成部分,它对于越过Fulgora上的油海Vulcanus上的熔岩河至关重要,同时它也能轻松穿梭于Gleba广阔的湿地之中。

高架铁路可以使用Rail planner铺设。按 G 键可切换层级,并在玩家的背包中有相应物品的情况下尝试建造斜坡。当按住 SHIFT 键并指向目标铁轨时,铁路规划工具将自动放置所需的斜坡或支架以连通铁路。每隔16节铁轨必须放置1座支架。拆除斜坡或支架会同时自动拆除其支撑的所有铁轨。

玩家和Enemies不能在高架铁路上行走。在火车正常爬坡时玩家可以进入或离开或火车,并被传送到地面。当火车位于水体或岩浆上方时,玩家无法进入或离开火车。两种类型的铁路信号都可以在高架铁路上放置,但它们无法在车站上放置。

部分建筑因超高无法在高架铁路下方放置:

相关成就

Getting on track

Build a locomotive.

Trans-Factorio express

Have a train plan a path 1,000 tiles or longer.

Watch your step

Get killed by a moving locomotive.

Getting on track like a pro

Build a locomotive within the first 90 minutes of the game.

参见