Game mechanics
From OpenTTD
Installation
Tutorial
FAQs
Game Interface
Construction
Vehicles
Settings
More topics
- Industries
- Cargo
- Towns
- Economy
- Disasters
- Tips
- Hidden features
- Hotkeys
- Console
- Game mechanics
- Multiplayer
- Scenario editor
Troubleshooting
Here you can find information about how OpenTTD calculates in-game figures.
You always wanted to know how the station-rating was built up? How goods-distribution works? Here you can find it!
Contents |
[edit] Player rating
Each part of the player rating is a linear function, ie. earning 50% of the target for a component will give 50% of the points allocated for that component. Where components involve monetary amounts, these are converted to the currency of the current game; internally these amounts are stored as the pound amount.
| Component | Target | Points (min) | Points (max) |
|---|---|---|---|
| Vehicle count | >=120 | 0 points for 0 vehicles | 100 points for at least 120 vehicles |
| Number of station parts player owns | >=80 | 0 points for 0 parts | 100 points for at least 80 parts |
| Minimum profit of vehicles at least two years old | >=£10,000 | 0 points for loss or £0 | 100 points for at least £10,000 |
| Minimum monthly revenue earned in past 3 years | >=£50k | 0 points for £0 | 50 points for at least £50k |
| Maximum monthly revenue earned in past 3 years | >=£100k | 0 points for £0 | 100 points for at least £100k |
| Units of cargo delivered in past year | >=40,000 | 0 points for 0 units | 400 points for at least 40,000 units |
| Number of types of cargo delivered in past quarter | >=8 | 0 points for 0 cargo-types | 50 points for at least 8 cargo-types |
| Current cash in bank | >=£10m | 0 points for $0 | 50 points for at least £10m |
| Current loan from bank | £0 | 0 points for >£250k | 50 points for £0 |
| Totals | 0 points | 1000 points |
|
| ||||||||||||||||||||||||||||||||||||||||
[edit] Station rating
This section shows the factors that affect how much of an industry's product is delivered to to a station.
| Factor | Condition | Rating points | Rating % |
|---|---|---|---|
| Max speed of last vehicle entering station | Above 85 km/h (52 mph) | (Speed (km/h) - 85) / 4 | 0% to 17% |
| Age in years of last vehicle entering station | 2 | 10 | 4% |
| 1 | 20 | 8% | |
| 0 | 33 | 13% | |
| Days since last cargo pickup (If a vehicle was ready to pick up a cargo but there was no cargo, it is regarded as a cargo pickup anyhow) Multiply days by 4 if last vehicle was a ship. | 32,5 to 52,5 | 25 | 10% |
| 17,5 to 32,5 | 50 | 20% | |
| 10 to 17,5 | 95 | 37% | |
| less than 10 | 130 | 51% | |
| Units of cargo waiting at station | More than 1500 | -90 | -35% |
| 1001 to 1500 | -35 | -14% | |
| 601 to 1000 | 0 | 0% | |
| 301 to 600 | 10 | 4% | |
| 101 to 300 | 30 | 12% | |
| less than 100 | 40 | 16% | |
| Statue in town of station | Built | 26 | 10% |
| Small advertising campaign | Station within 10 tiles of town center | +64 | +25% |
| Medium advertising campaign | Station within 15 tiles of town center | +112 | +44% |
| Large advertising campaign | Station within 20 tiles of town center | +160 | +63% |
| Road vehicle crashed | Station within 22 tiles of crash | -160 | -63% |
| Train crashed | Station within 30 tiles of crash | -160 | -63% |
Divide the total rating points by 256 to get the percent rating. The maximum possible rating is 99%. Advertising campaigns give an instant, temporary boost to ratings of nearby stations.
Every 2.5 days station ratings are computed; ratings can't change by more than 2% per cycle.
[edit] Local authority rating
Ratings limit some player actions; they start at +500 and can change based on some actions.
Currently you can exploit the game by clearing ~200 trees and then replanting them. This sets the rating to -1000 (the minimum), and then raises it to 220.
|
Required rating is listed as Permissive / Neutral / Hostile. |
Each month players' ratings automatically change:
- Rating goes up by 5 if it is less than 200.
- Rating goes up by 12 for each station that has transferred cargo in the last 50 days.
- Rating goes down by 15 for each station that has not transferred cargo in the last 50 days.
Example:
A player has a rating of -300, (Very Poor), 2 active stations and 1 unactive 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.
[edit] Industry production
Here is how the game determines how much cargo an industry produces per month. This section lists production governed by the default smooth economy patch. Production is a multiple of 8 or 9 (sometimes 10 with forests).
| Raw Material Industry | Produced Cargo | Initial production range | ||
|---|---|---|---|---|
| Coal Mine | Coal | 56 to 176 | ||
| Forest | Wood | 48 to 152 | ||
| Oil Rig | Oil | 56 to 176 | ||
| Farm | Grain and Livestock | 40 to 112 | ||
| Copper Mine | Copper Ore | 56 to 112 | ||
| Oil Well | Oil | 48 to 152 | ||
| Iron Mine | Iron Ore | 40 to 112 | ||
| Bank | Valuables | 24 to 64 | ||
| Gold Mine | Gold | 24 to 80 | ||
| Diamond Mine | Diamonds | 24 to 80 | ||
| Fruit Plantation | Fruit | 40 to 112 | ||
| Rubber Plantation | Rubber | 40 to 112 | ||
| Water Supply | Water | 48 to 152 | ||
| Farm | Maize | 40 to 128 | ||
| Lumber Mill | Wood | 0 | ||
| Cotton Candy Forest | Cotton Candy | 48 to 152 | ||
| Battery Farm | Batteries | 40 to 128 | ||
| Cola Wells | Cola | 48 to 136 | ||
| Plastic Fountain | Plastic | 56 to 160 | ||
| Bubble Generator | Bubbles | 48 to 152 | ||
| Toffee Quarry | Toffee | 40 to 112 | ||
| Sugar Mine | Sugar | 40 to 128 | ||
[edit] Production change
Each month the game randomly changes some industry productions.
[edit] Rules
- There is a 4.5% chance for a production change each month.
- Out of those 4.5% if industries are not connected (lack of any service or poor service - <60%) chance of increase is 33% - industries are gradually (mainly) decreasing production because they cannot sustain their operation (no or not enough revenue - to pay the workers etc.) - till their closure.
- When there is interest for the industry/good transport service (>60%) there is a 67% (out of those 4.5%) chance for increase of production due to good service.
- If the service achieves excellent or outstanding ratings (>80%), industry tries to fill the increased demand for cargo. Chance of increase is 83% (out of those 4.5%).
- Production changes per month with smooth economy are random, between 3 and 23%, more for very low productions of 12-40 tonnes per month.
- Maximum production is 2040 or 2195 units of cargo per month (= 8x or 9x 255).
[edit] Examples
A coal mine has 70% of its output transported: Percent of transported cargo is over 60% (very good service), so there's 3% chance for 3-23% (random) increase. Of course due to unforseen circumstances, the production can also go down (1.5% chance) for 3-23% (13% on average).
((1 + (3.0% - 1.5%) * 13%) ^ 12) - 1 ~ 2.36%, the coal mine will grow an average of 2.37% after the first year.
1.0236 ^ 20 - 1 ~ 59.6% after twenty years.
1.0236 ^ 50 - 1 ~ 321.8% after fifty years (x4.21 times).
1.0236 ^ 100 - 1 ~ 1035% after one hundred years (x11.3 times).
Industry with rating of more than 80%:
((1 + (3.75% - 0.75%) * 13%) ^ 12) - 1 ~ 4.78%, will grow approximately 4.78% after first year, 2.54 times after twenty years, 10.3 times after 50 years and 106.8 times after 100 years (note: over maximum).
It takes about 65 years to go from 100 to 2100 with bigger than 80% industry rating and about 130 years with a rating of 60-80%.
Unfortunately, in real life circumstances you will find industries changing their production rate very randomly and mentioned formula is true only with many examples and their average. For example, statistically out of 10 industries 6 will not manage to go from 100 to 2100 even with the best service during 65 years. And about 1 out of 9 industries will even lower their production when being served at 60-80% for 50 years.
However, practice shows that the latter statistic doesn't hold true, especially with trains (variable lengths) that wait no longer than 1 month at the station. So - for more responsiveness from industries - adapt the number of wagons to production (lowest should be two wagons - for the lowest productions). Full load orders are usually used for such cargo trains.
Note: The exact formula can be seen under "ChangeIndustryProduction" in industry_cmd.cpp.
[edit] Delivery payment rates
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 | Immediate | 24 | £39 | |
| Valuables | Bags | 1 | 32 | £91 |
| Livestock | Items | 4 | 18 | £53 |
| Grain | Tons | 4 | 40 | £58 |
| Goods | Crates | 5 | 28 | £75 |
| Coal | Tons | 7 | None | £72 |
| Steel | Tons | 7 | None | £69 |
| Iron Ore | Tons | 9 | None | £62 |
| Wood | Tons | 15 | None | £61 |
| Oil | Kiloliters | 25 | None | £54 |
| Bags | 20 | 90 | £55 | |
| Arctic specific | ||||
| Wheat | Tons | 4 | 40 | £58 |
| Paper | Tons | 7 | 60 | £66 |
| Gold | Bags | 10 | 40 | £71 |
| Food | Tons | Immediate | 30 | £69 |
| Tropical specific | ||||
| Rubber | Kiloliters | 2 | 20 | £54 |
| Fruit | Tons | Immediate | 15 | £51 |
| Maize | Tons | 4 | 40 | £53 |
| Tropical Wood | Tons | 15 | None | £97 |
| Copper Ore | Tons | 12 | None | £59 |
| Water | Kiloliters | 20 | 80 | £57 |
| Diamonds | Bags | 10 | None | £71 |
| Toyland specific | ||||
| Sugar | Tons | 20 | None | £54 |
| Toys | 25 | None | £68 | |
| Batteries | 2 | 30 | £53 | |
| Candy | Tons | 8 | 40 | £75 |
| Toffee | Tons | 14 | 60 | £58 |
| Cola | Kiloliters | 5 | 75 | £59 |
| Cotton Candy | Tons | 10 | 25 | £61 |
| Bubbles | 20 | 80 | £62 | |
| Plastic | Kiloliters | 30 | None | £54 |
| Fizzy Drinks | 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:
- For each day after the Early Delivery time that you deliver the cargo, you are penalized 0.4%.
- For each day after the Late Delivery time that you deliver the cargo, you are penalized an additional 0.4%.
- Maximum penalty is -88%.
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 - 80*0.004 - 10*0.004) = £3520
Notes:
- The exact formula is much more complicated. See economy.c.
- Distance is measured between the stations, not from the industries or by vehicle distance traveled. It is computed by adding the differences in x and y tiles, not straight-line distance.
[edit] Vehicle speeds
The game has many rules to make vehicles move fairly realistically. A vehicle travelling at 100 mph (160kph) will cross 5.6 tiles per day.
This means that for vehicle speed purposes, a tile is 429 miles (686km) on a side!
Aircraft:
- By default aircraft fly at a quarter of their listed speed (this can be changed in patch settings).
- Aircraft accelerate at about 200 km/h/day. It varies per aircraft.
- Broken down planes fly at 345 km/h.
- Airport taxi speed is 154 km/h.
Road Vehicles:
- Road vehicles accelerate at 37 km/h/day.
- Road vehicles go around corners at half their max speed
- Road vehicles accelerate an additional 74 km/h/day downhill.
- When going uphill, road vehicles slow down 10% 4 times per tile. This balances out with acceleration at 34 km/h for all road vehicles.
Ships:
- Ships accelerate at 37km/h/day.
- A "stopped" ship resumes it's last speed instantly.
Trains: (with the realistic train acceleration patch)
- Trains are not affected going up or down hills if they are powerful enough.
- Trains are limited to entering and exiting a depot at 61km/h.
- Trains can make one 45° turn without slowing down.
- When making two or more 45° turns in the same direction, the max speed is limited as follows:
| Tiles between double bend | Max speed (km/h) | ||
|---|---|---|---|
| Railroad | Monorail | Maglev | |
| 0 (90° turn) | 61 | 91 | 121 |
| 1 | 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 |
- Train acceleration and max speed is affected by engine power, current speed, total train mass, and track incline.
- Non-Maglev train acceleration = 37 *(0.55 * Power / Speed - 1.3 * Mass + 60 * #cars + 0.0035 * Mass * Speed + 0.24 * Speed^2 - 60 * Mass of cars on slope) / Mass (km/h/day)
- Maglev train Acceleration = 37 * (0.022 * Power - 0.24 * Speed^2 - 60 * Mass of cars on slope) / Mass (km/h/day)
- Braking is twice acceleration except when entering a depot or a station.
- Speed limits only apply when all of the turns occur within the length of the train:
See also: Realistic acceleration and Corners.
See aircraft_cmd.c, roadveh_cmd.c, ship_cmd.c, train_cmd.c, vechicle.c for code.


