Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

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 >.<