• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

crusader9

Second Lieutenant
47 Badges
Mar 23, 2014
162
297
  • Crusader Kings II: Legacy of Rome
  • Stellaris
  • Cities: Skylines Deluxe Edition
  • War of the Roses
  • Warlock 2: Wrath of the Nagas
  • Warlock 2: The Exiled
  • Crusader Kings II
  • Majesty 2
  • King Arthur II
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: The Republic
  • Stellaris: Nemesis
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Humanoids Species Pack
  • Stellaris: Apocalypse
  • Cities: Skylines - Green Cities
  • BATTLETECH - Digital Deluxe Edition
  • Cities: Skylines - Parklife
  • Shadowrun Returns
  • BATTLETECH: Flashpoint
  • Stellaris: Megacorp
  • Stellaris: Ancient Relics
  • Age of Wonders: Planetfall
  • Age of Wonders: Planetfall Sign Up
  • Stellaris: Lithoids
  • Age of Wonders: Planetfall - Revelations
  • Stellaris: Federations
  • Stellaris: Necroids
  • Cities: Skylines - Natural Disasters
  • Warlock: Master of the Arcane
  • Cities: Skylines
  • Pillars of Eternity
  • Cities: Skylines - After Dark
  • Cities: Skylines - Snowfall
  • Hearts of Iron IV: Cadet
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Age of Wonders II
  • Stellaris - Path to Destruction bundle
  • Cities: Skylines - Mass Transit
  • BATTLETECH
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Synthetic Dawn
  • Age of Wonders
  • Stellaris: Distant Stars
  • Age of Wonders III
I am trying to use a custom portrait for Glitch because I renamed her as a different character. However, I am not sure how to make it work. I edit the file and enter a portrait path for "Icon": "" but the game seems to ignore that when I start a new campaign and just goes back to the default. So, I got to edit the file PortraitPreset_glitch.json and change "Icon": "" to reflect on the path to the portrait like in other pre-made pilots, but it still only uses the default. So, I remove all of the 3d portrait parameters stuff below "Icon": "" and it still didn't work (kinda figured that wouldn't work).

Anyways, how do you make it so the starting pilots use custom portraits?
 
Well, the first thing to understand is that the starting pilot portraits are actually defined in simGameConstants/SimGameConstants.json... right underneath the list of "StartingMechWarriors" it has a section for "StartingMechWarriorPortraits".

It is important to note that "PortraitPreset_glitch" there is NOT a path... it is an ID. The system figures out what to do with the ID based on the information in the VersionManifest.csv file. For... well, reasons... I currently have 1.0.4 installed, so I don't know if some of this has changed... but in my testing, I found that the starting pilots can NOT use the "Sprite" type of resource that indicates a pre-generated image. It must use the "PortraitSettings" type of resource instead. The good news is that the portrait preset does appear to in turn allow you to select a Sprite resource to use by listing it in the "Icon" field. (Confused yet?)

I didn't fully test it since the 1.0.4 version can't skip the tutorial missions and I'm not running through those just to see if I managed to change Glitch's appearance correctly. What I do know, however, is that when I used an existing Sprite resource as the "StartingMechWarriorPortraits" entry, it would not start a new campaign and just sat on the loading screen endlessly (typical behavior when it can't find the resource it needs). When I instead changed the Icon entry in the PortraitPreset_glitch.json file (which is the one loaded for the PortraitPreset_glitch ID referenced in the default SimGameConstants.json file), the new campaign DID start correctly. I recommend first trying to load one of the existing custom images before working on getting your own in... basically all of the Skirmish pilots have IDs that are just their names. So in that Icon field, try putting "Apex", "Arclight", or whatever pilot you prefer.

If that works, then you can create your own ID by modifying the version manifest:
  • Find the line that starts with PortraitPreset_glitch.
  • COPY the whole line to a new line.
  • Change the ID (PortraitPreset_glitch) to some other value that isn't likely to be used anywhere else in the file (such as My_Custom_Glitch_Portrait).
  • Change the PortraitSettings bit to Sprite instead.
  • Change the data/portraits/PortraitPreset_glitch.json path to point to your PNG image instead.
Once the manifest is changed, you can then put the ID you used into Glitch's portrait preset file and it should work (assuming it's possible to use the custom portraits at all... if the Icon field isn't active, you're out of luck).

Edit: Almost forgot to mention... if you use Modtek/BTML it can take care of version manifest changes for you. I'm not going to run through the details, but basically you tell the modding system about the new entries you've made and it deals with telling the game.

2nd Edit: Also, it's likely that this is one of those changes that can safely be reverted to the vanilla unmodded game without having any effect on existing saves. So unless you want more custom pilots in future games, updates will not break things and you won't need to go through this process again.
 
Last edited:
Did you ever find a way to make this work?

I was thinking about this again today and gave it a try myself... now I'm not sure if it's possible for the starting pilots to have custom portraits at all. Not without writing a code-level mod, anyway.
 
Hi,
have a look at my thread about adding custom pilots to career mode. I also include steps on how to add custom portraits to pilots. It should cover what you are looking for.