mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
New performance option: front-line troops prefer roads
Co-Authored-By: MetalStormGhost <89945461+MetalStormGhost@users.noreply.github.com>
This commit is contained in:
parent
a81b4ffd05
commit
d8509ef736
@ -1,13 +1,14 @@
|
|||||||
# Retribution 1.0.0
|
# Retribution 1.0.0
|
||||||
|
|
||||||
## Features/Improvements
|
## Features/Improvements
|
||||||
* **[Mission Generation]** Add option to configure the maximum frontline length in settings
|
* **[Mission Generation]** Add option to configure the maximum front-line length in settings
|
||||||
* **[Mission Generation]** Variable flight-size (2/3/4-ship) for BAI/ANTISHIP/DEAD/STRIKE (main) missions
|
* **[Mission Generation]** Variable flight-size (2/3/4-ship) for BAI/ANTISHIP/DEAD/STRIKE (main) missions
|
||||||
* **[Modding]** Support for F-15D 'Baz' mod version 1.0
|
* **[Modding]** Support for F-15D 'Baz' mod version 1.0
|
||||||
* **[Modding]** Support for Su-30 mod version 2.01B
|
* **[Modding]** Support for Su-30 mod version 2.01B
|
||||||
* **[UI]** Add livery selector to Air Wing Configurator's squadrons.
|
* **[UI]** Add livery selector to Air Wing Configurator's squadrons.
|
||||||
* **[Performance]** Added performance option: Maximum front-line unit supply per control point.
|
* **[Performance]** Added performance option: Maximum front-line unit supply per control point.
|
||||||
* **[Performance]** Added performance option: Disable convoys.
|
* **[Performance]** Added performance option: Disable convoys.
|
||||||
|
* **[Performance]** Added performance option: Front-line troops prefer roads.
|
||||||
|
|
||||||
|
|
||||||
# Liberation:
|
# Liberation:
|
||||||
|
|||||||
@ -116,6 +116,12 @@ class FlotGenerator:
|
|||||||
"conflicts cannot have the heading `None`."
|
"conflicts cannot have the heading `None`."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.wpt_pointaction = (
|
||||||
|
PointAction.OnRoad
|
||||||
|
if self.game.settings.perf_frontline_units_prefer_roads
|
||||||
|
else PointAction.OffRoad
|
||||||
|
)
|
||||||
|
|
||||||
# Plan combat actions for groups
|
# Plan combat actions for groups
|
||||||
self.plan_action_for_groups(
|
self.plan_action_for_groups(
|
||||||
self.player_stance,
|
self.player_stance,
|
||||||
@ -313,10 +319,10 @@ class FlotGenerator:
|
|||||||
)
|
)
|
||||||
dcs_group.add_waypoint(
|
dcs_group.add_waypoint(
|
||||||
dcs_group.position.point_from_heading(forward_heading.degrees, 1),
|
dcs_group.position.point_from_heading(forward_heading.degrees, 1),
|
||||||
PointAction.OffRoad,
|
self.wpt_pointaction,
|
||||||
)
|
)
|
||||||
dcs_group.points[2].tasks.append(Hold())
|
dcs_group.points[2].tasks.append(Hold())
|
||||||
dcs_group.add_waypoint(retreat, PointAction.OffRoad)
|
dcs_group.add_waypoint(retreat, self.wpt_pointaction)
|
||||||
|
|
||||||
artillery_fallback = TriggerOnce(
|
artillery_fallback = TriggerOnce(
|
||||||
Event.NoEvent, "ArtilleryRetreat #" + str(dcs_group.id)
|
Event.NoEvent, "ArtilleryRetreat #" + str(dcs_group.id)
|
||||||
@ -386,7 +392,7 @@ class FlotGenerator:
|
|||||||
attack_point = self.find_offensive_point(
|
attack_point = self.find_offensive_point(
|
||||||
dcs_group, offset_heading, AGGRESIVE_MOVE_DISTANCE
|
dcs_group, offset_heading, AGGRESIVE_MOVE_DISTANCE
|
||||||
)
|
)
|
||||||
dcs_group.add_waypoint(attack_point, PointAction.OffRoad)
|
dcs_group.add_waypoint(attack_point, self.wpt_pointaction)
|
||||||
elif stance == CombatStance.BREAKTHROUGH:
|
elif stance == CombatStance.BREAKTHROUGH:
|
||||||
# In breakthrough mode, the units will move forward
|
# In breakthrough mode, the units will move forward
|
||||||
# If the enemy base is close enough, the units will attack the base
|
# If the enemy base is close enough, the units will attack the base
|
||||||
@ -404,7 +410,7 @@ class FlotGenerator:
|
|||||||
attack_point = self.find_offensive_point(
|
attack_point = self.find_offensive_point(
|
||||||
dcs_group, offset_heading, BREAKTHROUGH_OFFENSIVE_DISTANCE
|
dcs_group, offset_heading, BREAKTHROUGH_OFFENSIVE_DISTANCE
|
||||||
)
|
)
|
||||||
dcs_group.add_waypoint(attack_point, PointAction.OffRoad)
|
dcs_group.add_waypoint(attack_point, self.wpt_pointaction)
|
||||||
elif stance == CombatStance.ELIMINATION:
|
elif stance == CombatStance.ELIMINATION:
|
||||||
# In elimination mode, the units focus on destroying as much enemy groups as possible
|
# In elimination mode, the units focus on destroying as much enemy groups as possible
|
||||||
targets = self.find_n_nearest_enemy_groups(dcs_group, enemy_groups, 3)
|
targets = self.find_n_nearest_enemy_groups(dcs_group, enemy_groups, 3)
|
||||||
@ -416,7 +422,7 @@ class FlotGenerator:
|
|||||||
target_point = self.conflict.theater.nearest_land_pos(
|
target_point = self.conflict.theater.nearest_land_pos(
|
||||||
target.points[0].position + rand_offset
|
target.points[0].position + rand_offset
|
||||||
)
|
)
|
||||||
dcs_group.add_waypoint(target_point, PointAction.OffRoad)
|
dcs_group.add_waypoint(target_point, self.wpt_pointaction)
|
||||||
dcs_group.points[i + 1].tasks.append(AttackGroup(target.id))
|
dcs_group.points[i + 1].tasks.append(AttackGroup(target.id))
|
||||||
if (
|
if (
|
||||||
to_cp.position.distance_to_point(dcs_group.points[0].position)
|
to_cp.position.distance_to_point(dcs_group.points[0].position)
|
||||||
@ -461,7 +467,7 @@ class FlotGenerator:
|
|||||||
attack_point = self.find_offensive_point(
|
attack_point = self.find_offensive_point(
|
||||||
dcs_group, forward_heading, AGGRESIVE_MOVE_DISTANCE
|
dcs_group, forward_heading, AGGRESIVE_MOVE_DISTANCE
|
||||||
)
|
)
|
||||||
dcs_group.add_waypoint(attack_point, PointAction.OffRoad)
|
dcs_group.add_waypoint(attack_point, self.wpt_pointaction)
|
||||||
|
|
||||||
if stance != CombatStance.RETREAT:
|
if stance != CombatStance.RETREAT:
|
||||||
self.add_morale_trigger(dcs_group, forward_heading)
|
self.add_morale_trigger(dcs_group, forward_heading)
|
||||||
@ -516,8 +522,8 @@ class FlotGenerator:
|
|||||||
reposition_point = retreat_point.point_from_heading(
|
reposition_point = retreat_point.point_from_heading(
|
||||||
forward_heading.degrees, 10
|
forward_heading.degrees, 10
|
||||||
) # Another point to make the unit face the enemy
|
) # Another point to make the unit face the enemy
|
||||||
dcs_group.add_waypoint(retreat_point, PointAction.OffRoad)
|
dcs_group.add_waypoint(retreat_point, self.wpt_pointaction)
|
||||||
dcs_group.add_waypoint(reposition_point, PointAction.OffRoad)
|
dcs_group.add_waypoint(reposition_point, self.wpt_pointaction)
|
||||||
|
|
||||||
def add_morale_trigger(
|
def add_morale_trigger(
|
||||||
self, dcs_group: VehicleGroup, forward_heading: Heading
|
self, dcs_group: VehicleGroup, forward_heading: Heading
|
||||||
@ -542,7 +548,7 @@ class FlotGenerator:
|
|||||||
self.find_retreat_point(
|
self.find_retreat_point(
|
||||||
dcs_group, forward_heading, (int)(RETREAT_DISTANCE / 8)
|
dcs_group, forward_heading, (int)(RETREAT_DISTANCE / 8)
|
||||||
),
|
),
|
||||||
PointAction.OffRoad,
|
self.wpt_pointaction,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Fallback task
|
# Fallback task
|
||||||
|
|||||||
@ -443,18 +443,18 @@ class Settings:
|
|||||||
section=PERFORMANCE_SECTION,
|
section=PERFORMANCE_SECTION,
|
||||||
default=True,
|
default=True,
|
||||||
)
|
)
|
||||||
# perf_frontline_units_prefer_roads: bool = boolean_option(
|
|
||||||
# "Front line troops prefer roads",
|
|
||||||
# page=MISSION_GENERATOR_PAGE,
|
|
||||||
# section=PERFORMANCE_SECTION,
|
|
||||||
# default=False,
|
|
||||||
# )
|
|
||||||
perf_disable_convoys: bool = boolean_option(
|
perf_disable_convoys: bool = boolean_option(
|
||||||
"Disable convoys",
|
"Disable convoys",
|
||||||
page=MISSION_GENERATOR_PAGE,
|
page=MISSION_GENERATOR_PAGE,
|
||||||
section=PERFORMANCE_SECTION,
|
section=PERFORMANCE_SECTION,
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
|
perf_frontline_units_prefer_roads: bool = boolean_option(
|
||||||
|
"Front line troops prefer roads",
|
||||||
|
page=MISSION_GENERATOR_PAGE,
|
||||||
|
section=PERFORMANCE_SECTION,
|
||||||
|
default=False,
|
||||||
|
)
|
||||||
perf_frontline_units_max_supply: int = bounded_int_option(
|
perf_frontline_units_max_supply: int = bounded_int_option(
|
||||||
"Maximum frontline unit supply per control point",
|
"Maximum frontline unit supply per control point",
|
||||||
page=MISSION_GENERATOR_PAGE,
|
page=MISSION_GENERATOR_PAGE,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user