Crusader Kings III

Crusader Kings III

Total Animation - All Portraits Are Animated
Morven  [developer] 12 Mar, 2022 @ 4:10am
2
Vanishing Portraits Bug - How to Fix
The vanishing portraits bug in v1.5.1 is caused by Paradox changing the name of portrait keys in the code that mods depended on to display portraits. When a mod attempts to use the pre-v1.5.1 keyname no portrait will appear, to the player the portrait vanishes.

Most mods are being updated, but in the meantime to discover which mod is causing the problem for you, and to attempt your own fix, follow these steps. I'll write the guide for Notepad++ although other text editors and tools can be used.

Proceed at your own risk, it will involve using overwrite functions that you can make mistakes with that will cause bad things to happen.

1. First download and install Notepad++ if you don't have it:
https://notepad-plus-plus.org/downloads/

Optional; you can also download a CK3 language pack from here that makes Paradox code display much nicer:
https://forum.paradoxplaza.com/forum/threads/tool-notepad-script-highlighting-and-autocomplete.1415640/

2. Find your Steam install location. For most people it will be:
C:\Program Files (x86)\Steam\

3. Find your CK3 mod folder. This will be within the Steam folder above, with the following folder structure added on:
C:\Program Files (x86)\Steam\steamapps\workshop\content\1158310\

1158310 is the Steam ID of CK3. The folders inside are mods downloaded from the workshop that will be named by the same numerical Steam ID in the URL of their Steam workshop address. You can see the URL of the workshop entries by enabling the URL bar to display in Steam, or by right clicking Copy Page URL on a workshop item's page in Steam, or viewing the Steam workshop in a normal browser.

If you have Steam in a different folder, change the first part of the address to your Steam folder location to find your CK3 mod folder.

Consider making a backup of the folder you can restore from before proceeding.

4. Open Notepad++. Open from the top menu Search>Find in Files (or hit Ctrl+Shift+F on your keyboard).

5. In the "Directory" field write or paste in the address of the CK3 mod folder above, for most people that will be:
C:\Program Files (x86)\Steam\steamapps\workshop\content\1158310\

6. In the "Filters" field type: *.gui
This limits the search to the .gui files the bugged code appears in.

7. Ensure the "In all sub-folders" box is ticked.

***SKIP TO STEP 13 TO GO STRAIGHT TO THE FIX***

8. To find which mods have bugged code, run two searches. For the first write in the "Find what" field:
portrait_head_small_cached

9. Click "Find All". The results window will pop up files within mods that have the old bugged code. To figure out which mod it is that contains which file, double click the first entry in the results window; this will open the file in question. Right click the top tab of the file where the filename is displayed, from that menu select "Current Dir. Path to Clipboard".

Go back to Windows Explorer and paste the filepath in the explorer menu, this opens the folder location of the file with the bugged code. Then in Window's Explorer navigate back through the folder structure until you get to the affected mod's base folder where both the descriptor.mod file, and the thumbnail.png/jpg are present. Open either file, the descriptor.mod can be opened in Notepad++, and make a record of the mod's name.

10. Repeat for all unique files with the bugged "portrait_head_small_cached" code from the Notepad++ search results.

11. Then do the same search and discover steps 4 to 9 for the other bugged code key: portrait_head_cached

12. Now you have a list of all the mods which are causing the vanishing portraits bug for you. You can either disable them in your launcher, and contact the mod authors to update their code. Be sure to tell them about the fix, you can link back here.

Or you can attempt to apply a fix yourself.

***TO FIX***

CAVEAT: Some mods may need more than the simple key change fix outlined below, they may have sections of code using the bugged keynames that is now redundant and needs to be replaced.

13. In Notepad++ repeat steps 4 to 7:
  • 4. Open Notepad++ open from the top menu Search>Find in Files (or hit Ctrl+Shift+F on your keyboard)

  • 5. In the "Directory" field write or paste in the address of the CK3 mod folder above, for most people that will be:
    C:\Program Files (x86)\Steam\steamapps\workshop\content\1158310\

  • 6. In the "Filters" field type: *.gui
    This limits the search to the .gui files the bugged code appears in.

  • 7. Ensure the "In all sub-folders" box is ticked.

14. In the "Find what" field type:
portrait_head_small_cached

15. In the "Replace with" field type:
portrait_head_small

Be careful not to make mistakes here as you're about to run an overwrite function and implant any of your mistakes into your mod collection's code. Make sure all the fields are set correctly.

Proceed at your own risk.

16. Double check and make sure it all looks correct as per the instructions above, and click "Replace in Files".

17. Now in the "Find what" field type:
portrait_head_cached

18. In the "Replace with" field type:
portrait_head

19. Ensure the "Filters" field remains "*.gui" and the "Directory" field remains the CK3 mod folder location.

Again be careful not to make mistakes here as you're about to run an overwrite function and implant any of your mistakes into your mod collection's code. Make sure all the fields are set correctly.

Proceed at your own risk.

20. Double check and make sure it all looks correct as per the instructions above, and click "Replace in Files".

21. Now all the bugged mods should be fixed of the vanishing portrait bug. Launch the game and find out.

If you made a mistake with the "Replace in Files" function that you can't recover from, to reset everything try "verify games files" of CK3 in Steam, and perhaps redownload any mods whose code you messed up.
Last edited by Morven; 13 Mar, 2022 @ 4:45am
Showing 1-2 of 2 comments
Harken 23 Mar, 2022 @ 6:44pm 
ty very much for this, that bug is almost game breaking if you ever want to use character search. o7
Morven  [developer] 24 Mar, 2022 @ 1:41am 
Thanks mate, yeah it's a pernicious bug in that it can be hard to pin down exactly which mod(s) in your playset is causing it. Happy to be able to help.
Showing 1-2 of 2 comments
Per page: 1530 50