• 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.
Hello,

I cant select my mod its greyed out.
I have made replacement files for dlc013.

grey.jpg
 
Last edited:
do not use .zip for your mod,use direct file.
I have a folder and a fitting mod file.
But its not working.

Btw I wanted to replace gfx files from dlc013, so I made the following folder structure: mynamemod/gfx/characters/westafrican_female but the westafrican_female is actually in the dlc zip directory in the game.
 
For some reason the portraits appear a bit pixelated, I am currently using 3.0 alongside the game of thrones mod to create a few DNAs, any idea what's causing this? Might it be 3.0 version and should I stick with 2.5 instead?
 
It works great for me, except for two specific characters...

I am expecting results like this:
69777864_2979870645387565_2797852901907628032_n.jpg
69637820_2979870222054274_3742871949001359360_n.jpg


Instead, in-game, I get this:
69648286_2979843618723601_5400033055224102912_n.jpg

69870582_2979843582056938_683886817908359168_n.jpg


Can anyone explain me why is the game blatantly ignoring the properties I put in for the characters? I copied both DNA and properties from what the portrait builder gave me.

For the record...

Code:
1000260786 = {
...
	dna="cfeai0bad00"
	properties="rd00fk"
...
}
1000260788 = {
...
	dna="aieh00eb0b0"
	properties="vb0jak"
...
}
 
I can selet my mod now, but the portrait builder shows them broken and not like in game. It doesnt even show the new hair colors amd eye colors I set up in the gfx file.

in portraitbuilder vs game:
eyebrow_p.png



Why is this happening? It seems like the portraits_norse.gfx is not read by the builder.
 
Last edited:
I can selet my mod now, but the portrait builder shows them broken and not like in game. It doesnt even show the new hair colors amd eye colors I set up in the gfx file.

Why is this happening? It seems like the portraits_norse.gfx is not read by the builder.

In your screenshot the mod doesn't appear to be selected ?
Did you check the log files for any errors (the tool can be more strict than vanilla for parsing gfx files) ?
 
In your screenshot the mod doesn't appear to be selected ?
Did you check the log files for any errors (the tool can be more strict than vanilla for parsing gfx files) ?

Yes, I dont know why. Its usually always selected with the same problems.
help2.png


I have filtered all errors in the log file that have 'norse' in them:
Code:
019-10-11 22:58:50,554 ERROR PortraitReader - Lexical error in file portraits_norse.gfx, line @(616, 41) Unexpected token "16"; expected: CLOSE
2019-10-11 22:58:50,566 ERROR PortraitReader - Lexical error in file portraits_norse.gfx, line @(607, 41) Unexpected token "16"; expected: CLOSE
2019-10-11 22:59:13,911 WARN  PortraitBuilderForm - Could not find frame count for Name: PORTRAIT_norsegfx_male, Layers: 49, HairColours: 7, EyeColours: 8 and Unused (d5), disabling dropdown.
2019-10-11 22:59:13,960 WARN  PortraitBuilderForm - Could not find frame count for Name: PORTRAIT_norsegfx_male, Layers: 49, HairColours: 7, EyeColours: 8 and Unused (d10), disabling dropdown.
2019-10-11 22:59:13,960 WARN  PortraitBuilderForm - Could not find frame count for Name: PORTRAIT_norsegfx_male, Layers: 49, HairColours: 7, EyeColours: 8 and Makeup (p14), disabling dropdown.
2019-10-11 22:59:13,960 WARN  PortraitBuilderForm - Could not find frame count for Name: PORTRAIT_norsegfx_male, Layers: 49, HairColours: 7, EyeColours: 8 and Makeup2 (p15), disabling dropdown.
2019-10-11 22:59:13,960 WARN  PortraitBuilderForm - Could not find frame count for Name: PORTRAIT_norsegfx_male, Layers: 49, HairColours: 7, EyeColours: 8 and Jewelry (p16), disabling dropdown.
2019-10-11 22:59:13,960 WARN  PortraitBuilderForm - Could not find frame count for Name: PORTRAIT_norsegfx_male, Layers: 49, HairColours: 7, EyeColours: 8 and Immortality (p17), disabling dropdown.
2019-10-11 22:59:14,182 ERROR PortraitRenderer - Could not render layer GFX_character_german_male_physique:Custom (p21) from C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\interface\portraits\portraits_norse.gfx
2019-10-11 22:59:14,183 ERROR PortraitRenderer - Could not render layer GFX_german_male_cheeks:Cheeks (d4) from C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\interface\portraits\portraits_norse.gfx
2019-10-11 22:59:14,157 ERROR PortraitRenderer - Could not render layer :Headgear (p5) from C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\interface\portraits\portraits_norse.gfx
It has also a lot of errors for the german_male and other special layers (like all layers over p20 I guess). Shall I send the whole errors? That would be a lot to send.
 
Yes, I dont know why. Its usually always selected with the same problems.

I have filtered all errors in the log file that have 'norse' in them:

Code:
019-10-11 22:58:50,554 ERROR PortraitReader - Lexical error in file portraits_norse.gfx, line @(616, 41) Unexpected token "16"; expected: CLOSE
2019-10-11 22:58:50,566 ERROR PortraitReader - Lexical error in file portraits_norse.gfx, line @(607, 41) Unexpected token "16"; expected: CLOSE

Could you show what is between lines 600 -> 620 in portraits_norse.gfx ? There are some "16" that the parser doesn't like.
Could you also check if the file C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\interface\portraits\portraits_norse.gfx exists (I don't have it, it's supposed to be in dlc020) ? That could explain the mod checkbox if you modified base game files directly.
 
Could you show what is between lines 600 -> 620 in portraits_norse.gfx ? There are some "16" that the parser doesn't like.

Ok. Line 600-620 from portraits_norse.gfx are:
Code:
            { 20 20 20 } { 123 123 123 } { 200 200 200 } # hazel brown
            { 20 20 20 } { 123 123 123 } { 200 200 200 } # brown
            { 20 20 20 } { 123 123 123 } { 200 200 200 } # dark brown
        }

        eye_color_index = 9
        eye_color = {
            { 58 109 193}
            { 190 216 225 }
            { 164 191 210 }
            { 94 121 140 }
            { 100 129 101 }
            { 146 176 173 }
        
        }

        headgear_that_hides_hair = {{ 6 10 11 16 17 18 }
    }
 
    # norse Male christian
    portraitType = {

Could you also check if the file C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\interface\portraits\portraits_norse.gfx exists (I don't have it, it's supposed to be in dlc020) ? That could explain the mod checkbox if you modified base game files directly.

Yes its changing files from dlc020 gfx/characters/, but there are files in interface/portraits: portraits_norse and portraits_norsegeal

help2.png
 
Last edited:
Ok. Line 600-620 from portraits_norse.gfx are:

Yes its changing files from dlc020 gfx/characters/, but there are files in interface/portraits: portraits_norse and portraits_norsegeal

It's the extra { that is likely causing the issue:
Code:
        headgear_that_hides_hair = {{ 6 10 11 16 17 18 }

I'm not sure how you got all these files in C:\Program Files (x86)\Steam\SteamApps\common\Crusader Kings II\interface\portraits
I only have these:
vanilla-portraitgfx-files.jpg

If they are yours, you should move them into your mod folder instead, otherwise you can "verify integrity of game files" in steam to get rid of them.
 
It's the extra { that is likely causing the issue.
Yes, thanks a lot. Its working now.
However, I have set up a new layer (p40) in the portrait_properties and used them as an eyebrow layer that uses the hair color. However, i see no eyebrows in the builder (but in game it works). I used "GFX_norse_male_eyebrow:p40:h:y" and set up a sprite in the norse.gfx.

help2.png


It works in game. (There is not choice for selecting eyebrows, I have to figure out how to do that).

ruler_des.png


If they are yours, you should move them into your mod folder instead, otherwise you can "verify integrity of game files" in steam to get rid of them.
Yes these are an old version of my mod, Im removing them.
 
Last edited:
I have fixed everything, portraitbuilder showed everything I wanted correctly.

However, I reinstalled the game during the holidays and after doing that, PortraitBuilder ist not showing my mods in the selection menu (the mods work fine, I have just tried them in game).
I dont know why?

I have also tried to make a userdir.txt in the CK2 dir with the path, however I cant select anything.
What is happening?
 
Last edited:
Hi, I've been trying to start up the portrait builder but I get problems when it tries to download the DLC.
This is what shows up in the log:
Code:
2019-12-01 13:10:26,259 INFO  Program - Starting application
2019-12-01 13:10:26,336 INFO  PortraitBuilderForm - Portrait Builder Version 2.5.0
2019-12-01 13:10:26,338 INFO  PortraitBuilderForm - Configuration: CK2 directory C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\\, Mod directory: C:\Users\User\Documents\Paradox Interactive\Crusader Kings II\mod, DLC directory: C:\Users\User\Desktop\PortraitBuilder\dlc\
2019-12-01 13:10:26,338 INFO  PortraitBuilderForm - ----------------------------
2019-12-01 13:10:26,341 INFO  PortraitBuilderForm - ----------------------------
2019-12-01 13:10:26,341 INFO  PortraitBuilderForm - (Re-)loading data
2019-12-01 13:10:26,342 INFO  Loader - Loading portraits from vanilla.
2019-12-01 13:10:26,455 ERROR PortraitReader - Lexical error in file chatfonts.gfx, line @(9, 3) Unexpected token "colorcodes"; expected: ASSIGN, SUPERIOR, INFERIOR, EQUAL, SUPERIOR_OR_EQUAL, INFERIOR_OR_EQUAL
2019-12-01 13:10:26,474 ERROR PortraitReader - Lexical error in file DefaultDialog.gfx, line @(44, 47) Unexpected character ';' (U+3B)@(45, 2) Unexpected token "}"; expected: ASSIGN, SUPERIOR, INFERIOR, EQUAL, SUPERIOR_OR_EQUAL, INFERIOR_OR_EQUAL
2019-12-01 13:10:26,504 ERROR PortraitReader - Lexical error in file EU3_mapitems.gfx, line @(3, 1) Unexpected token "}"; expected: OPEN, IDENTIFIER, NUMBER
2019-12-01 13:10:26,518 ERROR PortraitReader - Lexical error in file fonts.gfx, line @(20, 3) Unexpected token "colorcodes"; expected: ASSIGN, SUPERIOR, INFERIOR, EQUAL, SUPERIOR_OR_EQUAL, INFERIOR_OR_EQUAL
2019-12-01 13:10:26,534 WARN  PortraitReader - File is empty: C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\\\interface\mainmenu.gfx
2019-12-01 13:10:26,535 ERROR PortraitReader - Lexical error in file mapitems.gfx, line @(128, 3) Unexpected token "cull_distance"; expected: ASSIGN, SUPERIOR, INFERIOR, EQUAL, SUPERIOR_OR_EQUAL, INFERIOR_OR_EQUAL
2019-12-01 13:10:26,821 INFO  Loader - Loading DLCs from C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\\dlc\
2019-12-01 13:10:26,864 INFO  Loader - Extracting Mongol Face Pack to C:\Users\User\Desktop\PortraitBuilder\dlc\dlc002\
2019-12-01 13:10:26,878 FATAL Program - Fatal error.System.ArgumentException: 1 is not a supported code page.
Parameter name: codepage
   at System.Text.Encoding.GetEncoding(Int32 codepage)
   at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
   at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(Stream stream)
   at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip(Stream inputStream, String targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, String fileFilter, String directoryFilter, Boolean restoreDateTime, Boolean isStreamOwner)
   at PortraitBuilder.Engine.Loader.UnzipDLCs(List`1 dlcs) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Engine\Loader.cs:line 128
   at PortraitBuilder.Engine.Loader.LoadDLCs() in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Engine\Loader.cs:line 106
   at PortraitBuilder.UI.PortraitBuilderForm.loadDLCs(Boolean clean) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\UI\PortraitBuilderForm.cs:line 144
   at PortraitBuilder.UI.PortraitBuilderForm.load(Boolean clean) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\UI\PortraitBuilderForm.cs:line 125
   at PortraitBuilder.UI.PortraitBuilderForm..ctor() in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\UI\PortraitBuilderForm.cs:line 77
   at PortraitBuilder.Program.StartUI(String[] args) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Program.cs:line 85
Do you have any suggestions on what I could do?
Thanks!
 
Hi, I've been trying to start up the portrait builder but I get problems when it tries to download the DLC.
This is what shows up in the log:
Code:
2019-12-01 13:10:26,259 INFO  Program - Starting application
2019-12-01 13:10:26,336 INFO  PortraitBuilderForm - Portrait Builder Version 2.5.0
2019-12-01 13:10:26,338 INFO  PortraitBuilderForm - Configuration: CK2 directory C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\\, Mod directory: C:\Users\User\Documents\Paradox Interactive\Crusader Kings II\mod, DLC directory: C:\Users\User\Desktop\PortraitBuilder\dlc\
2019-12-01 13:10:26,338 INFO  PortraitBuilderForm - ----------------------------
2019-12-01 13:10:26,341 INFO  PortraitBuilderForm - ----------------------------
2019-12-01 13:10:26,341 INFO  PortraitBuilderForm - (Re-)loading data
2019-12-01 13:10:26,342 INFO  Loader - Loading portraits from vanilla.
2019-12-01 13:10:26,455 ERROR PortraitReader - Lexical error in file chatfonts.gfx, line @(9, 3) Unexpected token "colorcodes"; expected: ASSIGN, SUPERIOR, INFERIOR, EQUAL, SUPERIOR_OR_EQUAL, INFERIOR_OR_EQUAL
2019-12-01 13:10:26,474 ERROR PortraitReader - Lexical error in file DefaultDialog.gfx, line @(44, 47) Unexpected character ';' (U+3B)@(45, 2) Unexpected token "}"; expected: ASSIGN, SUPERIOR, INFERIOR, EQUAL, SUPERIOR_OR_EQUAL, INFERIOR_OR_EQUAL
2019-12-01 13:10:26,504 ERROR PortraitReader - Lexical error in file EU3_mapitems.gfx, line @(3, 1) Unexpected token "}"; expected: OPEN, IDENTIFIER, NUMBER
2019-12-01 13:10:26,518 ERROR PortraitReader - Lexical error in file fonts.gfx, line @(20, 3) Unexpected token "colorcodes"; expected: ASSIGN, SUPERIOR, INFERIOR, EQUAL, SUPERIOR_OR_EQUAL, INFERIOR_OR_EQUAL
2019-12-01 13:10:26,534 WARN  PortraitReader - File is empty: C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\\\interface\mainmenu.gfx
2019-12-01 13:10:26,535 ERROR PortraitReader - Lexical error in file mapitems.gfx, line @(128, 3) Unexpected token "cull_distance"; expected: ASSIGN, SUPERIOR, INFERIOR, EQUAL, SUPERIOR_OR_EQUAL, INFERIOR_OR_EQUAL
2019-12-01 13:10:26,821 INFO  Loader - Loading DLCs from C:\Program Files (x86)\Steam\steamapps\common\Crusader Kings II\\dlc\
2019-12-01 13:10:26,864 INFO  Loader - Extracting Mongol Face Pack to C:\Users\User\Desktop\PortraitBuilder\dlc\dlc002\
2019-12-01 13:10:26,878 FATAL Program - Fatal error.System.ArgumentException: 1 is not a supported code page.
Parameter name: codepage
   at System.Text.Encoding.GetEncoding(Int32 codepage)
   at ICSharpCode.SharpZipLib.Zip.ZipFile.ReadEntries()
   at ICSharpCode.SharpZipLib.Zip.ZipFile..ctor(Stream stream)
   at ICSharpCode.SharpZipLib.Zip.FastZip.ExtractZip(Stream inputStream, String targetDirectory, Overwrite overwrite, ConfirmOverwriteDelegate confirmDelegate, String fileFilter, String directoryFilter, Boolean restoreDateTime, Boolean isStreamOwner)
   at PortraitBuilder.Engine.Loader.UnzipDLCs(List`1 dlcs) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Engine\Loader.cs:line 128
   at PortraitBuilder.Engine.Loader.LoadDLCs() in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Engine\Loader.cs:line 106
   at PortraitBuilder.UI.PortraitBuilderForm.loadDLCs(Boolean clean) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\UI\PortraitBuilderForm.cs:line 144
   at PortraitBuilder.UI.PortraitBuilderForm.load(Boolean clean) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\UI\PortraitBuilderForm.cs:line 125
   at PortraitBuilder.UI.PortraitBuilderForm..ctor() in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\UI\PortraitBuilderForm.cs:line 77
   at PortraitBuilder.Program.StartUI(String[] args) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Program.cs:line 85
Do you have any suggestions on what I could do?
Thanks!
It says right there: "2019-12-01 13:10:26,878 FATAL Program - Fatal error.System.ArgumentException: 1 is not a supported code page." Paradox programs typically use code page 1252. I can't even find info on code page 1. You should probably check your code page: https://knowledgebase.progress.com/articles/Article/4677
 
(no mods & all dlcs)

what gfx does 769 base ethnicity greek male use? thought it was byzantinegfx but doesn't seem so atm.

went through the list of male gfx from the builder to see which one'd match, none of them do even with the same dna.

what am i doing wrong? :eek:
 
Last edited:
I have all the dlc including the portrait ones so why can't I select the Byzantine portraits in the list? when I try to make portraits for them with the portrait builder all I get is the clothing with the facial portraits being the horrid old default western ones.

Do I need to fork out 20$ or something for the Ultimate Portrait Pack or something!?