• 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.
Wanted to report a minor issue that I'm having with Elder Kings. Custom races don't seem to match up exactly with the DNA and properties when I import a character's DNA and properties. No idea why that's happening, though.

Do you mean that, for instance, DNA chosithikwe may become cheii0hace0, after it refreshes ?
It happens when letters are higher than the number of frames in the sprite.
For instance d2 o becomes e if there are only 10 frames (a -> j), but both represent the 5th frame.
Also d5 (t) and d10 (e) are reset to 0, because they're not used in portraits.

Btw, just noticed that p6-p11 were behaving badly when importing with value 0: they seem to be randomized, I'll fix that.
 
  • 1
Reactions:
Do you mean that, for instance, DNA chosithikwe may become cheii0hace0, after it refreshes ?
It happens when letters are higher than the number of frames in the sprite.
For instance d2 o becomes e if there are only 10 frames (a -> j), but both represent the 5th frame.
Also d5 (t) and d10 (e) are reset to 0, because they're not used in portraits.

Btw, just noticed that p6-p11 were behaving badly when importing with value 0: they seem to be randomized, I'll fix that.

Yup, that's more or less what I was encountering--the two mostly match up but are slightly different.
 
This is really great. I'll test it now, but first, thanks a lot to worked on it!
@Romulien I just want to drop by and tell you what a god-send this little program has been while I was modding new portraits. Thank you so much for saving me so much time!

You're welcome ! In the end the time spent updating it will be compensated by the time you've gained :)
 
  • 1
Reactions:
Is it feasible to include support for additional, currently unused property layers?
 
Is it feasible to include support for additional, currently unused property layers?

Yeah, I can add d5, d10 and p2 (base head) as well - but I don't know if they work in-game. Do you know any mod using them ?
The characteristics not used in any layer of current portraitType, like p4 (beard) for women, get disabled so that shouldn't be too confusing.
 
I was thinking more along the lines of pre-supporting p14 and p15.
 
I was thinking more along the lines of pre-supporting p14 and p15.

With a bit of code refactoring it could be possible to deduce the list of characteristics from the ones referenced in portraitTypes, rather than hardcoding them.
Though not sure if this is worth the work, unless Paradox makes the maximum number of properties actually moddable.

I'm curious how to select non-german portraits? Selecting Byzantine Gfx does nothing. Even with DLCs checked on left
Having the same issue

byzantinegfx has fallback types in vanilla (using westerngfx assets), so you also need to activate "Mediterranean Portraits" DLC to actually get the byzantine sprites form dlc014.zip.
Is that the case ?
 
2.3.0
PortraitBuilder 2.3.0 is now released (see the first post for download and installation instructions).

Changelog:
Version 2.3.0 - 2016-09-03

- Support for mask (p12) and eyepatch (p13) new characteristics
- Add dropdowns for head (p2), d5 and d10 characteristics, in case used by mods
- Disable dropdown if sprite has only 1 frame (e.g. p2)
- Remove randomization when dna/properties 'letter' is 0 , and use index 0 instead
- 'letter' 0 is now used in output dna/properties strings with index 0, instead of (max - 1)

PortraitBuilder-2.3.0.jpg
 
Last edited:
  • 3
Reactions:
With a bit of code refactoring it could be possible to deduce the list of characteristics from the ones referenced in portraitTypes, rather than hardcoding them.
Though not sure if this is worth the work, unless Paradox makes the maximum number of properties actually moddable.

Actually I just saw there was a NDefines.NGraphics.NUMBER_OF_PROPERTIES = 14 so maybe they already are moddable ?!
 
  • 1
Reactions:
Something new since 2.4.1. I don't have 2.5.2 handy to check. Something to ask Divine.
 
With a bit of code refactoring it could be possible to deduce the list of characteristics from the ones referenced in portraitTypes, rather than hardcoding them.
Though not sure if this is worth the work, unless Paradox makes the maximum number of properties actually moddable.




byzantinegfx has fallback types in vanilla (using westerngfx assets), so you also need to activate "Mediterranean Portraits" DLC to actually get the byzantine sprites form dlc014.zip.
Is that the case ?

we DID enable Mediterranean portraits! We enabled ALL portrait packs
 
Something new since 2.4.1. I don't have 2.5.2 handy to check. Something to ask Divine.

It appears the define was added in 2.6.1 ! I've done some testing creating a new p14 in a layer, with:
Code:
NDefines.NGraphics.NUMBER_OF_PROPERTIES = 15
And it... works ! Guess that's an undocumented modding improvement ! :p We need no more re-use 'blinded' or 'player' layers for misc stuff.
I've updated the wiki accordingly: http://www.ckiiwiki.com/Portrait_modding#Properties, I'll see if this can be supported by the Portrait Builder.
 
  • 3
Reactions:
we DID enable Mediterranean portraits! We enabled ALL portrait packs

Hmm, just though about something: try to click on "Reload" button once in DLC tab. For a quicker startup the unzipping of DLCs is only done once, and maybe something went wrong the first time.
If that doesn't help, could you send me a copy of your logs via PM (log.txt file at same level as the .exe) ? Hopefully it will contain some clues.
Also could you check that you have a folder \dlc\dlc014\ with some unzipped assets, next to the .exe ?

For clarity here's what I'm having for byzantinegfx:
byzantine.jpg
 
  • 1
Reactions:
I've attached an image of what happens whenever I enable a mod (green graphics on portraits). Does anyone know why this might be happening?

I also see entries in the log file such as:

016-10-07 14:38:17,862 ERROR PortraitReader - Could not parse portraitType in file C:\Users\Jeff\Documents\Paradox Interactive\Crusader Kings II\mod\\Historical Immersion Project\interface\portraits\portraits_siberian.gfx
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at PortraitBuilder.Parser.PortraitReader.ParseLayer(ASTNode node, String filename) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Parser\PortraitReader.cs:line 268
at PortraitBuilder.Parser.PortraitReader.ParseLayers(ASTNode node, String filename) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Parser\PortraitReader.cs:line 255
at PortraitBuilder.Parser.PortraitReader.ParsePortraitType(ASTNode node, String filename) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Parser\PortraitReader.cs:line 185
at PortraitBuilder.Parser.PortraitReader.ParsePortraits(ASTNode node, String filename, PortraitData data) in c:\Users\Romain\git\PortraitBuilder\PortraitBuilder\Parser\PortraitReader.cs:line 134

What's interesting is that enabling the mod adds the new cultures to the dropdown but, as in this example, only the male Siberians appear and not the females, even though they are both part of portraits.siberian.gfx.
 

Attachments

  • Capture07OCT16.PNG
    Capture07OCT16.PNG
    73,5 KB · Views: 27