MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
129 stars 164 forks source link

OpFor Force Creation and Management over a Campaign #1312

Open jbhuddleston opened 4 years ago

jbhuddleston commented 4 years ago

MekHQ 0.47.0

Related to #348 and #352

BLUF: I am looking for a way to manage an (multiple) OpFor in the same way as the player forces for a Campaign.

Features requested:

  1. The results of a battle can be processed from the POV of each participant.
  2. In MekHQ one can generate a force, including structure (the feature implemented in MM).

Generally, how I see this working is the OpFor is run from a campaign file just like the players. They each are deployed to scenarios within a mission and their MULs are exported for import into a MM battle then the results are exported to the MUL(s) for manual resolution in their respective campaigns. Repairs take place in each campaign and the Campaign continues.

The most time-consuming part of this at the moment is initial generation of the OpFor structure as it tends to be larger than the player side and, as they move from one contract to another, more OpFor orgs need to be created to support one player org.

The battle results MUL is manipulable but becomes tedious to sort out by hand. When imported straight into a blank campaign it ignored pilot damage and the naming still includes the pilot rank.

I am going to try the above features manually next to see if the behaviour improves through pre-identified entities in the org.

inqistor commented 4 years ago

Can't you just use another instance of MekHQ? I never tried it, but after starting mission, there is question about player name. In theory, it should connect to MegaMek scenario for all sides separately.

purpledragon2 commented 4 years ago

The problem I would have with the second instance is that the markets would have different items/personnel available in the same locations on the same dates. I love the randomization of the markets, but would love to see a GM server / Player client build done such that the GM can see the whole picture but the players are limited to just what their characters would see.

jbhuddleston commented 4 years ago

Sorry, @inqistor but from your comment I am unsure whether you mean MekHQ or MegaMek.

We set up six battles for bot-controlled OpFor generated in MegaMek against the player forces who were exported for each scenario from within their MekHQ campaign. Resolving the battle damage for the players works exactly as it should from the MULs generated at the end of each player battle but I cannot do the same for the OpFor.

I exported all six starting OpFor and imported them into a separate MekHQ campaign for them then edited each player MUL to reflect the OpFor POV and attempted to import them in the same way (after creating a mission and six scenarios then deploying the forces) but the External IDs did not match. So, I fixed all 144 ExternalIDs (mechs and pilots) in the MULs and it sort of worked because I had not correctly identified the category for each mech and pilot in the MUL but they were all linked properly and I could edit the number of hits and who died, etc. in the end-of-battle wizard.

This was useful to see how things are connected but I won't be doing it twice. :-)

So, here is a better explanation of what I am trying to achieve wrt 1.

BattleAndResults.zip

Using MegaMek, I loaded the attached fight as a third Party "NoOne" then reconnected the two players as bots. These forces were generated by exporting the MUL for a scenario from each separate MekHQ campaign then loading both forces into one fight. It got stuck a couple of times and had to be reloaded from the autosave but finished eventually. I was unable to save an MUL because NoOne had no forces on the board, I assume, so I restarted the last autosave as Princess and again as FourAmigos-DE to finish off the last phase and save the MUL from their POV. The files are very different and this is what I would like to be able to achieve from the menu no matter who is playing and who is a bot, or even if all players are bots.

As a workaround, I now know that I can load the game up from the last autosave and produce the file myself from each POV but I should not need to.