From b8afb01c46123f64c5f201d430363acf91f339fb Mon Sep 17 00:00:00 2001 From: Pedro Magueija Date: Tue, 15 Sep 2020 14:58:17 +0200 Subject: [PATCH 1/6] Fix typo in CombatStance enumeration --- gen/ground_forces/combat_stance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/ground_forces/combat_stance.py b/gen/ground_forces/combat_stance.py index d2247f73..604ec508 100644 --- a/gen/ground_forces/combat_stance.py +++ b/gen/ground_forces/combat_stance.py @@ -3,7 +3,7 @@ from enum import Enum class CombatStance(Enum): DEFENSIVE = 0 # Unit will adopt defensive stance with medium group of units - AGGRESIVE = 1 # Unit will attempt to make progress with medium sized group of units + AGGRESSIVE = 1 # Unit will attempt to make progress with medium sized group of units RETREAT = 2 # Unit will retreat BREAKTHROUGH = 3 # Unit will attempt a breakthrough, rushing forward very aggresively with big group of armored units, and even less armored units will move aggresively ELIMINATION = 4 # Unit will progress aggresively toward anemy units, attempting to eliminate the ennemy force From 93b2e91c10036a6fad1b69a4f6b7116ba570b911 Mon Sep 17 00:00:00 2001 From: Pedro Magueija Date: Tue, 15 Sep 2020 15:03:41 +0200 Subject: [PATCH 2/6] Fix usage of CombatStance typo --- game/event/event.py | 2 +- gen/armor.py | 6 +++--- gen/briefinggen.py | 2 +- gen/ground_forces/ai_ground_planner.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/game/event/event.py b/game/event/event.py index e064ad94..8146deb3 100644 --- a/game/event/event.py +++ b/game/event/event.py @@ -267,7 +267,7 @@ class Event: ratio = (1.0 + enemy_casualties) / (1.0 + ally_casualties) - player_aggresive = cp.stances[enemy_cp.id] in [CombatStance.AGGRESIVE, CombatStance.ELIMINATION, CombatStance.BREAKTHROUGH] + player_aggresive = cp.stances[enemy_cp.id] in [CombatStance.AGGRESSIVE, CombatStance.ELIMINATION, CombatStance.BREAKTHROUGH] if ally_units_alive == 0: player_won = False diff --git a/gen/armor.py b/gen/armor.py index 5d9a8b29..07fafa67 100644 --- a/gen/armor.py +++ b/gen/armor.py @@ -30,7 +30,7 @@ class GroundConflictGenerator: self.enemy_planned_combat_groups = enemy_planned_combat_groups self.player_planned_combat_groups = player_planned_combat_groups self.player_stance = CombatStance(player_stance) - self.enemy_stance = random.choice([CombatStance.AGGRESIVE, CombatStance.AGGRESIVE, CombatStance.AGGRESIVE, CombatStance.ELIMINATION, CombatStance.BREAKTHROUGH]) if len(enemy_planned_combat_groups) > len(player_planned_combat_groups) else random.choice([CombatStance.DEFENSIVE, CombatStance.DEFENSIVE, CombatStance.DEFENSIVE, CombatStance.AMBUSH, CombatStance.AGGRESIVE]) + self.enemy_stance = random.choice([CombatStance.AGGRESSIVE, CombatStance.AGGRESSIVE, CombatStance.AGGRESSIVE, CombatStance.ELIMINATION, CombatStance.BREAKTHROUGH]) if len(enemy_planned_combat_groups) > len(player_planned_combat_groups) else random.choice([CombatStance.DEFENSIVE, CombatStance.DEFENSIVE, CombatStance.DEFENSIVE, CombatStance.AMBUSH, CombatStance.AGGRESSIVE]) self.game = game def _group_point(self, point) -> Point: @@ -222,7 +222,7 @@ class GroundConflictGenerator: u.heading = forward_heading + random.randint(-5,5) elif group.role in [CombatGroupRole.TANK, CombatGroupRole.IFV]: - if stance == CombatStance.AGGRESIVE: + if stance == CombatStance.AGGRESSIVE: # Attack nearest enemy if any # Then move forward OR Attack enemy base if it is not too far away target = self.find_nearest_enemy_group(dcs_group, enemy_groups) @@ -263,7 +263,7 @@ class GroundConflictGenerator: elif group.role in [CombatGroupRole.APC, CombatGroupRole.ATGM]: - if stance in [CombatStance.AGGRESIVE, CombatStance.BREAKTHROUGH, CombatStance.ELIMINATION]: + if stance in [CombatStance.AGGRESSIVE, CombatStance.BREAKTHROUGH, CombatStance.ELIMINATION]: # APC & ATGM will never move too much forward, but will follow along any offensive if to_cp.position.distance_to_point(dcs_group.points[0].position) <= AGGRESIVE_MOVE_DISTANCE: attack_point = to_cp.position.random_point_within(500, 0) diff --git a/gen/briefinggen.py b/gen/briefinggen.py index c3e10931..47e43ce6 100644 --- a/gen/briefinggen.py +++ b/gen/briefinggen.py @@ -148,7 +148,7 @@ class BriefingGenerator: self.description += "We do not have a single vehicle available to hold our position, the situation is critical, and we will lose ground inevitably.\n" elif enemy_base.base.total_armor == 0: self.description += "The enemy forces have been crushed, we will be able to make significant progress toward " + enemy_base.name + ". \n" - if stance == CombatStance.AGGRESIVE: + if stance == CombatStance.AGGRESSIVE: if has_numerical_superiority: self.description += "On this location, our ground forces will try to make progress against the enemy" self.description += ". As the enemy is outnumbered, our forces should have no issue making progress.\n" diff --git a/gen/ground_forces/ai_ground_planner.py b/gen/ground_forces/ai_ground_planner.py index bdc3a18d..877c9831 100644 --- a/gen/ground_forces/ai_ground_planner.py +++ b/gen/ground_forces/ai_ground_planner.py @@ -197,7 +197,7 @@ DISTANCE_FROM_FRONTLINE = { GROUP_SIZES_BY_COMBAT_STANCE = { CombatStance.DEFENSIVE: [2, 4, 6], - CombatStance.AGGRESIVE: [2, 4, 6], + CombatStance.AGGRESSIVE: [2, 4, 6], CombatStance.RETREAT: [2, 4, 6, 8], CombatStance.BREAKTHROUGH: [4, 6, 6, 8], CombatStance.ELIMINATION: [2, 4, 4, 4, 6], From e86a10e9baf94a32f4624f5aa3183ecd191ab300 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 25 Sep 2020 01:13:59 +0200 Subject: [PATCH 3/6] JF-17 radio frequency fix. --- gen/radios.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/radios.py b/gen/radios.py index bf4f1447..c0adb20c 100644 --- a/gen/radios.py +++ b/gen/radios.py @@ -124,7 +124,7 @@ RADIOS: List[Radio] = [ # 4 preset channels (A/B/C/D) Radio("SCR522", MHz(100), MHz(156), step=kHz(25)), - Radio("R&S M3AR VHF", MHz(108), MHz(174), step=MHz(1)), + Radio("R&S M3AR VHF", MHz(120), MHz(174), step=MHz(1)), Radio("R&S M3AR UHF", MHz(225), MHz(400), step=MHz(1)), ] From 83f221c5e3351717437ec7eb04b306a9b8acc267 Mon Sep 17 00:00:00 2001 From: Khopa Date: Fri, 25 Sep 2020 01:23:05 +0200 Subject: [PATCH 4/6] Use latest data-export --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index d8db9cf5..d1f0105e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "pydcs"] path = pydcs - url = https://github.com/pydcs/dcs - branch = master + url = https://github.com/khopa/dcs + branch = dataexport From 5e35efcaef5a1e526a142768b65712773f2c9090 Mon Sep 17 00:00:00 2001 From: David Pierron Date: Fri, 25 Sep 2020 10:36:18 +0200 Subject: [PATCH 5/6] UHF Intraflight Frequency for Player and Clients A-10C In the mission editor, using a VHF frequency for a Player or Client A-10C results in an error. Changed the radio definitions to use AN/ARC-164 for intraflight comms. --- gen/aircraft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/aircraft.py b/gen/aircraft.py index 4911c916..25c48aa0 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -374,7 +374,7 @@ class AircraftData: AIRCRAFT_DATA: Dict[str, AircraftData] = { "A-10C": AircraftData( inter_flight_radio=get_radio("AN/ARC-164"), - intra_flight_radio=get_radio("AN/ARC-186(V) AM"), + intra_flight_radio=get_radio("AN/ARC-164"), channel_allocator=WarthogRadioChannelAllocator() ), From 66f607b5e6a9cf790f6107b5f67a815a24c937e7 Mon Sep 17 00:00:00 2001 From: David Pierron Date: Fri, 25 Sep 2020 11:33:07 +0200 Subject: [PATCH 6/6] added a comment that links to my forum post --- gen/aircraft.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/aircraft.py b/gen/aircraft.py index 25c48aa0..81a6202e 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -374,7 +374,7 @@ class AircraftData: AIRCRAFT_DATA: Dict[str, AircraftData] = { "A-10C": AircraftData( inter_flight_radio=get_radio("AN/ARC-164"), - intra_flight_radio=get_radio("AN/ARC-164"), + intra_flight_radio=get_radio("AN/ARC-164"), # VHF for intraflight is not accepted anymore by DCS (see https://forums.eagle.ru/showthread.php?p=4499738) channel_allocator=WarthogRadioChannelAllocator() ),