Elin
96 ratings
Portrait Specification Framework
2
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
619.393 KB
22 Nov, 2024 @ 2:46am
21 Feb @ 12:45pm
20 Change Notes ( view )

Subscribe to download
Portrait Specification Framework

Description
This mod is a framework which extends the ability to specify portraits for individual NPCs based on any combination of Category, Gender, Race, Job, CardID, and age range
You no longer have to see warriors that look like wizards if you don't want to
This mod also allows you to reroll non-unique character portraits via a talk option if enabled in the config
This is a framework mod, it does not come with a portrait pack and must be linked to existing packs using the in-game UI, or use modpacks which have specially edited filenames

Press ESCAPE, mouse over TOOL, and then click PORTRAIT TOOLS:
How to use:
Portrait Picker Tab
On the top, you can use the two buttons to re-roll the entire map, or the currently selected single portrait
The left side of the screen shows all of the NPCs present on the current map (you can scroll down to see more)
The right side shows all portraits currently loaded into the game

Select an NPC on the left, and then click on a portrait on the right to change its portrait

Portrait Pool Links Tab
At the top is the mod filter, this will determine which portraits are shown based on the selected mod
After loading the game at least twice use the "Portrait Specification Framework Local Settings" Mod to have custom, mod independent settings which aren't erased by steam with every update
The deselect all button will clear the current portrait selection
On the left side is the list of all portraits loaded by the selected mod, you can click multiple portraits to select sets of them, and click a portrait again to deselect it
On the right are the filters which specify what NPCs this portrait should apply to
The default options are to include the portrait selection for all possible NPCs, this is hardly desirable, filter accordingly

Once satisfied with your filter and portrait selection, click "Add selection to pool"
this will create/add to a pool corresponding to the filter, and now all NPCS matching that filter will have a chance at getting one of the selected portraits
IMPORTANT
: filters are additive, if you have a set of portraits for any eulderna, and a set of portraits for any female, a female eulderna will have a chance to pull a portrait from both of those sets

Once satisfied with your pools, you can save them to file to preserve them for next game load
this will save a PSFLinks.json file into the mod's directory (workshop or local), and in the case of "vanilla" it will save it into the root directory (where the Elin.exe is)
this file will be loaded automatically next boot, saving your progress
saving multiple times overwrites the file
deleting the file resets work to 0 if you need a nuclear option

Settings
Enable "Reroll Portrait" option, adds a dialog option to reroll an NPCs portrait randomly
Enable vanilla portraits: if you have enough portraits for all possible NPCS, you can turn this off to disable vanilla portraits (they are not very precise atm, i will possibly make better links later)

Changelog:
V0.9
Now can tag portraits by minimum and maximum age
Features should now be significantly easier to add
Stale links where no portraits exist on disk, no longer result in a sprite being assigned and instead fallback to vanilla
Added ability to save local settings into an automatically generated mod so they don't get wiped out by steam every update
Added ability to add links without a portrait folder to make creation of link only mods easier/allow local links that don't get wiped

Future Work
Add ability to reroll/specify PCCs

Framework compatible AI generated portraits kindly donated by datse
https://mega.nz/folder/twYiETQR#g_QWftX2Cnck-qi7P5NOLw/folder/s0xCCQQR

Data Dumps for IDs
lists of ids for jobs, races, and cards are available at the following url:
https://mega.nz/folder/0tpkWRaK#zvBNDhNa974WR1JyE2GP2Q
74 Comments
Tanya 22 Jun @ 9:44am 
theres no portrait picker under tools, i have tried disabling all my other mods :(
Android  [author] 24 May @ 1:23pm 
@Hellstorm901
Currently it doesn't look at the folder structure when making decisions. But you can set the filenames to reflect the properties you want and it will try to automatically load them in.

For example:
An image named c_f_yerles would have the desired effect. Development on this mod has kind of stopped as of late, but I'll see if I can add in a parser for folder structure like you suggested once I get some time, it shouldn't be too much work.

I'll also see if I can get an adult tag working. If I remember correctly, in vanilla the "special" tag is used for player portraits, and the "un" tag is used for unique npcs. But the way unique character portraits are implemented is different from generic ones and this mod doesn't currently support overriding unique npcs.

@banoopy
development has basically been stopped, but I'll make some time and see if I can add another tab where you can check all existing tags so you don't have to sift through all the portraits to find them
Hellstorm901 23 May @ 4:49am 
Is there a way to set this mod up so instead of having to manually assign portraits to different categories and export a PSFLinks.json the mod instead had layered folders it reads from and automatically assigns anything in the folders to be loaded as portraits for example any image in c/f/yerles would replace all female yerles with them then for assigning portraits to specific jobs and ages it read the naming format of the potrait to do so

For example CustomPortrait_paladin_adult would automatically be assigned to any paladin NPC who is an adult (with "adult" being some coding to detect an NPC's age range to and from as Elin already does seem to have some sort of age range system its character creator)

I was wondering this because I notice that in the game portrait folder it has the "special" designation for portraits for unique characters meaning that game has some sort of coding which allows it to designate portraits to specific characters without those being loaded by other NPC's
banoopy 23 Apr @ 2:02am 
is there an easier way to filter sprites i feel like i keep making mistakes on filtering them and it's quite difficult to comprehend
Android  [author] 21 Feb @ 12:52pm 
Mod should be stable again, but now requires the YK UI Framework mod, which should be earlier in the load order. The requirement has been added to the steam page so it SHOULD automatically deploy to everyone's PC. but if it doesn't unsubscribe/resubscribe, and then make sure that YK Framework is set to load before this mod in the Elin mod list. Otherwise the UI won't open
Android  [author] 9 Feb @ 4:11pm 
@SOMEGUY
Might have been an update to the game that introduced some issues. I'll check it out when I have some time in a couple of days
SOMEGUY 9 Feb @ 10:12am 
I've just recently started getting slightly odd behavior with this. Before even if I didn't set any settings for them if I rerolled the map or just rerolled "special characters" like younger sisters their portraits would only change to younger sister portraits.

Now however their portraits will switch to any portrait that's prefaced with special_f. I tried deleting the PSFLinks file thinking that maybe I accidentally fucked something up without noticing but that did nothing. It's not a huge issue because I can obviously just use this mod to limit it to just the right portraits but still I didn't need to do that before so I figured I'd mention it.
Android  [author] 26 Jan @ 4:34pm 
@Critical
Not sure why your ducks have people portraits, I wasn't able to reproduce this with the mod or in vanilla.
This mod is mostly for modders/advanced users that want to set up large sets of portrait groups. young males using granny portraits is a vanilla behaviour which was originally in-scope for this mod, but was never tackled as part of the vanilla fixes.

The only thing this mod will do without any adjustments is fix the mifu/nefu portraits and use some unused portraits. ducks/geese aren't touched and should fall back to vanilla and show up as their sprite. If this is not the case and the ducks actually DO have human portraits because of this mod somehow, let me know which zone you are seeing this with and what happens if you re-roll the duck's portrait and I'll take a look again.

If you just want to set specific peoples portraits you can use THIS mod instead
Critical 26 Jan @ 1:59pm 
AM I understanding it correctly that this mod requires users to manually set every single entity's portrait? Is that why my ducks have portraits of people, young males use granny portraits etc?
Android  [author] 9 Jan @ 7:55am 
@Puddles, I had the no description update mod enabled... fixed thanks for letting me know
Updated description: Bugfixes and medium size change that makes the mod create a local second mod that stores settings that will never be overwritten by framework updates since steam keeps deleting peoples settings. Not sure if this is the best solution as it requires booting the game twice before it starts working but it integrates pretty well into the system as it is without any major changes