Skip to content

Name Issues with Units

Justin Bowen edited this page Jul 12, 2021 · 3 revisions
Clone this wiki locally

We've added support for backward compatibility for unit name changes. Although we always try to avoid changing names on units, there are situations where this becomes necessary. Examples include a new TRO or updated information from the MUL (http://www.masterunitlist.info/).

In Data\Mechfiles folder is a name_changes.txt that tracks changes the developers have made.

Provides backward compatibility for any changes to the unit name. # If a name is changed, an entry should be made here so that it can still # be found by a previous name that may appear in a MUL file or a MekHQ # campaign file. Each entry should be on a separate line and have the # format "oldname|currentname"

Jagermech JM6-DG|JagerMech JM6-DG


There could be situations when loading a MekHQ Campaign where you see an error like this:

In this case you'll need to manually resolve the conflict by editing the Cpnx file. First step is to make sure you have a good text editor (Notepad++ or gedit).

WARNING ANYTIME YOU MANUALLY EDIT YOUR CPNX FILE YOU RUN THE RISK OF BREAKING IT. SO ALWAYS MAKE A BACKUP FILE.

  1. Open the CPNX file in the editor (you will need to ensure it saves as a .cpnx, not a .cpnx.gz. This can be forced in MekHQ Options.)
  2. Use the search function to find the names showing in the error dialog. In the screenshot it would be Union C or Carrier (Standard)
  3. Start MegaMek as a stand alone (megamek.exe or megamek.jar)
  4. Use the Add a Combat Unit, and look for the unit in the selector.

In this case we can see the Union C has been renamed Union C (2829). One very important thing to notice is both the Chassis and Model Names have changed. In the CPNX file they are Chassis "Union" and Model "C". But recent information the decision was made to change the names to Chassis "Union C" and the Model to (2829).

The next step is to either manually edit each line, or in this case use a mass edit.

Once it's complete, save the campaign file and try to reload. You'll notice below the Union C issue is no longer showing as a problem.