游戏机制
/File/en/Translation.png
该文档正从 英语 翻译为 汉语
源文档标题: en/Manual/Game Mechanics/Main Page
完成度: 1%
  
  • 请帮助改进本文。
  • 参考风格指南编写正确的版本。
  • 在完成翻译后移除该模板。
OpenTTD 游戏手册
安装 · 教程
常见问题 · 游戏界面(en)
README.md
基础建设

铁路 :

信号灯 · 车站 · 交叉 · 设计技巧
公路建设 · 有轨电车 · 水路建设 · 机场 · 更改地形
载具
列车 · 汽车 · 船只 · 飞机 · 调度指令
选项
游戏选项 · 高级选项(en) · AI选项(en) · NewGRF · 作弊指令
图形与声音(en)
OpenGFX · OpenMSX · OpenSFX
更多主题
气候 · 城镇 · 工业 · 经济 · 灾难 · 游戏技巧 · 快捷键 · 控制台 · 游戏机制 · 多人游戏 · 场景编辑器 · 在线内容
故障排除 · 链接(en)

您可以在这里找到OpenTTD计算游戏内数值的方式。

如果您一直都想知道如何提升车站的评级或者货物的流通如何运作,在这里可以找到答案!

Contents

公司评价

组成公司评价明细的每个部分都是一个线性函数,打个比方,在某个部分达成了 50% 的目标,对应部分就会获得 50% 的分数。如果部分涉及资金数量,那就会转换成当前游戏的货币。在游戏内部,这些数值会被存储为英镑。

部分 目标 点数 (最小) 点数 (最大) 百分比
去年实现盈利的公司载具数量 >=120 载具数量为 0 就为 0 至少需要拥有 120 辆载具时获得 100 点 0 - 10%
公司最近仍然使用的车站组件数量 >=80 车站组件数量为 0 就为 0 至少需要拥有 80 个组件时获得 100 点 0 - 10%
运行两年以上的收入最低载具的损益 >=£10,000 处于亏损或损益为 £0 时就为 0 损益至少为 £10,000 时获得 100 点 0 - 10%
过去3年中季度收入最低的损益 >=£50k 损益为 £0 时为 0 至少为 £50k 时获得 50 点 0 - 5%
过去3年中季度收入最高的损益 >=£100k 损益为 £0 时为 0 至少为 £100k 时获得 100 点 0 - 10%
去年运输的货物总数 >=40,000 数量为 0 时为 0 至少运输 40,000 单位时获得 400 点 0 - 40%
上个季度中运输货物的种类数量 >=8 种类数量为 0 时为 0 至少运输 8 种类型时获得 50 点 0 - 5%
当前流动资金 >=£10m 为 £0 时为 0 至少£10m 时获得 50 点 0 - 5%
当前贷款数量 £0 贷款 >£250k 时为 0 £0时获得 50 点 0 - 5%
总表现值

0 点 1000 点 0 - 100%
公司评价排名
评分 头衔
0 - 127 工程师
128 - 255 交通管制员
256 - 383 运输代理
384 - 511 运输总监
512 - 639 运输经理
640 - 767 首席执行官
768 - 895 董事长
896 - 959 总裁
960 - 1000 运输大亨
2050年高分评级
评分 头衔
0 - 319 运输个体户
320 - 447 运输代理商
448 - 575 运输企业主
576 - 703 运输资本家
704 - 831 运输行业巨子
832 - 959 运输行业领袖
960 - 1000 世纪大亨

站点评级

该部分展示影响站点评级的因素。所有的计算根据货物类型单独计算。

因素 条件 评分 评价 %
最后装载货物载具的最大速度(上限255km/h)
如果是道路载具,则除以2
大于 85 km/h (52 mph) (速度 (km/h) - 85) / 4 0% - 17%
最后装载货物载具的运行年长 2 10 4%
1 20 8%
0 33 13%
最后装载货物经过的天数
如果最后装载货物载具的类型是船只,则“条件”列中的天数要再乘 4
注:如果载具抵达时有空运载货物但无货可运,仍视为一次运货。 但若载具抵达时已满载,不会被视作运货并且将继续计时。
30 - 52.5 25 10%
15 - 30 50 20%
7.5 - 15 95 37%
小于 7.5 130 51%
Units of cargo waiting at station
Note: if cargo has been transferred to other stations, then the game MAY consider the maximum cargo waiting at any of those stations as the waiting cargo for the source station: TruncateCargo(). This is triggered when the game truncates cargo (waiting_changed = true), which occurs when any of the stations meet the following conditions:
  • Cargo has not been picked up from any of those stations in 637.5 days. [1]
  • Station has rating less than or equal to 25% AND has more than 200 units of cargo waiting. [2]
  • Station has rating less than 50% AND has more than 0 units of cargo waiting, happening with RANDOM PROBABILITY proportional to the station rating. I.E. if station rating is 49%, there is a ~1% chance, at 25% rating there is a ~50% chance, and at 0% station rating there is a 100% chance. [3]
  • Station has more than 4096 units of cargo waiting. [4].
大于 1500 -90 -35%
1001 - 1500 -35 -14%
601 - 1000 0 0%
301 - 600 10 4%
101 - 300 30 12%
小于 100 40 16%
Statue in town of station Built 26 10%
事件 条件 评价变动 百分点变动
Small advertising campaign bought Station within 10 tiles of town center +64 +25pp
Medium advertising campaign bought Station within 15 tiles of town center +112 +44pp
Large advertising campaign bought Station within 20 tiles of town center +160 +63pp
车辆发生交通事故 距失事地点22格内的站点 -160 -63百分点
火车或者飞机失事 距失事地点30格内的站点 -160 -63百分点
飞机失事
失事时也会立即清除所处站点内所有存储的货物。 [5]
失事地点所处的站点 -255 -100百分点
贿赂地方政府失败 城区范围内所有站点 -255 -100百分点

Divide the total rating points by 255 to get the percent rating. The maximum possible rating is 100%.

Every 2.5 days (185 ticks), station ratings are computed; ratings can't change by more than 2 points (0.78%) per cycle, except due to items under "Event". Events give an instant, temporary boost (or penalty) to ratings of nearby stations. The rating will gradually return to normal, following the 2 point per 2.5 days rule.

The amount of cargo that can be transported from an industry is fully reliant on the station rating. This means that if there is exactly one station serving an industry, on ticks when the industry produces cargo, exactly station rating % of the cargo will be moved to the station. So if the amount of cargo transported from an industry is low, it is probably because the station rating is low, too.

Note: The exact formula can be seen under "UpdateStationRating()" in station_cmd.cpp. This uses some values calculated in "LoadUnloadVehicle()" in economy.cpp.

Note: If the rating gets to be less than 50%, the station starts losing cargo.

Note: If the amount of cargo waiting is greater than 4096 units (or 4,096,000 liters), the station also starts losing cargo. There is a hard cap of 32,768 units of cargo that can be waiting at a station. Any more than that completely disappears every few days. [6]

货物到站点的输送

Goods are distributed to stations according to station rating.

If there is only only station around, then a percentage of available goods equal to the station's rating is distributed to it every 2.5 day cycle.

If multiple stations are present, then goods are divided between them based on rating. If there are stations belonging to more than one company, then goods are first divided between companies according to the best station of each company: the proportion of goods allocated to a company C is equal to the best station rating of C over the sum of all best station ratings for all companies. Note that this will be equal to 100% if all stations belong to one company. Then each company's allocation is subdivided among its stations. A station S belonging to C receives a fraction of C's company allocation equal to the rating of S over the sum of the ratings of all stations belonging to C.

地方政府评级

Ratings limit some player actions; they start at +500 and can change based on some actions.

Currently you can exploit the game by planting about 200 trees within a town's influence radius. You may need to clear an area first, in order to have somewhere to plant them, but planting 200 will raise even a minimum rating of -1000 to 220. If your rating is Mediocre or lower, planting 30 trees will approximately wipe out the rating penalty from building one station. Planting trees while at a rating of Very Good or better has no effect.

评分 评价等级
-1000至-400 垃圾
-399至-200 糟糕
-199至0 较差
0至200 一般
201至400 较好
401至600 优秀
601至800 卓越
801至1000 完美
Player action Required rating* Effect on rating
Build a station -200 n/a
Destroy an 'edge' piece of road 16 / 64 / 112 -18, down to -100.
Destroy an 'inner' piece of road 16 / 64 / 112 -50, down to -100.
Destroy a city tunnel or bridge 144 / 208 / 400 -250, down to 0.
Destroy building** 40 to 300 -40 to -300
Plant tree on clear square n/a +7, up to 220.
Clear a tile with trees n/a -35
Successful bribe n/a +200, up to 800.
Unsuccessful bribe n/a Set to -50.
* "Required rating" is listed for the settings Permissive / Neutral / Hostile of
the Difficulty (en) option City council attitude towards area restructuring.
** For default buildings. NewGRFs can set this number from 0 to >1000,
which effectively makes the building unremovable.

Each month players' ratings automatically change:

Example:
A player has a rating of -300, (Very Poor), 2 active stations and 1 inactive station at a town.
5pts + 2 * 12pts - 15pts = 14pts points gain per month.
(-200 - -300)pts / 14pts/mo = 8 months before the town will let him build another station.

Code for town ratings is in town.h, town_cmd.c, tree_cmd.c, and road_cmd.c.

乘客与邮件的生成

城镇和公司总部会生成乘客和邮件,钻井平台只会生成乘客。

城镇乘客生成

每个轮询周期中(即每经过 256 个 tick),每格房屋会生成一个 0<=X<=255 的随机数。如果 X 大于该格上的人口数量,则不会生成乘客。如果小于,则会生成 X/8 + 1 名乘客(向下取整)。如果遇到经济衰退,生成的乘客数量减半,同时得到的数值改为向上取整。邮件的生成类似,但是采用另外的随机数进行计算,并且是根据邮件的生成系数计算而不是人口。。See the full list of default values for HouseProps: [7]

公司总部

The Company Headquarters is a unique structure that generates passengers and mail depending on it's level which is dependent on the performance rating of the company. Higher level company HQs generate more passengers and mail, the output of the headquarters is evenly distributed over all four tiles on a per tile basis as per the following formulas:

乘客: 256 / 4 tiles / (6 - company HQ Level (a value between 1 and 5) )

邮件: 196 / 4 tiles / (6 - company HQ Level (a value between 1 and 5) )

工业生产

Here is how the game determines how much cargo an industry produces per month. Production of raw materials happens 8 or 9 times per month. (It happens every 256 ticks. There are 74 ticks in a day, and 28 to 31 days in a month (date_type.h). This means that only about 9% of industries will produce 9 times in a 28-day February, but about 96% of industries will produce 9 times in a 31-day month like March.) The production will always be a multiple of 8 or 9, unless the industry changed production during that month.

This table lists possible starting productions governed by the smooth economy patch. These numbers are multiples of 8. When the game generates a new map, each industry produced 8 times and had no production changes in the December before the game started.

原材料工业设施 生产货物 初始产量范围
Coal Mine (en) Coal 56 to 176
Forest (en) Wood 48 to 152
Oil Rig (en) Oil 56 to 176
Farm (en) Grain and Livestock 40 to 112
Copper Ore Mine (en) Copper Ore 56 to 112
Oil Wells (en) Oil 48 to 152
Iron Ore Mine (en) Iron Ore 40 to 112
Bank (en) (temperate) Valuables 24 to 64

Gold Mine (en) Gold 24 to 80

Diamond Mine (en) Diamonds 24 to 80
Fruit Plantation (en) Fruit 40 to 112
Rubber Plantation (en) Rubber 40 to 112
Water Supply (en) Water 48 to 152
Farm (en) Maize 40 to 128
Lumber Mill (en) Wood 180 or 225 (if trees available)

Candyfloss Forest (en) Cotton Candy 48 to 152
Battery Farm (en) Batteries 40 to 128
Cola Wells (en) Cola 48 to 136
Plastic Fountains (en) Plastic 56 to 160
Bubble Generator (en) Bubbles 48 to 152
Toffee Quarry (en) Toffee 40 to 112
Sugar Mine (en) Sugar 40 to 128

(To calculate this table, look under _origin_industry_specs in table/build_industry.h for the industry and its cargo. The sugar mine has CT_SUGAR, 11, so the production starts at 11. Apply the formula from DoCreateNewIndustry() in industry_cmd.cpp: multiply the production by a random integer from 128 to 383, then divide by 256, rounding down. So 11 becomes 5 to 16. Finally, multiply it by 8 to get 40 to 128.)

Production change

Each month the game randomly changes some industry productions.

Default / TTD-like Economy Rules

For 256x256 tile maps there is one change per month possible (only 1 industry changes). Number scales nicely with map size since the introduction of "Daily production changes" function in trunk (r14332).

However - productions are limited to 6 production levels: lowest, lower, normal (with a new game started or a new industry built), higher, 2x higher and the highest. Production changes between these levels are either a 50% decrease (half) or a 100% increase (double).

To make things simple, let's look what are the chances for 256x256 maps (max. 1 change per month = max. 1 industry per month changes production):

Smooth Economy Rules

/File/en/Outdated content.png
过时信息
此页面的部分内容已经过时。由于游戏内容的更新,部分内容的描述可能不再准确,请及时对此页面内容进行更新。
Difficulty setting and Advanced setting have been replaced by Settings
Distinguish Smooth economy (advanced setting) and Steady economy (difficulty setting)
Special Cases

Examples

If a coal mine has 70% of its output transported, there is a 3% chance (4.5% * 67%) of a production increase from 3-23% and a 1.5% chance (4.5% * 33%) of a production decrease from 3-23% (but 13% on average).

(1 + (0.03 - 0.015) * 0.13) ^ 12 - 1 = 0.0237 or 2.37%

The coal mine will grow an average of 2.37% on average after the first year.
(1.0237 ^ 20) - 1 = 59.6% after twenty years
(1.0237 ^ 50) - 1 = 321.8% or 3.22x after fifty years
(1.0237 ^ 100) - 1 = 10.35x after one hundred years

For an industry with rating of more than 80%, there is a 3.75% chance of increase and 0.75% chance of decrease:
(1 + (0.0375 - 0.0075) * 0.13) ^ 12 - 1 = 0.0478 or 4.78%

The industry will grow approximately 4.78% on average after the first year.
(1.0478 ^ 20) - 1 = 2.54x after twenty years
(1.0478 ^ 50) - 1 = 10.32x after fifty years
(1.0478 ^ 100) - 1 = 106.62x after one hundred years

For an industry with the only_decrease flag set (currently Temperate Oil Wells), there is only a 4.5% chance of decrease:
(1 + (0 - 0.045) * 0.13) ^ 12 - 1 = (0.99415) ^ 12 -1 = -0.068 or -6.8%

The industry will shrink on average by approximately 6.8% after the first year.
(0.9320 ^ 20) = 24.46% of initial production after twenty years
(0.9320 ^ 50) = 2.96% of initial production after fifty years

ln(0.5) / ln(0.99415) = 118.1 months or 9.84 years is the half life of an only_decrease industry.
ln(8 / 48) / ln(0.99415) = 305.9 months or 25.4 years is the mean lifetime of a temperate Oil Wells (starting at 48 oil/month).
ln(8 / 152) / ln(0.99415) = 501.8 months or 41.8 years is the mean lifetime of a temperate Oil Wells (starting at 152 oil/month).

For good service, it takes 29.6 years on average to double; with excellent service, it takes 14.8 years. If in the game's time a day is 2.36 seconds, then the doubling time with good service is 7.1 hours; with excellent service, the doubling time is 3.6 hours. For production to go from near bottom of 100 to near maximum of 2040 or 2295 takes 130 years with good service and 65 years with excellent service.

However, in game you will find industries changing their production rate very randomly. It must be stressed the above examples are only true when observing many industries over the long-term; individual industries may greatly deviate from these averages. Statistically speaking, 6 out of 10 industries will not go from 100 to 2040-2295 even with the best service during 65 years. About 1 out of 9 industries will even lower their production when being served at 60-80% cargo transported for 50 years.

For more responsiveness from industries, adapt the number of wagons to industry production (for the lowest production, you should use two wagons). [Full Load] orders are usually used for such cargo trains.

Note: The exact formula can be seen under "ChangeIndustryProduction()" in industry_cmd.cpp.

物流的单位价格

The amount you get paid for delivering cargo is based on 4 factors: the amount of cargo you deliver, the value of the cargo, the distance you deliver it, and how on-time you deliver it.

Cargo Units Early Delivery
Time (days)
Late Delivery
Time (days)
Initial cargo
payment (pounds)
Passengers (en)

Immediate 24 £39
Valuables (en) Bags 1 32 £91
Livestock (en) Items 4 18 £53
Grain (en) Tons 4 40 £58
Goods (en) Crates 5 28 £75
Coal (en) Tons 7 None £72
Steel (en) Tons 7 None £69
Iron Ore (en) Tons 9 None £62
Wood (en) Tons 15 None £61
Oil (en) Kiloliters 25 None £54
Mail (en) Bags 20 90 £55
Arctic specific
Wheat (en) Tons 4 40 £58
Paper (en) Tons 7 60 £66
Gold (en) Bags 10 40 £71
Food (en) Tons Immediate 30 £69
Tropical specific
Rubber (en) Kiloliters 2 20 £54
Fruit (en) Tons Immediate 15 £51
Maize (en) Tons 4 40 £53
Tropical Wood (en) Tons 15 None £97
Copper Ore (en) Tons 12 None £59
Water (en) Kiloliters 20 80 £57
Diamonds (en) Bags 10 None £71
Toyland specific
Sugar (en) Tons 20 None £54
Toys (en)

25 None £68
Batteries (en)

2 30 £53
Sweets (en) Tons 8 40 £75
Toffee (en) Tons 14 60 £58
Cola (en) Kiloliters 5 75 £59
Candyfloss (en) Tons 10 25 £61
Bubbles (en)

20 80 £62
Plastic (en) Kiloliters 30 None £54
Fizzy Drinks (en)

30 50 £76

Initial cargo payment values are for delivering 100 pieces of cargo 1 tile. Payment goes up with inflation as the game progresses.

Late delivery penalties:

Examples (no inflation):
Deliver 200,000 liters of oil 20 squares in 10 days:
2 * £54 * 20 squares * 100% = £2160

Deliver 100 bags of mail 100 squares in 100 days:
£55 * 100 squares * (1 - 0.80*0.4 - 0.10*0.4) = £3520

HINT calculate easy:
Income = cargo units * cargo value * 0.4
Cargo value comes from the Y-axis on the specific transported goods graph in-game
measure your real delivery time in days and plot on x-axis This result will give you an easy estimation of your income with 5% deviation

Notes:

交通工具的速度

Internally OpenTTD works with a unit called "km-ish/h", which is equal to "mph*1.6". The conversion factor from km-ish/h to km/h is 1.00584, and the conversion factor from km-ish/h to mph is 1.6.

A tile is, for vehicle speed purposes 664.(216) km-ish, 668 km or 415 miles long. This is based on the following facts:

Now assume a vehicle going 1 km-ish/hour: (1 * 16 * 256) / (74 * 2) * 24 = 664.(216).

The net result is that 100 km/hour is ~3.6 tiles/day.

Aircraft

Road Vehicles

(Note: This does not apply when using the improved road vehicle acceleration model.)

Ships

Trains

(with the realistic train acceleration patch)

Curvature Max speed (km/h)
Railroad Monorail Maglev
0 (90° turn) 61 91 121
1 (2x45° turn) 88 132 176
2 111 166 221
3 132 198 264
4 151 226 301
5 168 252 336
6 183 274 365
7 196 294 392
8 207 310 413
9 216 324 432
10 223 334 445
11 228 342 456
12+ 231 346 461
Curvature Max speed (mph)
Railroad Monorail Maglev
0 37 56 75
1 54 82 109
2 68 103 137
3 82 123 164
4 93 140 187
5 104 156 208
6 113 170 226
7 121 182 243
8 128 192 256
9 134 201 268
10 138 207 276
11 141 212 283
12+ 143 214 286

"Curvature" means the average number of wagons of the train between turns. However, very sharp turns (curvatures 0 and 1) are not averaged out in longer trains.

/File/en/Manual/Game Mechanics/Speed-limits.png

See also: Realistic acceleration (en) and Corners (en).

See ground_vehicle.cpp, aircraft_cmd.cpp, roadveh_cmd.cpp, ship_cmd.cpp, train_cmd.cpp, vechicle.cpp for code.

As of OpenTTD 1.6.1, given power in hp, max tractive effort in kN, total weight of the train in tonnes, the number train parts (engines and wagons), the air drag value of the first engine in the train (NewGRF setting, defaults to min(192,max(1,floor(2048/max_speed))), meaning faster trains are built more aerodynamically), the combined weight of any train parts (engines or wagons) currently on an up-slope, the combined weight of any train parts (engines or wagons) currently on a down-slope, the slope steepness (game setting [1-10], default 3), and the current speed of the train in km/h, the acceleration of a non-maglev train can be calculated as follows:

force = min((max_te * 1000), floor((power * 746) / (current_speed * 5/18))) [N]

slope_force = weight_on_upslope * slope_steepness * 100 - weight_on_downslope * slope_steepness * 100 [N]

axle_friction = total_weight * 10 [N]

rolling_friction = floor((current_speed + 512) * 15 / 512) * total_weight [N]

air_drag_coefficient = 14 * floor(air_drag_value * (1 + number_of_parts * 3/20)) / 1000

air_drag = floor(air_drag_coefficient * current_speed^2) [N]

acceleration = (force - (slope_force + axle_friction + rolling_friction + air_drag)) / (total_weight * 4) [256th of a km/h per half-tick]

Note: air_drag_coefficient is twice that if any part of the train is in a tunnel.

Given the same values, the equilibrium speed, e.g. the speed the train would eventually settle on if the same conditions continued indefinitely, can be calculated as follows [Assuming a constant rolling_friction (i.e. the speed stays below 512 km/h), and ignoring the flooring of force and air_drag to an integer value]:

p = (slope_force + axle_friction + rolling_friction) / air_drag_coefficient

q = (-power * 746 * 18/5) / air_drag_coefficient

C = (27/2*q + ((27/2*q)^2 + 27*p^3)^(1/2))^(1/3)

equilibrium = min(max_speed, p/C - C/3, max(0, max_te * 1000 / air_drag_coefficient - p)^(1/2))

城镇的发展

请参照城镇的发展页面。