Setting Up a Custom User Data Directory for MegaMek, MegaMekLab, and MekHQ - MegaMek/megamek GitHub Wiki
This guide explains how to set up and use a custom user data directory for MegaMek (MM), MegaMekLab (MML), and MekHQ (MekHQ). The user directory lets you store units, camos, fonts, and the files listed below in a directory of your choice, outside any specific MegaMek installation. This way, you can easily share resources across different installations or versions without the need to move files around.
Note: The user directory works with cloud-based drives like OneDrive, Dropbox, and Google Drive, but all files must be saved locally.
- Consistency: Keep all your custom files in one location, accessible to all MM, MML, and MekHQ installations.
-
Flexibility: Choose any directory location that suits your organizational needs, such as
D:/myMMStuff
. - Ease of Upgrade: Simplifies the process of upgrading to new versions of MM, MML, or MekHQ, as all your custom content remains in a fixed location. When you install a new version, simply point the new install in the Client Settings to the location of the user folder.
-
MegaMek: Set the user data directory path in the Client settings. This is part of the
ClientPreferences
configuration. - MegaMekLab: Configure the path in the Options menu.
- MekHQ: Go to Options β Misc Options and set the path for the user data directory.
Note: Changes to the user directory setting typically take effect after a restart of the application.
This should point to the location and show the data folder level.
To ensure that the custom user data directory functions correctly, maintain the following directory structure:
-
Fonts: Place font files (e.g.,
.ttf
) anywhere within the user directory. -
Units: Store unit files (
.mtf
,.blk
) anywhere in the user directory.
Note: Only custom units should be stored in the user directory to avoid duplicate entries in the mech selector if files are also present in the local directory. -
Images: Place images in the following subdirectories:
-
data/images/camo/
for camo images -
data/images/portraits/
for portrait images -
data/images/fluff/<unit type>/
for unit fluff images. To find the exact subfolder names, refer to the/data/images/fluff/
directory in your MegaMek installation.
-
-
Skins: Skin definition files (
.xml
) can be placed anywhere in the user directory. -
Rank Systems: Store rank definition files in
data/universe/ranks.xml
. -
Awards: Save award definition files (
.xml
) indata/universe/awards/
.
Note: Youβll notice some data file types are missing, like Boards, for example. Due to how the programs use and load data, some folders just canβt be used with the User folders. The list above is considered complete as of the time of implementation (Dec 26, 2023).
Below is an example of a suitable directory structure with some example files:
D:/myMMStuff βββ Oxanium.ttf βββ Exo.ttf βββ campaign_units/ β βββ Atlas AS8-XT.mtf βββ data/ β βββ Jura.ttf β βββ MyMMSkin.xml β βββ images/ β β βββ camo/ β β β βββ myForceCamo.png β β β βββ oldcamo/ β β β βββ camo1.png β β β βββ camo2.png β β βββ portraits/ β β β βββ minscandboo.png β β βββ fluff/ β β βββ Mech/ β β β βββ Atlas.png β β βββ DropShip/ β β βββ Colossus.png βββ universe/ βββ ranks.xml βββ awards/ βββ MyAwards.xml βββ AuriganAwards.xml