Airport CEO Tweaks
This is a code-mod that is currently in a very 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
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)
- 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
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.
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_
extra info
Anything preceding “config” will be ignored by the mod. It is safe for example to write:
"name":"mytexture_config_...
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”
extra info
As of 1.1.1 you can use “xact” as shorthand for “exactly” to reduce the length of the names.
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.
If we wanted, we could continue...
"name":"config_reardoors_someotherkeyword_anoutherkeyword_exactly_WasteAccessDoor_someotherexactname_exactly_
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.
**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
},
Parameters
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",
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 stop-gap 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
Then use a move command to bring them back to zero. The move command will obviously only run if my mod is installed.
In the future, I plan to 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.
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
Download/Installation
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.
Manual Mod Install Instructions
After UMF is installed to your AirportCEO directory, you must install my mod.
After downloading “AirportCEOTweaks_v1.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
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.
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.
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.
Settings
- CargoAirlineFlags Airlines with any of these occurring in their name will be treated as cargo airlines.
- CargoFlightPaymnetModifier The completion bonus for cargo flights is weighted by this multiplier.
- FixesForDisabledModules Generally leave this true unless troubleshooting a bug.
- CargoSystem Set to false to disable tagging airlines as cargo airlines and all associated behavior.
- PlannerChanges Set to false to disable all planner improvements.
- AirlineChanges Placeholder for some of the more invasive changes to airlines that are planned but not yet implemented. I anticipate that I’ll hopelessly break the auto-planner in a future update, but I’ll be putting those changes behind this setting in case the planner improvements aren’t enough for you to be rid of the auto planner.
- LiveryExtensions Toggles the new livery features
- LiveryAuthorLogFiles Turn these on if you’re a mod author trying to figure out why your livery isn’t working
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.
Non-Committal Future Plans
Soon
- Implement feedback from livery authors
- Airlines offer longer running flight contracts
- More implementations of “hold shift to do this in bulk” eg staff training
- Extend current “cargo flights” system into general “flight types”
- Flight types with different turnaround duration (cargo flights are longer)
- Non-Vanilla Flight Types excluded from auto-planner
Vaguely in the Future or Maybe Not at All.
- Domestic vs International Airlines that respect home nation
- Flights renew indefinitely(ish) if satisfied
- Flight types with preferences/requirements per time of day (peak hours)
- Flight types that recur only on specific weekdays (weekend flights vs mid-week)
- Flight types configurable by airline
- Hypothetical flight types: budget, mainline, full service, VIP, regional/commuter, connection, air-tour, positioning, cargo, charter, special
- Generate ULDs/“baggage” for cargo flights.
- Better support for reskinning a “livery” to be a new aircraft type
- Support for small on medium stand (not actually as broken as you might think)
- Bring back upgrade-able runway length and allow aircraft to land on basis of available length
- Generally be more granular than small/medium/large
- MAYBE kit-bash some new stand types such as roll-through, rear access road, or intermediate sizes.
- Master contract&negotiation rework with admins required to maintain contracts
Changelog
1.1.1
- Added “makewindow” command for active liveries
- Added “xact” as shorthand for “exactly”
- Made livery log-spam toggle-able
1.1
- 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
- Added basic cargo system
- Added hold-shift planner enhancements