Greetings, Programs MechWarriors!Some of you may have noticed a new addition in the Player Configuration... dialog within MegaMek: the Automatic Ammunition Configuration section!
I'd like to give some information about this new functionality and answer any questions folks may have.
OverviewWe've added a section in the Player Configuration / Player Settings dialog to adjust ammunition bins and ASF bombs semi-intelligently.
These controls allow players to kit out ammo-using units a few different ways:
1. Autoconfig: select appropriate munitions for each unit using information about the current game settings, opposition units, time of day, and friendly unit capabilities.
2. Randomize: randomly select valid munitions from available options
3. Save/Load Loadouts: save the current configuration, or load a previously-created configuration
When the "OK" button is clicked, the new ammo configurations are applied!
Hitting "Cancel", or explicitly restoring the original configuration, will prevent the dialog from making changes.
This can be used to configure a player's own units, or Bot units, and will work in network games.
ControlsThere are a few obvious, and not-so-obvious, inputs to these capabilities. The obvious adjustments to be made are:
- "Faction Selection" dropdown - Choose your team's faction to adjust which munitions are available. This will only affect a few factions at specific times. Defaults to "IS - General".
- "Truly Random" checkbox - Off: "random" ammo only includes ammo that deals damage; On: ammo is fully randomized and results may be useless / suboptimal. Defaults to Off.
- "No Nukes" checkbox - Off: allows equipping nuclear munitions on relevant units (Davey Crockett, Alamo, etc.) if the game options allow. On: ignore game options and never equip nukes. Defaults to On.
But other game option settings will also influence how these controls function:
- Allowed Units and Equipment
- Year: determines which munitions are available in general, and to specific factions.
- Tech Level: determines which munitions are available in general; most optional munitions are Advanced or Experimental
- Variable Tech Level: can make some munitions available earlier depending on Tech Level and canon development time
- Ignore Clan Ammo Limitations: expands the range of munitions available to Clan factions
- Advanced Rules
- TacOps Double Blind: this will prevent the autoconfig tool from evaluating enemy forces, so munitions will be selected based on friendly capabilities only (e.g. Flak rounds are less likely)
- Advanced Aerospace Rules
- Allow Nuclear Weapons: this must be enabled _and_ "No Nukes" must be disabled in order for nuclear munitions to be generated.
Autoconfig logicWhen Autoconfig is clicked the system assesses the battlefield conditions (day/night, ground/space), friendly forces (including TAG/NARC capabilities), enemy force composition and capabilities (if Double Blind is not set), and attempts to choose four of the most effective ammo types for each weapon system type.
- If conditions are not daylight, illuminating munitions are weighted higher: Inferno, Tracer, and artillery Illumination, etc.
- If friendly forces include NARC or TAG, guided munitions will be weighted more highly; if none are included, guided munitions are weighted lower.
- Depending on Double Blind settings and enemy force composition, munitions that increase or reduce rounds/ton may be weighted differently; higher-damage munitions may be selected depending on enemy armor types; Inferno rounds are favored against energy-heavy forces and vehicles; rounds with extra anti-personnel damage will be weighted higher if there are many infantry or BA troops; etc.
- If the enemy forces include a large number of Airborne units, Flak rounds will be weighted higher.
- If the enemy force includes a number of high-MP units, Precision, seeking, and guided munitions may be selected
CaveatsThe feature as presented in 0.49.20 is still in development, and players should note that it still has many limitations:
- A late-breaking bug in 0.49.20 currently prevents Princess from using any ammo-based weapons! See "Workaround" section later
- Weather / planetary conditions outside of day/night are not considered; wind may affect missile effectiveness but this is not currently modeled.
- "Utility" munitions such as Smoke, Thunder, Illumination, etc. Princess doesn't know how to use these munitions so they are weighted very low and will only be generated by the Randomize button.
- ASF bomb loadouts are always random. We incorporated the original MHQ bomb generation code which randomly assigns munitions, but this will be improved in the next version
- Due to the nature of the .adf file format, saved _manual_ loadouts are only applicable to the units they derive from (but can be later edited to be more generic)
- MHQ limitations, such as players' factions or ammo supplies, do not apply. It is possible to equip forces with munitions that they don't own in their Campaign after loading into MM for a mission
ADF FormatIn order to make it possible for players to customize and re-use loadouts, we created a new file format that can be saved and loaded from this dialog.
If a player manually sets their munitions via the lobby, they can save the configuration for loading in future games.
(Note that entries will be saved for each specific chassis, variant, and pilot in the player's list, and will only apply to that specific combination.)
By contrast, the autogenerated configurations will be as generic as possible: a single imperative defining the top four munitions for each bin type will be applied to all units.
The file format is designed to be human readable and editable.
FormatEach line of an .adf file consists of two main parts:
- The chassis, variant, and pilot to which it applies, separated by single colons
- A set of imperatives, separated by double colons,
The imperative set is open-ended and can contain unlimited entries.
Each imperative itself consists of two parts: ammo type, and munitions in order of importance. e.g.
|-- Chassis
| |-- Variant (here, "any" will match any variant)
| | |-- Pilot (here, "any" will match any pilot)
| | | |-- First imperative starts with Ammo bin type (if size is specified, applies only to that size; otherwise, applies to all of that type)
| | | | |-- Primary, and default, munition to load on matching units. The default ammo will fill any excess bins after all imperatives are fulfilled.
| | | | | |-- Secondary munition. Exactly one bin will be filled with this ammo if more than one matching bin exists.
| | | | | | |-- Tertiary entry. Exactly one bin will be filled with this ammo if more than two matching bins exist.
| | | | | | | |-- Second imperative (if desired)
| | | | | | | | |-- Third imperative (if desired)
Crusader:any:any::LRM 15:LRM 15 Dead-Fire:Standard:Narc-capable[::SRM 6:SRM 6 Dead-Fire:Standard:Inferno[::...]]
To set all matching bin types to the same ammo, simply provide the desired munition type as the only imperative, e.g.
::AC:Precision
Any bins that match an imperative but have no ammo type explicitly stated will receive the first, or default, ammo type.
Any bins that do _not_ match an imperative will not be reconfigured.
Any unit that does not match any entry will not be reconfigured.
Entries are applied in the following order:
- Explicit chassis-variant-pilot match
- Explicit chassis-variant + "any" match
- Explicit chassis + "any" match, this will attempt to match a specific pilot or "any" for the third field
- "any" chassis match + explicit/"any" variant + explicit/"any"
Again, any unit that doesn't match an entry at all will not be reconfigured.
Autogenerated ConfigurationThe current autoconfigure code produces a single maximally-applicable entry that covers all weapon types:
any:any:any::Narc:Standard:Narc Explosive::Mek Mortar:Standard:Airburst:Anti-personnel:Semi-Guided::AC:Standard:Flak:Caseless:Precision::LRM:Dead-Fire:Standard:Fragmentation:Heat-Seeking::Artillery Cannon:Standard:Fuel-Air::ATM:HE:ER:Standard::Arrow IV:Standard:Inferno-IV:Cluster:ADA::Artillery:Standard:Flechette:Cluster:Fuel-Air::Bomb:Standard:ASMissile Ammo:ClusterBomb:RL 10 Ammo (Bomb)::SRM:Dead-Fire:Standard:Tandem-Charge:Acid
Although the default configuration system selects 4 imperatives for each weapon type, fewer or more are allowed.
(Note that the ::Bomb directive is generated but not currently used)
Randomized ConfigurationThe randomized configuration produces an even simpler single entry:
any:any:any::Mek Mortar:Random::Narc:Random::AC:Random::LRM:Random::Artillery Cannon:Random::ATM:Random::Arrow IV:Random::Artillery:Random::Bomb:Random::SRM:Random
This matches any unit, and generates a different random ammo type for each bin of each weapon system. Note that variation may be limited, depending on year, faction, and game settings.
Saved Manual ConfigurationOn the other hand, if a user customizes their loadout in the lobby and then wishes to save it for later re-use, the entries will be much more specific:
Catapult:CPLT-K2:Cheyenne Zogu::MG Ammo:Standard
Brutus Assault Tank::Monica Olba::LRM 20:LRM 20 Dead-Fire:Standard:LRM 20 Follow The Leader::SRM 2:SRM 2 Dead-Fire::SRM 6:SRM 6 Dead-Fire
Brutus Assault Tank::Bente Dybdahl::LRM 20:LRM 20 Dead-Fire:Standard:LRM 20 Follow The Leader::SRM 2:SRM 2 Dead-Fire::SRM 6:SRM 6 Dead-Fire
Crusader:CRD-3R:Ru-su Toyota::LRM 15:LRM 15 Dead-Fire:Standard::SRM 6:SRM 6 Dead-Fire::MG Ammo:Standard
Thorn:THE-S:Pori Hansson::LRM 5:LRM 5 Dead-Fire
Vedette Medium Tank:(AC2):Zak Crawford::SRM 2:SRM 2 Dead-Fire::AC/2:Flak AC/2::MG Ammo:Standard
Vedette Medium Tank:(AC2):Mikaho Joe::SRM 2:SRM 2 Dead-Fire::AC/2:Flak AC/2::MG Ammo:Standard
Awesome:AWS-8R:Iwane Jarakian::LRM 15:LRM 15 Dead-Fire:Standard
Peregrine Attack VTOL:(Kurita):Yasuo Doyle::SRM 4:SRM 4 Dead-Fire
Peregrine Attack VTOL:(Kurita):Heidi Kichida::SRM 4:SRM 4 Dead-Fire
Warrior Attack Helicopter:H-7:Teruyo Almaa::SRM 4:SRM 4 Dead-Fire::AC/2:Flak AC/2
Warrior Attack Helicopter:H-7A:Tatsui Nomura::AC/5:Flak AC/5::MG Ammo:Standard
Each entry will only match one specific chassis-variant-pilot combo, but a user can make these entries more generic and/or dynamic by:
- Replacing variant and pilot fields with "any"
- Removing weapon size from imperatives
- Replacing some or all imperatives for a give weapon system with the "Random" keyword
The accepted Chassis and Variant names, as well as Weapon Type and Munition names, are determined by MegaMek's internal codes.
If in doubt, I recommend saving off a config containing the desired munitions to use as a reference before editing any .adf files.
To apply a manually-edited .adf file to a force, simply click "Load Loadout", select the file, and then click "OK"; the Lobby should show that all the player's units have been modified.
If nothing seems to be happening when using Autoconfig, Randomize, or Load Loadout, check the MegaMek log file for errors.
Workaround for Princess Not Using Ammo Weapons in 0.49.20There is no way to enable Princess to use ammo-based weapons (other than bombs) in 0.49.20, but the autoconfiguration tools
can be applied to forces for use in 0.49.19.1 (the current Milestone version).
Since MUL files record ammo loadouts for each unit, I have used this approach for some of my testing:
- Create player and bot forces in 0.49.20
- Run Ammunition Autoconfig in 0.49.20
- Export MUL for each player's forces from 0.49.20
- Create player and bots in new 0.49.19.1 game
- Reinforce each player with the exported MULs
- Enjoy!
Alternatively, try out the nightly builds and get a sneak peek at the next version of this new system!