You are on page 1of 2

Windchild's Guide to Loading Portraits in MekHQ

Written 08-Feb-2020, Updated 05-Aug-2020


MekHQ version 0.47.8

How Portrait Loading Works:


The basic structure for loading a portrait is that it first determines the gender
of the person, then looks for a folder located under the gender for a folder with
the exact name of the primary role (see below for a list of possible primary
roles). If that folder doesn't exist, is empty, or contains only pictures which are
already assigned, the system continues with the next round of checking.
The system then checks for specialist grouping folders (see below), if it applies
to the role. If that folder doesn't exist, is empty, or contains only pictures
which are already assigned, the system continues with the next round of checking.
Next, the system looks in the general grouping folders (see below). If that folder
doesn't exist, is empty, or contains only pictures which are already assigned, the
system continues with the next round of checking.
Finally, it checks the gendered folders.

If the system finds at least one eligible picture in one of the checked folders, it
stops searching the folders and picks a random picture from the eligible ones in
that folder. Note that this stops the search, so if you put pictures in both
/Male/MechWarrior and /Male/Combat, Male MechWarriors will never be assigned one of
the pictures in the combat folder unless all the Male MechWarrior-specific pictures
are already assigned.

Folder Lists:
To be loaded, the portrait must be located in one of the following folders. To
determine the path required, you take the Primary Folder and add the Gendered
Folder, then the folder beneath it (outside of the Admin subtypes, which will
require the creation of the general Admin folder followed by their specification
folder)
For example, I want to load a group of portraits that are only for Male
MechWarriors in version 0.46.1. The folder I would need to have to place these
portraits into would therefore be
mekhq-windows-0.46.1/data/images/portraits/Male/MechWarrior
As a second example, I have a portrait that can be used by Female Admin in version
0.46.1. The folder I would need to place this portrait in would be mekhq-windows-
0.46.1/data/images/portraits/Female/Admin
As a third example, I have a portrait that can only be used by Female Admin/HR in
version 0.46.1. The folder I would need to have to place this portrait in would be
mekhq-windows-0.46.1/data/images/portraits/Female/Admin/HR

Primary Folder: All portraits are located in the portraits folder, just replace the
version of mekhq with the current version.
mekhq-windows-0.46.1/data/images/portraits

The following follows the format:


Grouping /Folder Name

Gendered Folders: Note that all of the below MUST be added to one of the two
gendered folders or the portraits will not load
Male Portraits: /Male
Female Portraits: /Female

Primary Role Folders:


None: /None
Mechwarrior: /MechWarrior
Vehicle Driver: /Vehicle Driver
Naval Driver: /Naval Driver
VTOL Pilot: /VTOL Pilot
Vehicle Gunner: /Vehicle Gunner
Conventional Aircraft Pilot: /Conventional Aircraft Pilot
Aero Pilot: /Aerospace Pilot
Proto Pilot: /ProtoMech Pilot
Battle Armor (Clan): /Elemental
Battle Armour: /Battle Armor Pilot
Soldier: /Soldier
Vessel Pilot: /Vessel Pilot
Vessel Crewmember: /Vessel Crewmember
Vessel Gunner: /Vessel Gunner
Hyperspace Navigator: /Hyperspace Navigator
Mech Tech: /Mech Tech
Mechanic: /Mechanic
Aero Tech: /Aero Tech
Battle Armor Tech: /Battle Armor Tech
Astech: /Astech
Doctor: /Doctor
Medic: /Medic
Admin/Command: /Admin/Command
Admin/Logistical: /Admin/Logistical
Admin/Transport: /Admin/Transport
Admin/HR: /Admin/HR
LAM Pilot: /LAM Pilot
Vehicle Crew: /Vehicle Crew

Specialist Grouping Folders: (see below for what are in these groupings)
Administrators: /Admin
Techs: /Tech
Medical Staff: /Medical
Vessel Crewmembers: /Vessel Crew

General Grouping Folders:


Combat Personnel: /Combat
Support Personnel: /Support

For the Specialist Grouping Folder, the following roles are included in the
groupings:
Administrators: Admin/Command, Admin/HR, Admin/Logistical, Admin/Transport
Techs: Mech Tech, Aero Tech, Mechanic, Battle Armor Tech
Medical Staff: Doctor, Medic
Vessel Crewmembers: Vessel Crewmember, Vessel Pilot, Vessel Gunner, Hyperspace
Navigator

You might also like