Skip to content

Forum Post Archive

zekew11 edited this page Jan 20, 2023 · 1 revision

AirportCEO Tweaks


If you've never done so; please read the post and especially the download instructions before using this link.


This is a code-mod that is currently in an early state. Its my hope that the mod eventually far outgrows the name. Features (bolded are new or improved in latest major update):

  • (Primitive) Cargo Flights
  • Planner Quality of Life Improvements.
  • Better Look-Alike Livery Support
  • Flight Activation Changes
  • Turnaround time is player-adjustable.
  • Airlines offer flight contracts which repeat based on airline size and satisfaction.
  • All flights are offered in "types" including economy, mainline, cargo, and more. These flight types influence the services requested at turnaround and the desired turnaround duration.
  • Toggleable QoL Features: No baggage requests on stands without a baggage bay (on by default); No baggage requests on small stands (off by default).
  • Airlines with a defined country code have and respect their nationality, operating to/from the home nation

Flight Types System as of 2.2.x

Airlines now have both a star-rank (vanilla) reflecting their "prestige" or importance in the airline industry, as well as an "economic tier". where "star-rank" describes the airline directly, "economic tier" describes the airline's target audience. Economic tiers are as follows:

  1. Budget
  2. Normal
  3. Above-Normal
  4. VIP

These are manually distributed among vanilla airlines according to those airline's descriptions. For mod airlines, a guess is taken based on star-rank. This guess will be made smarter in 2.2.x .

These airline traits influence the types of flights offered. Flight types are as follows:

Economy Economy flights usually want a fast turn around and don't care about things like catering. PAX are crammed in tight. Commuter Commuter flights are usually short hops. They are similar to economy flights in that they care more about turnaround time than services on offer, but this tendency is less extreme. Mainline Mainline flights are closest to vanilla airport CEO. They want a balanced turnaround. Flagship Flagship flights are important to the status of an airline. Expect to provide full services. In the future these flights will become very demanding with deep satisfaction penalties for failure to provide all that is requested. VIP These are all business class flights. They are similarly demanding to Flagship flights, but have reduced PAX capacity and widely varying turnaround time requirements. They are often offered in short or one-flight series. Cargo These flights have no PAX. They will request cleaning at most. They are likely to sit on the tarmac for a long time. Cargo services are not (yet) simulated.

The pop-up that displays in the planner now indicated the flight type and turnaround type requested. It also indicates the number of passengers vs the capacity of that flight. Expect higher loadings during the day. Complain to me when an economy flight is operating over the exit-limit for the aircraft type (actually please do; I am trying to tune these things).


Airline/Flight Behavior Changes as of 2.2.x

Airlines will now add more flights at the end of a contract when a flight completes. This will happen if they are satisfied with your performance and there are at least three repetitions of the flight already scheduled. This means that as long as an airline is happy with the service it gets in a given slot, the flight will remain in this slot indefinitely.

If a flight is not renewed and slips below the threshold of three remaining repetitions, it is doomed to expire (as it would have in the vanilla game). This is also the case if the player cuts the series short by canceling all future flights (hold shift while canceling a flight) at a nearer date than 3 days in the future.

The length of contract offered initially by airlines is now dependent on both the airline's size (star rating) and satisfaction. In the early game it should be important to grow your relationship with small airlines to the point that they reliably renew their flights with you beyond the three-day expiry threshold.

The little number in the flight slot UI now reflects repetitions remaining after the one you are viewing; helpful for knowing how far out a slot is booked.

The UI indicator in the flight planner for an airline's number of offered flights now instead reflects the number of offered flight-series.

Renewing flights will schedule at the same time-slot as the last flight in the series. If you've scheduled new flights several days out at a time that interferes this may create overlap. The three-days-out rule for renewals ensures that it is safe to modify your flight schedule any time in the upcoming three days.


Cargo Flights

  • Will not spawn PAX nor request catering, cleaning, ect...
  • Will not spawn any actual cargo...
  • Will not have "night lights" ie cabin window lighting at nighttime (newer cargo airline mods do this by default, but this fix applies programmatically to older mods as well)
  • Will yield reduced flight completion bonus pay (configurable)

Cargo flights are determined on an airline basis: an airline is either 100% cargo ops or 100% passenger ops. Cargo airlines are identified by the presence of tags in the airline name including "cargo", "freight", and "logistics". This tag list is user-editable, so for instance if you wanted Zoom to become a cargo carrier, this could be accomplished by adding "Zoom" to the tag list.


Planner Enhancements / Hacks

  • Hold shift when rescheduling a flight to reschedule all subsequent flights in the series as well
  • Hold shift when canceling a flight to cancel all subsequent flights in the series as well
  • Player-imposed restrictions on stand assignment are not enforced against the player
  • Rescheduling of active flights is permitted within limits (see flight activation changes)
  • Scroll wheel and keybinds (default -/=) can adjust the turnaround duration for a flight
  • The little number in the flight slot UI now reflects repetitions remaining after the one you are viewing; helpful for knowing how far out a slot is booked.
  • The UI indicator in the flight planner for an airline's number of offered flights now instead reflects the number of offered flight-series.
  • Auto-planner is off by default on new stands

These are great quality of life enhancements, but they are also very much "hacks". When rescheduling multiple flights, only the first is checked for overlap with other flights. The reschedule of active flights, intended to allow last-minute stand changes, is even more permissive. You can absolutely get yourself into trouble if you're not careful, but for me this is part of the fun :slight_smile:


Better Look-Alike Liverys

  • All visual elements of an aircraft can be relocated or disabled
  • Livery elements can now be rendered on the shadow or lighting layer
  • Door locations, which define things like service vehicle locations, can be changed
  • All modifications work through the livery.json

This is a first iteration of this feature. Right now it should be possible to make most visual changes one would desire, but there are still no game play distinctions between a look-alike and its base-game aircraft counterpart. watch this space ;)

Additionally, I have only tested these features, not developed content for them. Therefore if you aren't planning on modifying livery's yourself, you won't see any effect of this change until and unless livery authors adopt it into their work.

[details="How to Author Liverys using This Tool"] An active livery component is a named livery component in the json file. Most of the information about how the component modifies the aircraft is contained in the title of the component. This is broken into sections. These are described in the order they will appear. We'll keep a work in progress title line as we go in order to show the progression.

"name":

config

To be recognized as an active component, the name of the component must contain "config". Individual "words" in the title are separated by underscores...

"name":"config_

[details="extra info"] Anything preceding "config" will be ignored by the mod. It is safe for example to write:

"name":"mytexture_config_... [/details] nouns

Next we need to know what objects we'll be modifying. There are some keywords built in for common objects/groups of objects.

  • "wings": the wings. Includes flaps.
  • "tail": the tail
  • "shadow": the shadow
  • "lights": the blinky lights. also the lights that cast light in front of the plane
  • "effects": things like jet exhaust
  • "flaps": the animated flaps
  • "windows": the group of windows lit at nighttime
  • "frontdoors"): doors with "front" in the name
  • "reardoors": doors with "rear" in the name
  • "towbar": The point that towbar attaches for pushback. also includes the point that the aircraft turns around
  • "audio": All the audio emitters
  • "groundequipment": APU/GPU
  • "livery": the entire livery (not the entire aircraft: all the elements loaded as part of this specific livery)
  • "self" : this object (example: make this sprite render as a shadow)

In our example we've shortened a fuselage and want to move the back service vehicles forward. we'll use "reardoors" for this.

"name":"config_reardoors

But wait! there's a problem here. The waste access door, for cabin cleaning, is labeled simply "wasteaccessdoor". Because it doesn't have "rear" in the name, it didn't get included in the reardoors keyword...

exactly

We can find components by name by using the term "exactly" in our config. Every word after an "exactly" will be considered a name of a component to try to find, until the parser sees a second "exactly"

[details="extra info"] As of 1.1.1 you can use "xact" as shorthand for "exactly" to reduce the length of the names. [/details]

It is possible to string together multiple nouns, both by keyword and by "exactly" in a single config (as long as you're going to apply the same operation to all of them). This means we can do this:

"name":"config_reardoors_exactly_WasteAccessDoor_exactly_

The above will fetch all the doors with rear in the name by keyword, and then also fetch the WasteAccessDoor by name.

[details="If we wanted, we could continue..."] "name":"config_reardoors_someotherkeyword_anoutherkeyword_exactly_WasteAccessDoor_someotherexactname_exactly_ [/details]

verbs

Now we need to actually do something with these objects...

  • "disable" : turns the object(s) off
  • "enable" : turns the object(s) back on
  • "moveabs" : moves all object(s) to the position of this livery component. (if you do this with the door groups you'll be putting all the doors in one place...)
  • "moverel": moves all object(s) by the amount that corresponds to the position of this livery component (preferred for working with groups)
  • "makeshadow": puts these object(s) in the shadow layer
  • "makewindow" : move the object(s) to the windows group and put it in the nonlit layer. For window lights.
  • "makenonlit": puts these object(s) in the nonlit layer (think of it as "not affected by light level")

In our example, we want to move a bunch of doors in different positions forward by the same amount. This is done by moverel:

"name":"config_reardoors_exactly_WasteAccessDoor_exactly_moverel",

This line will move the doors by the amount specified as the position of the livery object that it is the name for. It is convenient that we can use the object's position for this. The rest of the object parameters are unimportant: I'd recommend setting it to a slice of your livery that is transparent since it isn't actually trying to be a visual object in of itself.

It is in theory possible to chain verbs the same way as with nouns, though I don't see an application for this at the moment.

[details="Completed Example"]

		{  
            "name":"config_reardoors_exactly_WasteAccessDoor_exactly_moverel",
            "layerOrder":1,
            "slicePosition":{  
                "x":1,
                "y":1
            },
            "sliceSize":{  
                "x":1,
                "y":1
            },
            "position":{  
                "x":2.4,
                "y":0.0,
                "z":0
            },
            "flip":{  
                "x":0,
                "y":0
            },
            "rotation":0
        },

[/details]

Parameters

[details="parameters are not currently very important..."] In the near future there may be settings that need parameters that aren't already part of a livery. These parameters will come after the last verb. A hypothetical example is below: this is not implemented:

"name":"config_aircraftconfig_settitle_737-200", [/details]

Compatibility

I recognize that I may introduce a headache for modders that distribute primarily on the workshop wherein any livery that uses this framework will be dependent on a non-workshop mod to function fully.

A solution is to put any features that would look "wrong" without my mod on Z-level -9999, where they will be invisible (below the "floor")

            "position":{  
                "x":2.4,
                "y":0.0,
                "z":-9999.0

My mod will automatically search for livery components that are hidden in this way and reset them. None of this exercise is necessary for testing or distributing to those that know they need my mod as a dependency.

[/details]


Flight Activation Changes

  • Flights now calculate flight time based on speed and distance and activate when the aircraft should be taking off.
  • Rescheduling flights en-route is now related to flight time; you can delay flights by a percentage of total flight time plus a margin, you can advance flights by ~10 percent of remaining flight time
  • Scheduling flights before they activate requires a margin of 2X flight time

Max Flights/Day Changes

  • Multiple ATC towers can contribute to your flight cap. However, each successive tower will have half the "power" of the one before.
  • Same situation for extra radars.
  • The algorithm is smart enough to put the best towers in the highest positions in the hierarchy.
  • Radars and towers exist on separate hierarchies.
  • If you get your flight cap up to 500/day; I give you a pass all the way up to 999 because you've transcended my game design skills and should not be restrained by them.

Download/Installation

For Beta, See Manual Install Instructions, Mirrors

This mod is installed via uModFramework. This framework allows me to inject my code into the game at runtime without modifying or redistributing Apog Lab's code. The framework can be downloaded here. Mac users may need to follow the work-around instructions on this page (which also contains the install guide for other platforms)

From there, Windows users can follow this link and hit the "Install" button. Mac/Linux users will need to instead use he "Manual Download" option and install the mod manually.

[details="Manual Mod Install Instructions"] After UMF is installed to your AirportCEO directory, you must install my mod.

After downloading "AirportCEOTweaks_vx.x.x.umfmod", move or copy this file to

Airport CEO\uModFramework\Mods

For me this folder appears here:

C:\Program Files (x86)\Steam\steamapps\common\Airport CEO\uModFramework\Mods [/details]

Launch airport CEO normally. Access the UMF menu with shift-F10 and verify that "AirportCEOtweaks" is installed/activated. If you activate (or de-activate) the mod in-game, restart the game for changes to take effect.

UMF manually verifies the safety and integrity of mods it hosts, so the version available via UMF may lag the forum post by a couple of days. Mirror links are provided for those who don't want to wait/those who need to roll back.

[details="Mirrors"]

Follow Manual Installation Instructions

[/details]

[details="Source Code"] My source code is available here. (You do not need the source code to run the mod, it is made available for transparency.) Source code may lag the latest build, but never by more than one month. Feel free to request current source code if you feel the need to. [/details]

Incompatible with Negotiable Turnaround Time and Autoplanner settings


Bugs & Support

  • Please do report game-breaking bugs to this thread: there is every possibility that one got through.
  • Please do understand that I have very limited time for this project. It could easily be a week or two between me identifying an issue and how to solve it and me actually fixing it. For "nuisance" issues there may never be a fix.
  • Don't report bugs encountered while playing with this mod enabled, or on a save that has had this mod enabled, to the developers unless it is reproducible without my mod ever being installed. Code-mods can become a pain for developers due to bugs in the mod being reported as bugs in the base game.

[details="Settings"]

  • Keybinds Should be self-explanatory
  • Cargo Airline Flags Airlines with any of these occurring in their name will be treated as cargo airlines.
  • Cargo Flight Payment Modifier The completion bonus for cargo flights is weighted by this multiplier.
  • Fixes For Disabled Modules Generally leave this true unless troubleshooting a bug.
  • Legacy Cargo System Set to false to disable tagging airlines as cargo airlines and all associated behavior. Soon to be depreciated by a better system built on flighttypes
  • Planner Changes Set to false to disable all player-side planner improvements.
  • Longer Series flight series length is determined by airline size and satisfaction.
  • Airline Changes Here be dragons
  • Livery Extensions Toggles the new livery features
  • Livery Author Log Files Turn these on if you're a mod author trying to figure out why your livery isn't working
  • Permissive Planning Makes planning flights very permissive and unrealistic; good for certain testing though.

[/details]

[details="License"] Current License: All rights reserved.

I am quite open to more permissive sharing, but you must ask me.

Each release/distribution shall revert to Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International 6 months by calendar date after it is made publicly available.

Each release/distribution shall revert to GNU General Public License 24 months by calendar date after it is made publicly available.

[/details]

Trello!

[details="Changelog"]

2.2

  • Completely rewrote route generation.
  • New route generation supports airline nationality.
  • Resolved flight planning issue causing skipped flights and hanging confirmation button.
  • Implemented basic detection of domestic-only carriers.
  • Fixed Issues with airline contract descriptions
  • Fixed Issues with Tweaks aircraft shadows
  • credit humoresque: Tooltips in flight planner for hold-shift-to-affect-all functionality
  • credit humoresque: Structure auto-repair threshold now adjustable in F10 settings
  • credit humoresque: ACEO Tweaks version shown below game version

2.1

It is recommended to disable the auto planner when starting to play with 1.2.1, and enable it only cautiously, one stand at a time. The design goal of the update is that autoplanner is not necessary.

  • Turnaround times depend on type of flight
  • Airlines extend flight contracts when satisfied
  • Airlines cut short flight contracts when upset
  • Airlines operate various flight types based on their economic focus
  • Airline flight reward/bonus is now effected by flight & airline parameters
  • Some airline descriptions updated/retconned to match new game mechanics
  • Flight types displayed in flight info window, as well as expected PAX vs PAX capacity
  • PAX capacity depends on flight type
  • PAX load factor depends on time of day
  • Fixed some planner bugs from 1.1
  • Rewrote service request system for baggage, catering, cleaning, fueling, ramp service
  • Added setting to disable baggage service on small stands (vanilla behavior is default)
  • Added setting to disable baggage service on stands with no baggage bay (improved behavior is default)
  • Depreciated settings for experimental flight types and new contract lengths

1.2.0.x

  • Added a system for more complex airline and flight behavior. Partially utilized.
  • Turnaround time is player adjustable within limits
  • Airlines offer flight contracts which repeat based on airline size and satisfaction
  • Flights in series indicator in schedule UI now indicates flights remaining, as opposed to the total number planned initially, giving better indication of when contracts will expire.
  • Livery layers hidden by z-level are automatically unhidden (mod compatibility feature)
  • Further airline features disabled by default until 1.2.1 due to not being complete / stable.
  • Trello : https://trello.com/b/Wjx5mvmW/aceo-tweaks

1.1.1.x

  • Added "makewindow" command for active liveries
  • Added "xact" as shorthand for "exactly"
  • Made livery log-spam toggle-able

1.1.0.x

  • UMF auto-update enabled for future updates (pending approval from UMF)
  • Improved planner rescheduling logic: more permissive for the player
  • Added Flight type framework (not implemented)
  • Added Active Livery Components, used for changing previously inaccessible visual features of aircraft

1.0.0.x

  • Added basic cargo system
  • Added hold-shift planner enhancements

[/details]

[details="Previous Release Notes"]