How To: Modifying Pilot Portraits - HelmMemoryCore/Mechwarrior-4-ModdingTools GitHub Wiki
Overview
If you are wanting to modify the vanilla Mechwarrior 4 Mercenaries experience, it's actually not too difficult to do so. It's going to require a bit of running around the props.mw4 and texture.mw4 files.
Recommended Software Needed:
- MW4eXtractor.exe
- Required for extracting the raw contents of props.mw4 and texture.mw4.
- Found in this Repository, can pull it down either using git or Downloading as a Zip File.
- https://www.moddb.com/games/mechwarrior-4-mercenaries/downloads/star-league-cache-mechwarrior-4-mod-tools
- https://github.com/HelmMemoryCore/Mechwarrior-4-ModdingTools/archive/refs/heads/main.zip
- GIMP
- Or another image editing tool like Photoshop.
- https://www.gimp.org/
- Dreamstudio
- Or another AI Image Generator
- IMPORTANT - NOT A FREE SERVICE. REQUIRES MONEY TO GET GENERATED IMAGES.
- https://dreamstudio.ai/
Important Files / Scripts
- props.mw4\mercsshellscripts\mechbay\graphics
- Free Market Pilot Portrait .tga files located
- Files range from 14200_personnel_0.tga to 14214_personnel_21.tga and 14245_personnel_5.tga to 14249_personnel_9.tga
- props.mw4\mercsshellscripts
- Where Castle, Spectre and the Pilot Portraits located for the Pre-Mission Briefing
- 13821_castle-port.tga - Castle
- 13930_spectre-port.tga - Spectre
- 13774_cm_lancemates.tga - Vertically Aligned Lancemate Roster
Extracting props.mw4
First, you want to extract the zip file containing Mechwarrior 4 Modding Tools - Star League Cache from either this GitHub Repository or from ModDB:
- https://www.moddb.com/games/mechwarrior-4-mercenaries/downloads/star-league-cache-mechwarrior-4-mod-tools
- https://github.com/HelmMemoryCore/Mechwarrior-4-ModdingTools/archive/refs/heads/main.zip
Inside that zip file is a file named MW4eXtractor.exe. This will allow you to extract the contents of the .mw4 files inside of your Mechwarrior 4: Mercenaries installation.
Next, we want to open props.mw4 inside of MW4eXtractor.exe application:
Then select props.mw4 on the left sidebar and click Extract it!
This will bring up a File Directory screen where you can designated a location for the extracted props.mw4 files to land.
If you've done that correctly, you should see a props.mw4 and the contents inside that looks like this:
Creating your own AI Generated - Pilot Portraits
Now, to create our Pilot Portraits, I've decided to use DreamStudio. It gave me pretty good results without too much difficulty playing around with the prompts.
NOTE: DreamStudio and other AI Image Generation Services are NOT free. It requires you to pay in order to generate images. Fortunately, I thought DreamStudio's price per image was fair, which is why I ended up using it.
Once you are ready, we can start telling the prompt to generate images. These were the some of the text prompts I gave it to generate the images I used for the my Pilot Portraits Mod:
-
Blaze - portrait, orange hair woman, late 30s, long hair, black shirt, looking straight on, close-up head shot, cinematic lighting, flat yellow background, science fiction, high quality, black turtle neck
-
Spirit - portrait, short dark brown hair woman, middle aged, black shirt, looking straight on, close-up head shot, cinematic lighting, flat blue background, science fiction, high quality, black turtle neck
-
Mustang - portrait, long blonde hair woman, mid 40s, black shirt, looking straight on, close-up head shot, cinematic lighting, flat yellow background, science fiction, high quality, black turtle neck
-
Angel - portrait, long dark brown hair woman, ponytail, early 20s, long hair, looking straight on, close-up head shot, cinematic lighting, flat blue background, science fiction, high quality, black turtle neck
After picking your Image Style and giving a description of what you want created, you can now generate your images:
Feel free to use this as many times as you need to in order to get satisfactory results.
Preparing the new Pilot Portrait Files
Now we are at the fun part. If you are doing a full conversion, there are 25 .tga files you need to make changes in order for your images to show up in both the Free Market and Pre-Mission Briefing Screen. Also, one of those .tga files is a bit more involved than the rest.
-
Inside of props.mw4\mercsshellscripts\mechbay\graphics
- 14200_personnel_0.tga
- Falcon
- 14201_personnel_1.tga
- Rufus
- 14202_personnel_10.tga
- Spirit
- 14203_personnel_11.tga
- Goof
- 14204_personnel_12.tga
- Bullseye
- 14205_personnel_13.tga
- Gator
- 14206_personnel_14.tga
- Beowulf
- 14207_personnel_15.tga
- Goat
- 14208_personnel_16.tga
- Goblin
- 14209_personnel_17.tga
- Black Jack
- 14210_personnel_18.tga
- Scooter
- 14211_personnel_19.tga
- Scrapper
- 14212_personnel_2.tga
- Angel
- 14213_personnel_20.tga
- Blaze
- 14214_personnel_21.tga
- Buzz
- 14223_personnel_3.tga
- Shredder
- 14234_personnel_4.tga
- Rubius
- 14245_personnel_5.tga
- Mags
- 14246_personnel_6.tga
- Hannibal
- 14247_personnel_7.tga
- Bulldog
- 14248_personnel_8.tga
- Mustang
- 14249_personnel_9.tga
- Claymore
- 14200_personnel_0.tga
-
Inside of mercsshellscripts\graphics
- 13774_cm_lancemates
- Vertically Aligned Set of all Lancemates
- 13821_castle-port
- Castle
- 13930_spectre-port
- Spectre
- 13774_cm_lancemates
13774_cm_lancemates is the hardest one. We will do that one last.
Resizing Pilot Portrait Files for the Free Market and Pre-Mission Briefing
First, you want to start up Gimp and open one of your newly AI Generated Pilot Portraits:
Second, go to the top bar and click Image -> Scale Image
Third, change the Width and Height to 48 x 48. Keep everything else exactly the same. Then click Scale.
Lastly, with our newly shrink image, we want to go to File -> Export As
Then Export the image as a .tga file. You can name it as a backup like new mags.tga. Or you can name it right away for it's intended spot inside of props.mw4 when we recompile it. In this case, since this is supposed to be Mag's new Pilot Portrait, it will be 14245_personnel_5.tga.
Rinse and Repeat for all of your new Pilot Portraits.
Setting up 13774_cm_lancemates.tga
All of the Pre-Mission Briefing Pilot Portraits are actually stacked Vertically Aligned:
For all of the Pilot Portraits you want to change, we need to Copy and Paste the new portrait exactly on top of the intended pilot it's meant to replace.
Open up your newly resized Pilot Portrait, left click on the image and hit CTRL-C (Copy).
Now go to 13774_cm_lancemates.tga and hit CTRL-V (Paste):
Now we want to use the arrow keys to move her up to where the original Mags Portrait is:
Now rinse and repeat for all of the other Portraits.
When you are finished, the 13774_cm_lanemates.tga file should look something similar to this:
And make sure you export this image as 13774_cm_lanemates.tga.
Recompiling props.mw4
Once we have resized all of our individual Pilot Portraits and set up 13774_cm_lanemates.tga, it's now time to recompile props.mw4. Start up MW4eXtractor.exe and open up props.mw4 again. This time, we want to click on Replace Files:
Now click on Add Files and add all of our new Pilot Portraits.
Once you are ready, click Compress!
Inside of your Mechwarrior 4: Mercenaries Installation, there should be a new _props.mw4. That will contain the new props.mw4 with the Pilot Portraits inside.
IMPORTANT: BACKUP YOUR ORIGINAL props.mw4 FILE BEFORE PROCEEDING
Delete the original props.mw4 and rename _props.mw4 to props.mw4. Then start up MW4Mercs.exe. If everything was done correctly, you should see your new pilot images in both the Free Market and the Pre-Mission Briefing Screen:
Enjoy!