About this mod
Mod allows easy customization of NPC and Party Member portraits. Mod also allows customization of party member bodies. Optional advanced features allow real-time selection of portrait/body based on user defined rules
- Requirements
- Permissions and credits
- Changelogs
Portraits
This mod allows you to easily customize the portraits of various characters in WOTR with advanced features provided specifically for companions.
Bodies
Mod supports body and appearance changes for companions by placing/including a human-readable body.json file in the folder containing the portrait of the companion. The body will be loaded/applied along with the portrait. A boon for Portrait Pak authors who don't want to be limited by the typical in-game model associated with the companion.
Rules
In addition to portraits and bodies, mod supports rules that allow users to define multiple portraits and bodies for each companion and a rule will determine when the portrait/body is used. This can potentially allow some interesting behaviors like:
- Portrait/Appearance can change based on companion class selection choices as they level up.
- Portrait/Appearance can change based on companion items/armor worn. See changes to both portrait and body occur as they add and remove items.
- Portrait/Appearance can change based on quest state.
- Portrait/Appearance can change for specific dialogs.
- Portrait/Appearance can change when combat begins/ends. Maybe your companions drop the visor, put on a helmet or put on a hood in combat, but you like to see their face outside combat
- Portrait/Appearance can change mid-combat based on health. Watch the face display a bloody lip, broken nose, blood splatters or maybe just have a red tint set in as the health drops.
- Portrait/Appearance can change based on the presence of numerous facts/tags associated with the Companions.
- Many, many... more.
Installation
Typically one would install this just before or at the same time as an NPC Portrait Pak.
1. Start -> Windows System -> File Explorer
2. In the Location Bar, enter:
%APPDATA%\..\LocalLow\Owlcat Games\
- Hit enter to resolve and go to the directory.
3. Copy/Paste CompanionPortraitEnabler_v1.7z into the folder above.
Within the folder "Owlcat Games" you should now see two items: The folder "Pathfinder Wrath Of The Righteous" and the file you just copied in/saved:
...\Pathfinder Wrath Of The Righteous
...\CompanionPortraitEnabler_v1.7z
4. Right click the file and select "7-Zip" -> Extract Here
If this is the first mod you have ever installed, you shouldn't see any overwrite prompts.
If you have installed mods in the past, there may be contention with "OwlcatModificationManagerSettings.json". If you are prompted to overwrite that file, select "No" and manually update it Advanced section of readme. If you are prompted to overwrite any files other than "OwlcatModificationManagerSettings.json" consider cancelling and following the Advanced Install instructions in the readme.
The Advanced Install instructions are more detailed and geared towards helping users avoid breaking other mods. If this is the only WOTR mod you have installed, then you can just hit "Yes to all" and be on your way as there is no danger of breaking another mod.
5. Your done. Without a portrait pak installed, all the mod will do is generate resources in the folder:
%APPDATA%\..\LocalLow\Owlcat Games\Pathfinder Wrath Of The Righteous\Portraits\πpcSnapshots
I recommend installing an NPC Portrait Pak such as Showcase Portraits for CPE to confirm it is working.
Some information regarding how to setup your own portraits for companions and define your own bodies can be found below. More details can be found on the wiki page. (And if not, it will be updated soon :) )
Details
Portraits
By default, the mod monitors portrait requests made by the game engine. When one is detected, it checks the folder:
WOTR_CONFIG_FOLDER/Portraits/πpcPortraits/
The mod looks inside "πpcPortraits" for a folder that matches the name of the requested portrait. When found (with validated contents), the mod returns the local override portrait instead of the games default portrait.
Portrait interception allows users to override the portraits of most in-game characters with simple folder naming conventions and file drops similar to the way users can add portrait options for the player.
Example:
When you meet Seelah, the game will request "Seelah_Portrait". The mod intercepts the request and checks for a folder named:
.../Portraits/πpcPortraits/Seelah_Portrait/
If found, it will verify the 3 files below:
.../Portraits/πpcPortraits/Seelah_Portrait/Fulllength.png
.../Portraits/πpcPortraits/Seelah_Portrait/Medium.png
.../Portraits/πpcPortraits/Seelah_Portrait/Small.png
If all files are valid, they will be loaded and returned in place of the games normal image for Seelah.
Bodies
Following the same process as above, if a portrait folder contains a body.json, the contents are parsed and an attempt is made to apply the appearance to the associated NPC.
.../Portraits/πpcPortraits/Seelah_Portrait/body.json
This system always works with companions, however, non-companion characters are typically baked into the game in such a way that their appearance can not be altered. You can attempt to put a body.json in the folders of non-companion NPCs and the mod will attempt to apply it, but it doesn't typically work.
This mod treats portrait and body overrides independently. You can have a body.json in a Portrait folder without any portraits and it will still get applied.
Q: How do I obtain/create/update a body.json file?
When you save, load or transition between areas, CPE saves off snapshots of game resources to the directory:
WOTR_CONFIG_FOLDER/Portraits/πpcSnapshots/
This includes the current body.json for each party member as well as files detailing in game items, objects and party stats. Use these as a reference to create and build your own bodies.
A more comprehensive listing of body file format and properties can be found on the wiki. (And if it is not, it will be soon :) )
RULES
If a portrait request is made and the associated NPC is a member of the party (either traveling with you or not), after processing the portrait folder, the mod will search for sub-folders containing rules.
Portraits:
Mod will search for subfolders that begin with the prefix "portrait". If found, it will confirm the existence of 3 images and a rule.json. For example, Seelah_Portrait may look like this:
.../πpcPortraits/Seelah_Portrait/FullLength.png
.../πpcPortraits/Seelah_Portrait/Medium.png
.../πpcPortraits/Seelah_Portrait/Small.png
.../πpcPortraits/Seelah_Portrait/portrait_01/FullLength.png
.../πpcPortraits/Seelah_Portrait/portrait_01/Medium.png
.../πpcPortraits/Seelah_Portrait/portrait_01/Small.png
.../πpcPortraits/Seelah_Portrait/portrait_01/rule.json
.../πpcPortraits/Seelah_Portrait/portrait_02/FullLength.png
.../πpcPortraits/Seelah_Portrait/portrait_02/Medium.png
.../πpcPortraits/Seelah_Portrait/portrait_02/Small.png
.../πpcPortraits/Seelah_Portrait/portrait_02/rule.json
When game events fire, the sub-folders are evaluated in alphanumeric order. First sub-folder with a rule that evaluates to true wins. So above, portrait_01 would be evaluated first. If the rule evaluates to true, that portrait would be displayed. If it evaluated to false, portrait_02 would be evaluated. If all rules fail, the mod falls back to the parent directory and uses the portrait defined there.
Because of the fallback behavior, in order for portrait rules to work, there MUST be 3 valid images in the original portrait folder. In the example above, "Seelah_Portrait" is the original portrait folder. So if it was missing one of those 3 PNG Image files, the rule sub-folders would be ignored.
Bodies:
Mod will search for subfolders that begin with the prefix "body". If found, it will confirm the existence of a body.json and a rule.json. For example, Seelah_Portrait may look like this:
.../πpcPortraits/Seelah_Portrait/body.json
.../πpcPortraits/Seelah_Portrait/body_01/body.json
.../πpcPortraits/Seelah_Portrait/body_01/rule.json
.../πpcPortraits/Seelah_Portrait/body_02/body.json
.../πpcPortraits/Seelah_Portrait/body_02/rule.json
When game events fire, the sub-folders are evaluated in alphanumeric order. First sub-folder with a rule that evaluates to true wins. So above, body_01 would be evaluated first. If the rule evaluates to true, that body would be displayed. If it evaluated to false, the next body directory would be evaluated. If all rules fail, the mod falls back to the parent folder and uses the body defined there.
Because of the fallback behavior, in order for body rules to work, there MUST be a valid body.json in the parent folder or all body* sub-directories will be ignored.
Q: How do I obtain/create/update a rule.json file?
When you save, load or transition between areas, CPE saves off snapshots of game resources to the directory:
WOTR_CONFIG_FOLDER/Portraits/πpcSnapshots
The party_info.txt file in particular includes party state. Next to most stats and items is a small condition snippet of what you would use to add a condition based on that stat/item. Use these as a reference to create and build your own rules.
A more comprehensive listing of recognized rule properties and rule file format can be found on the wiki. (And if it is not, it will be soon :) )