mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
737e04d09e
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,4 +1,4 @@
|
|||||||
[submodule "pydcs"]
|
[submodule "pydcs"]
|
||||||
path = pydcs
|
path = pydcs
|
||||||
url = https://github.com/pydcs/dcs
|
url = https://github.com/khopa/dcs
|
||||||
branch = master
|
branch = dataexport
|
||||||
|
|||||||
@ -267,7 +267,7 @@ class Event:
|
|||||||
|
|
||||||
ratio = (1.0 + enemy_casualties) / (1.0 + ally_casualties)
|
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:
|
if ally_units_alive == 0:
|
||||||
player_won = False
|
player_won = False
|
||||||
|
|||||||
@ -374,7 +374,7 @@ class AircraftData:
|
|||||||
AIRCRAFT_DATA: Dict[str, AircraftData] = {
|
AIRCRAFT_DATA: Dict[str, AircraftData] = {
|
||||||
"A-10C": AircraftData(
|
"A-10C": AircraftData(
|
||||||
inter_flight_radio=get_radio("AN/ARC-164"),
|
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"), # VHF for intraflight is not accepted anymore by DCS (see https://forums.eagle.ru/showthread.php?p=4499738)
|
||||||
channel_allocator=WarthogRadioChannelAllocator()
|
channel_allocator=WarthogRadioChannelAllocator()
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ class GroundConflictGenerator:
|
|||||||
self.enemy_planned_combat_groups = enemy_planned_combat_groups
|
self.enemy_planned_combat_groups = enemy_planned_combat_groups
|
||||||
self.player_planned_combat_groups = player_planned_combat_groups
|
self.player_planned_combat_groups = player_planned_combat_groups
|
||||||
self.player_stance = CombatStance(player_stance)
|
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
|
self.game = game
|
||||||
self.jtacs: List[JtacInfo] = []
|
self.jtacs: List[JtacInfo] = []
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ class GroundConflictGenerator:
|
|||||||
u.heading = forward_heading + random.randint(-5,5)
|
u.heading = forward_heading + random.randint(-5,5)
|
||||||
|
|
||||||
elif group.role in [CombatGroupRole.TANK, CombatGroupRole.IFV]:
|
elif group.role in [CombatGroupRole.TANK, CombatGroupRole.IFV]:
|
||||||
if stance == CombatStance.AGGRESIVE:
|
if stance == CombatStance.AGGRESSIVE:
|
||||||
# Attack nearest enemy if any
|
# Attack nearest enemy if any
|
||||||
# Then move forward OR Attack enemy base if it is not too far away
|
# Then move forward OR Attack enemy base if it is not too far away
|
||||||
target = self.find_nearest_enemy_group(dcs_group, enemy_groups)
|
target = self.find_nearest_enemy_group(dcs_group, enemy_groups)
|
||||||
@ -280,7 +280,7 @@ class GroundConflictGenerator:
|
|||||||
|
|
||||||
elif group.role in [CombatGroupRole.APC, CombatGroupRole.ATGM]:
|
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
|
# 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:
|
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)
|
attack_point = to_cp.position.random_point_within(500, 0)
|
||||||
|
|||||||
@ -205,7 +205,7 @@ class BriefingGenerator(MissionInfoGenerator):
|
|||||||
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"
|
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:
|
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"
|
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:
|
if has_numerical_superiority:
|
||||||
self.description += "On this location, our ground forces will try to make progress against the enemy"
|
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"
|
self.description += ". As the enemy is outnumbered, our forces should have no issue making progress.\n"
|
||||||
|
|||||||
@ -197,7 +197,7 @@ DISTANCE_FROM_FRONTLINE = {
|
|||||||
|
|
||||||
GROUP_SIZES_BY_COMBAT_STANCE = {
|
GROUP_SIZES_BY_COMBAT_STANCE = {
|
||||||
CombatStance.DEFENSIVE: [2, 4, 6],
|
CombatStance.DEFENSIVE: [2, 4, 6],
|
||||||
CombatStance.AGGRESIVE: [2, 4, 6],
|
CombatStance.AGGRESSIVE: [2, 4, 6],
|
||||||
CombatStance.RETREAT: [2, 4, 6, 8],
|
CombatStance.RETREAT: [2, 4, 6, 8],
|
||||||
CombatStance.BREAKTHROUGH: [4, 6, 6, 8],
|
CombatStance.BREAKTHROUGH: [4, 6, 6, 8],
|
||||||
CombatStance.ELIMINATION: [2, 4, 4, 4, 6],
|
CombatStance.ELIMINATION: [2, 4, 4, 4, 6],
|
||||||
|
|||||||
@ -3,7 +3,7 @@ from enum import Enum
|
|||||||
|
|
||||||
class CombatStance(Enum):
|
class CombatStance(Enum):
|
||||||
DEFENSIVE = 0 # Unit will adopt defensive stance with medium group of units
|
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
|
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
|
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
|
ELIMINATION = 4 # Unit will progress aggresively toward anemy units, attempting to eliminate the ennemy force
|
||||||
|
|||||||
@ -124,7 +124,7 @@ RADIOS: List[Radio] = [
|
|||||||
# 4 preset channels (A/B/C/D)
|
# 4 preset channels (A/B/C/D)
|
||||||
Radio("SCR522", MHz(100), MHz(156), step=kHz(25)),
|
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)),
|
Radio("R&S M3AR UHF", MHz(225), MHz(400), step=MHz(1)),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user