[patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

[patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

Post by Vetteman06 »

Terminus Airports

13 New Airports.

Terminus:
Terminus1, 1980, 2 Hangars, 2 Runways, 9 Terminals, 3 Cargo Terminals, 3 Helipads, Cost is ~20M (USD)
Terminus2, 1990, 4 Hangars, 4 Runways, 16 Terminals, 6 Cargo Terminals, 6 Helipads, Cost is ~40M (USD)
Terminus3, 2000, 6 Hangars, 6 Runways, 25 Terminals, 9 Cargo Terminals, 9 Helipads, Cost is ~60M (USD)
Terminus4, 2010, 8 Hangars, 8 Runways, 36 Terminals, 12 Cargo Terminals, 12 Helipads, Cost is ~80M (USD)

Cargo:
Cargo Small, 1970, 2 Hangars, 1 Runway, 4 Cargo Terminals, 4 Helipads, Normal Cost.
Cargo Large, 1970, 2 Hangars, 2 Runways, 8 Cargo Terminals, 8 Helipads, Normal Cost.
Cargo X-Large, 1970, 2 Hangars, 2 Runways, 12 Cargo Terminals, 12 Helipads, Normal Cost.

Large:
Commuter Large, 1970, 2 Hangars, 1 Runway, 6 Terminals, 2 Cargo Terminals, 2 Helipads, Normal Cost
San Fran, 1970, 2 Hangars, 4 Runways (Crossing), 9 Terminals, 4 Cargo Terminals, 2 Helipads, Normal Cost
Leipzig, 1970, 2 Hangars, 2 Runways, 7 Terminals, 4 Cargo Terminals, 2 Helipads, Normal Cost
Windy, 1970, 1 Hangar, 1 Terminal, 1 Cargo Terminal, 1 Helipad, Normal Cost, Very Windy!!
Indianapolis, 1970, 4 Hangars, 4 Runways, 26 Terminals, 6 Cargo Terminals, 2 Helipads, Normal Cost
Schiphol, 1970, 3 Hangars, 6 Runways, 12 Terminals, 4 Cargo Terminals, 2 Helipads, Normal Cost

Zip File:
Contains lang directory, need the language file copied to your install lang directory.
terminus.grf is a NewGRF that has one replacement tile and mini airport images for the airport selector.
x64 version of it compiled.
patch of the changes.

Known Issues/Notes:
Cargo Payment doesn't work quite right. Multi company airports may not pay out to each company correctly.
ALT key was implemented Windows specific. If you compile on other platforms, you may need to make changes in order for the ALT key to be enabled.
ALT Key - Airport tiles are flat, terrain is not, you will see interesting results on hilly terrain. This is normal.

v. 1.49 Changes
[+] Spoiler
- Update - Updated to OpenTTD 1.10.3.
- Bugfix - Fixed aircraft leaving hangar without reservation.
- Bugfix - 4 airports have additional block checks to keep locking from occurring.
v. 1.48 Changes
[+] Spoiler
- Bug Fix - Indianapolis Airport Deadlock possible.
v. 1.47 Changes
[+] Spoiler
Upgraded to OpenTTD version 1.10.1

Added a new state to make planes land smoother.
Fixed Airport Control Window where it could crash game.
Fixed Airport Control Window where it did not always show the FLL entries.
Fixed Helicopter entries at all airports.
Fixed City airport locking up when helicopters were used.
Fixed Metropolitan airport locking up when helicopters were used.
Airport Control Window now has contrasting colors to make it easier to read.
v.1.45 Changes
[+] Spoiler
- Bug fix - Terminal to Hangar movements were not being reserved by planes correctly.
- Bug fix - Indianapolis needed more reservations to keep it from locking up.
- Bug fix - Terminus airports could lock up under heavy load, made runways reserve an extra block to prevent.
- Bug fix - New games under the new 1.8 would crash when new AI was started. Fixed it.
- Removed the daylight patch.
- Removed the cargo payment. May add JGR's.

Source:
github https://github.com/Vetteman06/OpenTTD
(A patch is no longer provided, please use git/GitHub to acquire the source or make a patch).

Patch boilerplate:
This is not an official OpenTTD release, therefore bug reports, suggestions, questions and so on should be posted in this thread, or to this patch's GitHub.
As currently implemented, savegames created using this patch pack will not be loadable on trunk versions or other patched versions.


Previous Updates: viewtopic.php?p=1207197#p1207197

Patch Inclusions:
Airport Replacement by Cirdan http://www.tt-forums.net/viewtopic.php?t=35867

Screenshot of the 13 airports:
Terminus Airports
Terminus Airports
Terminus Airports.png (640.04 KiB) Viewed 5654 times
Attachments
Terminus Airports v1.49.zip
(12.08 MiB) Downloaded 629 times
Last edited by Vetteman06 on 13 Jan 2021 17:10, edited 31 times in total.
Diamond42
Engineer
Engineer
Posts: 35
Joined: 21 Aug 2013 11:58

Re: [patch] Terminus Airports

Post by Diamond42 »

Hey Mate,

Fantastic work!

I solely use OpenTTD for aircraft so anything to do with airports or aircraft I absolutely love!

How long did it take? And what are the capacities like? Say relevant to the Huge airports?

Dying to try these but I use the spring patchpack :-(
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [patch] Terminus Airports

Post by planetmaker »

Your upload violate our copyright in two ways: You neither publish complete sources (or at least the complete patch as well) nor does the binary distribution you offer contain the documentation shipped with OpenTTD which includes the appropriate copyright notice. You should always build the bundle and use that for distribution.
Diamond42
Engineer
Engineer
Posts: 35
Joined: 21 Aug 2013 11:58

Re: [patch] Terminus Airports

Post by Diamond42 »

Good thing what he made was very, very good then.
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports

Post by Vetteman06 »

Diamond42-
It took a long time to do. I am not that great of a coder. :lol: I changed the way the state machine works a bit in order to make the flow on the airport much easier to understand. Basically instead of just in time reservation of blocks, it now does a full reservation before the plane moves. So instead of having to reserve blocks all throughout the airport, it now reserves at 3 points. Terminal, Depot, EndLanding. So tcreating/testing the flow is a lot easier. It is also why I had to completely change all the airports flow. And why it took so long.

I have no idea on the flow comparison. I have never used the Huge Airports patch. But would be interested in hearing what you think about it. Terminus4 is designed to service about 75-100 towns. Or handle from 100-150 planes. If you use Full Load, then about 100 planes.

planetmaker-
The complete source is in the zip file. Airport_Patch_R27410.patch With the exception of the 2 patches I included, it is all my code. Which is free for anyone to use/modify.

I didn't know about the OpenTTD copyright notice. I'll do some research and get that included.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: [patch] Terminus Airports

Post by adf88 »

Vetteman06 wrote:I didn't know about the OpenTTD copyright notice. I'll do some research and get that included.
Here's a simple explanation: http://tldrlegal.com/license/gnu-genera ... license-v2
:] don't worry, be happy and checkout my patches
Diamond42
Engineer
Engineer
Posts: 35
Joined: 21 Aug 2013 11:58

Re: [patch] Terminus Airports

Post by Diamond42 »

Just had a quick look and saw you made planes push back...amazing!

That alone is increadible!
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.01 (r27410)

Post by Vetteman06 »

Diamond42 wrote:Just had a quick look and saw you made planes push back...amazing!
I have been messing with this for so long, I forgot about adding that state into the state machine of the airports.
I added that to the original post...
I always thought it was silly for the plane to turn around in the terminal.
A side effect was the improvement in performance of the terminals.
It cuts out 4 extra turn orders in most cases.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: [patch] Terminus Airports v1.01 (r27410)

Post by Eddi »

Since you're the resident airport expert now, do you want to have a stab at properly exporting airport state machines to NewGRFs, so people can add their own airports without messing with the code?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: [patch] Terminus Airports v1.01 (r27410)

Post by planetmaker »

The push-back of the planes from their loading bays would make a nice separate patch which is relatively easy to integrate (as uncontroversial, I'd think). And of course I support Eddi's notion. Means to have really newgrfable-airports would be nice, allowing to build airports from pieces.
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.01 (r27410)

Post by Vetteman06 »

Eddi wrote:Since you're the resident airport expert now,
LOL... That's funny...
planetmaker wrote:The push-back of the planes from their loading bays would make a nice separate patch
I could separate it out if desired.
Eddi wrote:do you want to have a stab at properly exporting airport state machines to NewGRFs, so people can add their own airports without messing with the code?
So, I started out thinking that this might be possible... One of the big changes to the states was to get rid of the notion of blocked states. Where a state was made up of multiple tiles. This was done because there wasn't a real reservation system to blocks. In order to make sure a path from terminal 3 to the depot was possible, they made all 3 blocks a state in between. It worked, but made it so only one plane could be in those blocks at a time. Which greatly reduced throughput to all those terminals.

So I removed all that and made each tile it's own state. Well almost... I ran out of states on Terminus4 and had to combine the crossover blocks into a single state. But after looking at the next step, I pretty much gave up on the idea of a modular airport.

The next part would be to make the movement orders simple enough to be imbedded into the NewGRF's for each state. And this is where it fell apart...
The main path through the airport could be done this way. But the reverse path stuff would never work.

Take this one movement order from HANGAR1 to TERM01... { 8, TERM01, 0, TAXI04_block | TAXI05_block | TAXI53_block, 82 }
It needs to reserve 3 TAXI blocks to insure its arrival to TERM01 from HANGAR1.
So you would need to path all possible combinations and main flow paths are ignored and reverse paths are reserved.

But what is the main path?
If you just plop down a taxi tile, which way is main flow and which way is reverse flow...
Terminus3 and Terminus4 are complete circles taxi wise... If not careful in programming... infinite loop...

How do you determine which terminals are attached to which runways?
On Terminus4, I restrict the terminals accessible to each landing runway to 9.
But the Depot right next to it has paths to 16 Terminals.
I do this to keep a plane from blocking the exit path from the runway trying to reserve a path.
Instead it will move into the depot and then try and reserve the path to terminals that require reservations.
Keeps the airport moving a lot smoother...

It would be a very tall order to try and do it in NewGRF's...
You might be able to do it, but it would never be as optimized as a person planning and testing it manually.

The thing that could be done would be to move the sturcture/movement orders out into different files.
That way you could make changes to those without recompiling...
But then you take the risk of someone mucking in those files and submitting bug reports.

Anyway, my goal was to get the pathing simpler to do...

For Terminus4, here are some numbers...
EndLanding to Terminal 9 * 4 = 36 paths.
EndLanding to Depot 1 x 4 = 4 paths.
Terminal to Depot 36 * 1 = 36 paths
Terminal to Takeoff 36 * 1 = 36 paths
Depot Upper to Terminal 4 * 16 = 64 paths
Depot Lower to Terminal 4 * 7 = 28 paths
Depot to Takeoff 8 * 1 = 8 paths

This is just the airplanes and do not include the Helicopters...
212 paths I have to trace for that one airport and just for planes.
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.01 (r27410)

Post by Vetteman06 »

Diamond42 wrote:And what are the capacities like?
So, I really hadn't given much thought to how many passengers could possibly be transferred in a month through one of my designs.
It would be a cool metric to add to the airport screen to show how many passengers are transferred through an airport.
I might look into it...

I went back and found an old movement test game I made.
It was more to test the movement states of the airport under heavy use where planes stayed at the terminals for extended periods of time.

This game has no other movement than passengers and mail.

On average the company as a whole was moving about 46,000 units a month.
About 15% of that is mail.
So 39,000 passengers and 7,000 mail.
And the destinations were either at the city or this airport.
So divide that in 2.

I am figuring that the Terminus4 airport is handling close to 20,000 passengers and 3,500 mail a month.
If optimize for passenger throughput, it could probably get to 25,000 passengers and 4,000 mail a month average.
Divide that by 300 passengers average per plane and that's about 67 planes per month being serviced.

Screenshot of game:
Terminus4_Flow.png
Terminus4 Flow
(628.09 KiB) Not downloaded yet
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Re: [patch] Terminus Airports v1.01 (r27410)

Post by SirkoZ »

This patch should be included into OpenTTD. These airports are a big step
forward in the right direction - even replacing the big, metropolitan, international and intercontinental airports respectively.
Finally some useful airports, especially with airplanes having option to carry all kinds of cargo.
Could make a nice game if one doesn't want to always fiddle with ever expanding railways.
If wishes were horses... :mrgreen:
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.10 (r27410)

Post by Vetteman06 »

SirkoZ wrote:Finally some useful airports, especially with airplanes having option to carry all kinds of cargo.
Could make a nice game if one doesn't want to always fiddle with ever expanding railways.
If wishes were horses...
Well, you will like this update.
Cargo planes now have their own airports. :mrgreen:
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [patch] Terminus Airports v1.10 (r27410)

Post by kamnet »

Very nice job! It would be nice to see these offered in four-direction rotation along with proper in-game display for each layout.
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.10 (r27410)

Post by Vetteman06 »

kamnet wrote:Very nice job! It would be nice to see these offered in four-direction rotation along with proper in-game display for each layout.
I agree...
It is on my todo list.
But with 20 airports and 4 rotations, looking at 80 Preview Sprites...

I find that kinda dumb to do all those sprites when the airport view could just be built.
I might try and change the preview to be a special viewport or something built.
That way all rotations will always be available and I won't have to build all those sprites.
Plus they would auto take on any changes in structure of the airport.
(Like when I change the helipads.)

Anyway, I thought I would show the Leipzig airport in action...
Here there is a plane landing, buses on the inside transferring passengers out to stations in town.
And the town has built some buildings inside the airport area.

Leipzig in action:
Attachments
Leipzig in Action.png
Leipzig in Action.png (764.73 KiB) Viewed 5654 times
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [patch] Terminus Airports v1.10 (r27410)

Post by kamnet »

Any thoughts about the idea of leaving out the terminals and just letting players place them on their own via NewGRFs?
Eddy Arfik
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 09 Apr 2014 11:10

Re: [patch] Terminus Airports v1.10 (r27410)

Post by Eddy Arfik »

kamnet wrote:Any thoughts about the idea of leaving out the terminals and just letting players place them on their own via NewGRFs?
I was going to ask the same question. The extra state machines are great, but I'm not a big fan of the buildings everywhere, it makes things look really cluttered, and buildings directly at the end of the runways just looks plain wrong imo. It would be much nicer if the actual airport part was only the runways, taxiways and hangars, and instead of the buildings have empty tiles that can be filled with the players choice of object or station tiles.
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: [patch] Terminus Airports v1.10 (r27410)

Post by Quast65 »

First of all, wow great work!! :bow: Especially with the planes backing out!!!
But, indeed, I agree with the 2 posts above. It would be great to match these airports up with the fake-airport-objects GRF I made a while ago.
viewtopic.php?f=26&t=73075&hilit=fake+airport
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.10 (r27410)

Post by Vetteman06 »

kamnet wrote:Any thoughts about the idea of leaving out the terminals and just letting players place them on their own via NewGRFs?
That is an extremely easy thing to do.

There were 2 reasons for putting the color player on the plane parking space instead of the building.
This was one of them. Eventually I was going to make the building neutral and not have player color.
My original thought was to just use other buildings available, but this idea is better.
I will compile a version without buildings and put it on the main page.

The other reason was to allow the owner of the airport to change ownership of one terminal to another player.
Basically making the airport be multi-player.
So making the buildings neutral was important for this one.
I got a few things to work out first, but it is coming.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 8 guests