CK2 PortraitBuilder
Build Server |
Framework |
Status |
AppVeyor |
.NET 4.6.2 |
|
Travis |
Mono 5.x |
|
PortraitBuilder is a Winforms application to help CK2 modders creating custom characters, by previewing their appearance, which can then be used in character history of mods, or to customize a character in a saved game.
This project is a fork of Measter's 1.x PortraitBuilder.
See the dedicated CK2 forum thread, after registering your CK2 game.
Features
- Reading portraits from vanilla, DLCs zip archives and mod folders
- Saving current portrait as png image
- Import/export of DNA & properties strings
.NET users (Windows)
- Install .NET 4.6.2
- Start PortraitBuilder.exe
- Select your CK2 game executable (ex: C:\Program Files (x86)\Steam\SteamApps\common\Crusader Kings II\CK2game.exe). This value is kept into a file "gamedir.txt".
- Errors are logged to a log.txt file. Adding -logfull to PortraitBuilder.exe launch options will set log level to DEBUG.
Mono users (Linux/MacOS/Windows)
- Install Mono 6.x. Note: GTK# is not required.
- To launch:
- On Windows, run "mono PortraitBuilder.exe"
- On Linux, run ". PortraitBuilder" which is an alias for "MONO_PATH=./lib mono PortraitBuilder.exe"
- On MacOS, run: "MONO_PATH=./lib mono --arch=32 PortraitBuilder.exe", as WinForms only work with Mono 32bits on MacOS
- Select your CK2 game executable (ex: ~/.local/share/Steam/SteamApps/common/Crusader Kings II/ck2 or /Users/USER/Library/Application Support/Steam/SteamApps/common/crusader kings ii/ck2.app). This value is kept into a file "gamedir.txt".
- Errors are logged to a log.txt file
Developers
Install Visual Studio Community 2017.
Build from PortraitBuilder.sln, it will automatically download dependencies via NuGet from packages.config file.
The built executable for .NET can also be executed with Mono, without needing to re-compile.
Main dependencies:
To re-generate the Lexer/Parser from the grammar, install Hime standalone distribution, and use the himecc command line utility:
himecc PortraitReader.gram -n PortraitBuilder.Parser
Using Ubuntu on Windows 10
You'll need Xming for Windows.
Create the following symlinks to simulate a CK2 Steam installation on Unix:
- Game files: ln -s /mnt/c/Program\ Files\ (x86)/Steam ~/.local/share/Steam
- Shortcut in home folder: ln -s ~/.local/share/Steam/SteamApps/common/Crusader\ Kings\ II ~/ck2
- Mod folder: ln -s /mnt/c/Users/[user]/Documents/Paradox\ Interactive ~/.paradoxinteractive