Introduce weighted distribution for random 2/3/4-ships

This commit is contained in:
Raffson
2023-02-26 14:03:22 +01:00
parent f2cebc82cc
commit ae379bd8f5
12 changed files with 77 additions and 8 deletions

View File

@@ -36,6 +36,7 @@ CAMPAIGN_MANAGEMENT_PAGE = "Campaign Management"
GENERAL_SECTION = "General"
PILOTS_AND_SQUADRONS_SECTION = "Pilots and Squadrons"
HQ_AUTOMATION_SECTION = "HQ Automation"
FLIGHT_PLANNER_AUTOMATION = "Flight Planner Automation"
MISSION_GENERATOR_PAGE = "Mission Generator"
@@ -310,6 +311,41 @@ class Settings:
),
)
# Flight Planner Automation
#: The weight used for 2-ships.
fpa_2ship_weight: int = bounded_int_option(
"2-ship weight factor (WF2)",
CAMPAIGN_MANAGEMENT_PAGE,
FLIGHT_PLANNER_AUTOMATION,
default=50,
min=0,
max=100,
detail=(
"Used as a distribution to randomize 2/3/4-ships for BARCAP, CAS, OCA & ANTI-SHIP flights. "
"The weight W_i is calculated according to the following formula: 

"
"W_i = WF_i / (WF2 + WF3 + WF4)"
),
)
#: The weight used for 3-ships.
fpa_3ship_weight: int = bounded_int_option(
"3-ship weight factor (WF3)",
CAMPAIGN_MANAGEMENT_PAGE,
FLIGHT_PLANNER_AUTOMATION,
default=35,
min=0,
max=100,
detail="See 2-ship weight factor (WF2)",
)
fpa_4ship_weight: int = bounded_int_option(
"4-ship weight factor (WF4)",
CAMPAIGN_MANAGEMENT_PAGE,
FLIGHT_PLANNER_AUTOMATION,
default=15,
min=0,
max=100,
detail="See 2-ship weight factor (WF2)",
)
# Mission Generator
# Gameplay
fast_forward_to_first_contact: bool = boolean_option(