• Crusader Kings II Expansion Subscription

    Subscribe to the CK II Expansion and enjoy unlimited access to 13 major expansions and more!


  • Crusader Kings III Available Now!

    The realm rejoices as Paradox Interactive announces the launch of Crusader Kings III, the latest entry in the publisher’s grand strategy role-playing game franchise. Advisors may now jockey for positions of influence and adversaries should save their schemes for another day, because on this day Crusader Kings III can be purchased on Steam, the Paradox Store, and other major online retailers.


    Real Strategy Requires Cunning

Romulien

Lt. General
19 Badges
Jul 2, 2013
1.404
308
  • Crusader Kings II
  • Major Wiki Contributor
Portrait Builder is a tool for Windows that allows to render CK2 portraits outside of the game.

This is a fork and continuation of Measter's original tool, for which the development stopped end of 2012, but whose code was open-sourced.

Features:
  • Read portraits definitions from vanilla, portrait DLC zip archives, or flat mods
  • Preview character portraits based on portraitTypes (ethnicity, sex, age, year), dna, properties, rank and government.
    • Merchant republic and religious special clothing frames are supported via a government drop-down.
    • Societies clothing override is supported via an optional dropdown to replace sprites used by culture-indexed layers (c0->c7)
  • Auto-watch for modifications on loaded mod files while editing, to automatically reload the mod data and refresh current portrait
  • Randomize values for selected characteristics
  • Import/export DNA and properties strings
  • Save current character portrait as png image
  • Disabling of the characteristics that are not used by the selected portrait type, or that have only one frame.
  • Read the user mod folder location via a userdir.txt file in Steam directory (if any)
Limitations:
  • Only works on Windows, compatibility for Linux/Mac with Mono is not working.
    • Note: the tool has some rendering issues with HIP/CPR+ mod on Win7.
  • Does not support archived mods (the ones downloaded from Steam Workshop as .zip)
  • Load order of gfx files is hardcoded to vanilla -> DLCs (alphabetical) -> mods (alphabetical), i.e. "dependencies" of .mod files is not taken into account for overridden files. If you need this for a mod, report it here so it gets supported.
  • Government list is hardcoded with vanilla governments (no parsing of governments from mods)
PortraitBuilder-2.5.0.jpg


Installation:
  • Download PortraitBuilder-2.5.0.zip and unzip it somewhere.
  • Download and install required .NET 4.5 library (in case not already installed)
  • Start PortraitBuilder.exe
  • Select the location of your CK2game.exe (for instance: C:\Program Files (x86)\Steam\SteamApps\common\Crusader Kings II\CK2game.exe) - You can get it from Steam, by right-clicking the game in the library, then Properties / Local Files / Browse Local Files. This value will be kept into a gamedir file.
  • Wait 20-30s for the DLCs to unzip, then the UI should show up.
  • In case of crash, look into the log.txt file for details.
Notes:
Full changelog:

By Romulien:

Version 2.5.0 - 2018-01-27

- Add labels for new vanilla 2.8 properties (p14 makeup, p15 makeup2, p16 jewelry and p17 immortality)
- Add new 2.8 government frames
- Allow selection of characteristics to update when clicking randomize button
- Read mod directory from userdir.txt file in Steam CK2 folder, if any
- Prevent crash when mod directory doesn't exist
- Support unquoted values for spriteType name and texturefile
- Show incompatible mods as disabled in the list, with the reason in tooltip (archived mods, no portrait data or invalid path)

Version 2.4.0 - 2017-04-07

- Support for clothing propertyType override, replacing sprites used by culture-indexed layers (c0->c5)
- Support for a variable number of properties, with dynamic creation of characteristic comboboxes in the UI
- Improve error reporting when parsing portraits.gfx when parsing string into integer or byte
- Allow non-ordered flags in propertyType layers
- Fix randomization that was never using the last frame
- Solve some eye-related rendering issues caused by attempting to read pixels outside of the width/height of the source image

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)

Version 2.2.0 - 2016-07-03

UI:
- Add government dropdown
- Add some tooltips to UI controls

Engine:
- Implement override logic for religious and merchant special sprites
- Add file watchers to mod content, in order to auto-refresh in case of changes
- Add some safeties to .mod file parsing
- Add unhandled exceptions handlers in application

Code re-factoring:
- Upgrade dependencies and use NuGet to retrieve them
- Switch DDS lib from DevIL to CSharpImageLibrary
- Generate .pdb to always have line numbers for exceptions
- Use Costura.Fody to embed dependencies in assembly

Version 2.1.0 - 2016-06-25

UI:
- Use better icon
- Add DLC/mod tabs
- Add "Toggle All" and "Reload" buttons for content.
- Keep selected portraitType when enabling DLC/mod
- Use 2 tabs instead of 3, and move hair/eye color to DNA tab
- Move PORTRAIT_ prefix as a label for portraitType dropdown
- Add d/p codes in labels
- Add warning for properties overridden via portrait_properties.txt
- Rename Earl to Count
- Add dropdown for Player (p11), used in certain mods
- Disable dropdown when a dna/property is not used by any portraitType layer, rather than adding index 0-26.

Engine:
- Split DLCs so they can be activated separately
- Support rendering from multiple mods
- Parse vanilla/DLCs/mods portrait data only once during startup
- Avoid unzipping DLCs at startup if not needed (use Reload button to force refresh)
- Filter files to unzip from DLC, to reduce loading time & size.
- Allow content to only contain sprites in gfx/characters/, without portraitTypes
- Fix bug were duplicate portraitType definition would not override previous one (byzantinegfx)
- Fix load order of assets that was using vanilla instead of mod
- Optimize memory usage, by unloading assets when reloading/unchecking content
- Catch parsing failures at spriteType / portraitType level

Code re-factoring:
- Simplify code structure within a single project
- Separate class concerns to have smaller files
- Adapt class namespaces to match new folder structure
- Replace redundant CustomFlags by proper characteristics

Version 2.0.0 - 2016-04-04
- Compatibility with vanilla 2.5.2
- Update lookup of ck2.exe to CK2game.exe
- Support for offsets (inline and external)
- Support for extra proprty p11 (player overlay)
- Support for DLCs. Disable buggy mod loading, for now.
- Replace poorly usable BrowseFolderDialog by an OpenFileDialog, to locate CK2 .exe
- Rework the logging, using log4net, with various log levels
- Append the version to the window title
- Add an icon to the .exe
- Remove code duplication, and general cleanup of the code
- Fix some gfx parsing errors
- Try/catch around some bad .dds files like western_male_eyes2.dds that cause exceptions

By Measter:

Version 1.1.7 - 2012-11-24
- Added logging. Outputs log on error, and can be forced to output with -log.
- Now attempts to load portrait info from all .gfx files in \interface.
- Can now load mods from My Documents folder.
- Fixed crash when trying to parse a portrait type which already exists.

Version 1.1.6
- Fixed bug in import validation.
- Changed notice text in import dialog to specify 11 digits.

Version 1.1.5
- Updated for CKUtils 1.8.
- Now loads portrait sprites from portrait_sprites.gfx.
- Added selector for the 11th property digit.
- Importing now requires 11 digits for property code.

Version 1.1.4
- Changed UI setup to not be dependent on certain keywords.

Version 1.1.3
- Fixed bug in Muslim hair rendering in vanilla files.

Version 1.1.2
- Added digit to DNA code output to prevent game crash(again).
- Fixed bug when importing DNA codes when using a female portrait set.
- DNA and Property codes are now no longer randomized when changing portrait sets.

Version 1.1.1
- Fixed bug causing crash due to lack of beard on females.

Version 1.1
- Rewrote the program to use CK2s portrait.gfx file instead of .portset files.

Version 1.0.3
- Added randomization button.

Version 1.0.2
- Fixed bug causing the first tile to have the wrong index.

Version 1.0.1
- Changed the DNA output to match the length of that in the game's character definition.
 

Attachments

  • PortraitBuilder-2.0.0.zip
    884,8 KB · Views: 154
  • PortraitBuilder-2.1.0.zip
    890,7 KB · Views: 116
  • PortraitBuilder-2.2.0.zip
    525,5 KB · Views: 225
  • PortraitBuilder-2.3.0.zip
    526,4 KB · Views: 840
  • PortraitBuilder-2.4.0.zip
    523,6 KB · Views: 1.428
  • PortraitBuilder-2.5.0.zip
    520 KB · Views: 3.630
  • PortraitBuilder-3.0.0.1.zip
    281,5 KB · Views: 303
  • PortraitBuilder-3.0.0.2.zip
    292,4 KB · Views: 1.274
Last edited:
  • 20
  • 3
Reactions:

CrackdToothGrin

Mercenary Face Builder
35 Badges
Mar 18, 2007
2.547
690
crackdtoothgrin.designbinder.com
  • Crusader Kings II: Way of Life
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Hearts of Iron III
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings Complete
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Crusader Kings III
  • Crusader Kings II: Sons of Abraham
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
Portrait Builder utility is back in business ! :cool:

This is a fork and continuation of Measter's great tool (original thread: https://forum.paradoxplaza.com/forum/index.php?threads/utility-portrait-builder.604169/ ), for which the development stopped end of 2012.

It should now be compatible with vanilla 2.5.2 and all graphical DLCs.
Mod support has been disabled, until a solution is found to support DLCs + multiple (sub-)mods at the same time.

Installation:
  • Download and install required .NET 4.5 library (in case not already installed)
  • Download PortraitBuilder.zip and unzip it somewhere.
  • Start PortraitBuilder.exe
  • Select the location of your CK2game.exe (for instance: C:\Program Files (x86)\Steam\SteamApps\common\Crusader Kings II\CK2game.ex) - You can get it from Steam, by right-clicking the game in the library, then Properties / Local Files / Browse Local Files. This value will be kept into a gamedir file.
  • Wait 20-30s for the DLCs to unzip, then the UI should show up.
  • In case of crash, look into the log.txt file for details.

Changelog:

Does "Graphical DLC" include maybe mods in .zip format dropped in the main directory?

You have no idea how useful this program could be to me specifically. Also, excited to try it!
 
  • 1
Reactions:

loup99

Godogost of Armorica
79 Badges
Jan 22, 2013
16.364
5.257
  • Crusader Kings III
  • Europa Universalis IV
  • Warlock 2: The Exiled
  • 500k Club
  • Pride of Nations
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Crusader Kings Complete
  • Imperator: Rome Deluxe Edition
  • Victoria 2
  • Arsenal of Democracy
  • Cities in Motion
  • Crusader Kings II
  • Darkest Hour
  • Europa Universalis III: Chronicles
  • For The Glory
  • Hearts of Iron III
  • March of the Eagles
  • Rome Gold
  • Sengoku
  • Victoria 2: A House Divided
  • Victoria: Revolutions
  • Cities: Skylines
  • Europa Universalis IV: Pre-order
Thank you for bringing this up to date, I'm sure it will be very helpful for the modding community!
 
  • 2
Reactions:

Romulien

Lt. General
19 Badges
Jul 2, 2013
1.404
308
  • Crusader Kings II
  • Major Wiki Contributor
Does "Graphical DLC" include maybe mods in .zip format dropped in the main directory?

You have no idea how useful this program could be to me specifically. Also, excited to try it!

I can imagine the pain of waiting for the game to load every time...

Yes, that workaround will actually work :p
Drop the .zip and .mod file in \common\Crusader Kings II\DLC\, and adapt the .mod file:
- change the .mod file extension to .dlc
- change the archive path from
Code:
archive = "mod/mymod.zip"
to
Code:
archive = "dlc/mymod.zip"
- it's probably best to start the zip name with a letter after d, so that the mod is loaded last (in case it overrides DLC stuff)

For a more convenient solution, I'm thinking to expand the UI with a scrollable list of DLCs and mods, with check-boxes to activate/deactivate each one individually (i.e. similar to the game launcher) - if feasible. What do you think ?
 
Last edited:
  • 5
  • 1
Reactions:

richvh

Preserver of the Light
63 Badges
Dec 1, 2001
14.691
1.999
Visit site
  • Stellaris: Leviathans Story Pack
  • Pillars of Eternity
  • Crusader Kings II: Horse Lords
  • Cities: Skylines - After Dark
  • Knights of Pen and Paper 2
  • Crusader Kings II: Conclave
  • Stellaris
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Crusader Kings II: Reapers Due
  • Tyranny: Archon Edition
  • Tyranny: Archon Edition
  • Tyranny: Gold Edition
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Surviving Mars
  • Stellaris: Synthetic Dawn
  • Tyranny - Tales from the Tiers
  • Tyranny - Bastards Wound
  • Age of Wonders III
  • Age of Wonders: Shadow Magic
  • Age of Wonders
  • Age of Wonders II
  • Crusader Kings II: Jade Dragon
  • Crusader Kings III: Royal Edition
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • A Game of Dwarves
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Magicka
  • Majesty 2 Collection
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Rome: Vae Victis
  • 500k Club
  • Cities: Skylines
Wouldn't it be archive = "dlc/mymod.dlc" since you're changing the filetype to .dlc?
 

CrackdToothGrin

Mercenary Face Builder
35 Badges
Mar 18, 2007
2.547
690
crackdtoothgrin.designbinder.com
  • Crusader Kings II: Way of Life
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Hearts of Iron III
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings Complete
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Crusader Kings III
  • Crusader Kings II: Sons of Abraham
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
I can imagine the pain of waiting for the game to load every time...

I've logged like 100 hours of play time just loading the game up to test something.

And that's just for when I haven't bothered to take the game files out and play outside of Steam.

For a more convenient solution, I'm thinking to expand the UI with a scrollable list of DLCs and mods, with check-boxes to activate/deactivate each one individually (i.e. similar to the game launcher) - if feasible. What do you think ?

I think that's great, personally.

Hardmode suggestions: Make it so that way you can modify the RGB values of the eye color and hair color and export them in the same way they are in the .gfx files to avoid the "type save overwrite reload" of customizing hair color. Or have the ability to pixel shift and export to create custom offset files. :)
 
  • 1
Reactions:

Romulien

Lt. General
19 Badges
Jul 2, 2013
1.404
308
  • Crusader Kings II
  • Major Wiki Contributor
Wouldn't it be archive = "dlc/mymod.dlc" since you're changing the filetype to .dlc?

I've clarified my post, it is the .mod that needs to be renamed to .dlc, the zip archive remains as-is.

Hardmode suggestions: Make it so that way you can modify the RGB values of the eye color and hair color and export them in the same way they are in the .gfx files to avoid the "type save overwrite reload" of customizing hair color. Or have the ability to pixel shift and export to create custom offset files. :)

Would a "refresh/reload portrait" button, to quickly take into account latest changes in .gfx / offsets / assets files help ?
I'd prefer to keep the file editing and portrait rendering separate, due to the complexity of the UI that would be needed for proper editing.
 
  • 1
Reactions:

CrackdToothGrin

Mercenary Face Builder
35 Badges
Mar 18, 2007
2.547
690
crackdtoothgrin.designbinder.com
  • Crusader Kings II: Way of Life
  • Heir to the Throne
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Victoria: Revolutions
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Hearts of Iron III
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Monks and Mystics
  • Crusader Kings Complete
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
  • Crusader Kings III
  • Crusader Kings II: Sons of Abraham
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis III Complete
  • Divine Wind
Would a "refresh/reload portrait" button, to quickly take into account latest changes in .gfx / offsets / assets files help ?
I'd prefer to keep the file editing and portrait rendering separate, due to the complexity of the UI that would be needed for proper editing.

Sure thing, that would work.
 

Preuße

Second Lieutenant
55 Badges
Mar 15, 2008
123
166
  • Crusader Kings II: Charlemagne
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mare Nostrum
  • Stellaris: Synthetic Dawn
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • Europa Universalis IV: Call to arms event
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Conquest of Paradise
  • Crusader Kings II
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sword of Islam
  • Europa Universalis IV: Art of War
  • Divine Wind
  • Europa Universalis III
  • Crusader Kings II: Sunset Invasion
  • Stellaris: Apocalypse
  • Stellaris: Distant Stars
  • Stellaris: Humanoids Species Pack
  • Hearts of Iron IV: Expansion Pass
  • Stellaris: Ancient Relics
  • Hearts of Iron IV: Death or Dishonor
  • Stellaris: Lithoids
  • Europa Universalis IV: Mandate of Heaven
  • Crusader Kings II: Holy Fury
  • Crusader Kings II: Monks and Mystics
  • Hearts of Iron IV: Together for Victory
  • Stellaris: Leviathans Story Pack
  • Stellaris: Digital Anniversary Edition
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II: Reapers Due
  • Hearts of Iron IV: Colonel
  • Hearts of Iron IV: Cadet
  • Stellaris
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Horse Lords
  • Europa Universalis IV: Common Sense
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: El Dorado
  • Crusader Kings III
  • 500k Club
  • Europa Universalis IV
Thank you for this.
 
  • 1
Reactions:
2.1.0

Romulien

Lt. General
19 Badges
Jul 2, 2013
1.404
308
  • Crusader Kings II
  • Major Wiki Contributor
PortraitBuilder 2.1.0 is now released, and has mod support !
It also contains some UI and performance improvements.
See the first post for download and installation instruction.

Mods were tricky because they may contain bad syntax, empty or corrupted files, etc.
I've tested with a few of them, but feel free to report issues, by comparing the rendering in-game and with PortraitBuilder.
In particular I've noticed an issue in BLG with sprite betterlookinggarbs\gfx\characters\shared\imprisoned.dds, which seems corrupted (couldn't test if it's also broken in-game).

For next release, I'm planning to add support for religious & merchants clothing as well as government frames, probably via a dropdown with an hardcoded list of vanilla governments.

Changelog:
Version 2.1.0 - 2016-06-25

UI:
- Use better icon
- Add DLC/mod tabs
- Add "Toggle All" and "Reload" buttons for content.
- Keep selected portraitType when enabling DLC/mod
- Use 2 tabs instead of 3, and move hair/eye color to DNA tab
- Move PORTRAIT_ prefix as a label for portraitType dropdown
- Add d/p codes in labels
- Add warning for properties overridden via portrait_properties.txt
- Rename Earl to Count
- Add dropdown for Player (p11), used in certain mods
- Disable dropdown when a dna/property is not used by any portraitType layer, rather than adding index 0-26.

Engine:
- Split DLCs so they can be activated separately
- Support rendering from multiple mods
- Parse vanilla/DLCs/mods portrait data only once during startup
- Avoid unzipping DLCs at startup if not needed (use Reload button to force refresh)
- Filter files to unzip from DLC, to reduce loading time & size.
- Allow content to only contain sprites in gfx/characters/, without portraitTypes
- Fix bug were duplicate portraitType definition would not override previous one (byzantinegfx)
- Fix load order of assets that was using vanilla instead of mod
- Optimize memory usage, by unloading assets when reloading/unchecking content
- Catch parsing failures at spriteType / portraitType level

Code re-factoring:
- Simplify code structure within a single project
- Separate class concerns to have smaller files
- Adapt class namespaces to match new folder structure
- Replace redundant CustomFlags by proper characteristics

Would love mod portrait support though.

Done ! :)
 
  • 4
Reactions:

CannotresistDLC

Captain
22 Badges
May 28, 2016
302
190
  • Crusader Kings II: Charlemagne
  • Pillars of Eternity
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Republic
  • Crusader Kings II
  • Shadowrun Returns
  • Cities: Skylines - Parklife
  • Cities: Skylines - Parklife Pre-Order
  • Cities: Skylines - Green Cities
  • Age of Wonders III
  • Cities: Skylines - Mass Transit
  • Crusader Kings II: Reapers Due
  • Crusader Kings II: Conclave
  • Cities: Skylines - After Dark
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Way of Life
  • Cities: Skylines
Nice, thanks for the hard work! I'll give the new version a try as soon as my next generation comes of age, no doubt. (If portraits/dna affected the "ugly" trait, all of my Genius/Quick/Strong dynasty members would have it...)
 

selteur

Sergeant
18 Badges
Aug 30, 2012
85
23
  • Crusader Kings II
  • Stellaris: Distant Stars
  • Crusader Kings III
  • Stellaris: Federations
  • Hearts of Iron IV: La Resistance
  • Stellaris: Lithoids
  • Stellaris: Ancient Relics
  • Prison Architect
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Hearts of Iron IV: Cadet
  • Stellaris
  • 500k Club
  • Battle for Bosporus
  • Stellaris: Megacorp
  • Crusader Kings II: Sword of Islam
Hello ! your software seems to be great but it doesn't launch for me i check the log files and i do not found any errors. Can you help me ?:)
 

Romulien

Lt. General
19 Badges
Jul 2, 2013
1.404
308
  • Crusader Kings II
  • Major Wiki Contributor
Hello ! your software seems to be great but it doesn't launch for me i check the log files and i do not found any errors. Can you help me ?:)

Sure, but I'll need a bit more info to be able to help ^^
Does it generate a log.txt next to PortraitBuilder.exe ?
If yes, can you show or PM me the content, to know which step it passed ?
If no, it means it doesn't succeed to launch the application at all, maybe some .dll from the .zip are missing or .NET 4.5 (which version of Windows do you have ?) ?
 
2.2.0

Romulien

Lt. General
19 Badges
Jul 2, 2013
1.404
308
  • Crusader Kings II
  • Major Wiki Contributor
PortraitBuilder 2.2.0 is now released !
See the first post for download and installation instructions.

It adds support for governments, with the rendering of theocracy and merchant republic special clothing.
List of governments is hardcoded from vanilla (no parsing of government files / frame_suffix).

It also adds a "file watcher" on activated mods: changing any portraits .gfx, .dds assets or external offsets .txt, will trigger a refresh of mod data and re-draw of portrait.
Implementation is basic (whole mod data gets refreshed), but performances seem OK.

With this done, I'm hoping PortraitBuilder has all the important stuff in, and I don't plan any other releases, except for potential bugfixes or compatibility with a future vanilla patch.
Feel free to suggest other features though, if you feel something is missing !

Full changelog:
Version 2.2.0 - 2016-07-03

UI:
- Add government dropdown
- Add some tooltips to UI controls

Engine:
- Implement override logic for religious and merchant special sprites
- Add file watchers to mod content, in order to auto-refresh in case of changes
- Add some safeties to .mod file parsing
- Add unhandled exceptions handlers in application

Code re-factoring:
- Upgrade dependencies and use NuGet to retrieve them
- Switch DDS lib from DevIL to CSharpImageLibrary
- Generate .pdb to always have line numbers for exceptions
- Use Costura.Fody to embed dependencies in assembly

PortraitBuilder-2.2.0.jpg


Sure thing, that would work.

Done, using file watchers on active mods !

Hello ! your software seems to be great but it doesn't launch for me i check the log files and i do not found any errors. Can you help me ?:)

Based on your logs I couldn't identify the cause for certain, but I've made the .mod files parsing a bit more robust.
I've also added line numbers in exception stacktrace (.pdb file), so that if issue is still there with new version, new logs should allow to narrow it down !
 
Last edited:
  • 4
Reactions:

Colossal_Elk

Unspecified Cervid
23 Badges
Dec 10, 2013
1.320
1.544
  • Crusader Kings II: Charlemagne
  • Europa Universalis IV: Res Publica
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
  • Crusader Kings II: Way of Life
  • Crusader Kings II: Horse Lords
  • Crusader Kings II: Conclave
  • Stellaris
  • Crusader Kings II: Reapers Due
  • Stellaris: Digital Anniversary Edition
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Crusader Kings II: Jade Dragon
  • Crusader Kings II: Holy Fury
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.