Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Strive for Power

Fantasy Slave Management/RPG Erotic Game · By Strive4Power

Improved Random Portraits v1.0

A topic by Kyler2 created Aug 20, 2018 Views: 162,202 Replies: 170
Viewing posts 1 to 47
(12 edits) (+3)

Changes how "random portraits" feature works, to do filtering based upon tags in the path and filename of portraits to try and better match the given slave.

For full details on how it filters and selects, see info.txt in the mod. In short, it filters on Race, Gender, and age. then does a weighted selection on matching of Hair, Skin, Tits, and Ass.

Warning - Mod requires version 0.5.18d or newer. It will break the game if applied to 0.5.18c or under.

Download

See Modding Guide for details on installation. NOTE: When upgrading, delete the old version first, do not just extract over top it.

Companion tool available to help set tags, see post in Portrait Packs.

Changelog:

Version 1.0

  • Removed tooltip as it interferes with delayed portrait loading mod.

Version 0.10

  • Fix tooltip on images in portrait image select dialog
  • Added minMatch setting and associated behavior to abort, or broaden for age.

Version 0.9

  • Properly recognize AssB and TitsB

Version 0.8

  • Fix bug with male vs. female matching.  All portraits with "Female" in them was being matched as male too.

Version 0.7

  • Updated for change to AddTo in 0.5.18d.
  • Added tooltip with tags to portrait select dialog (doesn't entirely seem to work in 0.5.18d).

Version 0.6

  • Added re-choosing of portrait after starting slave's customization is complete, so it will use final hair, skin, breast, and ass selections.
  • Added a "Random Portrait" button to the slave customization panel. Clicking this let's you re-roll a portrait for a slave.

Version 0.5

  • Refactored completely.
    • Loads portraits once and re-uses for up to 5 minutes.
    • Portrait attribute parsing split off to separate file
  • Additional tags available for Skin, Tits, and Ass. See info.txt for more details.
  • Adjustment to how ages are appled. Child matches child/loli, Teen matches Teen, Adult matches Adult. No attribute, assumed to be Adult.
  • Weighted selection for Hair, Skin, Tits, and Ass
  • Debug option which prints out details on filtering and selection to help determine why a portrait was chosen.

Version 0.4

  • Added filtering for Tits and Ass size.

Version 0.3:

  • Filtered DarkElf from Elf.
  • Ignore <color>Skin for hair color.
  • Filter Skin on <color>Skin.
  • Accept Child or Loli for Child age.
(1 edit) (+1)

The first mod in the newly founded mod section, congrats :)

Noticed that in "var hair = person.haircolor" Auburn is missing. Also the game scripts and most portrait packs use the spelling "Blond" as opposed to "Blonde".

There's also jelly hair. But no need to add it as only slimes have weird gloopy hair, so the racial sorting will handle it. MB :S

Look forward to trying this mod (once I have updated the names on my portrait packs).

That's a comment I carried over from AK|Phantom's version, it has no effect on how things actually work, I think he added it as a reference.  The game uses blond too, so the blonde in there is definitely misleading.  Preferably remove the comment from the code later as better if they're referenced from elsewhere anyways, like races.gd.  The actual code uses exactly whatever string is set on the character.  This can be almost anything as dying hair lets you type in whatever you want. Not that this code ever runs after that, but I was thinking it'd be nice to add a button to re-do the random portrait in case you changed things or didn't like what it chose but didn't want to manually choose.

Next up though would like to filter on titssize and asssize.  Will need some sort of suffix for each, Ass seems obvious, but should it be Tits or something else for them? or maybe multiple? I could just have it match <size>(Tits|Breasts|Boobs).   Was going to wait for a pack to come out with something named for those first.

I appreciate all the work on the packs, that seems 50x harder than what I've done, and without them this mod would be useless.

Hahaa, well it's evident I don't know how the scripts work.

I'm about to re-upload a portrait pack that is named to work with this mod. It's the Seraph gals one. Time permitting I'll test it out and rename the other packs once you're happy this mod is finished.

I don't believe a software project is ever truly finished. Right now I'm just writing it against what packs are out there. If you or any others add additional tags to portraits then I'll filter on anything that's reasonable. Only preference would to never rely on position. I don't want to see "(Brown, Tan, Huge, Flat)", with there being some expectation that it's hair, skin, tits, ass.   I could handle it, but I think it's less intuitive for users and more restrictive in what each pack creator does.  "Brown, TanSkin, HugeTits, FlatAss"  would be much preferable. I can handle that in any sort of ordering, any sort of separators, could even be directory names instead of in the file. Can optionally be more specific too for hair, BrownHair.  Can also specify multiple if it's kind of in between.

After that there is still always room for improvement. Could add an in-game UI to customize the priority of the filters.

Had thought about a weighted system, where it wasn't a hard filter, but instead a preference for a match. Probably still best to do hard filter on race and sex, and probably age, but if it also starts trying to match on everything else, then determining priority probably be personal preference.  If instead it gave a score based on how much each feature matched, with optionally priority for each, so that way if one pic matches skin and hair, while another matches skin and tits, and another matches hair and ass, those 3 could maybe have equal footing. Rather than it filtering on hair, and removing the one that matched skin and tits.  Also with user preferences, someone could say they want the tits to match more than anything else. Then even if it can't match the ones they consider less important, it'd always match the tit size.

As mentioned, I'd also like an option to re-scan for portrait.  Helpful if you add more packs, or have modified the character, or just didn't like what it rolled and still too lazy to manually select one.

roadmap wise, I'll probably add things in roughly this order:

  1. Rudimentary tits and ass filtering.
  2. Weighted system for hair, skin, tits, and ass matching. Weights hard coded in the code, but could edit them before applying the mod.
  3. Re-scan button on Customization page.
  4. Edit weights/priority from UI.

#1 probably be done tonight/tomorrow.  #2 maybe also be done tomorrow, but probably later.  #3 means figuring out how to use modding system to modify UI and instead of wholesale replacing something,  inserting into it.  Probably tackle it more on the weekend.  #4 might never happen, depending on how hard #3 is, and how painful I find GDScript plus the rest of the code base.

Ambitious doesn't quite do that last post justice! A weighted system for hair/skin tone etc would be fantastic.

Seeing as you seem up for a challenge. There's been something bothering me a little. Once the portrait packs are all fully 'tagged' with colors/asssize etc , some beautiful portraits will never be chosen by the script. For example, there are Dryad pictures with fair skin and blue hair, while in game Dryads only ever spawn with green skin and green/purple hair. All it takes is a couple of pictures labeled with greenskin to make sure the others never get picked.

You can still manually select any portrait, so it's not a big deal.

There are several possible solutions to give every portrait a chance to appear on random slaves.

  • Create a separate mod that only factors in race, gender and age
  • Modify the other game scripts so that slaves spawn with a wider variety of pre existing skin and hair colors.
  • Create a single brand new ambiguous skin and hair color (eg "Unnaturally colored", "Hybrid") That can be added to the scripts that generate slaves. Then put that in the names of the 'unlucky' portraits so that they have a chance to appear.
  • Something incredibly complex whereby if a portrait name doesn't have a fitting racial hair/skin color, it is temporarily given one that would naturally fit its race.
  • Make it so there is a low % chance to disregard the color checks each time a slave is generated.

I quite like the "brand new skin and hair color" one, as it allows the generated slave's matched portrait to be accurate. Without limiting available portraits and without creating endless color combinations to find portraits for.

As I said, it's not a big deal. Just throwing out ideas :)

"Make it so there is a low % chance to disregard the color checks each time a slave is generated.."

That is what I was thinking of doing with the weighted system. Start every portrait with a weight of say 1,  for every matching attribute add 5.  A portrait that matches all 4 attributes would have a weight of 21, and thus be 21 times more likely to be chosen than one that matches nothing.  Make it so you can adjust those weights, both starting and per attribute, even if it's just modifying the script file in the mod before applying it. You could thus then set a weight to 0 and it would no longer have an effect on selection at all.

"Create a single brand new ambiguous skin and hair color (eg "Unnaturally colored", "Hybrid") That can be added to the scripts that generate slaves. Then put that in the names of the 'unlucky' portraits so that they have a chance to appear.

Something incredibly complex whereby if a portrait name doesn't have a fitting racial hair/skin color, it is temporarily given one that would naturally fit its race."

Those could be combined.  Could go through possible skin colors and check if any match the portrait, recording that. If none do then list of matching colors would be empty.  When filtering, could consider an empty list of colors to match all possibilities.  Tie that in to weighted system, but consider a "no-color-found" situation to be a lower weight, like wrong colors = 0 weight,  matching color = 5,  no color = 2?

It'd depend upon probably doing a cached read of portraits, as it might start having a performance impact if doing so many comparisons against a large library of portraits every time a new slave is generated. In general though I like splitting up the code into "Generate portrait attributes" and "match portrait" chunks anyways though.

(1 edit)

Seems like you're on top of it :)

It a world with such a variety of interbreedable humanoids, it's no small wonder that many wild monster girls and bandits have crazy hair and skin colors.

With regards to "brand new ambiguous skin and hair color" it's pretty easy to check the default color ranges of a race while naming portraits. So adding one or two extra 'tags' (to those that deviate from racial norms) is not difficult on my end.

I'll leave the math that allows these hybrids a fair chance at appearing to you, and start looking at the race.gd and existing portraits packs to determine which races are the sluttiest have the most deviation from racial norms.

I've restructured it so it now only scans for possible default skin/fur/hair colors, and if it can't find any of those, it considers it to be unspecified.  Also realized existing code only considered hair color and ignored fur color, so all those colors assigned to beastkin/halfkin never got used. so updated it to use hair if set, otherwise use fur.  Also got structure in place to do weighted random selection, however there's a bug with the current mod loading code preventing me from doing this in a more efficient manner( I wanted to avoid re-scanning portraits on every new slave).  it's a simple single-line fix so hopefully Maverik can fix it soon, but means next version of mod will require latest version of the game.

(1 edit)

Maverik's updated and re-uploaded the current version of the game at least once today, if not more. Hopefully you won't have to wait long.

EDIT: Faith rewarded :)

I worked out how to make a line adjustment mod that adds ambiguous hair/skin colors, and which races need it. However, given how much work sexiestmanalive has put into naming portraits already, i'm going to stop working on it as of now.

I'm really glad you are working together :)

With your weighted system combined with the option to choose the weight each body part holds, it sounds like every portrait will now have a chance to be chosen. Thank you.

question : why is the script only differentiating between Adult and Loli, while Teen is just kinda both? how come it's not its own visual age?

also : great job! the mod itself does great for the most part, except for when the age is teen, i've seen some adult slaves with teen portratis while loli slaves also get them, not sure what's going on there. but for the most part it's working great.

Mostly because the portrait packs I have tested with only have Loli/Child or untagged, and the code I started from was considering Teen and Child to be the same thing. Thought this was better, if not still ideal. So currently, I only really have it tested against a set where they either have a child tag or don't, and where the author considered child tag to apply to teen and child.

Most packs don't have ages tagged for everything, so being overly specific on these ends up filtering out far too much.  I'm thinking it'll be better to eventually have special logic for "no tag" to handle this better.  Basically check for all 3, and if none are set, then handle that differently. Not sure how best to handle it though and that's sort of what I was trying to handle with the above.

This is basically the current logic:

Untagged: Used for Teen and Adult
Child: Used for Teen and Child
Teen: Used for Teen and Adult
Adult: Used for Adult

I should amend that I believe to this?

Untagged: Used for Teen and Adult
Child: Used for Child
Teen: Used for Teen
Adult: Used for Adult

That sound like a good plan? Won't quite match up with AK|Phantom's all-in-one that only tags Child, and considers it to also match Teen.

A Simple Instruction /installation manual would be awesome, Kay, thanks Mi Amore~ ♥

Squeakedy squeak... Squeakith. (Translated: The wiki has an article on mods that may help you)

hehe! Thankies! ♪

Added a link to the modding guide as install instructions. Forgot my original post mentioned how to install, but this one didn't.

(1 edit)

There seems to be a sorting issue with Dark elves, I've noticed so far Humans, and Halfkin showing up as dark elves.

adding Neiads to the list. Seems dark elves just take from any race's portrait collection

Which version? At one point, it was searching for "Dark Elf" for dark elf, with the space, which wasn't matching anything, and thus picking from any race. I changed it at some point to just strip all spaces from race, so it'd properly search for DarkElf.  Latest version should fix.  Can upgrade by extracting the mod over, then going back to mods screen and clicking "apply" (might need to turn off/on mod, but i don't think you need to).

The Dark Elf race is accepting Lamia's, Nereid's, Elves, and human portraits. On Version 3 (recent, I hope?)

Do you have any portraits tagged BeastSkinCat?  As mentioned, if nothing matches, then it rolls back to the full list.

Yes, I have beastkin cats.

Should be fixed in 0.3, but maybe you don't have it applied? After extracting a new version you have to go back in to mods and click apply, otherwise it'll keep using older code. Definitely don't see it with 0.4.

You do have to have some files with DarkElf in the path,  if it can't find any DarkElf tagged portraits, it will choose any.

Deleted 4 years ago

I'd need to know all the available portrait names. Can you get me a recursive list of all files in the portraits folder, and all relevant attributes of the given slave? (race, sex, age, hair, skin, tits, ass)? 

The key thing to remember, if nothing matches then it currently drops that filter and goes back. So, it goes to filter on Child,  finds 0 portraits that match Child (after filtering on race and gender),  it will now not filter on age at all.  So if you only have "Adult" portraits, then any child age slaves will still be pulling portraits from the pool of Adults.

If you have exactly this for portraits
Seraph Female Adult AverageTits
Seraph Female Child AverageTits
Then, it should always choose the Child for Child and Adult for Adult, but if you had:
Seraph Female Adult AverageTits
Seraph Female Adult AverageTits 2
Then, when looking for a portrait for a child, it'd find nothing, so it'd not filter on age and go with any of the adult profiles.

For the others, it again can potentially be an issue with it filtering out from hair or skin before it gets to tits. This will be less of an issue for next version, which uses weights.  I'm also adding option to enable debug output which gives some more info on it's selection process which might help explain why it's not selecting what you expect?

For the last, characters besides the tags don't matter. Nor does case. It could be any of the following:

  • Human Female Adult BigTits
  • Human-Female-Adult-BigTits
  • HumanFemaleAdultBigTits

All 3 would be parsed the same.

it seems all this does is filter male from female...

It definitely does more, but as mentioned, without details on what files are in your portrait folder, and what all the attributes it's matching are, I can't really help you.

I did release 0.5,  which has a debug setting. If you set that to true, it prints out a lot of details about how it's selecting portraits. That might help identify either what is wrong with my script, or with your portrait files.  you can also go a step further and uncommon some files at the end of portrait.gd and it'll dump all attributes it's detecting for all portraits when it loads them. this can be a rather large dump. both of these slow the game down considerably when it's selecting portraits.

i will definitely debug this once i have the time. but to answer your question, yes i had both a child and adult portraits. as i did realise the filtering would indeed pick an adult one if there was not a child one.

the way i'm testing portraits is, making a a new sandboxed game, customize start and make my start slave whatever race / age and so on what i want. i'm also making the amount of portraits in the portrait folder for that race smaller to make sure if it's working or not. So if i want to check if it's picking age, i'll mostly only have one adult and child one. as it should be only be picking one of the pictures. when i tested breast size, i had 4 different portraits with different sizes but all adults as i could just make the starting slave, adult, so the age wouldn't matter. i'm probably going to do the same thing with 0.5 when i'm going to debug, if there's anything wrong with this, do let me know :)

Aha, yeah that'd explain it. That form of testing is useless. The starting slave is generated a bit differently. randomportrait only gets applied when slave is initially created. Your starting slave is generated with the default slave race, age, sex, and origins. Other attributes start as random. Portrait will be selected based upon that every single time. Then after all that, you're changing the race, age, sex.

Basically, your method of testing will never work, it'll always be searching for roughly the same attributes every time, regardless of what you chose. It'll always be matching a Human, Adult, Female, with random hair/skin/tits/ass.

I could look at inserting a call to randomportrait after you've selected your starting slave? Would basically need to add to _on_slaveconfirm_pressed a call to constructor.randomportrait(startSlave)  at the start. Then this would apply to the starting slave. I can test this out and add it to later version of the mod, but with 0.5 your method of testing won't work.

I also wanted to figure out how to add a button to the "customization" tab of slaves to re-generate a random portrait, in case you modified etc.  that'd also help solve this.

For my own testing, I load the game and go to slave markets.  The slaves get regenerated every time you load, doesn't let me test everything but gets some sampling.

Actually missed a line, regenerateslave()  does re-generate the class with the chosen race, age, and sex. so your method of testing *should* be valid for those 3, but it will still be using random hair, skin, tits, and ass for generation, not what you choose.  With 0.5 you can confirm this by turning on debug mode.

However 0.5.18c is completely broken for me. It broke my 0.5.18b save to make it think main quest was done.  Starting a new game gives you every single unique character in the game at the start, which is a tad broken. looking at the code... it's Mansion.gd line 43, should be debug == true.

So i tried again but with just humans this time because i tried the way you described, with just slaves from the slave house. and it seems to work great. age definitely worked, this i never found a problem with. The breast size also seems work, i had a few outliers in the beginning, but then i tried increasing the weight for the breast size to test it( to a pretty high number), and i hardly found any problems then. i couldn't get Debug to work but i don't think it was needed after all. 

Bothered me that it wouldn't work for a customized starting slave, so there's now a 0.6 that corrects that.  Additionally I succeeded in adding a "Random Portrait" button above the normal Portrait button in the slave customization panel. Causes it to roll another portrait for the slave. Makes testing even easier as you can roll several times.

That explains why I always had to fix my starting slave >.<

How goes the caching? Now that your requested "one line fix" is in :)

Note the link changed and changelog includes 0.5? However if you're going to use 0.5.18c,  you need to change false to true in Mansion.gd line 43, otherwise it can mess up existing saves, and inserts all unique characters into your mansion upon starting a new game.

Hahaa, sorry mate. The one time I skim over the top of the post, sigh.

Glad it's all running smoothly. I can get stuck in renaming my packs.

Well now there's a 0.6, with that button to re-roll the portrait. Down to only adding ability to edit the weights in-game, which is seeming much more feasible after doing that button. Could probably tie these in to the main game's settings so they're stored across versions of the game and mod. Would also allow adjusting them in-game, including toggling debug output, without restarting.

Thank you so much for working on this. It has been my top 1 most anticipated feature and you are making it happen! 

Would it be possible to add the scan's selected portrait to the npcs as soon as we enter battle? I think that would be cool.

I want to rename all images from the MGQ pack (and possibly other packs afterwards) to fit your criteria but Im not quite sure how. 
I took a look at info.txt as well as the code in constructor.gd (Im no programmer) and I cant figure out which tags/filters would work for Hair Color. Perhaps "BlondHair" would do? About races, would a HalfkinCat filter work? Does your mod differentiate between Beastkin and Halfkin? Is it even worth to differentiate them?
And also it seems you dont have Eye color scans?

I dont know how well the weighting logic performs, I havent fully tested yet since Im waiting for your reply to rename the images I have. 
Even if its pretty accurate you might want to check my version of what the scan's logic should be(I had thought about this before you started working on this mod)(link here). Its much simpler but it hopefully opens your mind to some kind of improvement over your current logic.

Also just a thought, hypothetically in the future if we have like 2Gb of portraits wouldnt it be much better to scan specific folders? I think that would be easily achievable If all images were organized by this folder structure:"Portraits\Sex\Race\" (example:"Portraits\Female\Harpy\"). That way most images would be excluded from the scans which should result in much faster scanning and might even prevent lag or even crashes on low-end pc's.

For hair color, no qualifier is need, yo can just do Blond, Brown, etc.

Currently the mod considers HalfkinCat and BeastkinCat 2 entirely different things. If you have a portrait you think straddles the two, you can add both HalfkinCat and BeastkinCat to the name. For many though it's  clear distinction, Beastkin are full on furry, Halfkin are human, with elements of the animal so I think it's better to differentiate.

No eye color yet. Nor many of the other attributes with multiple possibilities like height, tail, wings, horns, etc. Now that the weighting is in place though I can add them.  Most likely the basic implementation will be <color>Eyes, <type>Wings, etc.  With additional modifiers if it makes sense. All matches are case insensitive and do not require any specific surrounding characters.

From your rules, you listed off alternative colors. I had been thinking of working something in like that by having a similar list, and if a portrait doesn't have the exact color, giving it partial weight for a neighboring color.  Like if no Auburn,  then give half weight if it had Brown or Red.

>Also just a thought, hypothetically in the future if we have like 2Gb of portraits wouldnt it be much better to scan specific folders?

For this mod, scanning is a function of # of portraits, not their size. With 935 (100mb) portraits it currently takes <1 second most of the time for my, on a low end that might be longer. It only does this if A) the cache is empty (new game run) or expired (older than 5 minutes currently), and B) a new slave is being created. This should scale up to some rather large portrait folders, and I plan to make the cache time configurable so if it's a really large collection and really slow computer, you could disable expiration entirely.

I am thinking of some improvements to the portrait image select dialog. I have a half-working on-demand load which is critical if the collection grows to huge levels.  Additionally was thinking, could display matched attribute data for portraits as a tooltip, so if you ever have a doubt if a portrait is matching correctly, you can check.

The reason I doubted the worth of differentiation between beastkins and halfkins is because there will always be a very limited amount of beastkin images available (I think). Therefore, even though it cuts out realism, it might be worth more to not differentiate them, thus allowing for a much greater variety of images for beastkin. That was my reasoning, though I should have explained it.

About the scans time Im genuinely surprised it acts that fast even though its just loading the files names. Right now Im just using the MGQ pack for testing purposes so I literally felt no lag at all. My concern was due to slow loading times of the portrait menu when you have a large size of portraits but that's normal since its loading all the images entirely. The last feature you mentioned sounds really awesome for curiosity and debug purposes. It would absolutely come in handy when testing out new packs before the completion of this mod and its a niche thing to have at all times anyway so Im all up for it. Thank you again for working on this, Im really looking forward to the future of this mod.

Can I please get a Name Template to save time?

Something like:

HalfkinfoxFemaleBlondehair 

or something?

You're overthinking this, there is no template. It looks for each tag anywhere in the path. info.txt details all tags.

Halfkinfox/female/BlondTitsB.png
female/Halfkinfox/TitsBBlonde.png
HalfkinfoxfemaleBlondeTitsB.png
Mousekin'sAwesomePortraits/Halfkinfox.BlondTitsB.female.png

All of those will work and come up with the same result.

maybe I should Re-iturate What's the full list of tag's for each search?

(1 edit)

Its easier to have a template when you are manually renaming lots and lots of files. How about something like: 

Sex-Race-Age-Skin-FurColor-HairColor-EyeColor-Tits-Ass-Attribute1-Attribute2-Attribute...

Example:

Female-HalfkinWolf-Adult-PaleSkin-BrownHair-RedEyes-SmallTits-SmallAss-AnimalEars-AnimalTail

I have no idea what the filters for unimplemented attributes will be but for now I think Ill work on renaming following this template.

EDIT: actually do hyphens work as word separators? 

^ what I was asking for, more or less

What I'm saying is that this is entirely up to you. It has no impact on the mod. You can decide what you want the template to be for your mod pack on your own.

Personally, I'd use folders so it's easier to see how many I have for different chunks. Like:

Race/Sex/Age/HairFur-Eye-Tits-Ass-misc.png

and an example

Human/Female/Adult/Blond-RedEyes-TitsB-AssS-1.png

Again however, this is entirely up to you.

I'm tempted to write a portrait pack manager app. Lets you select a portrait, view it, and then edit the tags, and it renames both the portrait and body in-sync.  Maybe even let you select an image as full body, select a section to crop as portrait, and add that? What OS do you guys use? My language of choice for such an app would probably be C#, the result working on Windows, and maybe on Linux/Mac via Mono. Probably make your work of renaming them a lot easier, as you'd just have to select an image, check some boxes, click apply, rinse repeat for folder.

seems like a lot of complications for something pretty simple... when you get use to it.

okay okay, what if someone has red hair, and red eyes. do you have to type both "redears-redeyes-male-elf" for example, or does "red" in the both of them conflict?

(2 edits)

sexiestmanalive is renaming something like 3100 pictures. Once that colossal portrait pack comes out, I'm pretty sure it will become the new standard naming format for packs. As far as I know, it doesn't use eye color. I'm a take the path of least resistance and leave the eyes out of naming. Some portraits have eye color that wouldn't appear on that particular race anyway (so you're only naming eyes on those, for people to use the search function)

This next part is what I'm gonna try and use for naming (from manalive)

Breasts_Size: ["TitsS", "TitsM", "TitsL", "TitsH"] where: TitsS = "masculine", "flat", "small"; TitsM = "average"; TitsL = "big"; TitsH = "huge"
Skin_Tone: ["SkinL", "SkinT", "SkinD" "SkinP" "SkinB"] where: SkinL = "pale", "fair"; SkinT = "olive", "tan"; SkinD = "brown", "dark"; SkinP="purple"; SkinB="blue"
Butt_Size: ["AssS", "AssM", "AssL", "AssH"] where: AssS = "masculine", "flat", "small"; AssM = "average"; AssL = "big"; AssH = "huge"

So an example would be "Dragonkin Teen Blond TitsM SkinT AssL AssH"

The two Butt sizes are because it could be either. The tags can be in any order too I think. Mod will assume a portrait is female unless the word male is present, so you don't need to write female. Will assume Adult unless either the word Teen or Child is present, so don't need to write Adult on a portrait

If you really wanted to add eye color tags. I'd suggest EyeBK for black EyeBE for blue EyeBN for brown EyeG for green etc.
"redeyes" would still work, It just might take a little more work from Kyler, because as you surmised, there would could be a conflict. I know that when searching male it disregards that part of the word in female. But don't know if the colors work the same way, yet.

(Sorry if i'm coming across critical, pulling my hair out trying to get around the button image files for races, so we can add "Mimicekin")

Foe eyes I'll most likely scan for both RedEyes and EyesR.  I'm already scanning for BlueSkin and SkinB.  

Per question above, when/if I add Eyes,  for any ambiguity,  color without qualifier == hair.  If qualifier, then it's not hair but whatever the qualifier is.

RedRedEyes.png = Red Hair Red Eyes
RedHairRedEyes.png = Red Hair Red Eyes
RedEyes.png = Red Eyes
Red.png = Red hair
BrownBrownSkin.png = Brown Hair Brown Skin

I could also add alternative tags, but <color>Eyes is the simplest to implement.

Any way you can make a mod that adds equipment to random encounters? and if that's a thing, can you add tags for said equipment type? (ie. Armor, Maid/butler outfit, etc) that way, if you find someone you fight that has said eqiup, it set's to portrait? on random slave spawn? or w/e?

Omg yess, please make that portrait pack manager app

Started work on it, probably finish something later this weekend. Adding selectors for everything is a bit annoying, but got it scanning a folder and viewing the images, and a race selector. Just need to add the rest.

Looking forward to it then. Don't really want to try manually renaming 1700+ images in my pack again to remove the extra tags with windows alone lol.

Want to also ask since my pack right now has no teens and not planning to update anytime soon if you can add in portrait script that if there are no teens then it'll choose one of loli. 

v0.1 of the PortraitPackEditor is linked in top post. Of note, it scans things alphabetically.  Could move all existing portraits into a _Rename subfolder under Portraits and Bodies, then they'll always be at the top of the list until renamed/moved.

It does impose it's own structuring to the name,

<races>\<genders>\<ages>\<hair colors> <Skin colors> <tit sizes> <ass sizes> <custom text> #.ext  

The # starts at 1, then if there's already a file with the exact same name, it increments to 2, and so on till it finds one that isn't in use.

For the age selection, it is a bit of an issue, as no teens, right now means it falls back to everything. I don't think making it fall back to loli is the answer though. Partially depends on your definition for those.

No teens falling back onto loli would still match better than no teens falling onto everything. Or are you saying that would end up making every image not tagged as adult fall onto loli as well? 

The editor is updated with multi set, and Readme.txt has an example that might have been written with this in mind... can filter on Loli, select all, and then can set "Child" and "Teen", then apply.

Finally got around to testing your mod out last night and really loved it. Especially your random portrait button feature which strive really needed if you're running a very large portrait pack. Was actually planning to open a suggestion thread for one to be added but now I don't need to :)

Updated to mod version 0.6 and slave screen broke, this is what I see when I click my slave:

Deleted 5 years ago

Version of the game? Not sure it works right with 0.5.18d because of the change to AddTo. And if older than 0.5.18c it won't work either. I'll test with latest later and update. 

Yeah, on latest version

I'l test/post later, but you can try changing AddTo 1 to AddTo 0 in the files that have it and that should fix.

0.7 posted, works with 0.5.18d

Thanks! :D

Question, how interested would you pack maintainers be in the mod providing the option for a "Nude Body", basically a third directory. Something I liked about the main characters is they have multiple portraits, technically 3 body images, Clothed, Naked Forced, and Naked Consensual. Finding all 3 of those for a portrait isn't as likely, but often you can get both a clothed and nude version of some images, going by what I see on yande.re and danbooru.donmai.us there's options often.

Basically, could tweak the the game so when setting a portrait it sets those if they also exist, and uses them in the sex system like it does for unique characters? Best guess, this would be too much effort to actually setup for any given portrait pack and thus vast majority of portraits wouldn't support it, and thus not too worthy of implementing?

As a player that would be nice :D

I was hoping this would be an official feature at some point since its kind of an obvious thing to add if the main npcs already have them. It would require a  re-check for every image in existing packs again but thats is something I can deal with. Its an extra feature with no downsides, those who want to use it will use it and those who dont will not. With that said, if the main developers do not go for it and if its something you can do without exerting yourself than plz by all means go ahead, I and pretty much every player would enjoy it as well.

The implementation for the unique characters doesn't make it easy to do the same for other characters.  Instead of an attribute on the unique character, instead it's a separate table of the images that it looks up if the person is unique :(  

If the main game instead just stored these as an attribute of the main character and then just used it if present... it'd be trivial.  I can effectively implement this for regular slaves, but yeah it'll be a bit involved.

According to info.txt the mod loads AssB/TitsB as big ass/tits. Yet the editor has a 'Large' tag instead of 'Big' and its adding AssL/TitsL to files and not loading AssB/TitsB at all. Now im confused, is the mod loading these AssL/TitsL ? If so, info.txt should be updated.

Llooks like a mistake i made both in the mod and editor.  Should be big in both cases.

(1 edit)

One issue found with this pack, [using latest version of game and this mod],  if you try to use the "portait" button to pick an image yourself, it breaks the game, not sure why it just does.


this is the error that it gives, you click on the portait

ERROR: Node not found: ../../..
   At: scene/main/node.cpp:1524

That error shows up before you click on a portrait, it's because of how I'm creating the "Random Portrait" button. It has no impact on anything. Game still works. The error doesn't show up when you click on portrait, it shows up the first time you click on a slave and view the Customization tab.

Portrait button still works fine for me too. Checked on a fresh install. If you have a lot of portraits, it can take a long time for the window to finish loading. If you don't have enough memory, it could crash the game.

settings.json has a few bugs:

beastkinwolf tag has a space between 'beastkin' and 'wolf'
SkinL tags and so on were added under Haircolors

Feature request:

Option to turn on/off Male, Futanari and Female scans - good for those with just a few images of a specific sex so they can toggle scans off instead of allowing the same pictures to show up over and over again.

That, or I was thinking a minimum match count? If it's below the count, then depending on filter it rolls back, or quits.  Race and Gender quit,  age maybe does an intelligent rollback,  where child loosens to include teens,  teen loosens to include adult?  Default of like 10, but changeable in settings?

That sounds several times better and though its a much more complex solution its still simple logic-wise. It would be nice if you could add a in-game settings page. Though Im not sure such a feature would work without the need to restart the game.

Implemented in 0.10, wasn't that complex of logic. Reworked the mod too so from now on, don't need to re-apply for most updates.

I'd like to add settings UI, was thinking in the game's own options menu, add a tab. Wouldn't require a restart of the game, but would be a bit painful to implement. my godot knowledge isn't the best.  I kinda hope I can copy chunks of options.tscn, make up my own options panel,  load that, then add it as a child of the existing options panel and have it work.

Thank you for adding this. I just tested by messing around with the minMatch variable and its working flawlessly. Though I think the random portrait button should ignore minMatch. Right now I only have 1 female HalfkinTanuki image and though I dont want every female HalfkinTanuki slave to show up with that image I still want the random portrait button to assign it in case I intend to keep the slave. I cant see any drawback on this.

I'd still want the button to the fallback for ages, but yeah could make it so it doesn't abort for minmatch if it's a manual random call.

I briefly tried to do the UI. I see a path forward, but it's a bit painful. eventually finish it up.

You are right, I didnt thought things through. Considering what you said, I think the button should work as if minmatch = 1. 

Took a quick look at options.tscn and managed to make a new tab with a checkbox just for fun. At least the layout's chunks of code are as straightforward as it gets.

I had hoped to use another tscn file to define the tab, and then just insert it in and wire it up, but Couldn't get that working, loaded fine, but instancing it spit out:

At: scene/resources/packed_scene.cpp:98
WARNING: instance: Parent path './RandomPortrait' for node 'minmatch' has vanished when instancing: 'user://mods/randomportraits/options.tscn'.

Worked fine to create a tab in code, add the texture (duplicate dit from one of the other tabs), and then start adding my own checkbox's and labels. It's just tedious laying things out.

(2 edits)

I can't get this mod to work at all i get a long string of errors but before i can copy them the game crashes to desktop.
i am using 5.18d when i restart the game claims to 5.17d and none of the main page buttons work.
When selecting the mod in the mod manger i get this error:

SCRIPT ERROR: _ready: Unable to iterate on object of type  Nil'.
          At: res://files/scripts/mods/modpanel.gd:33
ERROR: get_as_text: Condition ' !f ' is true. returned: String()
   At: core/bind/core_bind.cpp:1623

Try re-installing your game, your backup files are probably broken.  Bugs in some prior versions could lead to bad backup being made. Make a fresh extract of the game and apply there.

If you want to see the full errors though, run the game fro ma command prompt and the output goes there, and stays there after it exits.

is the backup stored somwhere else other than the games folder as i have deleted every thing but the image files and redownloaded the game and the mods

Your issue has happened to me several times. Its problem lies in the backup folder. Make a clean extract of the game and place the 'randomportraits' folder inside the mods folder. Only then launch the game for the first time and apply the mod following the modding guide. The game will close, now you have to delete the backup folder (inside game folder) before doing anything else. Finally launch the game and confirm that the mod is applied and the game is working.

I take it that the problem is the backup like to correct 'mistakes' that the mod has introduced. Do i need to deletee the backup folder everytime? or just the once?

Im not entirely sure but I think just once should do. 

You need to extract the game fresh.  The problem was that the old version would backup already modified files, potentially broken files,  then use those files. Some versions also didn't replace the back'ed up files with the new files so it'd potentially intermix versions.

Extract a fresh copy of the game, the entire game to a fresh folder,  don't mess with the backup folder. Run it, then click apply for mods.

Did a complete purge of everything in adddata/roaming/strive including saves as well as re-installing seemed to work

Since 5.19 its not automaticaly assigning body pictures when firsty selecting or when using random portrait button

(1 edit)

I haven't tested it with 0.5.19 yet. Unfortunately the mod is probably fairly version specific if they're going to keep changing the code the mod applies to.

Edit: Just downloaded 0.5.19, applied the mod,  no unexpected errors seen. Ran game again, did a quickstart,  starting slave got a random portrait as expected,  and random portrait button works. Same with slaves at slave trader.

Will need more information to know what's going wrong for you.  Are you starting a new game to test this? Are you applying any other mods? What errors show up on the console? (there's always some that aren't actually a problem, but some might indicate what's going wrong).  You can run the game from a command prompt and then the errors persist after the game closes.

just started it up again and this time its assigning both pictures, so god knows what the problem was.

(1 edit)

Started a new save and noticed the mod gave my MC a body image even though the portrait was still one of the default ones I had picked. Two ways to solve this, either the mod stops attributing body image to MC or it needs to be fixed to add the associated portrait as well. 

EDIT: The portrait tooltip is not showing hair color.

Yeah unfortunately the game doesn't do anything special when making a new slave that is the main character so i can't skip the random portrait generation for that. I could insert clearing the full body image to the game's code for the start. Forgot about this as i manually edited my save to remove the full body image from it. I kind of want to wait and see how they're maybe going to tweak some of this in the near future.

The current version of the mod, does not seem to play nice with 0.5.9a, as gives compilation error.

Also, side thing[not related to problems] for the portraits-bodies thing, I just use only the bodies folders in both respective and deleting the portraits in the portait folder and just having bodies duplicated[1 in portraits folder and 1 in bodies file] due to portaits-bodies not always lining up correctly.  Which works fine for me.

Unfortunately 0.5.19a is broken, mod won't work with it. Will have to wait for a fixed 0.5.19b.  The regex change mentioned in the changelog broke single-line variables added in a mod, which this mod depends upon. The "var randomportraits = null" line from my mod no longer gets inserted.

https://itch.io/t/292969/bug-0519a-regex-for-variables-broken

You can use the modpanel.gd i linked to on pastebin from there if you want to use 0.5.19a,  would need to replace it in both files and backup folders, otherwise changes will be lost after applying, making next apply also break. Hopefully fix is put into a 0.5.19b soon.

Okay. Sorry if someone asked this before or if I'm being too annoying, but;

Can we get a pregnant tag? Can we have a script that detects preg girls and update their pics with preg ones accordingly?

If needed, I can help with some coding, testing, or debugging. (I know python, java,  and C#)

This would be rather painful to implement with how the game currently works. I don't see myself implementing this.

(2 edits)

Too bad. 

Are you planning on adding any features to the mod? If so, what are they? Would it help you if I volunteered to help test or debug code?

Does it work for 19d? 

(Pick random portrait button doesn't show up. I've tried re-installing/ re-extracting the mod. Mod previously worked for 19c)

I've found the best way is delete the mod and the backup file install the gam, start it the reinstall the mod

So:

  1. Remove mod with game UI
  2. Delete all mod files, including the 'backup file'.  (What is the backup file? Where is it?)
  3. Delete game?
  4. Re-install game?
  5. Re-install mod

Is that correct?

1. maunualy delete or just remove from mod folder
2. do one for all mod files the backup folder is in the game folder delete it.
3. re-install game (sometimes you will need a clean install  which means deleting the old one or using a different folder)
4. start game ( this will create a new back up folder) then exit once your sure it works
5. put Mods back
6. restart then activate mod(s) and it should workk fine until the next update

This is what the game intends for you to be able to do:
1. Run game
2. Go to Mods
3. Click "reset"
4. Run game again, and should be back to stock.

Problem is some versions corrupted the backups folders.  While in other situations, if the current files are corrupt, then you can't open the mods dialog, or use the reset button anyways.  You can manually delete the files folder and replace it with a copy of the backup folder in the game folder, but the backup folder may be suspect.  Thus best bet is to wipe the game folder and extract it again. Or extract it to some new location and use that.

0. Optional: Delete and re-extract mod, to ensure it's not been corrupted.
1. Delete and re-extract game
2. Run game, go to Mods, and apply
3. Run game again, mod should work.

Step 0 is maybe needed if you edited the mod in some broken way.

i was assuming that stuff like rest had already been tried

So. I figured out the problem.

You can't put the mod on a version of Strive installed on a hard drive that has admin permission required to make changes. (This is often the default for C drive.)

I recently moved Strive to C, (which is my SSD) for faster loading. However, windows was giving me shit, asking for permission for everything, and being unable to make shortcuts for some insipid reason.  Checking the debug log, I saw the mod kept trying to make folders on the C drive, but failing. So, I tried moving the modded-strive back to my normal drive, and now the mod works again.

TLDR; mod only works if admin permission is granted by default.

Is it possible to make it somehow work with delayed portrait loading?

It does work with delayed portrait loading.

But how? For me its not working. I can only have one of this. If i have IRP then DPL is not working ;/ Should i do something with order? If yes, DPL should be "0"? Or IRP should be?

When you replaced with v1.0 (which I hope you did), did you extract it fresh, or did you just extract it over top the old one?  If you didn't extract it fresh to the mods folder (delete the old one first), then yeah that still wouldn't work, the v1.0 removes a file, if you just extract over you'd change basically nothing.

i didnt replaced. I'm pretty new so i just downloaded it about week ago or something. So what should i do to have this mods working? And should i make a new save? Or it will work anyway without it.

Re-download the mod, there's a new 1.0 from a few days ago when i released the delayed loading mod that specifically is compatible. so download it again, delete the old, and extract the new. Load up the game, and hit apply again.

Don't need to make a new save or anything.

Thanks! Its working now! : D

(1 edit)

So, I think I found a bug. This is inside the 'pick portrait' button in game. When I enter a search term, say, 'titsb', I get pretty good filtered results. However, every 20th or so entry has about ten images superimposed on one another.  I think they all fit the search results, but it's hard to tell with the text overlapping itself so much.

I'm not sure how provide a screenshot because my printscreen key doesn't work for this sub menu (it just records the main mansion menu).

Also, sometimes images or text will clip off the right side of the popup box, like the margin is set off screen, if that makes sense.

I'm playing the game windowed + maximized.

That would have nothing to do with this mod.  Also likely has nothing to do with the delayed portrait loading mod either.

Ok. I'll make a bug post.

can confirm the error is with m ain game as i had it with a vanilla install

(1 edit)

Question: The "random portraits" feature, is this something that you only have if you are a patreon? I'm using version 0.5.19d and all slaves except some special ones (like Emily, Cali etc) have no portrait at all and it seems there is no option to change that.

Edit: 10 seconds after posting this i found the feature xD

Kyler, 

did you change a line in newsexsystem.gd, func switchsides() ?
var person = panel.get_meta('person')
from
var person = globals.newslave(globals.allracesarray[rand_range(0,globals.allracesarray.size())], 'adult', 'male')

I ask because I was tinkering with newsexsystem.gd, and kept getting an error from switchsides(), no matter what i did. That is, until I copied your altered line into my mod path NSS.gd

Nope, you can look at th emod and see what files it modifies, newsexsystem.gd is not one of those.

(1 edit)

Okay, I see that now.

Yeah, it was a really weird bug that caused the sex interaction to break completely. I fixed it by including a line I found in newsexsystem.gd, func changesides(), after applying your mod. Bizarrely, the code from the vanilla game was causing the breakage.

Deleted 2 years ago

By "activated it in the mods menu" do you mean checked it, and clicked apply? Which results in the game exiting.

To get logs, run the game from a shell prompt.  it outputs to the shell all the messages.  If there's no Random Portrait button, then the mod did not apply correctly.  You might need to extract a fresh copy of the game, and apply the mod again, thus time running it from the shell, to see what errors might happen.  Some errors are normal though, so if anything can be worth while to run the game, and exit it once, just to see what normally happens.  Then run it again, apply the mod, and see if any different errors appear. I don't know if mods work on Mac as I haven't read of anyone trying and my only mac is a work laptop.

The game has it's own random portrait code, but it *only* uses race, so that's likely what you saw get applied.

Deleted 2 years ago

Short answer: Mods can't work on OSX at all currently, and probably for the foreseeable future.

The errors you've posted to me suggested it is not working at all on your machine, and maybe Mac's in general. Basically, the mod engine is trying to build a backup folder, and failing.  That's the first step to applying a mod, it makes a backup copy of all the files, then loads the backup copy of files, and applies the mod.  If it can't make the backup, it'll never actually apply a mod.

I just downloaded the OSX build of the game, and looking in that zip, I don't see how the mod engine could work at all on OSX.  The mod engine expects to find a "files" folder that contains all the .gd files, but the osx package of the game doesn't have that, all the resources seem to be packaged up in a pck file. So mod engine, tries to find script files in the files folder, and it doesn't exist, so it errors a bunch trying to backup things.  then when trying to apply the mod, it can't find the backup folder so errors some more and basically does nothing.

I'm not sure if there's some way to have the game not use a pck file on OSX or not? If it needs to be built differently or could be manually achieved? The mod engine could also potentially be able to detect things are in a pck file and instead iterate on the files inside there and be made to work, however without a mac to actually test this on, it'd be a bit difficult to achieve.

Deleted 2 years ago

it also needs to write out the .gd files and have the game use them, instead of what is in the pck file. so pre-including backup might help it write out the files initially if it at least lets it use existing files... but overall seems like it could be annoying to get working.

The mod didn't work originally when I put it in the mod list. The portraits did not show up at all, instead I moved it into the folders named "body" and "portraits" before the mod folder which seems to have worked. I'm not sure if I did something wrong, but if anyone has the same problem, that would be the solution.

Is this compatible with 5.21b? I get these errors in console, and the mod doesn't work. The 'pick random portrait' button appears in game menus, but does nothing and spits out more console errors.

Win 10 64 bit. Strive 5.21b. 

constants mod, randomportraits 1.0, delayedportraitloading1.0

It works just fine for me, check if its the modloader that got broken from enabling/disabling mods. Just do a fresh install of 5.21b, making sure you erase backups folder and try again, if the problem persists then it may be a problem with your randomportraits download, because on my side it works as intended. Same windows 10 64 bit, strive 5.21b.

Delayed portrait loading got integrated into 0.5.21, stop using it, it will definitely break things.   I haven't tested it, but their patch notes noted they pulled it into the official game.

Disabled the delayedloader mod. Got a similar console error.

Deleted 2 years ago
(1 edit)

    # Filter on Gender
    filteringPortraits = []
    for p in validPortraits:
        if p.genders.has(person.sex):
            filteringPortraits.append(p) #Add portrait that has required sex
    if portraitSettings.debug: print('Filtered on gender %s, resulted in %d portraits.' % [person.sex, filteringPortraits.size()])
    if !filteringPortraits.empty():
        if (filteringPortraits.size() < portraitSettings.minMatch):
            return
        validPortraits.clear()
        validPortraits = filteringPortraits

It's quite a small change in randomportraits.gd.  (If you get some indent compile errors, as I did, use spaces instead of indents).

There is no option in my mod to only check for race, that's maybe one of the game's options for its own simplistic random portrait code, which this mod completely replaces.

I think you could achieve this by changing minMatch to -1 ?  This would affect more than just the gender filtering though.  Right now, for race or gender, if the matches are below minMatch, it aborts.  If it's not, but the result is empty, then it ignores that filter.  so if these conditions are met:

  • minMatch setting set to 0
  • No matching portraits for gender

Then instead of aborting like it would with a minMatch, it will discard the filtering on gender.  It'll filter on it, see that the result is empty, and continue with the prior list.  It'll however apply this to Races too, so if it filters on race and gets 0, it'll revert to using all portraits, then trying to filter on gender,  if that's also 0, it'll continue with all portraits (or a set of portraits for a race if you had one).


I think a more ideal way to handle this would be to have settings for whether it aborts or ignores the filter when below minMatch for race, gender, and age.

I haven't been playing the game as much lately and thus not too active on the mod. Not sure if/when that might change.

What file would i have to edit (If its even possible) to make the mod work with "dark elf" rather than "darkelf"

portrait.gd

Line 21, you'd want to change like this I think, haven't tested.

filterRegex.compile('(?!dark ?)elf')

This will make sure it doesn't match just "elf" on files named "Dark Elf"

then later on you'd want to change line 26 like this, so it'll support both with and without spaces.

if file.findn(race.replace(' ','')) >= 0 || file.findn(race >= 0:

Entire file,  and again i didn't test these but should roughly work.

https://pastebin.com/raw/tZ2N9MJt

thanks for the hel, but it hasn't worked. could 'we' make fix on dark instead of dark elf?

Hi @Kyler2 there is a bug in hair color code.

for color in ['auburn', 'black', 'black_gray', 'black_white', 'blond', 'blue', 'brown', 'gray', 'green', 'jelly', 'orange', 'orange_white', 'purple', 'red', 'white']:
filterRegex.compile(color.replace(' ','') + "(?!skin)")
if filterRegex.search(file):
hairColors.append(color)

this code doesn't work with tags that your app uses because it uses capital letters. I fixed it for myself by converting string to lower in this line:
if filterRegex.search(file.to_lower()):

Also would be cool if tits and ass code had something like this in the end:
if titSizes.empty(): titSizes += ['small','flat','masculine','average','large','big','huge']
so that when none of the sizes are picked it would match any of them

Is there any way to add a tag for slave appearance such as unsavory, cute, average ext

Is this compatable with 5.24/5.24a?

I don't believe so. Most mods need to be somewhat heavily reworked to be compatible with the latest version.

Seems to be working fine

Just noticed this in portrait.gd

# Avoid matching DarkElf for Elf
filterRegex.compile('(?!dark)elf')
if filterRegex.search(file.to_lower()):
races.append(race)

I think it should be (?<!dark)

Deleted 4 years ago

Indeed, it seems to be wrong.  Not sure if this will be fixed, but you have my thanks since I derived some of my code from this code.

I can't say I read back through this thread any, but I would imagine it should be taken one step further.

(?<!dark\s*)

Sorry, I don't know what it means. I just copy-paste the code from '(?<!fe)male' parts

No worries.  The < means look backwords.  The \s means black space.  Without the \s DarkElf is treated as different from Elf, but Dark Elf is not.

I've downloaded and installed the mod... I think sucessfully. However, it is't working. There's just no portraits loading.Could it be becase I'm using the launcher, and can't see the load order? 
It says to use random portraits tho....

Here's a quick guide, it may cover stuff you already know.

This mod does not include any portraits, you need to download them separately and put them in the AppData's "portraits" or "bodies" folders.

This mod should be extracted from the zip archive into the AppData's "mods" folder.  Be sure that the path fits the form of "Strive/mods/<modname>/info.txt", as it will not install correctly if there are more or less folders in the path. (If the mod is in the folder named "randomportraits1.0", then it is probably wrong.)

Once in place, mods are applied to the game through the "Mods" panel located in the game's main screen. Select the mods to be applied, then press "Apply".  The game will attempt to apply the mods, but will not inform you of any problems that occurred.  Thus, mods need to be verified manually.  This mod can generally be verified by loading a progress, select a slave, open the Customization tab, and look for the "Random Portrait" button.  If present, then the mod has successfully been applied, though it may still conflict with other mods.

Alright.... When I try to extract the mod, it shows "randomportraits1.0", and I can not really find the info.txt box.
Ah, I am also using Windows 10, by the way. Sorry if this has nothing to do with it

"info.txt" is a file located inside mods that provides an explanation of the mod.  If you have "randomportraits1.0", then you have too many folders.  Look inside that folder, you will find the folder "randomportraits", and inside that folder you will find "info.txt".  You need to remove the contents of "randomportraits1.0" and put them into the AppData's "mods" folder.  That way AppData will have a path containing "Strive/mods/randomportraits/info.txt".

Alright, I think I understand. Hopefully it'll work

I am having the same problem but I have already extracted from the randomportraits1.0 folder

That's not really any info by which I can judge your situation.  Is there a "Random Portrait" button?  Are you using any other mods?  Are you using any portrait packs?  Does manually assigning pictures work?

(2 edits)

the problem is that there are no other mods, I am absolutely sure I have downloaded it correctly, I have activated it in the mods list, but there is no random portrait button, but manually setting portraits does work

and yes I am using a few portrait packs but they are all compatible with the mod

Okay, this is good information; however, based on that the mod was most likely not installed correctly, as the presence of the random portrait button is the simplest sign that the mod has been installed.  The fact that you can select portraits manually means that there is probably no issues on that side.

You have probably seen the install instructions I gave a few posts above this, please be sure that you have followed them carefully.  I'll try to give a detailed list of things to verify.

On windows, there should be a file path "C:\Users\USERNAME\AppData\Roaming\Strive\mods\randomportraits\info.txt".  If correct, the contents of that file will display on the right side of the panel when you hover the mouse over the mod name in the mod panel.

Press the "Active Mods" button on the mod panel.  Near the top left corner of the mod panel, the text "Active Mod List" should appear as part of a transparent popup, with "randomportraits" underneath. (The visibility of this popup can be fixed by my bugfix patch on the Strive Discord, but it will not effect whether the mod works)  If the mod is not listed, then try applying the mod.

In the folder containing game files, find and open the game file "Strive\files\scripts\mainmenu.gd" with any decent text editor.  Find the line "globals.constructor.randomportrait(startSlave)", it should be just below the line "func _on_slaveconfirm_pressed():".  If that line is not present, then the mod system did not add the mod to the game files.  You may need to move the Strive game files to a new location or change the permissions of the folder to allow the game to change it's own files.  A user once had an issue with permissions due to the game being located in the standard "Program Files" folder.

(1 edit)

nevermind it is fixed now, it being hidden might have had something to do with it... but can you really blame me?

(+1)

I don't know if you're still around at all, Kyler2, but if so would you mind if I work on a patch to make this mod compatible with my own? I don't want to touch your code without permission, of course, but I do love using your mod and would like to see them be able to play nicely together.

I am having a problem that I am not sure is my fault, I cant figure out how to actually give them a random portrait

Deleted 2 years ago

I have enabled the mod but the button still isnt there

(+1)

If Kyler2 is still lurking here, I'd like to ask permission to update the randomportraits mod and the PortraitPackEditor tool. I already did it for my own use and was pleasantly surprised about how easy Kyler2 had made to tweak those. Especially by providing the source code for the editor. I'll post a thread in the mod section to check whether there is any interest anyway, but if Kyler2 has any problems with me sharing the edited versions, I'll of course keep my versions private.

(+1)

If you could please share with me the tweaked version, I cannot find a way to make it work for me. :)

I made a post with it in the mods section.

I am trying this mod now, love the way it works so far, except I bought 1 and captured one Tribal Elf, I can not set portraits or body on either of them

https://itch.io/t/984434/randomportraits-and-portrait-pack-editor-for-the-10-ver...

Hi, I assumed I installed the mod correctly, but pressing the random portrait button doesn't seem to do anything. Something a bit odd that i noticed was that the "randomportraits" folder has a "Constants" file in it now, after applying it in the game. Any suggestions on how I could get it to work?

(1 edit)

The only reason there would be a Constants folder in it is if the path for the Strive mod folder was set to that folder instead of ".../Strive/mods". While Strive's mod system was updated to use mods along any path in the designated mod folder, the mods themselves often use only an exact relative file path. In this case it expects "<the mod folder>/randomportraits/", but that path is not valid with the current path assigned as the Strive mod folder(edit: it's looking for ".../Strive/mods/randomportraits/randomportraits/").

With already existing characters that don't have a pfp, the game crashes when I click on them.

This issue is most likely unrelated to this mod as the changes made by this mod do not change behavior depending on if the character has a portrait image, nor does the vanilla game. Any conflicts with another mod would affect every slave regardless if they had an image.

Hi

Should this mod work in strive for conquest?  

I was linked to this mod from   https://itch.io/t/239558/body-and-portrait-packs-v29updated-2805

Body and Portrait packs v2.9(UPDATED 28.05)

thanks for any help

(1 edit)

No, there is absolutely zero chance of this working with conquest. You followed a link to this mod from another part of the Strive for Power forums not from the Conquest forums.

Side note, this is the old version of the random portraits mod, though that has no impact on your question as neither version will work for Conquest.

This is the old ver? Would you mind linking to the new ver? When I search up random portraits this is the one that comes up

https://itch.io/t/984434/randomportraits-and-portrait-pack-editor-for-the-10-ver...