Feb 13, 2022
30
13
For modders, my new action folders structure, search priority is this :

name,
gender.race.age.pregnant,
gender.race.pregnant,
gender.race.age,
gender.race,
gender.age.pregnant,
gender.pregnant,
gender.age,
gender

gender : female, male, transfemale, transmale
race : black, asian, latina, (put nothing for white)
age : young (18-24), (put nothing for 25-39), mature (40-59), old (60+)
pregnant : pregnant, (nothing if not pregnant)

So for a pregnant young black female named Cindy, it will look for pictures in this order :

Cindy,
female.black.young.pregnant,
female.black.pregnant,
female.black.young,
female.black,
female.young.pregnant,
female.pregnant,
female.young,
female
CU

How can I make "Cindy" show the specific pregnancy sex scenes only for her instead of the non-pregnant sex scenes playing instead?

My "Cindy" is Latina, Mature, and Pregnant, but when I put the female.latina.mature.pregnant or female.latina.pregnant as a fail-safe, it won't show the pregnant version. Only when I take out the folders from "Cindy" (Basically turning her into another generic female character for sex scenes) does the pregnant images work.

I just want to be able to have specific Pregnant scenes for only "Cindy" and not the generic Pregnant scenes that would normally play for anyone else.

The folders I have inside the "Cindy" folder at the moment, is just:
default (has the usual pussy, cum_in_pussy, anal, etc.)
kitchen (copy pasted from female folder but removed scenes in it and added specific scenes)
shower (Ditto)

I tried adding a [pregnant] folder inside "Cindy" to see if it may work and it didn't work so that idea is crossed out.
 
  • Thinking Face
Reactions: GamerDaddy

decker666

Member
Sep 29, 2017
185
354
How can I make "Cindy" show the specific pregnancy sex scenes only for her instead of the non-pregnant sex scenes playing instead?

My "Cindy" is Latina, Mature, and Pregnant, but when I put the female.latina.mature.pregnant or female.latina.pregnant as a fail-safe, it won't show the pregnant version. Only when I take out the folders from "Cindy" (Basically turning her into another generic female character for sex scenes) does the pregnant images work.

I just want to be able to have specific Pregnant scenes for only "Cindy" and not the generic Pregnant scenes that would normally play for anyone else.

The folders I have inside the "Cindy" folder at the moment, is just:
default (has the usual pussy, cum_in_pussy, anal, etc.)
kitchen (copy pasted from female folder but removed scenes in it and added specific scenes)
shower (Ditto)

I tried adding a [pregnant] folder inside "Cindy" to see if it may work and it didn't work so that idea is crossed out.
Hi,
Made a little change in the image search so that if Cindy is pregnant and you have a Cindy.pregnant folder it will check it before all the other folders.
Don't forget to relaunch node searchActions.js after creating that new folder, with at least a default subfolder containing the sex images you want for her.



Congrats for finding a game situation I didn't think of :)
CU
 
Last edited:
Feb 13, 2022
30
13
Hi,
Made a little change in the image search so that if Cindy is pregnant and you have a Cindy.pregnant folder it will check it before all the other folders.
Don't forget to relaunch node searchActions.js after creating that new folder, with at least a default subfolder containing the sex images you want for her.

Pixeldrain

Congrats for finding a game situation I didn't think of :)
CU
Works perfectly. Thank you very much for your time and the fix for the pregnant update

I just hope it becomes possible for women to be able to be moved in their positions as a QoL update.

Example:

Before;
v Sasha
^v Britt
^v Lexi
^ Tracy

After;
v Britt
^v Sasha
^v Tracy
^ Lexi
 

decker666

Member
Sep 29, 2017
185
354
Thank for real life but is this include in game?
In fact I was a little bit too quick to answer (I had proposed the change a while back).

v0.26 : X=55
v0.27 : X=49

0% : chance over or equal to X
100% : chance under X, with breeder trait
50% : chance under X, if mc takes fertility potion
10% : chance under X

This may change in the future :D
 
Last edited:
  • Like
Reactions: GamerDaddy

lp456

Newbie
May 24, 2018
84
13
In fact I was a little bit too quick to answer (I had proposed the change a while back).

v0.26 : X=55
v0.27 : X=49

0% : chance over or equal to X
100% : chance under X, with breeder trait
50% : chance under X, if mc takes fertility potion
10% : chance under X

This may change in the future :D
Okay wish it increase to 60 instead in mature
 

kuhaaku98

Newbie
Jan 12, 2019
49
9
Anyone else had the error in the current save?
"Cannot read properties of undefined (reading 'id')." This error appeared in my save that I have been using since the beginning of the game
 
  • Like
Reactions: ttyrke

guest1492

Member
Apr 28, 2018
322
272
I ran into an issue when playing v0.26c on mopoga. Sometimes when I go back to the cabin, the game freezes and I have to kill the page. This is how it looks like when it happens:

1701014535239.png

At first I assumed that this is a problem from getting redirected to 'Event: Common capital' which I had never seen before, but I was able to get that event to show properly after numerous refreshes. I'm not sure what exactly is the problem.

I have tried using SugarCube.Engine.play('Event: Common capital') in the browser console and that does cause the game to freeze. Also I looked at the code of the event and there seems to be an issue with this:
Code:
<<set _randomPersons = setup.getRandomPersons(_persons, 2)>>
<<set 
    _randomPerson1Id = _randomPersons[0],
    _randomPerson2Id = _randomPersons[1]
>>
...
$guests[_randomPerson1Id].name
setup.getRandomPersons returns an array of objects, which means _randomPerson1Id is an object, so $guests[_randomPerson1Id].name shouldn't really work, but the problem is that I can sometimes get the event to fire and it works properly.

I'm confused o_O. I've attached my save but I don't think that it'll be any help at all.
 
  • Like
Reactions: ttyrke

ttyrke

Well-Known Member
Game Developer
Jun 10, 2017
1,387
1,499
Anyone else had the error in the current save?
"Cannot read properties of undefined (reading 'id')." This error appeared in my save that I have been using since the beginning of the game
Add your save file
 

ttyrke

Well-Known Member
Game Developer
Jun 10, 2017
1,387
1,499
I ran into an issue when playing v0.26c on mopoga. Sometimes when I go back to the cabin, the game freezes and I have to kill the page. This is how it looks like when it happens:

View attachment 3119719

At first I assumed that this is a problem from getting redirected to 'Event: Common capital' which I had never seen before, but I was able to get that event to show properly after numerous refreshes. I'm not sure what exactly is the problem.

I have tried using SugarCube.Engine.play('Event: Common capital') in the browser console and that does cause the game to freeze. Also I looked at the code of the event and there seems to be an issue with this:
Code:
<<set _randomPersons = setup.getRandomPersons(_persons, 2)>>
<<set
    _randomPerson1Id = _randomPersons[0],
    _randomPerson2Id = _randomPersons[1]
>>
...
$guests[_randomPerson1Id].name
setup.getRandomPersons returns an array of objects, which means _randomPerson1Id is an object, s $guests[_randomPerson1Id].name shouldn't really work, but the problem is that I can sometimes get the event to fire and it works properly.

I'm confused o_O. I've attached my save but I don't think that it'll be any help at all.
Thx. Sounds like an infinity loop. Will check it out
 
  • Like
Reactions: guest1492

guest1492

Member
Apr 28, 2018
322
272
Thx. Sounds like an infinity loop. Will check it out
I realized that _persons in the code I quoted is actually an array of integers and not objects, so my point about your code is invalid and that's not the reason for the game freezing.

EDIT 1
After yet another look, I believe that the problem is with this part of the code:
JavaScript:
setup.getRandomPersonIds = function(persons, limit = 2) {
    var randomIds = [];
    var randomPersonList = clone(persons);
    while (randomIds.length < limit && randomPersonList.length) {
        var randomIndex = Math.floor(Math.random() * randomPersonList.length);
        if (!randomIds.includes(randomIndex)) {
            randomIds.push(randomIndex);
            randomPersonList.splice(randomIndex, 1);
        }
    }

    return randomIds;
};
Using something like SugarCube.setup.getRandomPersonIds([3, 5], 2) can cause an infinite loop. In the code, randomIndex is an integer that's either 0 or 1 (since persons is a 2 element array here). So randomIds is going to be filled with either 0 or 1 (which is not what you want, since you actually want it to be 3 or 5 in this example, but that's a separate issue).

The infinite loop happens if the first time through the loop, randomIndex is 0. Now randomPersonList has a length of 1 and so afterwards, randomIndex will always be 0 and thus doesn't get pushed into randomIds. So randomIds stays with length 1 and the loop repeats.

Side note, but SugarCube's creator added many custom methods to the Array class, so that whole function could be written like so:
JavaScript:
setup.getRandomPersonIds = function(persons, limit = 2) {
    return [].concatUnique(persons).randomMany(limit);
}

EDIT 2
Changing that function seems to have fixed the problem for me.
 
Last edited:
  • Like
Reactions: red1n
3.50 star(s) 33 Votes