diff --git a/changelog.md b/changelog.md index 2279041b..fec0835a 100644 --- a/changelog.md +++ b/changelog.md @@ -29,6 +29,7 @@ * **[Mission Generation]** Introducing the Armed Recon flight plan, i.e. CAS against any Theater Ground Object * **[Doctrine]** Ability to customize the startup time allocated to the player * **[Mission Generation]** Ability to choose whether player flights can spawn on the sixpack or not +* **[Options]** New options in Mission Generator section: Limit AI radio callouts & Suppress AI radio callouts. ## Fixes * **[UI/UX]** A-10A flights can be edited again diff --git a/game/missiongenerator/aircraft/aircraftbehavior.py b/game/missiongenerator/aircraft/aircraftbehavior.py index 9b129d15..7ab55e4f 100644 --- a/game/missiongenerator/aircraft/aircraftbehavior.py +++ b/game/missiongenerator/aircraft/aircraftbehavior.py @@ -27,6 +27,9 @@ from dcs.task import ( PinpointStrike, AFAC, SetUnlimitedFuelCommand, + OptNoReportWaypointPass, + OptRadioUsageContact, + OptRadioSilence, ) from dcs.unitgroup import FlyingGroup @@ -151,6 +154,19 @@ class AircraftBehavior: # Do not restrict afterburner. # https://forums.eagle.ru/forum/english/digital-combat-simulator/dcs-world-2-5/bugs-and-problems-ai/ai-ad/7121294-ai-stuck-at-high-aoa-after-making-sharp-turn-if-afterburner-is-restricted + if flight.client_count and flight.flight_type != FlightType.AEWC: + # configure AI radio usage for player flights to avoid AI spamming the channel + if flight.coalition.game.settings.silence_ai_radios: + group.points[0].tasks.append(OptRadioSilence(True)) + elif flight.coalition.game.settings.limit_ai_radios: + # the pydcs api models this in a quite strange way for some reason, + # and has no proper support to choose "nothing" + radio_usage = OptRadioUsageContact() + radio_usage.params["action"]["params"]["value"] = "none;" + group.points[0].tasks.append(radio_usage) + + group.points[0].tasks.append(OptNoReportWaypointPass(True)) + @staticmethod def configure_eplrs(group: FlyingGroup[Any], flight: Flight) -> None: if flight.unit_type.eplrs_capable: diff --git a/game/settings/settings.py b/game/settings/settings.py index ba2bf32f..876d3854 100644 --- a/game/settings/settings.py +++ b/game/settings/settings.py @@ -797,6 +797,20 @@ class Settings: "which are known to work as of DCS World 2.9.4.53990." ), ) + limit_ai_radios: bool = boolean_option( + "Limit AI radio callouts", + page=MISSION_GENERATOR_PAGE, + section=GAMEPLAY_SECTION, + default=True, + detail="Avoids the target-detection callouts over the radio by AI. (except for AWACS flights)", + ) + silence_ai_radios: bool = boolean_option( + "Suppress AI radio callouts", + page=MISSION_GENERATOR_PAGE, + section=GAMEPLAY_SECTION, + default=False, + detail="Keeps the AI silent at all times for flights with human pilots. (except for AWACS flights)", + ) # Mission specific desired_player_mission_duration: timedelta = minutes_option( "Desired mission duration",