Quantx / CC2-UI-Enhancer

UI Enhancer mod for Carrier Command 2
58 stars 17 forks source link

Air Operations Screen mod #11

Closed ambispess closed 3 years ago

ambispess commented 3 years ago

Heyo! Originally I was going to release this as a stand-alone mod, but as your mod is the de facto go-to and cooperation and maintenance seem to go well, I figured you might take a look and see if is an addition to your mod you might like, so here is the ReadMe I had prepared:

Air Operations Screen mod

This small quality-of-life mod changes the Landing Queue Screen to a more useful Air Operations Screen. It will show ALL deployed and active air drones, their current tasks, their type, their health and fuel status. It uses color coding for quick and easy glances from other stations. This is especially useful for singleplayer but also useful in multiplayer. This mod does not change the drone AI or handling and is merely cosmetic, and is entirely client-side.

001 002 003 004 011 009 014 015

HOW TO READ THE SCREEN:

1) The status column of the modded ATC screen has several status modes for air drones, modes further up will take priority over modes below:

"DMG!" = Damage! = Drone is actively being damaged! Beware that this mode only shows briefly, so make sure to check the health percentage on the screen too.

"PARK" = Parking = Drone is parking after a landing. It is on the runway, or moving down the elevator, or being brought to its drone bay by the crane.

"LAND" = Landing = Drone is in the final landing phase. Landing can not be aborted anymore.

"HOLD" = Holding = Drone is inside or on its way to the holding pattern preparing for landing. Landing can still be aborted.

"LNCH" = Launch = Drone is in the launching phase. It is on the runway, or moving up the elevator, or being brought to the elevator by the crane. Launch can not be aborted anymore.

"STBY" = Standby = Drone is standing by for launch, it is being refueld and rearmed, or waiting for the crane and elevator to be free. Launch can still be aborted.

"HPLT" = Human Pilot = Drone is piloted manually by a human player from a drone control terminal. This only checks the actual flight controls, not if the gimbal camera, weapons and other attachments are in human control, check the remote control column for those.

"ATTK" = Attack = Drone is carrying out a planned attack order.

"LIFT" = Lifting = Petrel is at an airlift waypoint and is lifting up a ground vehicle.

"DPLY" = Deploy = Petrel is at a deploy waypoint and putting down a ground vehicle.

"LOOP" = Loop = Drone is patrolling on a series of waypoints that loop on themselves.

"WYPT" = Waypoint = Drone is flying toward a single waypoint or on a series of waypoints that do NOT loop on themselves.

"FREE" = Freeflight = Plane has no waypoints or orders, and is in free flight, flying straight ahead.

"HOVR" = Hovering = Helicopter has no waypoints or orders, and is hovering stationary.

2.) The name column lists the type name of a drone, these are the same 3 letter abbreviations you can see from vehicle HUDs. The color of the name also indicates if the health status or fuel status of the drone is in a warning or critical state, yellow is warning, red is critical. It will automatically change to whatever of those two is in worse condition. For example if the fuel is critical and the health is good, the name will be red, and if the fuel is good and the health is in warning, it will be yellow.

3.) The fuel column lists the remaining fuel percentage of a drone as a number. The percentage will also change color to indicate the fuel status: Between 50% and 99% the number will be white to indicate a good condition. Between 25% and 50% the number will be yellow to indicate a warning condition. Less than 25% the number will be red to indicate a critical condition. At full 100% fuel it will show a dark green "OK" to indicate a good launch condition.

4.) If the drone is damaged, the health column lists the remaining health percentage of a drone as a number. The percentage will also change color to indicate the health status: At full 100% health it will give no number to indicate an undamaged and good condition, and to make it easier to spot other drones that are damaged. Between 50% and 99% the number will be yellow to indicate a warning condition. Less than 50% the number will be red to indicate a critical condition.

5.) The last column is the remote control status. It will show a remote control symbol if a human player is viewing any of the drone's cameras, weapons or attachments from the drone control terminals. This will show even if the drone and its attachments are still fully in automatic mode, so check the status column if you want to check manual flight controls.

KNOWN ISSUES:

0.a) This mod only changes the drone list on the right of the screen, the holding pattern "map" on the left of the screen is still almost fully vanilla and has some minor vanilla issues. Notably holding helicopters will sometimes render too early onto the screen and the icon will overlap on the text, also they sometimes don't render accurately during the landing phase. In the long term, it is probably wiser to just remove the vanilla holding pattern "map", because it is not accurate and you can not control the landing and holding queue priorities anyway, so beyond the nice looks it serves no purpose.

0.b) Another vanilla bug with the screen (not caused by this mod) is that if another player is sitting in the middle of the 3 drone control terminal chairs below it, you sometimes can not enter the close-up view of the screen when clicking on it, for example to scroll a large list.

0.c) Yet another vanilla bug unrelated to this mod, if a helicopter in the holding pattern gets destroyed it can happen that all helicopters inside the holding pattern get stuck holding and stop moving. Sometimes you can fix this by giving them new waypoint orders, other times only a reload of the savefile seems to work.

1.) Helicopters don't use the same landing procedure like planes do when they fly from their final holding spot down to the carrier runway, they skip a step, so unlike with planes the actual landing phase variable is never set by the game with helicopters. I worked around this by creating a check to see if the helicopter is inside a 3D area very close behind the carrier's runway and just ahead of the final helicopter holding spot, which is the normal landing slope for them. This works well enough almost all the time, but it can rarely happen that for few seconds a holding helicopter is shown as landing and then again as holding if it is flying directly over the carrier to its designated holding spot. Like everything else in this mod this is only cosmetic and has no impact on actual landing procedures. If this gets patched the mod should still work correctly because the mod's landing check is done anyway before the 3D area check.

COMPABILITY AND PERMISSIONS:

Because this mod only changes the screen code, it is entirely client-side, so you can run it even if others on a multiplayer server are not. Future game patches and other mods might change this file, or you may want to adjust my mod to your needs, or you want to merge this mod code into your own mod, or you want to patch it for future game versions if I don't update this anymore. In every case, you can use, copy and change the modded code as you like within the rights of MicroProse and Geometa.

THANKS TO:

My friends for testing the mod and being awesome in general! All the modders (especially Quantx) who are putting in hard work to improve the game! Geometa and Microprose for making this game!

Quantx commented 3 years ago

That's amazing, I'd be thrilled to add it!

ambispess commented 3 years ago

Glad you like it, thanks for adding it and thanks for your efforts :)