mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Added option to disable AI pilot levelling
This commit is contained in:
parent
1bcc332885
commit
6cd711a1e2
@ -5,6 +5,7 @@ Saves from 3.x are not compatible with 4.0.
|
|||||||
## Features/Improvements
|
## Features/Improvements
|
||||||
|
|
||||||
* **[Campaign]** Squadrons now have a maximum size and killed pilots replenish at a limited rate.
|
* **[Campaign]** Squadrons now have a maximum size and killed pilots replenish at a limited rate.
|
||||||
|
* **[Campaign]** Added an option to disable levelling up of AI pilots.
|
||||||
* **[Campaign AI]** AI will plan Tanker flights.
|
* **[Campaign AI]** AI will plan Tanker flights.
|
||||||
* **[Economy]** Adjusted prices for aircraft to balance out some price inconsistencies.
|
* **[Economy]** Adjusted prices for aircraft to balance out some price inconsistencies.
|
||||||
* **[Factions]** Added more tankers to factions.
|
* **[Factions]** Added more tankers to factions.
|
||||||
|
|||||||
@ -20,6 +20,7 @@ class Settings:
|
|||||||
# Difficulty settings
|
# Difficulty settings
|
||||||
player_skill: str = "Good"
|
player_skill: str = "Good"
|
||||||
enemy_skill: str = "Average"
|
enemy_skill: str = "Average"
|
||||||
|
ai_pilot_levelling: bool = True
|
||||||
enemy_vehicle_skill: str = "Average"
|
enemy_vehicle_skill: str = "Average"
|
||||||
map_coalition_visibility: ForcedOptions.Views = ForcedOptions.Views.All
|
map_coalition_visibility: ForcedOptions.Views = ForcedOptions.Views.All
|
||||||
labels: str = "Full"
|
labels: str = "Full"
|
||||||
|
|||||||
@ -305,7 +305,10 @@ class AircraftConflictGenerator:
|
|||||||
current_level = levels.index(base_skill)
|
current_level = levels.index(base_skill)
|
||||||
missions_for_skill_increase = 4
|
missions_for_skill_increase = 4
|
||||||
increase = pilot.record.missions_flown // missions_for_skill_increase
|
increase = pilot.record.missions_flown // missions_for_skill_increase
|
||||||
new_level = min(current_level + increase, len(levels) - 1)
|
capped_increase = min(current_level + increase, len(levels) - 1)
|
||||||
|
new_level = (capped_increase, current_level)[
|
||||||
|
self.game.settings.ai_pilot_levelling
|
||||||
|
]
|
||||||
return levels[new_level]
|
return levels[new_level]
|
||||||
|
|
||||||
def set_skill(self, unit: FlyingUnit, pilot: Optional[Pilot], blue: bool) -> None:
|
def set_skill(self, unit: FlyingUnit, pilot: Optional[Pilot], blue: bool) -> None:
|
||||||
|
|||||||
@ -565,6 +565,23 @@ class QSettingsWindow(QDialog):
|
|||||||
general_layout.addWidget(squadron_replenishment_rate_label, 4, 0)
|
general_layout.addWidget(squadron_replenishment_rate_label, 4, 0)
|
||||||
general_layout.addWidget(squadron_replenishment_rate, 4, 1, Qt.AlignRight)
|
general_layout.addWidget(squadron_replenishment_rate, 4, 1, Qt.AlignRight)
|
||||||
|
|
||||||
|
ai_pilot_levelling = QCheckBox()
|
||||||
|
ai_pilot_levelling.setChecked(self.game.settings.ai_pilot_levelling)
|
||||||
|
ai_pilot_levelling.toggled.connect(self.applySettings)
|
||||||
|
|
||||||
|
ai_pilot_levelling_info = (
|
||||||
|
"Set whether or not AI pilots will level up after completing a number of"
|
||||||
|
" sorties. Since pilot level affects the AI skill, you may wish to disable"
|
||||||
|
" this, lest you face an Ace!"
|
||||||
|
)
|
||||||
|
|
||||||
|
ai_pilot_levelling.setToolTip(ai_pilot_levelling_info)
|
||||||
|
ai_pilot_levelling_label = QLabel("Allow AI pilot levelling")
|
||||||
|
ai_pilot_levelling_label.setToolTip(ai_pilot_levelling_info)
|
||||||
|
|
||||||
|
general_layout.addWidget(ai_pilot_levelling_label, 5, 0)
|
||||||
|
general_layout.addWidget(ai_pilot_levelling, 5, 1, Qt.AlignRight)
|
||||||
|
|
||||||
campaign_layout.addWidget(HqAutomationSettingsBox(self.game))
|
campaign_layout.addWidget(HqAutomationSettingsBox(self.game))
|
||||||
|
|
||||||
def initGeneratorLayout(self):
|
def initGeneratorLayout(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user