Difference between revisions of "TrainCarts/PathFinding/zh"
Saionji Rin (talk | contribs) (Created page with "== 配置方法 ==") |
Saionji Rin (talk | contribs) (Created page with "=== 故障处理 ===") |
||
Line 25: | Line 25: | ||
− | + | === 设置新的道岔节点 === | |
− | === | ||
− | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Line 37: | Line 35: | ||
− | + | === 设置单行线路 === | |
− | === | ||
− | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Line 49: | Line 45: | ||
− | + | == 来试试吧 === | |
− | == | ||
− | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Line 71: | Line 65: | ||
− | + | == 高级功能 == | |
− | = | ||
− | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Line 80: | Line 72: | ||
− | + | === 故障处理 === | |
− | === | ||
− | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Line 90: | Line 80: | ||
− | + | ==== 所有路径点 ==== | |
− | ==== | ||
− | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Line 101: | Line 89: | ||
− | + | ==== 单一路径点 ==== | |
− | ==== | ||
− | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Line 113: | Line 99: | ||
− | + | === 路径管理 === | |
− | === | ||
− | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
Line 122: | Line 106: | ||
− | + | ==== 指令 ==== | |
− | ==== | ||
− | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> |
Revision as of 15:12, 30 December 2021
简介
thumb|right|Setup of 3 destinations and a switcher sign to route trains between them
我们可以通过TC插件的switcher、blocker和destination控制牌的相互配合,实现一个复杂的铁路系统,让不同列车前往不同的目的地。在本页面中将介绍自动寻路系统的工作原理以及配置方式。
TC插件可以在路网中设定路径点,同时通过列车自身的路径点属性将列车导向不同的方向。配置路径点的信息请参阅此界面。在路网中,道岔以及路径点的位置被称为“节点”。为了避免列车冲突,可以使用路阻来限制自动寻路的方向。
配置方法
设定路径点
Start by placing down destination signs with a name for the destination on the third line. The fourth line can be used to set a new destination to go to once a train goes over the sign, but can be left empty.
设置新的道岔节点
Places where the track should be switched need to have an always-powered switcher sign placed. Now when a train moves over it that has a destination set, a route will be calculated and then the track is switched.
设置单行线路
When it is desirable that trains only ever go in one direction over a piece of track, an always-powered blocker sign can be used. This is useful when having two tracks side-by-side, each going in opposing directions. The path finding system will automatically ignore paths that are blocked by blocker signs.
来试试吧 =
Place down a minecart on the track, and use the Destination command to set a destination:
/train destination [name] /train destination output
Now give the minecart a push towards the switcher sign, and observe how it will automatically switch the track to send the train towards the destination. You can change the destination again and send it to the switcher again. Continue to experiment with multiple switchers, blockers and destinations.
If you run into a problem where the switcher appears to make a mistake, use the Reroute command to force a recalculation of all routing information:
/train reroute
It is also possible to use the property sign to set a destination:
高级功能
Once the basic system is understood, there are some more complicated features to discuss.
故障处理
The plugin offers a debug stick with which path finding information can be displayed. Use the stick item to click on rails to show information about the route(s) that can be taken. Sneak (shift) while clicking performs a reroute, which recalculates the track reachable from where you clicked. If you have multiple smaller rail networks, this can be more efficient than executing the global reroute command.
所有路径点
Use the following command to get a stick item that displays all destinations reached from a given track:
/train debug destination
The track clicked is followed until a node of the track network is found, after which all routeable destinations are listed. For every destination the total distance to it is listed, and particles are displayed leading into it. If you find that a certain destination is not listed that should be, you can move further along the track clicking occasionally to find where the break is.
单一路径点
Use the following command to debug a specific destination:
/train debug destination [destination]
Now when you click on the track, particles are displayed what route is taken to reach the destination. This is useful when debugging a specific destination so no particles are displayed for routes and destinations that aren't relevant to you.
路径管理
Normally only one destination is set at a time. It is possible to set the next destination to go to on the destination sign itself, but that means you can only have one possible route. With the route manager a list of destinations to visit can be configured, and then applied to trains. Trains will then go down this list, advancing it every time they pass by a destination on it.
指令
First, edit a train, then use the following commands to set a list of destinations:
/train route set [destination1] ([destination2] [destination3...]) /train route set outpost hillfort dungeon
To add additional destinations to the existing route, or to remove them, use these commands:
/train route add [destination1] ([destination2] [destination3...]) /train route remove [destination1] ([destination2] [destination3...])
You can then use the destination command or property to start the route at a desired destination. Otherwise, the route is started from the beginning the moment the train hits a destination sign. To inspect the route of a train, use the base route command. The current destination the train has is highlighted green.
/train route
Persistence
The route of a train can be saved globally under a name so it can later be applied to other trains instantly.
/train route save [name]
To load a saved route, this command can be used:
/train route load [name]
Alternatively, it can be done using a property sign as well: