Skip to content

Commit

Permalink
Merge pull request #5714 from Sleet01/RFE_5284_finish_MM_munition_gen…
Browse files Browse the repository at this point in the history
…erator_development

Finish MegaMek munition generator development
  • Loading branch information
IllianiCBT authored Jul 9, 2024
2 parents fe685a1 + 246e91f commit 393683a
Show file tree
Hide file tree
Showing 14 changed files with 1,374 additions and 307 deletions.
Binary file not shown.
118 changes: 118 additions & 0 deletions megamek/mmconf/munitionLoadoutSettings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Used by TeamLoadoutGenerator and MunitionWeightCollection</comment>
<entry key="commentStartMunitionTreeArea">The following entries are used by MunitionTree</entry>
<entry key="mtReducingAmmoReduceIfUnderFactor">2.0</entry>
<entry key="mtReducingAmmoIncreaseIfOverFactor">3.0</entry>
<entry key="mtFlakMinBombersExceedThreshold">0.0</entry>
<entry key="mtFlakEnemyFliersFractionDivisor">4.0</entry>
<entry key="mtPrecisionAmmoFastEnemyFractionDivisor">4.0</entry>
<entry key="mtHPAmmoAdvArmorEnemiesExceedThreshold">0.0</entry>
<entry key="mtFireproofMaxEnemyFractionDivisor">4.0</entry>
<entry key="mtInfantryEnemyExceedsFractionDivisor">4.0</entry>
<entry key="mtVeeEnemyExceedsFractionDivisor">4.0</entry>
<entry key="mtBAEnemyExceedsFractionDivisor">4.0</entry>
<entry key="mtSeekingAmmoEnemyECMExceedThreshold">1.0</entry>
<entry key="mtGuidedAmmoFriendlyTAGThreshold">1.0</entry>
<entry key="mtGuidedAmmoFriendlyNARCThreshold">1.0</entry>
<entry key="mtGuidedAmmoFriendlyMissileBoatFractionDivisor">3.0</entry>
<entry key="mtUtilityAmmoOffboardUnitsThreshold">2.0</entry>
<entry key="mtUtilityAmmoFriendlyVsEnemyFractionDivisor">1.0</entry>
<entry key="commentTopMunitionsSubsetCount">This count determines how many munition types (out of all options) are actually selected</entry>
<entry key="mtTopMunitionsSubsetCount">4</entry>
<entry key="commentStartTLGBombArea">The following entries are used by Bombs:</entry>
<entry key="bombMapGroundSpreadNormal">6</entry>
<entry key="bombMapGroundSpreadAnti-Mek">3</entry>
<entry key="bombMapGroundSpreadAnti-conventional">2</entry>
<entry key="bombMapGroundSpreadStandoff">1</entry>
<entry key="bombMapGroundSpreadStrike">2</entry>
<entry key="bombMapPirateGroundSpreadNormal">7</entry>
<entry key="bombMapPirateGroundSpreadFirestorm">3</entry>
<entry key="normalBombLoad_HE">40</entry>
<entry key="normalBombLoad_LG">5</entry>
<entry key="normalBombLoad_CLUSTER">30</entry>
<entry key="normalBombLoad_INFERNO">15</entry>
<entry key="normalBombLoad_THUNDER">10</entry>
<entry key="antiMekBombLoad_HE">55</entry>
<entry key="antiMekBombLoad_LG">15</entry>
<entry key="antiMekBombLoad_INFERNO">10</entry>
<entry key="antiMekBombLoad_THUNDER">10</entry>
<entry key="antiMekBombLoad_HOMING">10</entry>
<entry key="antiConvBombLoad_CLUSTER">50</entry>
<entry key="antiConvBombLoad_INFERNO">40</entry>
<entry key="antiConvBombLoad_FAE_SMALL">8</entry>
<entry key="antiMekBombLoad_HOMING">2</entry>
<entry key="standoffBombLoad_ARROW">40</entry>
<entry key="standoffBombLoad_HOMING">60</entry>
<entry key="strikeBombLoad_LG">45</entry>
<entry key="strikeBombLoad_HOMING">25</entry>
<entry key="strikeBombLoad_HE">30</entry>
<entry key="lowTechBombLoad_HE">35</entry>
<entry key="lowTechBombLoad_RL">65</entry>
<entry key="pirateBombLoad_HE">7</entry>
<entry key="pirateBombLoad_RL">45</entry>
<entry key="pirateBombLoad_INFERNO">35</entry>
<entry key="pirateBombLoad_CLUSTER">5</entry>
<entry key="pirateBombLoad_FAE_SMALL">6</entry>
<entry key="pirateBombLoad_FAE_LARGE">2</entry>
<entry key="pirateFirestormBombLoad_INFERNO">60</entry>
<entry key="pirateFirestormBombLoad_FAE_SMALL">30</entry>
<entry key="pirateFirestormBombLoad_FAE_LARGE">10</entry>
<entry key="antiAirBombLoad_RL">40</entry>
<entry key="antiAirBombLoad_LAA">40</entry>
<entry key="antiAirBombLoad_AAA">15</entry>
<entry key="antiAirBombLoad_AS">4</entry>
<entry key="antiAirBombLoad_ASEW">1</entry>
<entry key="antiShipBombLoad_AAA">50</entry>
<entry key="antiShipBombLoad_AS">35</entry>
<entry key="antiShipBombLoad_ASEW">15</entry>
<entry key="pirateAntiBombLoad_RL">60</entry>
<entry key="pirateAntiBombLoad_LAA">30</entry>
<entry key="pirateAntiBombLoad_AAA">10</entry>
<entry key="commentStartMWCArea">The following entries are used by MWC:</entry>
<entry key="defaultWeaponWeight">1.0</entry>
<entry key="defaultStandardMunitionWeight">2.0</entry>
<entry key="defaultMissileStandardMunitionWeight">2.0</entry>
<entry key="defaultDeadFireMunitionWeight">3.0</entry>
<entry key="defaultATMMunitionWeight">2.0</entry>
<entry key="defaultATMStandardWeight">1.0</entry>
<entry key="increaseWeightFactor">2.0</entry>
<entry key="increaseWeightIncrement">1.0</entry>
<entry key="decreaseWeightFactor">0.5</entry>
<entry key="decreaseWeightDecrement">0.0</entry>
<entry key="commentPercentBombers">Sets the minimum + (0 ~ N) range of bomber units to equip.</entry>
<entry key="percentBombersToEquipMin">40</entry>
<entry key="percentBombersToEquipRange">60</entry>
<entry key="commentFighterCAPThreshold">For each Aerospace unit, if 1d6 is equal or below threshold, equip for CAP</entry>
<entry key="fightersLoadForCAPRollTargetThreshold">1</entry>
<entry key="bomberMinUnarmedSafeThrustValue">2</entry>
<entry key="bomberMinArmedSafeThrustValue">3</entry>
<entry key="fighterCAPMinUnarmedSafeThrustValue">2</entry>
<entry key="fighterCAPMinArmedSafeThrustFractionDivisor">2.0</entry>
<entry key="maxBomberLoadFactorDivisor">5.0</entry>
<entry key="maxBomberLoadThrustDiffFactor">5</entry>
<entry key="maxPercentBomberLoadToEquipMin">50</entry>
<entry key="maxPercentBomberLoadToEquipRange">40</entry>
<entry key="bombersToAddTagMaxCount">3</entry>
<entry key="bomberRandomThresholdMaxPercent">100</entry>
<entry key="fighterCAPRandomPercentageRange">100</entry>
<entry key="fighterCAPAntiShipLoadoutRandomPercentageMax">20</entry>
<entry key="commentReplacementBomb">If a munition must be replaced, range and threshold of RL vs HE</entry>
<entry key="bombReplacementIntRange">2</entry>
<entry key="bombReplacementRLThreshold">0</entry>
<entry key="maxBombApplicationLoopCount">10</entry>
<entry key="maxBombOrdnanceWeightPercentThreshold">100</entry>
<entry key="bombRandomReplaceRating4PlusThreshold">5</entry>
<entry key="bombRandomReplaceRating3PlusThreshold">10</entry>
<entry key="bombRandomReplaceRating2PlusThreshold">25</entry>
<entry key="bombRandomReplaceRating1PlusThreshold">40</entry>
<entry key="bombRandomReplaceRating0PlusThreshold">80</entry>
<entry key="commentPirateBinFillRatio">Pirates and Rebels get ammo bins filled at random ratios</entry>
<entry key="commentPirateBinFillRatio2">Min(maxAllowed, Max(minAllowed, random/rangeDivisor + quality/qualityDivisor))</entry>
<entry key="commentPirateBinFillRatio3">E.g. the defaults give a range of 20% to 100%, with Quality Rating 0 giving ~20% and Rating 5 giving ~75% on average</entry>
<entry key="pirateMaxAllowedBinFillRatio">1.0</entry>
<entry key="pirateMinAllowedBinFillRatio">0.2</entry>
<entry key="pirateRandomRangeDivisor">4.0</entry>
<entry key="pirateQualityDivisor">8.0</entry>
</properties>
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

package megamek.client.generator;

import megamek.client.ratgenerator.ForceDescriptor;

import java.util.HashSet;

/**
Expand All @@ -32,6 +34,7 @@ public class ReconfigurationParameters {

// Map settings
public boolean darkEnvironment = false;
public boolean groundMap = false;
public boolean spaceEnvironment = false;

// Enemy stats
Expand All @@ -53,7 +56,10 @@ public class ReconfigurationParameters {
public HashSet<String> enemyFactions = new HashSet<String>();

// Friendly stats
//
public int friendlyQuality = ForceDescriptor.RATING_5;
public String friendlyFaction = "";
public boolean isPirate = false;
public long friendlyCount = 0;
public long friendlyTAGs = 0;
public long friendlyNARCs = 0;
Expand All @@ -69,6 +75,9 @@ public class ReconfigurationParameters {
// Nukes may be banned for a given team but allowed in general (boo, hiss)
public boolean nukesBannedForMe = true;

// Allow setting bin filled percentages (e.g. for destitute pirates)
public float binFillPercent = 1.0f;

// Datatype for passing around game parameters the Loadout Generator cares about
ReconfigurationParameters() {
}
Expand Down
Loading

0 comments on commit 393683a

Please sign in to comment.