diff --git a/MekHQ/data/scenariomodifiers/AlliedASFAce01.xml b/MekHQ/data/scenariomodifiers/AlliedASFAce01.xml index 325b963123..ca99a60949 100644 --- a/MekHQ/data/scenariomodifiers/AlliedASFAce01.xml +++ b/MekHQ/data/scenariomodifiers/AlliedASFAce01.xml @@ -1,6 +1,5 @@ - One of your employer's ASF Aces is close and is moving to support. Watch - and learn. + One of your employer's ASF Aces is close and is moving to support. Watch and learn. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/AlliedAirSupport.xml b/MekHQ/data/scenariomodifiers/AlliedAirSupport.xml index de8e555dd3..ae8d3c4a4b 100644 --- a/MekHQ/data/scenariomodifiers/AlliedAirSupport.xml +++ b/MekHQ/data/scenariomodifiers/AlliedAirSupport.xml @@ -8,9 +8,9 @@ -3 -3 false - false + true true - false + true false 5 diff --git a/MekHQ/data/scenariomodifiers/AlliedAirSupportBombers.xml b/MekHQ/data/scenariomodifiers/AlliedAirSupportBombers.xml index b6622dc792..7590d71659 100644 --- a/MekHQ/data/scenariomodifiers/AlliedAirSupportBombers.xml +++ b/MekHQ/data/scenariomodifiers/AlliedAirSupportBombers.xml @@ -8,9 +8,9 @@ -3 -3 false - false + true true - false + true false 5 diff --git a/MekHQ/data/scenariomodifiers/AlliedArtyGarrison.xml b/MekHQ/data/scenariomodifiers/AlliedArtyGarrison.xml index b05c1c5784..98aa708094 100644 --- a/MekHQ/data/scenariomodifiers/AlliedArtyGarrison.xml +++ b/MekHQ/data/scenariomodifiers/AlliedArtyGarrison.xml @@ -1,6 +1,5 @@ - This facility is defended by an additional force of allied artillery who - have been unable to clear the area. + This facility is defended by an additional force of allied artillery who have been unable to clear the area. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/AlliedArtySupport.xml b/MekHQ/data/scenariomodifiers/AlliedArtySupport.xml index 98759955b0..d5b58f4a28 100644 --- a/MekHQ/data/scenariomodifiers/AlliedArtySupport.xml +++ b/MekHQ/data/scenariomodifiers/AlliedArtySupport.xml @@ -12,9 +12,9 @@ 1 0 false - false + true false - false + true true 9 diff --git a/MekHQ/data/scenariomodifiers/AlliedGroundSupport.xml b/MekHQ/data/scenariomodifiers/AlliedGroundSupport.xml index bce75007e8..c345cef2ba 100644 --- a/MekHQ/data/scenariomodifiers/AlliedGroundSupport.xml +++ b/MekHQ/data/scenariomodifiers/AlliedGroundSupport.xml @@ -14,7 +14,7 @@ true false true - true + false 1 2 @@ -30,7 +30,7 @@ -1 1 1.0 - Allied Ground Reinforcements + Ground Reinforcements 3 3 4 diff --git a/MekHQ/data/scenariomodifiers/AlliedHorseCav.xml b/MekHQ/data/scenariomodifiers/AlliedHorseCav.xml index 4aea460fd6..6f4d2d4193 100644 --- a/MekHQ/data/scenariomodifiers/AlliedHorseCav.xml +++ b/MekHQ/data/scenariomodifiers/AlliedHorseCav.xml @@ -1,6 +1,5 @@ - From half a league onward a Mercenary Light Brigade of Horse Cavalry rides - into the valley of death to assist. + From half a league onward a Mercenary Light Brigade of Horse Cavalry rides into the valley of death to assist. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/AlliedMekAceCRD.xml b/MekHQ/data/scenariomodifiers/AlliedMekAceCRD.xml index 4977a83191..834c558324 100644 --- a/MekHQ/data/scenariomodifiers/AlliedMekAceCRD.xml +++ b/MekHQ/data/scenariomodifiers/AlliedMekAceCRD.xml @@ -1,6 +1,5 @@ - One of your employer's Aces is close and is moving to support. Watch and - learn. + One of your employer's Aces is close and is moving to support. Watch and learn. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/AlliedMekAceGLT.xml b/MekHQ/data/scenariomodifiers/AlliedMekAceGLT.xml index be9a12f710..2bd55edba6 100644 --- a/MekHQ/data/scenariomodifiers/AlliedMekAceGLT.xml +++ b/MekHQ/data/scenariomodifiers/AlliedMekAceGLT.xml @@ -1,6 +1,5 @@ - One of your employer's Aces is close and is moving to support. Watch and - learn. + One of your employer's Aces is close and is moving to support. Watch and learn. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/AlliedMekAceGOL.xml b/MekHQ/data/scenariomodifiers/AlliedMekAceGOL.xml index 266ed0239f..4431784250 100644 --- a/MekHQ/data/scenariomodifiers/AlliedMekAceGOL.xml +++ b/MekHQ/data/scenariomodifiers/AlliedMekAceGOL.xml @@ -1,6 +1,5 @@ - One of your employer's Aces is close and is moving to support. Watch and - learn. + One of your employer's Aces is close and is moving to support. Watch and learn. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/AlliedMekAceOTT.xml b/MekHQ/data/scenariomodifiers/AlliedMekAceOTT.xml index 86377b08b9..56c6ded9e5 100644 --- a/MekHQ/data/scenariomodifiers/AlliedMekAceOTT.xml +++ b/MekHQ/data/scenariomodifiers/AlliedMekAceOTT.xml @@ -1,6 +1,5 @@ - One of your employer's Aces is close and is moving to support. Watch and - learn. + One of your employer's Aces is close and is moving to support. Watch and learn. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/AlliedMekAceTBT.xml b/MekHQ/data/scenariomodifiers/AlliedMekAceTBT.xml index 056194904f..1ec218702b 100644 --- a/MekHQ/data/scenariomodifiers/AlliedMekAceTBT.xml +++ b/MekHQ/data/scenariomodifiers/AlliedMekAceTBT.xml @@ -1,6 +1,5 @@ - One of your employer's Aces is close and is moving to support. Watch and - learn. + One of your employer's Aces is close and is moving to support. Watch and learn. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/AlliedMekGarrison.xml b/MekHQ/data/scenariomodifiers/AlliedMekGarrison.xml index c673ac0b72..5a533ee242 100644 --- a/MekHQ/data/scenariomodifiers/AlliedMekGarrison.xml +++ b/MekHQ/data/scenariomodifiers/AlliedMekGarrison.xml @@ -1,6 +1,5 @@ - This facility is guarded by a lance of allied meks who will fight - alongside us in its defense. + This facility is guarded by a lance of allied meks who will fight alongside us in its defense. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/AlliedReinforcements.xml b/MekHQ/data/scenariomodifiers/AlliedReinforcements.xml index 45d99ec2b5..12c65bd438 100644 --- a/MekHQ/data/scenariomodifiers/AlliedReinforcements.xml +++ b/MekHQ/data/scenariomodifiers/AlliedReinforcements.xml @@ -14,7 +14,7 @@ true false true - true + false 1 2 diff --git a/MekHQ/data/scenariomodifiers/AlliedTankGarrison.xml b/MekHQ/data/scenariomodifiers/AlliedTankGarrison.xml index 13fd623c68..76fae9341f 100644 --- a/MekHQ/data/scenariomodifiers/AlliedTankGarrison.xml +++ b/MekHQ/data/scenariomodifiers/AlliedTankGarrison.xml @@ -1,6 +1,5 @@ - This facility has a garrison of tanks, which will fight alongside your - force in the facility's defense. + This facility has a garrison of tanks, which will fight alongside your force in the facility's defense. AllGroundTerrain SpecificGroundTerrain @@ -15,7 +14,7 @@ false true true - false + true false 10 diff --git a/MekHQ/data/scenariomodifiers/AlliedTankReinforcements.xml b/MekHQ/data/scenariomodifiers/AlliedTankReinforcements.xml index 8d75d6a55b..8f176c8304 100644 --- a/MekHQ/data/scenariomodifiers/AlliedTankReinforcements.xml +++ b/MekHQ/data/scenariomodifiers/AlliedTankReinforcements.xml @@ -14,7 +14,7 @@ true false true - true + false 1 2 diff --git a/MekHQ/data/scenariomodifiers/AlliedTraineesAir.xml b/MekHQ/data/scenariomodifiers/AlliedTraineesAir.xml index db2e5066da..12d891360b 100644 --- a/MekHQ/data/scenariomodifiers/AlliedTraineesAir.xml +++ b/MekHQ/data/scenariomodifiers/AlliedTraineesAir.xml @@ -12,7 +12,7 @@ 9 0 false - false + true true true false diff --git a/MekHQ/data/scenariomodifiers/AlliedTraineesGround.xml b/MekHQ/data/scenariomodifiers/AlliedTraineesGround.xml index e737c65792..541eb29e03 100644 --- a/MekHQ/data/scenariomodifiers/AlliedTraineesGround.xml +++ b/MekHQ/data/scenariomodifiers/AlliedTraineesGround.xml @@ -12,7 +12,7 @@ 0 0 false - false + true true true false diff --git a/MekHQ/data/scenariomodifiers/AlliedTurrets.xml b/MekHQ/data/scenariomodifiers/AlliedTurrets.xml index 7545645791..abd0088b43 100644 --- a/MekHQ/data/scenariomodifiers/AlliedTurrets.xml +++ b/MekHQ/data/scenariomodifiers/AlliedTurrets.xml @@ -14,7 +14,7 @@ false true true - false + true 10 diff --git a/MekHQ/data/scenariomodifiers/BadIntelAir.xml b/MekHQ/data/scenariomodifiers/BadIntelAir.xml index bccd0e236d..d35f1c06e6 100644 --- a/MekHQ/data/scenariomodifiers/BadIntelAir.xml +++ b/MekHQ/data/scenariomodifiers/BadIntelAir.xml @@ -1,6 +1,5 @@ - Recon underestimated enemy strength, and additional enemy units are - present. + Recon underestimated enemy strength, and additional enemy units are present. false PostForceGeneration diff --git a/MekHQ/data/scenariomodifiers/BadIntelGround.xml b/MekHQ/data/scenariomodifiers/BadIntelGround.xml index 62ca046b03..4d57f9fb89 100644 --- a/MekHQ/data/scenariomodifiers/BadIntelGround.xml +++ b/MekHQ/data/scenariomodifiers/BadIntelGround.xml @@ -1,6 +1,5 @@ - Recon underestimated enemy strength, and additional enemy units are - present. + Recon underestimated enemy strength, and additional enemy units are present. AllGroundTerrain SpecificGroundTerrain @@ -31,7 +30,7 @@ -1 2 1.0 - Additional Ground Units + Additional OpFor 3 3 4 diff --git a/MekHQ/data/scenariomodifiers/EnemyAirCav.xml b/MekHQ/data/scenariomodifiers/EnemyAirCav.xml index e0e648bbaf..5f5fd884ba 100644 --- a/MekHQ/data/scenariomodifiers/EnemyAirCav.xml +++ b/MekHQ/data/scenariomodifiers/EnemyAirCav.xml @@ -1,6 +1,5 @@ - A force of enemy VTOLs coming in low over the horizon. Don't let this be - the apocalypse. + A force of enemy VTOLs coming in low over the horizon. Don't let this be the apocalypse. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/EnemyAirSupportBombers.xml b/MekHQ/data/scenariomodifiers/EnemyAirSupportBombers.xml index 956ac5b0dd..725b949f2f 100644 --- a/MekHQ/data/scenariomodifiers/EnemyAirSupportBombers.xml +++ b/MekHQ/data/scenariomodifiers/EnemyAirSupportBombers.xml @@ -1,6 +1,5 @@ - Enemy aircraft detected on approach and will arrive shortly after the - start of the battle. + Enemy aircraft detected on approach and will arrive shortly after the start of the battle. false PostForceGeneration diff --git a/MekHQ/data/scenariomodifiers/EnemyArtyGarrison.xml b/MekHQ/data/scenariomodifiers/EnemyArtyGarrison.xml index 1e566ca4df..261f739cb2 100644 --- a/MekHQ/data/scenariomodifiers/EnemyArtyGarrison.xml +++ b/MekHQ/data/scenariomodifiers/EnemyArtyGarrison.xml @@ -1,6 +1,5 @@ - This facility is defended by an additional force of enemy artillery who - have been unable to clear the area. + This facility is defended by an additional force of enemy artillery who have been unable to clear the area. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/EnemyHotDrop.xml b/MekHQ/data/scenariomodifiers/EnemyHotDrop.xml index 92062d9ca1..8b735f4f3b 100644 --- a/MekHQ/data/scenariomodifiers/EnemyHotDrop.xml +++ b/MekHQ/data/scenariomodifiers/EnemyHotDrop.xml @@ -1,6 +1,5 @@ - Enemy DropShip has been detected in the area. Telemetry indicates it's at - least partially loaded. Expect additional hostile units to be deployed via airdrop. + Enemy DropShip has been detected in the area. Telemetry indicates it's at least partially loaded. Expect additional hostile units to be deployed via airdrop. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/EnemyMercBrawl.xml b/MekHQ/data/scenariomodifiers/EnemyMercBrawl.xml index fda97b1f7e..50dbf32744 100644 --- a/MekHQ/data/scenariomodifiers/EnemyMercBrawl.xml +++ b/MekHQ/data/scenariomodifiers/EnemyMercBrawl.xml @@ -1,6 +1,5 @@ - The Enemy has hired a Mercenary Brawler Lance with veteran markings. - Beware. + The Enemy has hired a Mercenary Brawler Lance with veteran markings. Beware. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/EnemyMercFireSupport.xml b/MekHQ/data/scenariomodifiers/EnemyMercFireSupport.xml index 597c1e9faf..d53245c075 100644 --- a/MekHQ/data/scenariomodifiers/EnemyMercFireSupport.xml +++ b/MekHQ/data/scenariomodifiers/EnemyMercFireSupport.xml @@ -1,6 +1,5 @@ - The Enemy has hired a Mercenary Fire Support Lance with veteran markings. - Keep your head down. + The Enemy has hired a Mercenary Fire Support Lance with veteran markings. Keep your head down. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/EnemyMercHopInfantry.xml b/MekHQ/data/scenariomodifiers/EnemyMercHopInfantry.xml index 7076561d79..3ce3b35880 100644 --- a/MekHQ/data/scenariomodifiers/EnemyMercHopInfantry.xml +++ b/MekHQ/data/scenariomodifiers/EnemyMercHopInfantry.xml @@ -1,6 +1,5 @@ - A horn heralds the arrival of an Enemy unit of Coventry Kangaroo Cavalry. - Beware. + A horn heralds the arrival of an Enemy unit of Coventry Kangaroo Cavalry. Beware. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/EnemyMercSkirmish.xml b/MekHQ/data/scenariomodifiers/EnemyMercSkirmish.xml index c9ff7f018c..7ee9365480 100644 --- a/MekHQ/data/scenariomodifiers/EnemyMercSkirmish.xml +++ b/MekHQ/data/scenariomodifiers/EnemyMercSkirmish.xml @@ -1,6 +1,5 @@ - OpFor Mercenary Skirmishers with veteran markings are in the area. Don't - get flanked. + OpFor Mercenary Skirmishers with veteran markings are in the area. Don't get flanked. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/EnemyMercSkyInfantry.xml b/MekHQ/data/scenariomodifiers/EnemyMercSkyInfantry.xml index 63a2ae302c..8f7eb11df9 100644 --- a/MekHQ/data/scenariomodifiers/EnemyMercSkyInfantry.xml +++ b/MekHQ/data/scenariomodifiers/EnemyMercSkyInfantry.xml @@ -1,6 +1,5 @@ - The flap of leathery wings announces the arrival of an Enemy unit of - Branth Sky Infantry. Beware. + The flap of leathery wings announces the arrival of an Enemy unit of Branth Sky Infantry. Beware. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/FacilityAlliedEvac.xml b/MekHQ/data/scenariomodifiers/FacilityAlliedEvac.xml index 5e4e9f99d4..e09500965a 100644 --- a/MekHQ/data/scenariomodifiers/FacilityAlliedEvac.xml +++ b/MekHQ/data/scenariomodifiers/FacilityAlliedEvac.xml @@ -10,7 +10,7 @@ true true true - false + true false 10 diff --git a/MekHQ/data/scenariomodifiers/FacilityHostileCapture.xml b/MekHQ/data/scenariomodifiers/FacilityHostileCapture.xml index 87831a2bac..287f5b404f 100644 --- a/MekHQ/data/scenariomodifiers/FacilityHostileCapture.xml +++ b/MekHQ/data/scenariomodifiers/FacilityHostileCapture.xml @@ -1,6 +1,5 @@ - This facility must be captured: 75% of the designated buildings must - remain intact. + This facility must be captured: 75% of the designated buildings must remain intact. false PostForceGeneration Capture @@ -27,8 +26,7 @@ Crippled turrets are considered intact for the purposes of this objective. - Leave intact the following force(s) and unit(s) to be able to take control of - this facility: + Leave intact the following force(s) and unit(s) to be able to take control of this facility: NONE Preserve 75 diff --git a/MekHQ/data/scenariomodifiers/FacilityHostileCaptureNonWin.xml b/MekHQ/data/scenariomodifiers/FacilityHostileCaptureNonWin.xml index 2db795ba18..04b689511e 100644 --- a/MekHQ/data/scenariomodifiers/FacilityHostileCaptureNonWin.xml +++ b/MekHQ/data/scenariomodifiers/FacilityHostileCaptureNonWin.xml @@ -1,6 +1,5 @@ - This facility can be captured if 75% of the designated buildings remain - intact with 75% of the hostile forces destroyed, crippled or forced to withdraw. + This facility can be captured if 75% of the designated buildings remain intact with 75% of the hostile forces destroyed, crippled or forced to withdraw. false PostForceGeneration Capture @@ -27,8 +26,7 @@ Crippled turrets are considered intact for the purposes of this objective. - Leave intact at least 75% of the following force(s) and unit(s) in order to be - able to take control of this facility: + Leave intact at least 75% of the following force(s) and unit(s) in order to be able to take control of this facility: NONE Preserve 75 @@ -56,8 +54,7 @@ - Destroy, cripple or force the withdrawal of 75% of the following force(s) and - unit(s) to take control of the facility: + Destroy, cripple or force the withdrawal of 75% of the following force(s) and unit(s) to take control of the facility: NONE ForceWithdraw 75 diff --git a/MekHQ/data/scenariomodifiers/GoodIntel.xml b/MekHQ/data/scenariomodifiers/GoodIntel.xml index 105b054f8c..8a88486f70 100644 --- a/MekHQ/data/scenariomodifiers/GoodIntel.xml +++ b/MekHQ/data/scenariomodifiers/GoodIntel.xml @@ -1,6 +1,5 @@ - Recon over-estimated enemy strength. A group of enemy units are not - present. + Recon over-estimated enemy strength. A group of enemy units are not present. true PostForceGeneration Opposing diff --git a/MekHQ/data/scenariomodifiers/GroundedEnemyDropship.xml b/MekHQ/data/scenariomodifiers/GroundedEnemyDropship.xml index 3e35036b9a..6f6d6efe50 100644 --- a/MekHQ/data/scenariomodifiers/GroundedEnemyDropship.xml +++ b/MekHQ/data/scenariomodifiers/GroundedEnemyDropship.xml @@ -1,6 +1,5 @@ - An enemy DropShip has been grounded in this area, but its weapons are - still active so pay attention. + An enemy DropShip has been grounded in this area, but its weapons are still active so pay attention. AllGroundTerrain SpecificGroundTerrain diff --git a/MekHQ/data/scenariomodifiers/HostileBVBudgetIncrease.xml b/MekHQ/data/scenariomodifiers/HostileBVBudgetIncrease.xml index 3cef85d903..af5e67ce5f 100644 --- a/MekHQ/data/scenariomodifiers/HostileBVBudgetIncrease.xml +++ b/MekHQ/data/scenariomodifiers/HostileBVBudgetIncrease.xml @@ -1,6 +1,5 @@ - Local coordination has allowed the opposition to deploy a larger force to - respond to your presence. + Local coordination has allowed the opposition to deploy a larger force to respond to your presence. false PreForceGeneration Opposing diff --git a/MekHQ/data/scenariomodifiers/PreBattleDamageAllies.xml b/MekHQ/data/scenariomodifiers/PreBattleDamageAllies.xml index 0c63c83c4b..975daf8995 100644 --- a/MekHQ/data/scenariomodifiers/PreBattleDamageAllies.xml +++ b/MekHQ/data/scenariomodifiers/PreBattleDamageAllies.xml @@ -1,6 +1,5 @@ - The allied units have not been fully repaired from their previous - engagement. + The allied units have not been fully repaired from their previous engagement. false PostForceGeneration Allied diff --git a/MekHQ/data/scenariomodifiers/PreBattleDamageHostiles.xml b/MekHQ/data/scenariomodifiers/PreBattleDamageHostiles.xml index 92114b111b..04aef57678 100644 --- a/MekHQ/data/scenariomodifiers/PreBattleDamageHostiles.xml +++ b/MekHQ/data/scenariomodifiers/PreBattleDamageHostiles.xml @@ -1,6 +1,5 @@ - The hostile force appears to have suffered some minor battle damage in a - previous engagement. + The hostile force appears to have suffered some minor battle damage in a previous engagement. true PostForceGeneration Opposing diff --git a/MekHQ/data/scenariomodifiers/PrimaryAlliesAir.xml b/MekHQ/data/scenariomodifiers/PrimaryAlliesAir.xml index a2442fdb89..ebffd711bc 100644 --- a/MekHQ/data/scenariomodifiers/PrimaryAlliesAir.xml +++ b/MekHQ/data/scenariomodifiers/PrimaryAlliesAir.xml @@ -1,6 +1,5 @@ - To compensate for the presence of a large opposing force, allied units - will be working alongside us on this operation. + To compensate for the presence of a large opposing force, allied units will be working alongside us on this operation. true PreForceGeneration @@ -11,7 +10,7 @@ false false true - true + false false 5 diff --git a/MekHQ/data/scenariomodifiers/PrimaryAlliesGround.xml b/MekHQ/data/scenariomodifiers/PrimaryAlliesGround.xml index f28d37da7c..893eb6e609 100644 --- a/MekHQ/data/scenariomodifiers/PrimaryAlliesGround.xml +++ b/MekHQ/data/scenariomodifiers/PrimaryAlliesGround.xml @@ -1,6 +1,5 @@ - To compensate for the presence of a large opposing force, allied units - will be working alongside us on this operation. + To compensate for the presence of a large opposing force, allied units will be working alongside us on this operation. AllGroundTerrain SpecificGroundTerrain @@ -15,7 +14,7 @@ false false true - true + false false 5 diff --git a/MekHQ/data/scenariomodifiers/airBattleModifiers.xml b/MekHQ/data/scenariomodifiers/airBattleModifiers.xml index a07eb9040c..7ea90faecf 100644 --- a/MekHQ/data/scenariomodifiers/airBattleModifiers.xml +++ b/MekHQ/data/scenariomodifiers/airBattleModifiers.xml @@ -74,7 +74,7 @@ EnemyAirPatrol.xml - + diff --git a/MekHQ/data/scenariomodifiers/groundBattleModifiers.xml b/MekHQ/data/scenariomodifiers/groundBattleModifiers.xml index d1603fa81a..4ca3b24a95 100644 --- a/MekHQ/data/scenariomodifiers/groundBattleModifiers.xml +++ b/MekHQ/data/scenariomodifiers/groundBattleModifiers.xml @@ -159,7 +159,7 @@ EnemyMekPatrol.xml - + EnemyAirCav.xml EnemyAirMobileInf.xml - + AlliedOfficerMek.xml @@ -228,20 +228,20 @@ AlliedHorseCav.xml - + EnemyFieldArtyCrack.xml EnemyFieldArtyOffboard.xml - + diff --git a/MekHQ/data/scenariotemplates/DropShip Raid.xml b/MekHQ/data/scenariotemplates/DropShip Raid.xml index 4e47d0648d..9e6c850c2d 100644 --- a/MekHQ/data/scenariotemplates/DropShip Raid.xml +++ b/MekHQ/data/scenariotemplates/DropShip Raid.xml @@ -106,7 +106,7 @@ 2 1.0 DropShip - 2 + 3 3 4 0 diff --git a/MekHQ/data/scenariotemplates/Frontline Disruption.xml b/MekHQ/data/scenariotemplates/Frontline Disruption.xml index 101a7fbee6..ab2cb87a4e 100644 --- a/MekHQ/data/scenariotemplates/Frontline Disruption.xml +++ b/MekHQ/data/scenariotemplates/Frontline Disruption.xml @@ -129,9 +129,7 @@ - Destroy 50% of the following force(s) and unit(s) before they can reach the - destination - edge: + Destroy 50% of the following force(s) and unit(s) before they can reach the destination edge: NONE Destroy 50 diff --git a/MekHQ/data/scenariotemplates/Heavy Recon Evasion.xml b/MekHQ/data/scenariotemplates/Heavy Recon Evasion.xml index 6317b7649c..7bfb2977d1 100644 --- a/MekHQ/data/scenariotemplates/Heavy Recon Evasion.xml +++ b/MekHQ/data/scenariotemplates/Heavy Recon Evasion.xml @@ -89,67 +89,6 @@ - - - OpFor - - - - - ScenarioVictory - Fixed - 1 - - - - - ScenarioDefeat - Fixed - 1 - - - - Scans may be conducted by moving a unit within three hexes of the - target and foregoing all attacks. - Any kind of probe, improved sensors quirk or sensor geek SPA - extends the range to five hexes, and the unit may attack as normal. - Note: This objective should be tracked manually outside of - MegaMek. - - Scan the following enemy unit(s) and force(s): - NONE - Custom - 100 - true - None - - - - OpFor - - - - - ScenarioVictory - Fixed - 1 - - - - - ScenarioDefeat - Fixed - 1 - - - - Destroy or rout 50% of the following force(s) and unit(s): - NONE - ForceWithdraw - 50 - true - None - Player @@ -174,8 +113,9 @@ NONE Preserve 50 - true - None + false + 2 + ScaledToPrimaryUnitCount diff --git a/MekHQ/resources/mekhq/resources/AtBDynamicScenarioFactory.properties b/MekHQ/resources/mekhq/resources/AtBDynamicScenarioFactory.properties index 8cf97009ce..0cc7c2b92b 100644 --- a/MekHQ/resources/mekhq/resources/AtBDynamicScenarioFactory.properties +++ b/MekHQ/resources/mekhq/resources/AtBDynamicScenarioFactory.properties @@ -1,9 +1,7 @@ # reportResultsOfBidding -bidAwayForcesVerbose.text=%s (%s/%s) has bid away the following forces:

%s
-bidAwayForcesLogger.text=%s (%s/%s) has bid away the following forces: -bidAwayForces.text=%s (%s/%s) has bid away %s unit%s. -nothingBidAway.text=%s (%s/%s) has not bid away any forces.
-addedBattleArmorNewReport.text=%s (%s/%s) has supplemented their force with %s additional unit%s of Battle Armor. +bidAwayForcesVerbose.text=%s has bid away the following forces:
%s +bidAwayForcesLogger.text=%s has bid away the following forces: +bidAwayForces.text=%s has bid away %s unit%s. +nothingBidAway.text=%s has not bid away any forces. +addedBattleArmorNewReport.text=%s supplemented their force with %s additional unit%s of Battle Armor. addedBattleArmorContinueReport.text=
They also supplemented their force with %s additional unit%s of Battle Armor. -batchallConcludedVersion1.text=

"Bargained Well and Done."
-batchallConcludedVersion2.text=

"Well-Bargained and Done."
diff --git a/MekHQ/src/mekhq/campaign/Campaign.java b/MekHQ/src/mekhq/campaign/Campaign.java index c14e3e0a16..5de9ee16af 100644 --- a/MekHQ/src/mekhq/campaign/Campaign.java +++ b/MekHQ/src/mekhq/campaign/Campaign.java @@ -3746,9 +3746,11 @@ private void processNewDayATB() { } } + processNewDayATBScenarios(); + for (AtBContract contract : getActiveAtBContracts()) { if (campaignOptions.isUseGenericBattleValue()) { - if (contract.getStartDate().equals(getLocalDate()) && getLocation().isOnPlanet()) { + if (contract.getStartDate().equals(getLocalDate())) { if (getCampaignOptions().isUseGenericBattleValue() && BatchallFactions.usesBatchalls(contract.getEnemyCode())) { contract.setBatchallAccepted(contract.initiateBatchall(this)); @@ -3756,8 +3758,6 @@ private void processNewDayATB() { } } } - - processNewDayATBScenarios(); } /** diff --git a/MekHQ/src/mekhq/campaign/againstTheBot/AtBConfiguration.java b/MekHQ/src/mekhq/campaign/againstTheBot/AtBConfiguration.java index bed12b063e..b6a9d75a17 100644 --- a/MekHQ/src/mekhq/campaign/againstTheBot/AtBConfiguration.java +++ b/MekHQ/src/mekhq/campaign/againstTheBot/AtBConfiguration.java @@ -25,7 +25,6 @@ import megamek.common.annotations.Nullable; import megamek.logging.MMLogger; import mekhq.MekHQ; -import mekhq.utilities.MHQXMLUtility; import mekhq.campaign.Campaign; import mekhq.campaign.finances.Money; import mekhq.campaign.personnel.Person; @@ -33,6 +32,7 @@ import mekhq.campaign.personnel.enums.PersonnelRole; import mekhq.campaign.rating.IUnitRating; import mekhq.campaign.universe.Faction; +import mekhq.utilities.MHQXMLUtility; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -189,21 +189,13 @@ public int weightClassIndex(int entityWeightClass) { } public int weightClassIndex(String wc) { - switch (wc) { - case "L": - case "UL": - return 0; - case "M": - return 1; - case "H": - return 2; - case "A": - case "C": - case "SH": - return 3; - default: - throw new IllegalArgumentException("Could not parse weight class " + wc); - } + return switch (wc) { + case "L", "UL" -> 0; + case "M" -> 1; + case "H" -> 2; + case "A", "C", "SH" -> 3; + default -> throw new IllegalArgumentException("Could not parse weight class " + wc); + }; } public @Nullable String selectBotLances(String org, int weightClass) { @@ -273,22 +265,15 @@ public int weightClassIndex(String wc) { * weight class */ public static int decodeWeightStr(String s, int i) { - switch (s.charAt(i)) { - case WEIGHT_ULTRA_LIGHT: - return EntityWeightClass.WEIGHT_ULTRA_LIGHT; - case WEIGHT_LIGHT: - return EntityWeightClass.WEIGHT_LIGHT; - case WEIGHT_MEDIUM: - return EntityWeightClass.WEIGHT_MEDIUM; - case WEIGHT_HEAVY: - return EntityWeightClass.WEIGHT_HEAVY; - case WEIGHT_ASSAULT: - return EntityWeightClass.WEIGHT_ASSAULT; - case WEIGHT_SUPER_HEAVY: - return EntityWeightClass.WEIGHT_SUPER_HEAVY; - default: - return 0; - } + return switch (s.charAt(i)) { + case WEIGHT_ULTRA_LIGHT -> EntityWeightClass.WEIGHT_ULTRA_LIGHT; + case WEIGHT_LIGHT -> EntityWeightClass.WEIGHT_LIGHT; + case WEIGHT_MEDIUM -> EntityWeightClass.WEIGHT_MEDIUM; + case WEIGHT_HEAVY -> EntityWeightClass.WEIGHT_HEAVY; + case WEIGHT_ASSAULT -> EntityWeightClass.WEIGHT_ASSAULT; + case WEIGHT_SUPER_HEAVY -> EntityWeightClass.WEIGHT_SUPER_HEAVY; + default -> 0; + }; } public static String getParentFactionType(final Faction faction) { @@ -318,16 +303,12 @@ public Money shipSearchCostPerWeek() { } public @Nullable Integer shipSearchTargetBase(int unitType) { - switch (unitType) { - case UnitType.DROPSHIP: - return dropshipSearchTarget; - case UnitType.JUMPSHIP: - return jumpshipSearchTarget; - case UnitType.WARSHIP: - return warshipSearchTarget; - default: - return null; - } + return switch (unitType) { + case UnitType.DROPSHIP -> dropshipSearchTarget; + case UnitType.JUMPSHIP -> jumpshipSearchTarget; + case UnitType.WARSHIP -> warshipSearchTarget; + default -> null; + }; } public TargetRoll shipSearchTargetRoll(int unitType, Campaign campaign) { diff --git a/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java b/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java index 22a1970890..534fd6ca72 100644 --- a/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java +++ b/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java @@ -32,9 +32,7 @@ import megamek.common.enums.SkillLevel; import megamek.common.icons.Camouflage; import megamek.common.planetaryconditions.Atmosphere; -import megamek.common.util.fileUtils.MegaMekFile; import megamek.logging.MMLogger; -import megamek.utilities.BoardClassifier; import mekhq.MHQConstants; import mekhq.MekHQ; import mekhq.campaign.Campaign; @@ -244,6 +242,7 @@ public static void finalizeScenario(AtBDynamicScenario scenario, AtBContract con * @return How many "lances" or other individual units were generated? */ private static int generateForces(AtBDynamicScenario scenario, AtBContract contract, Campaign campaign) { + logger.info(String.format("GENERATING FORCES FOR: %s", scenario.getName().toUpperCase())); int generatedLanceCount = 0; List forceTemplates = scenario.getTemplate().getAllScenarioForces(); @@ -269,6 +268,11 @@ private static int generateForces(AtBDynamicScenario scenario, AtBContract contr // generate all forces in a specific order level taking into account previously // generated but not current order levels. // recalculate effective BV and unit count each time we change levels + + // how close to the allowances do we want to get? + int targetPercentage = 100 + ((Compute.randomInt(8) - 3) * 5); + logger.info(String.format("Target Percentage: %s", targetPercentage)); + for (int generationOrder : generationOrders) { List currentForceTemplates = orderedForceTemplates.get(generationOrder); effectiveBV = calculateEffectiveBV(scenario, campaign, false); @@ -434,14 +438,16 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac int forceBVBudget = (int) (effectiveBV * forceTemplate.getForceMultiplier()); if (isScenarioModifier) { - forceBVBudget = (int) (forceBVBudget * ((double) campaign.getCampaignOptions().getScenarioModBV() / 100) * forceTemplate.getForceMultiplier()); + forceBVBudget = (int) (forceBVBudget * ((double) campaign.getCampaignOptions().getScenarioModBV() / 100) + * forceTemplate.getForceMultiplier()); } int forceUnitBudget = 0; if (forceTemplate.getGenerationMethod() == ForceGenerationMethod.UnitCountScaled.ordinal()) { forceUnitBudget = (int) (effectiveUnitCount * forceTemplate.getForceMultiplier()); - } else if ((forceTemplate.getGenerationMethod() == ForceGenerationMethod.FixedUnitCount.ordinal()) || (forceTemplate.getGenerationMethod() == ForceGenerationMethod.PlayerOrFixedUnitCount.ordinal())) { + } else if ((forceTemplate.getGenerationMethod() == ForceGenerationMethod.FixedUnitCount.ordinal()) + || (forceTemplate.getGenerationMethod() == ForceGenerationMethod.PlayerOrFixedUnitCount.ordinal())) { forceUnitBudget = forceTemplate.getFixedUnitCount() == ScenarioForceTemplate.FIXED_UNIT_SIZE_LANCE ? lanceSize : forceTemplate.getFixedUnitCount(); } @@ -450,35 +456,46 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac boolean isLowPressure = false; boolean isTainted = false; boolean allowsConvInfantry = true; + boolean allowsBattleArmor = true; boolean allowsTanks = true; - if (scenario.getAtmosphere().isLighterThan(Atmosphere.THIN)) { - isLowPressure = true; - allowsTanks = false; - } else { - mekhq.campaign.universe.Atmosphere specific_atmosphere = contract.getSystem().getPrimaryPlanet().getAtmosphere(currentDate); - switch (specific_atmosphere) { - case TOXICPOISON: - case TOXICCAUSTIC: - allowsConvInfantry = false; - allowsTanks = false; - break; - case TAINTEDPOISON: - case TAINTEDCAUSTIC: - isTainted = true; - break; - default: - break; + + if (campaign.getCampaignOptions().isUsePlanetaryModifiers()) { + if (scenario.getAtmosphere().isLighterThan(Atmosphere.THIN)) { + isLowPressure = true; + allowsTanks = false; + } else { + mekhq.campaign.universe.Atmosphere specific_atmosphere = + contract.getSystem().getPrimaryPlanet().getAtmosphere(currentDate); + + switch (specific_atmosphere) { + case TOXICPOISON: + case TOXICCAUSTIC: + allowsConvInfantry = false; + allowsTanks = false; + break; + case TAINTEDPOISON: + case TAINTEDCAUSTIC: + isTainted = true; + break; + default: + break; + } } - } - if (scenario.getWind().isTornadoF1ToF3() || scenario.getWind().isTornadoF4()) { - allowsConvInfantry = false; - if (scenario.getWind().isTornadoF4()) { + + if (scenario.getGravity() <= 0.2) { allowsTanks = false; + isLowGravity = true; } } - if (scenario.getGravity() <= 0.2) { - allowsTanks = false; - isLowGravity = true; + + if (campaign.getCampaignOptions().isUseWeatherConditions()) { + if (scenario.getWind().isTornadoF1ToF3() || scenario.getWind().isTornadoF4()) { + allowsConvInfantry = false; + if (scenario.getWind().isTornadoF4()) { + allowsTanks = false; + allowsBattleArmor = false; + } + } } // Required roles for units in this force. Because these can vary by unit type, @@ -551,9 +568,6 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac boolean stopGenerating = false; String currentLanceWeightString = ""; - // how close to the BV allowance do we want to get? - int targetPercentage = 100 + ((Compute.randomInt(8) - 3) * 5); - // Generate a tactical formation (lance/star/etc.) until the BV or unit count // limits are exceeded while (!stopGenerating) { @@ -584,56 +598,72 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac } // If there are no weight classes available, something went wrong so don't - // bother trying - // to generate units + // bother trying to generate units if (currentLanceWeightString == null) { generatedLance = new ArrayList<>(); + } else { // Hazardous conditions may prohibit deploying infantry or vehicles - } else if ((actualUnitType == UnitType.INFANTRY && !allowsConvInfantry) || (actualUnitType == UnitType.TANK && !allowsTanks)) { - generatedLance = new ArrayList<>(); - logger.warn(String.format("Skipping generation of unit type %s due to hostile conditions.", UnitType.getTypeName(actualUnitType))); + if ((actualUnitType == UnitType.INFANTRY && !allowsConvInfantry) + || (actualUnitType == UnitType.BATTLE_ARMOR && !allowsBattleArmor)) { + logger.warn("Unable to generate Infantry due to hostile conditions." + + " Switching to Tank."); + actualUnitType = UnitType.TANK; + } + + if (actualUnitType == UnitType.TANK && !allowsTanks) { + logger.warn("Unable to generate Tank due to hostile conditions." + + " Switching to Mek."); + actualUnitType = UnitType.MEK; + } // Gun emplacements use fixed tables instead of the force generator system - } else if (actualUnitType == UnitType.GUN_EMPLACEMENT) { - generatedLance = generateTurrets(4, skill, quality, campaign, faction); + if (actualUnitType == UnitType.GUN_EMPLACEMENT) { + generatedLance = generateTurrets(4, skill, quality, campaign, faction); // All other unit types use the force generator system to randomly select units - } else { - // Determine unit types for each unit of the formation. Normally this is all one - // type, but SPECIAL_UNIT_TYPE_ATB_MIX may generate all Meks, all vehicles, or - // a Mek/vehicle mixed formation. - List unitTypes = generateUnitTypes(actualUnitType, lanceSize, quality, factionCode, allowsTanks, campaign); - - // Formations composed entirely of Meks, aerospace fighters (but not conventional), - // and ground vehicles use weight categories as do SPECIAL_UNIT_TYPE_ATB_MIX. - // Formations of other types, plus artillery formations do not use weight classes. - if ((actualUnitType == SPECIAL_UNIT_TYPE_ATB_MIX - || actualUnitType == SPECIAL_UNIT_TYPE_ATB_CIVILIANS - || IUnitGenerator.unitTypeSupportsWeightClass(actualUnitType)) - && !forceTemplate.getUseArtillery()) { - - // Generate a specific weight class for each unit based on the formation weight - // class and lower/upper bounds - final String unitWeights = generateUnitWeights(unitTypes, factionCode, - AtBConfiguration.decodeWeightStr(currentLanceWeightString, 0), - forceTemplate.getMaxWeightClass(), forceTemplate.getMinWeightClass(), - requiredRoles, campaign); - - if (unitWeights != null) { - generatedLance = generateLance(factionCode, skill, quality, unitTypes, unitWeights, - requiredRoles, campaign, scenario); - } else { - generatedLance = new ArrayList<>(); - } } else { - generatedLance = generateLance(factionCode, skill, quality, unitTypes, requiredRoles, - campaign, scenario); - - // If extreme temperatures are present and XCT infantry is not being generated, - // swap out standard armor for snowsuits or heat suits as appropriate - if (actualUnitType == UnitType.INFANTRY) { - for (Entity curPlatoon : generatedLance) { - changeInfantryKit((Infantry) curPlatoon, isLowPressure, isTainted, scenario.getTemperature()); + // Determine unit types for each unit of the formation. Normally this is all one + // type, but SPECIAL_UNIT_TYPE_ATB_MIX may generate all Meks, all vehicles, or + // a Mek/vehicle mixed formation. + List unitTypes = generateUnitTypes(actualUnitType, lanceSize, quality, + factionCode, allowsTanks, campaign); + + // Formations composed entirely of Meks, aerospace fighters (but not conventional), + // and ground vehicles use weight categories as do SPECIAL_UNIT_TYPE_ATB_MIX. + // Formations of other types, plus artillery formations do not use weight classes. + if ((actualUnitType == SPECIAL_UNIT_TYPE_ATB_MIX + || actualUnitType == SPECIAL_UNIT_TYPE_ATB_CIVILIANS + || IUnitGenerator.unitTypeSupportsWeightClass(actualUnitType)) + && !forceTemplate.getUseArtillery()) { + + // Generate a specific weight class for each unit based on the formation weight + // class and lower/upper bounds + final String unitWeights = generateUnitWeights(unitTypes, factionCode, + AtBConfiguration.decodeWeightStr(currentLanceWeightString, 0), + forceTemplate.getMaxWeightClass(), forceTemplate.getMinWeightClass(), + requiredRoles, campaign); + + if (unitWeights != null) { + generatedLance = generateLance(factionCode, skill, quality, unitTypes, unitWeights, + requiredRoles, campaign, scenario); + } else { + generatedLance = new ArrayList<>(); + } + + if (!generatedLance.isEmpty() && forceTemplate.isEnemyBotForce()) { + logger.info(String.format("Force Weights: %s (%s)", + currentLanceWeightString, unitWeights)); + } + } else { + generatedLance = generateLance(factionCode, skill, quality, unitTypes, requiredRoles, + campaign, scenario); + + // If extreme temperatures are present and XCT infantry is not being generated, + // swap out standard armor for snowsuits or heat suits as appropriate + if (actualUnitType == UnitType.INFANTRY) { + for (Entity curPlatoon : generatedLance) { + changeInfantryKit((Infantry) curPlatoon, isLowPressure, isTainted, scenario.getTemperature()); + } } } } @@ -643,7 +673,8 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac // work with what is already generated if (generatedLance.isEmpty()) { stopGenerating = true; - logger.warn(String.format("Unable to generate units from RAT: %s, type %d, max weight %d", factionCode, forceTemplate.getAllowedUnitType(), weightClass)); + logger.warn(String.format("Unable to generate units from RAT: %s, type %d, max weight %d", + factionCode, forceTemplate.getAllowedUnitType(), weightClass)); continue; } @@ -679,7 +710,9 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac ArrayList arrayGeneratedLance = new ArrayList<>(generatedLance); // bin fill ratio will be adjusted by the load out generator based on piracy and // quality - ReconfigurationParameters rp = TeamLoadOutGenerator.generateParameters(cGame, cGame.getOptions(), arrayGeneratedLance, factionCode, new ArrayList<>(), new ArrayList<>(), ownerBaseQuality, ((isPirate) ? TeamLoadOutGenerator.UNSET_FILL_RATIO : 1.0f)); + ReconfigurationParameters rp = TeamLoadOutGenerator.generateParameters(cGame, + cGame.getOptions(), arrayGeneratedLance, factionCode, new ArrayList<>(), + new ArrayList<>(), ownerBaseQuality, ((isPirate) ? TeamLoadOutGenerator.UNSET_FILL_RATIO : 1.0f)); rp.isPirate = isPirate; rp.groundMap = onGround; rp.spaceEnvironment = (mapLocation == MapLocation.Space); @@ -726,7 +759,7 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac // the percentage chosen based on unit rating double currentPercentage = ((double) forceBV / forceBVBudget) * 100; - stopGenerating = currentPercentage > targetPercentage; + stopGenerating = currentPercentage > 100; } else { // For generation methods other than scaled BV, compare to the overall budget stopGenerating = generatedEntities.size() >= forceUnitBudget; @@ -746,10 +779,10 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac if (campaign.getCampaignOptions().isUseGenericBattleValue()) { balancingType = " Generic"; } - logger.info(String.format("Generated a force with %s / %s %s BV", - forceBV, forceBVBudget, balancingType)); + logger.info(String.format("%s generated a force with %s / %s %s BV", + forceTemplate.getForceName(), forceBV, forceBVBudget, balancingType)); - int adjustedBvBudget = (int) (forceBVBudget * 1.25); + int adjustedBvBudget = (int) (forceBVBudget * 1.1); while ((forceBV > adjustedBvBudget) && (generatedEntities.size() > 1)) { int targetUnit = Compute.randomInt(generatedEntities.size()); @@ -769,7 +802,7 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac generatedEntities.remove(targetUnit); } - logger.info(String.format("Final force %s / %s %s BV", + logger.info(String.format("Final force %s / %s %s BV (adjusted for bounds)", forceBV, adjustedBvBudget, balancingType)); } @@ -970,8 +1003,7 @@ private static void reportResultsOfBidding(AtBDynamicScenario scenario, Campaign for (String unitName : bidAwayForces) { if (report.isEmpty()) { report.append(String.format(resources.getString("bidAwayForcesVerbose.text"), - generatedForce.getName(), scenario.getName(), scenario.getContract(campaign), - unitName)); + generatedForce.getName(), unitName)); } else { report.append(unitName).append("
"); } @@ -979,14 +1011,13 @@ private static void reportResultsOfBidding(AtBDynamicScenario scenario, Campaign } else { if (!bidAwayForces.isEmpty()) { report.append(String.format(resources.getString("bidAwayForces.text"), - generatedForce.getName(), scenario.getName(), scenario.getContract(campaign), - bidAwayForces.size(), bidAwayForces.size() > 1 ? "s" : "")); + generatedForce.getName(), bidAwayForces.size(), bidAwayForces.size() > 1 ? "s" : "")); boolean isUseLoggerHeader = true; for (String unitName : bidAwayForces) { if (isUseLoggerHeader) { logger.info(String.format(resources.getString("bidAwayForcesLogger.text"), - generatedForce.getName(), scenario.getName(), scenario.getContract(campaign))); + generatedForce.getName())); isUseLoggerHeader = false; } logger.info(unitName); @@ -997,8 +1028,7 @@ private static void reportResultsOfBidding(AtBDynamicScenario scenario, Campaign if (supplementedForces > 0) { if (report.isEmpty()) { report.append(String.format(resources.getString("addedBattleArmorNewReport.text"), - generatedForce.getName(), scenario.getName(), scenario.getContract(campaign), - supplementedForces, supplementedForces > 1 ? "s" : "")); + generatedForce.getName(), supplementedForces, supplementedForces > 1 ? "s" : "")); } else { report.append(String.format( resources.getString("addedBattleArmorContinueReport.text"), @@ -1006,17 +1036,9 @@ private static void reportResultsOfBidding(AtBDynamicScenario scenario, Campaign } } - if (supplementedForces > 0 || !bidAwayForces.isEmpty()) { - if (Compute.randomInt(8) == 0) { - report.append(resources.getString("batchallConcludedVersion2.text")); - } else { - report.append(resources.getString("batchallConcludedVersion1.text")); - } - } - if (supplementedForces == 0 && bidAwayForces.isEmpty()) { - logger.info(String.format(resources.getString("nothingBidAway.text"), - generatedForce.getName(), scenario.getName(), scenario.getContract(campaign))); + report.append(String.format(resources.getString("nothingBidAway.text"), + generatedForce.getName())); } campaign.addReport(report.toString()); @@ -1519,12 +1541,20 @@ public static Entity getEntity(String faction, unitData = campaign.getUnitGenerator().generate(params); } + if (unitData == null) { if (!params.getMissionRoles().isEmpty()) { - logger.warn(String.format("Unable to randomly generate %s %s with roles: %s", + Entity secondChanceEntity = getEntity(faction, skill, quality, unitType, weightClass, campaign); + + if (secondChanceEntity == null) { + logger.warn(String.format("Unable to randomly generate %s %s with roles: %s." + + " Second chance generation also failed.", EntityWeightClass.getClassName(params.getWeightClass()), UnitType.getTypeName(unitType), params.getMissionRoles().stream().map(Enum::name).collect(Collectors.joining(",")))); + } else { + return secondChanceEntity; + } } return null; } @@ -2656,6 +2686,9 @@ public static int calculateEffectiveBV(AtBDynamicScenario scenario, Campaign cam int bvBudget = 0; double difficultyMultiplier = getDifficultyMultiplier(campaign); + String generationMethod = campaign.getCampaignOptions().isUseGenericBattleValue() ? + "Generic BV" : "BV2"; + // deployed player forces: for (int forceID : scenario.getForceIDs()) { ScenarioForceTemplate forceTemplate = scenario.getPlayerForceTemplates().get(forceID); @@ -2684,17 +2717,23 @@ public static int calculateEffectiveBV(AtBDynamicScenario scenario, Campaign cam bvBudget = (int) round(bvBudget * difficultyMultiplier); } + logger.info(String.format("Total Player %s: %s (adjusted for campaign difficulty)", generationMethod, bvBudget)); + // allied bot forces that contribute to BV do not get multiplied by the - // difficulty - // even if the player is super good, the AI doesn't get any better + // difficulty even if the player is perfect, the AI doesn't get any better for (int index = 0; index < scenario.getNumBots(); index++) { BotForce botForce = scenario.getBotForce(index); ScenarioForceTemplate forceTemplate = scenario.getBotForceTemplates().get(botForce); if (forceTemplate != null && forceTemplate.getContributesToBV()) { bvBudget += botForce.getTotalBV(campaign); + + logger.info(String.format("%s %s: %s", + botForce.getName(), generationMethod, botForce.getTotalBV(campaign))); } } + logger.info(String.format("Total Base %s Budget: %s", generationMethod, bvBudget)); + return bvBudget; }