Belcher

Newbie
Apr 4, 2020
34
11
I've played a while with it like you did it and it seems fine. Definitely better then starting from 0 with every slave.
I mean the only in game reason I can think of for them starting that was is you didnt ask and forced them to do it in a specific way. So you basically never asked if theyve eaten shit before, which would give them a D. I like to know if they do so I can train them in something befitting it instead of a maid or doctor. Usually they become artists or concubines. I figure in a world as messed up as this the artists do that stuff semi regularly and Id rather have someone who dabbled in it deal with it then someone who didnt.
 

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
Also, there's no reason for freshly captured slaves not to have been abused.

I remember in the manga Berserk: one girl is being sold into slavery by 3 guys, and one of them wants to abandon the money he'd get from selling her in order to cut off her entrails and see if her internal organs can encircle a tree. And although his partner don't condone it, they don't make anything to stop him either even though they could

Jack-o-nine-tails is basically a hentai game of Bersek that is set in another dimension. If that kind of horrible sadistic things happen in the real world, you can be sure that freshly sold slaves here have at least possibly been mouth fucked by a horse or two. Life is life. :coffee:
Not related to this post, but I have no idea how to tag someone :D

I wanted to ask if there is a specific reason for the picture loading system for slave/assistant scenes to be the way it is
(I'm talking about having to explicitly specify each photo that can show up for every scene for all girls in different files.).

As it is right now it's really tedious to go through 386 files to add just one photo for an existing/new slave/assistant scene.

I have a little demo as a proposal for an alternative:

Code:
if $args[0] = 'pic':
    if $args[1] = 'slave':
        if $slave["hairColor"] = '':
            if instr($slave["fullimage"], 'white') ! 0:
                $slave["hairColor"] = 'white'
            elseif instr($slave["fullimage"], 'red') ! 0:
                $slave["hairColor"] = 'red'
            elseif instr($slave["fullimage"], 'purple') ! 0:
                $slave["hairColor"] = 'purple'
            elseif instr($slave["fullimage"], 'pink') ! 0:
                $slave["hairColor"] = 'pink'
            elseif instr($slave["fullimage"], 'green') ! 0:
                $slave["hairColor"] = 'green'
            elseif instr($slave["fullimage"], 'brown') ! 0:
                $slave["hairColor"] = 'brown'
            elseif instr($slave["fullimage"], 'blue') ! 0:
                $slave["hairColor"] = 'blue'
            elseif instr($slave["fullimage"], 'blond') ! 0:
                $slave["hairColor"] = 'blond'
            elseif instr($slave["fullimage"], 'black') ! 0:
                $slave["hairColor"] = 'black'
            end
  
            if instr($slave["fullimage"], 'short') ! 0:
                $slave["hairLen"] = 'short'
            else
                $slave["hairLen"] = 'long'
            end
  
            if slave["age"] = 0:
                $slave["age"] = 'young'
            elseif slave["age"] = 1:
                $slave["age"] = 'loli'
            elseif slave["age"] = 2:
                $slave["age"] = 'milf'
            end
        end
        $picPath_spec_noNr = $args[2] + '_' + $slave["hairColor"] + '_' + $slave["hairLen"] + '_' + $slave["age"]
        $picPath_gen_noNr = $args[2] + '_general_' + $slave["age"]
    elseif $args[1] = 'assistant':
        if $assistant["hairColor"] = '':
            if instr($assistant["fullimage"], 'white') ! 0:
                $assistant["hairColor"] = 'white'
            elseif instr($assistant["fullimage"], 'red') ! 0:
                $assistant["hairColor"] = 'red'
            elseif instr($assistant["fullimage"], 'purple') ! 0:
                $assistant["hairColor"] = 'purple'
            elseif instr($assistant["fullimage"], 'pink') ! 0:
                $assistant["hairColor"] = 'pink'
            elseif instr($assistant["fullimage"], 'green') ! 0:
                $assistant["hairColor"] = 'green'
            elseif instr($assistant["fullimage"], 'brown') ! 0:
                $assistant["hairColor"] = 'brown'
            elseif instr($assistant["fullimage"], 'blue') ! 0:
                $assistant["hairColor"] = 'blue'
            elseif instr($assistant["fullimage"], 'blond') ! 0:
                $assistant["hairColor"] = 'blond'
            elseif instr($assistant["fullimage"], 'black') ! 0:
                $assistant["hairColor"] = 'black'
            end
            if instr($assistant["fullimage"], 'short') ! 0:
                $assistant["hairLen"] = 'short'
            else
                $assistant["hairLen"] = 'long'
            end
            if assistant["age"] = 0:
                $assistant["age"] = 'young'
            elseif assistant["age"] = 1:
                $assistant["age"] = 'loli'
            elseif assistant["age"] = 2:
                $assistant["age"] = 'milf'
            end
        end
        $picPath_spec_noNr = $args[2] + '_' + $assistant["hairColor"] + '_' + $assistant["hairLen"] + '_' + $assistant["age"]
        $picPath_gen_noNr = $args[2] + '_general_' + $assistant["age"]
    end
    lok_rand = rand(1, picMax[$picPath_spec_noNr] + picMax[$picPath_gen_noNr])
    pic_type = picMax[$picPath_gen_noNr] - picMax[$picPath_spec_noNr]
    if pic_type <= 0:
        pic_type *= -1
        if lok_rand > pic_type:
            $picPath = $args[3] + $picPath_spec_noNr + '_' + str(lok_rand - picMax[$picPath_gen_noNr])
        else
            $picPath = $args[3] + $picPath_gen_noNr + '_' + str(lok_rand)
        end
    else
        if lok_rand > pic_type:
            $picPath = $args[3] + $picPath_gen_noNr + '_' + str(lok_rand - picMax[$picPath_spec_noNr])
        else
            $picPath = $args[3] + $picPath_spec_noNr + '_' + str(lok_rand)
        end
    end
    $picPath = $replace($picPath, '_1')
end
The "picMax" array looks like this, it has the max number of images for each specific configuration, as well as the generals. (ex for "hj", every scene would need this (~3060 lines for no loli and ~4560 lines for loli)):
Code:
picMax["hj_black_long_milf"] = 1
picMax["hj_black_long_young"] = 3
picMax["hj_black_short_milf"] = 1
picMax["hj_black_short_young"] = 2
picMax["hj_blond_long_milf"] = 1
picMax["hj_blond_long_young"] = 3
picMax["hj_blond_short_milf"] = 1
picMax["hj_blond_short_young"] = 1
picMax["hj_blue_long_milf"] = 1
picMax["hj_blue_long_young"] = 1
picMax["hj_blue_short_milf"] = 1
picMax["hj_blue_short_young"] = 1
picMax["hj_brown_long_milf"] = 1
picMax["hj_brown_long_young"] = 3
picMax["hj_brown_short_milf"] = 1
picMax["hj_brown_short_young"] = 3
picMax["hj_general_milf"] = 2
picMax["hj_general_young"] = 2
picMax["hj_green_long_milf"] = 1
picMax["hj_green_long_young"] = 2
picMax["hj_green_short_milf"] = 1
picMax["hj_green_short_young"] = 1
picMax["hj_pink_long_milf"] = 1
picMax["hj_pink_long_young"] = 1
picMax["hj_pink_short_milf"] = 1
picMax["hj_pink_short_young"] = 1
picMax["hj_purple_long_milf"] = 1
picMax["hj_purple_long_young"] = 2
picMax["hj_purple_short_milf"] = 1
picMax["hj_purple_short_young"] = 1
picMax["hj_red_long_milf"] = 1
picMax["hj_red_long_young"] = 1
picMax["hj_red_short_milf"] = 1
picMax["hj_red_short_young"] = 4
picMax["hj_white_long_milf"] = 1
picMax["hj_white_long_young"] = 3
picMax["hj_white_short_milf"] = 1
picMax["hj_white_short_young"] = 1
You don't have permission to view the spoiler content. Log in or register now.

There are few improvements that can be done like adding hair color and hair length to the slaves .json files to avoid those "if"s and having a few more strings to remember the last picture shown to try and avoid repetition as much as possible, also having a .json with all the "picMax" values instead of keeping them in the .qsp could be a thing.

It makes the adding a new picture to an existing scene as simple as throwing it in the correct folder, naming it porperly and changing one, maximum two values in the picMax array.
It also reduces the adding of new scenes to making your own 38/57(no loli/loli) lines in that array which in my opinion is simple then opening, modifying and saving 386 files (like, accidentally miss one and lose your mind when the unlucky player of the mod reports the bug :LOL:)

I've tested it, it works, I didn't see any slow down in the image loading speed. I wanted to have your opinion first and if you like it, I'll start polishing it and make the improvements I mentioned and also any changes/features you want. With a little tweaking we could have it display pics for other things like more then one pic for the food screen.
 
Last edited:
  • Like
Reactions: Pianocat

qwertyu12359

Jack-o-nine-tails
Game Developer
Aug 1, 2017
1,639
1,824
Not related to this post, but I have no idea how to tag someone :D

I wanted to ask if there is a specific reason for the picture loading system for slave/assistant scenes to be the way it is
(I'm talking about having to explicitly specify each photo that can show up for every scene for all girls in different files.).

As it is right now it's really tedious to go through 386 files to add just one photo for an existing/new slave/assistant scene.

I have a little demo as a proposal for an alternative:

Code:
if $args[0] = 'pic':
    if $args[1] = 'slave':
        if $slave["hairColor"] = '':
            if instr($slave["fullimage"], 'white') ! 0:
                $slave["hairColor"] = 'white'
            elseif instr($slave["fullimage"], 'red') ! 0:
                $slave["hairColor"] = 'red'
            elseif instr($slave["fullimage"], 'purple') ! 0:
                $slave["hairColor"] = 'purple'
            elseif instr($slave["fullimage"], 'pink') ! 0:
                $slave["hairColor"] = 'pink'
            elseif instr($slave["fullimage"], 'green') ! 0:
                $slave["hairColor"] = 'green'
            elseif instr($slave["fullimage"], 'brown') ! 0:
                $slave["hairColor"] = 'brown'
            elseif instr($slave["fullimage"], 'blue') ! 0:
                $slave["hairColor"] = 'blue'
            elseif instr($slave["fullimage"], 'blond') ! 0:
                $slave["hairColor"] = 'blond'
            elseif instr($slave["fullimage"], 'black') ! 0:
                $slave["hairColor"] = 'black'
            end

            if instr($slave["fullimage"], 'short') ! 0:
                $slave["hairLen"] = 'short'
            else
                $slave["hairLen"] = 'long'
            end

            if slave["age"] = 0:
                $slave["age"] = 'young'
            elseif slave["age"] = 1:
                $slave["age"] = 'loli'
            elseif slave["age"] = 2:
                $slave["age"] = 'milf'
            end
        end
        $picPath_spec_noNr = $args[2] + '_' + $slave["hairColor"] + '_' + $slave["hairLen"] + '_' + $slave["age"]
        $picPath_gen_noNr = $args[2] + '_general_' + $slave["age"]
    elseif $args[1] = 'assistant':
        if $assistant["hairColor"] = '':
            if instr($assistant["fullimage"], 'white') ! 0:
                $assistant["hairColor"] = 'white'
            elseif instr($assistant["fullimage"], 'red') ! 0:
                $assistant["hairColor"] = 'red'
            elseif instr($assistant["fullimage"], 'purple') ! 0:
                $assistant["hairColor"] = 'purple'
            elseif instr($assistant["fullimage"], 'pink') ! 0:
                $assistant["hairColor"] = 'pink'
            elseif instr($assistant["fullimage"], 'green') ! 0:
                $assistant["hairColor"] = 'green'
            elseif instr($assistant["fullimage"], 'brown') ! 0:
                $assistant["hairColor"] = 'brown'
            elseif instr($assistant["fullimage"], 'blue') ! 0:
                $assistant["hairColor"] = 'blue'
            elseif instr($assistant["fullimage"], 'blond') ! 0:
                $assistant["hairColor"] = 'blond'
            elseif instr($assistant["fullimage"], 'black') ! 0:
                $assistant["hairColor"] = 'black'
            end
            if instr($assistant["fullimage"], 'short') ! 0:
                $assistant["hairLen"] = 'short'
            else
                $assistant["hairLen"] = 'long'
            end
            if assistant["age"] = 0:
                $assistant["age"] = 'young'
            elseif assistant["age"] = 1:
                $assistant["age"] = 'loli'
            elseif assistant["age"] = 2:
                $assistant["age"] = 'milf'
            end
        end
        $picPath_spec_noNr = $args[2] + '_' + $assistant["hairColor"] + '_' + $assistant["hairLen"] + '_' + $assistant["age"]
        $picPath_gen_noNr = $args[2] + '_general_' + $assistant["age"]
    end
    lok_rand = rand(1, picMax[$picPath_spec_noNr] + picMax[$picPath_gen_noNr])
    pic_type = picMax[$picPath_gen_noNr] - picMax[$picPath_spec_noNr]
    if pic_type <= 0:
        pic_type *= -1
        if lok_rand > pic_type:
            $picPath = $args[3] + $picPath_spec_noNr + '_' + str(lok_rand - picMax[$picPath_gen_noNr])
        else
            $picPath = $args[3] + $picPath_gen_noNr + '_' + str(lok_rand)
        end
    else
        if lok_rand > pic_type:
            $picPath = $args[3] + $picPath_gen_noNr + '_' + str(lok_rand - picMax[$picPath_spec_noNr])
        else
            $picPath = $args[3] + $picPath_spec_noNr + '_' + str(lok_rand)
        end
    end
    $picPath = $replace($picPath, '_1')
end
The "picMax" array looks like this, it has the max number of images for each specific configuration, as well as the generals. (ex for "hj", every scene would need this (~3060 lines for no loli and ~4560 lines for loli)):
Code:
picMax["hj_black_long_milf"] = 1
picMax["hj_black_long_young"] = 3
picMax["hj_black_short_milf"] = 1
picMax["hj_black_short_young"] = 2
picMax["hj_blond_long_milf"] = 1
picMax["hj_blond_long_young"] = 3
picMax["hj_blond_short_milf"] = 1
picMax["hj_blond_short_young"] = 1
picMax["hj_blue_long_milf"] = 1
picMax["hj_blue_long_young"] = 1
picMax["hj_blue_short_milf"] = 1
picMax["hj_blue_short_young"] = 1
picMax["hj_brown_long_milf"] = 1
picMax["hj_brown_long_young"] = 3
picMax["hj_brown_short_milf"] = 1
picMax["hj_brown_short_young"] = 3
picMax["hj_general_milf"] = 2
picMax["hj_general_young"] = 2
picMax["hj_green_long_milf"] = 1
picMax["hj_green_long_young"] = 2
picMax["hj_green_short_milf"] = 1
picMax["hj_green_short_young"] = 1
picMax["hj_pink_long_milf"] = 1
picMax["hj_pink_long_young"] = 1
picMax["hj_pink_short_milf"] = 1
picMax["hj_pink_short_young"] = 1
picMax["hj_purple_long_milf"] = 1
picMax["hj_purple_long_young"] = 2
picMax["hj_purple_short_milf"] = 1
picMax["hj_purple_short_young"] = 1
picMax["hj_red_long_milf"] = 1
picMax["hj_red_long_young"] = 1
picMax["hj_red_short_milf"] = 1
picMax["hj_red_short_young"] = 4
picMax["hj_white_long_milf"] = 1
picMax["hj_white_long_young"] = 3
picMax["hj_white_short_milf"] = 1
picMax["hj_white_short_young"] = 1
You don't have permission to view the spoiler content. Log in or register now.

There are few improvements that can be done like adding hair color and hair length to the slaves .json files to avoid those "if"s and having a few more strings to remember the last picture shown to try and avoid repetition as much as possible, also having a .json with all the "picMax" values instead of keeping them in the .qsp could be a thing.

It makes the adding a new picture to an existing scene as simple as throwing it in the correct folder, naming it porperly and changing one, maximum two values in the picMax array.
It also reduces the adding of new scenes to making your own 38/57(no loli/loli) lines in that array which in my opinion is simple then opening, modifying and saving 386 files (like, accidentally miss one and lose your mind when the unlucky player of the mod reports the bug :LOL:)

I've tested it, it works, I didn't see any slow down in the image loading speed. I wanted to have your opinion first and if you like it, I'll start polishing it and make the improvements I mentioned and also any changes/features you want. With a little tweaking we could have it display pics for other things like more then one pic for the food screen.
If you think that'll work flawlessly, that'll be an amazing idea! A real breakthrough. (i107760 : would you like to give a second opinion?)

Just one thing: "If you have 1 specific pic and 3 general pics instead of giving the one specific picture 50% chance show up and the other 3 16.6% change each, it tries to even the odds."
I've been thinking of a better system for a while now. General pictures are dull; the only reason I spent so much time replacing them is because we inherited them from the old system, otherwise I'd have only picked specific pictures. Specific pictures should always be more likely (x1.5 at least) to appear than "general" pictures. If you can make that happen, that'll be perfect.
 
Last edited:

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
If you think that'll work flawlessly, that'll be an amazing idea! A real breakthrough. (i107760 : would you like to give a second opinion?)

Just one thing: "If you have 1 specific pic and 3 general pics instead of giving the one specific picture 50% chance show up and the other 3 16.6% change each, it tries to even the odds."
I've been thinking of a better system for a while now. General pictures a dull; the only reason I spent so much time replacing them is because we inherited from the system, otherwise I'd have only pick specific pictures. Specific pictures should always be more likely (x1.5 at least) to appear than "general" pictures. If you can make that happen, that'll be perfect.
Alright sure, I'll add the vars to remember what picture was shown before too to avoid constant repetition for the girl configurations that have only one specific picture for a scene.
Maybe we can also add another round of pictures after it's completed, I'll keep an I eye out as I search for pics for my own mod.
 
  • Like
Reactions: qwertyu12359

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
Also, something I've been thinking about is letting the game tap into different hair length pictures before it goes to general pics, or at least have different hair length pics have the same chance of appearing as the general ones.

If we increase the chance for specific pics to appear then I think it wouldn't even be that obvious and I think it would be quite beneficial for the girl configurations that don't have that many specific pics.
 

qwertyu12359

Jack-o-nine-tails
Game Developer
Aug 1, 2017
1,639
1,824
Also, something I've been thinking about is letting the game tap into different hair length pictures before it goes to general pics, or at least have different hair length pics have the same chance of appearing as the general ones.

If we increase the chance for specific pics to appear then I think it wouldn't even be that obvious and I think it would be quite beneficial for the girl configurations that don't have that many specific pics.
I'm afraid I'm against the idea. The player is used to repetition, but the less the picture clashes with the full body model, the better. Imagine fetching for a girl with long hair and seeing her like that and whenever she gives you a blowjob, she randomly has 5mm of hair on her skull!

That's the reason why manually erased all seeable hair from general pictures, pixel by pixel. So we wouldn't see a pink hair girl with blue hair, or a short haired girl with long hair. It's all about managing suspension of disbelief as much as the game system makes it possible. (y)
 
  • Like
Reactions: Lokplart

qwertyu12359

Jack-o-nine-tails
Game Developer
Aug 1, 2017
1,639
1,824
Maybe we can also add another round of pictures after it's completed, I'll keep an I eye out as I search for pics for my own mod.
It's already in my plan to add another round of pictures :) You can see in the roadmap of the first post, for 2.2:
- Add more precise pictures for "blowjob", "vaginal sex" and "gangbang". :Kappa:

2.3:
- Have the images for "self-humiliation", etc. actually be about "self-humiliation", etc. Instead of fetching for the exhibitionism pictures. :Kappa:
- Include pictures (for all acts, all ages, all hair color) in "girls/scene". :Kappa:

I've added some of the tasks you gave yourself in the Roadmap :) If you have more, tell me so I can copy paste them. If you want more, tell me how many ;)
 

Belcher

Newbie
Apr 4, 2020
34
11
Is there a mechanic I dont know about or is there something bugging out? Thats a D level obedience but Im still in B? I dropped down to D not to long ago for adding spoil and then it jumped back up quickly without spoil dropping.
 
  • Thinking Face
Reactions: qwertyu12359

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
As an update on the pic thingy... I've got the whole picMax array done, every relevant picture is counted and my code thingy returns the right string every time.

Now it should be as simple as just assigning the string to the "$special_bg" var that is used in the "interaction_screen" location to get the right picture, right?

Wrong...

Even though my code returns the right string for some reason it doesn't get displayed right.. it ALWAYS picks a random general picture of that act on it's own.
And to make it even more weird, if I force the game to display a pic with my thing, lets say a hj pic, it's going to display it properly, for every act EXCEPT hj

I'm just gonna explain the process and if you can see where this goes wrong please tell me..
Code for the thing the chooses pictures, mostly the same, I added your higher chance of displaying a specific pic and fixed a bug:
Code:
if $args[0] = 'pic':
    !getting slave info
    if $args[1] = 'slave':
        if $slave["hairColor"] = '':
            if instr($slave["fullimage"], 'white') ! 0:
                $slave["hairColor"] = 'white'
            elseif instr($slave["fullimage"], 'red') ! 0:
                $slave["hairColor"] = 'red'
            elseif instr($slave["fullimage"], 'purple') ! 0:
                $slave["hairColor"] = 'purple'
            elseif instr($slave["fullimage"], 'pink') ! 0:
                $slave["hairColor"] = 'pink'
            elseif instr($slave["fullimage"], 'green') ! 0:
                $slave["hairColor"] = 'green'
            elseif instr($slave["fullimage"], 'brown') ! 0:
                $slave["hairColor"] = 'brown'
            elseif instr($slave["fullimage"], 'blue') ! 0:
                $slave["hairColor"] = 'blue'
            elseif instr($slave["fullimage"], 'blond') ! 0:
                $slave["hairColor"] = 'blond'
            elseif instr($slave["fullimage"], 'black') ! 0:
                $slave["hairColor"] = 'black'
            end
       
            if instr($slave["fullimage"], 'short') ! 0:
                $slave["hairLen"] = 'short'
            else
                $slave["hairLen"] = 'long'
            end
       
            if slave["age"] = 0:
                $slave["age"] = 'young'
            elseif slave["age"] = 1:
                $slave["age"] = 'loli'
            elseif slave["age"] = 2:
                $slave["age"] = 'milf'
            end
        end
!        msg '<<$slave["hairColor"]>> | <<$slave["hairLen"]>> | <<$slave["age"]>>'
        $picPath_spec_noNr = $args[2] + '_' + $slave["hairColor"] + '_' + $slave["hairLen"] + '_' + $slave["age"]
        $picPath_gen_noNr = $args[2] + '_general_' + $slave["age"]
    elseif $args[1] = 'assistant':
        if $assistant["hairColor"] = '':
            if instr($assistant["fullimage"], 'white') ! 0:
                $assistant["hairColor"] = 'white'
            elseif instr($assistant["fullimage"], 'red') ! 0:
                $assistant["hairColor"] = 'red'
            elseif instr($assistant["fullimage"], 'purple') ! 0:
                $assistant["hairColor"] = 'purple'
            elseif instr($assistant["fullimage"], 'pink') ! 0:
                $assistant["hairColor"] = 'pink'
            elseif instr($assistant["fullimage"], 'green') ! 0:
                $assistant["hairColor"] = 'green'
            elseif instr($assistant["fullimage"], 'brown') ! 0:
                $assistant["hairColor"] = 'brown'
            elseif instr($assistant["fullimage"], 'blue') ! 0:
                $assistant["hairColor"] = 'blue'
            elseif instr($assistant["fullimage"], 'blond') ! 0:
                $assistant["hairColor"] = 'blond'
            elseif instr($assistant["fullimage"], 'black') ! 0:
                $assistant["hairColor"] = 'black'
            end
            if instr($assistant["fullimage"], 'short') ! 0:
                $assistant["hairLen"] = 'short'
            else
                $assistant["hairLen"] = 'long'
            end
            if assistant["age"] = 0:
                $assistant["age"] = 'young'
            elseif assistant["age"] = 1:
                $assistant["age"] = 'loli'
            elseif assistant["age"] = 2:
                $assistant["age"] = 'milf'
            end
        end
        $picPath_spec_noNr = $args[2] + '_' + $assistant["hairColor"] + '_' + $assistant["hairLen"] + '_' + $assistant["age"]
        $picPath_gen_noNr = $args[2] + '_general_' + $assistant["age"]
    end
   
    !choosing gen or spec
    if picMax[$picPath_spec_noNr] ! 0 and picMax[$picPath_gen_noNr] ! 0:
        lok_rand = rand(1, picMax[$picPath_spec_noNr] + picMax[$picPath_gen_noNr])
        pic_type = picMax[$picPath_gen_noNr] - picMax[$picPath_spec_noNr]
        if pic_type <= 0:
            pic_type *= -1
            if lok_rand > picMax[$picPath_gen_noNr]:
                $picPath = $picPath_spec_noNr
            else
                $picPath = $picPath_gen_noNr
            end
        else
!            msg '<<lok_rand>> | ( (<<picMax[$picPath_spec_noNr]>> + <<picMax[$picPath_gen_noNr]>>) / 2) - (<<pic_type>> / 4)'
            if lok_rand > ( (picMax[$picPath_spec_noNr] + picMax[$picPath_gen_noNr]) / 2 ) - (pic_type / 4):
                $picPath = $picPath_gen_noNr
            else
                $picPath = $picPath_spec_noNr
            end
        end
    elseif picMax[$picPath_spec_noNr] = 0:
        $picPath = $picPath_gen_noNr
    else
        $picPath = $picPath_spec_noNr
    end
   
    !choosing specific number
    lok_rand = rand(1, picMax[$picPath])
    if lok_rand ! 1:
        $picPath = $args[3] + $picPath + '_' + lok_rand
    else
        $picPath = $args[3] + $picPath
    end
    $result = $picPath
end
Example of interaction (The changed thing is that instead of "$special_bg" taking the value of a string from the slave's .json file it now takes the result of my thing):
Code:
IF interaction = 1312:
$interaction_type = 'self_sex_lesson'
$subskill = 'slave["sub_fj"]'
$subskill_xp = 'slave["sub_fj_xp"]'
repulse = 2
rise_difficulty = 7 + slave["sub_fj"]
$text[1] = '  <<$fj_lesson_description[slave["sub_fj"]]>>'
$play_sound[2] = '<<$slopy[slave["age"]]>>'
$special_bg = FUNC('lok_display', 'pic', 'slave', 'fj', 'girls/sex/')
couch_skill = master_petting
add_master_hygiene = 4
add_slave_hygiene = 10
add_house_mess = 5
ejaculation_intensity = 1
if slave["sub_fj"] > 5: $interaction_type = 'completed'
$place = 'bedroom'    
$special_part = {master_petting_rate += (skill_adv_mul * 1)}  
END
This is what the game uses to display pictures for this type of interactions:
Code:
IF $interaction_type = 'self_sex_lesson':
IF nsfw = 0:
    *p '<div id = "bg"><img src="content\pic\<<$special_bg>>.png"></div>'
END
END
I'll upload some images with the thing that happens the message says the string that is stored in "$special_bg" but that is not what is displayed. The images are from multiple variations of the same code but it's the same bug that still happens. The last image is from the code I showed in this post

Help :cry:
 

Pararock

Member
Aug 17, 2016
316
379
I think it's related to the code in the Qt UI.

C:
QStringList FastQSPWindow::scanHTMLForImages(QString html)
{
  QRegExp imgTagRegex("\\<img[^\\>]*src\\s*=\\s*\"([^\"]*)\"[^\\>]*\\>", Qt::CaseInsensitive);
  imgTagRegex.setMinimal(true);
//  QStringList imgmatches;
  QStringList urlmatches;
  int offset = 0;
  while( (offset = imgTagRegex.indexIn(html, offset)) != -1){
    offset += imgTagRegex.matchedLength();
//    imgmatches.append(imgTagRegex.cap(0)); // Should hold complete img tag
    urlmatches.append(imgTagRegex.cap(1)); // Should hold only src property
  }
  return urlmatches;
}

bool FastQSPWindow::choseRandomImageFromArray(QStringList urlmatches)
{
  foreach(QString img_src, urlmatches)
  {
    origImage = img_src;
    img_src = img_src.replace('\\', '/');

    QString stripped = img_src.replace(".gif", "");
    stripped = stripped.replace("content/pic/", "");

    QList<QString> images = qspJack.getImageArrays(stripped);
    if(!images.isEmpty())
    {
      int random = qrand() % images.count();
      newImage = "content/pic/" + images.at(random) + ".gif";
      return true;
    }
  }
  newImage = "";
  return false;
}
It replace image image found in the html by images found in the imagearray taken from the json file. TBH, that part still really confuse me.
 

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
I think it's related to the code in the Qt UI.

C:
QStringList FastQSPWindow::scanHTMLForImages(QString html)
{
  QRegExp imgTagRegex("\\<img[^\\>]*src\\s*=\\s*\"([^\"]*)\"[^\\>]*\\>", Qt::CaseInsensitive);
  imgTagRegex.setMinimal(true);
//  QStringList imgmatches;
  QStringList urlmatches;
  int offset = 0;
  while( (offset = imgTagRegex.indexIn(html, offset)) != -1){
    offset += imgTagRegex.matchedLength();
//    imgmatches.append(imgTagRegex.cap(0)); // Should hold complete img tag
    urlmatches.append(imgTagRegex.cap(1)); // Should hold only src property
  }
  return urlmatches;
}

bool FastQSPWindow::choseRandomImageFromArray(QStringList urlmatches)
{
  foreach(QString img_src, urlmatches)
  {
    origImage = img_src;
    img_src = img_src.replace('\\', '/');

    QString stripped = img_src.replace(".gif", "");
    stripped = stripped.replace("content/pic/", "");

    QList<QString> images = qspJack.getImageArrays(stripped);
    if(!images.isEmpty())
    {
      int random = qrand() % images.count();
      newImage = "content/pic/" + images.at(random) + ".gif";
      return true;
    }
  }
  newImage = "";
  return false;
}
It replace image image found in the html by images found in the imagearray taken from the json file. TBH, that part still really confuse me.
I can't find that, where is it?
 

Pararock

Member
Aug 17, 2016
316
379
I can't find that, where is it?


I have a fork in progess to move to Qt 5.14


That whole random images thing is a mess.

The json files have array of image for each character, but since it was an array within an array it didn't work with QSP. There's way arround this, for example having variable name with an index in it.

But instead of this, he create an array in QSP engine while loading the json and have the Qt UI query the engine for the array then search for img tag to see if there's a match and do the random switch.


That's pretty much were I lost my motivation and gave up on this.
 

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500


I have a fork in progess to move to Qt 5.14


That whole random images thing is a mess.

The json files have array of image for each character, but since it was an array within an array it didn't work with QSP. There's way arround this, for example having variable name with an index in it.

But instead of this, he create an array in QSP engine while loading the json and have the Qt UI query the engine for the array then search for img tag to see if there's a match and do the random switch.


That's pretty much were I lost my motivation and gave up on this.
What happens if I take the arrays out of every .json slave seed file?
 

Pararock

Member
Aug 17, 2016
316
379
What happens if I take the arrays out of every .json slave seed file?
From what I understand of the code(I could be very wrong), if any variable name match the result of <<$special_bg>> it will get replaced by the value of that variable. So, you need to be sure that no image are named the same as a variable.

Code:
IF $interaction_type = 'self_sex_lesson':
IF nsfw = 0:
    *p '<div id = "bg"><img src="content\pic\<<$special_bg>>.png"></div>'
END
END
I don't really follow this thread, just looking once in a while. But what is your the goal here?

Are you looking to switch the random part image all in QSP code?
 

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
From what I understand of the code(I could be very wrong), if any variable name match the result of <<$special_bg>> it will get replaced by the value of that variable. So, you need to be sure that no image are named the same as a variable.

Code:
IF $interaction_type = 'self_sex_lesson':
IF nsfw = 0:
    *p '<div id = "bg"><img src="content\pic\<<$special_bg>>.png"></div>'
END
END
I don't really follow this thread, just looking once in a while. But what is your the goal here?

Are you looking to switch the random part image all in QSP code?
I am trying to make it so that you don't have to go through 380 something files just to add ONE photo. You don't need to have an array which specifically mentions what pictures you can show for one girl configuration when all the photos have a naming convention.

You can get the hair color and hair length and just construct the photo path in code. This way I just add the image, name it properly, change one value in one file (the .json I made which counts the amount of pics for each girl configuration + general pics) and be good to go.

I'll try to see if your understanding of the code is right.
 

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
From what I understand of the code(I could be very wrong), if any variable name match the result of <<$special_bg>> it will get replaced by the value of that variable. So, you need to be sure that no image are named the same as a variable.

Code:
IF $interaction_type = 'self_sex_lesson':
IF nsfw = 0:
    *p '<div id = "bg"><img src="content\pic\<<$special_bg>>.png"></div>'
END
END
I don't really follow this thread, just looking once in a while. But what is your the goal here?

Are you looking to switch the random part image all in QSP code?
Ok so I bypassed it. I moved the scene, sex and torture images in another folder and made a new image box that's a copy of the normal #bg and now it works. Way tf is this so hard coded? That thing is fighting with itself for fucks sake

qwertyu12359 if you're ok with moving the pictures to another folder then it's doable, if not, then I think it's kind of a roadblock for any progress in this direction. That damned image randomizer... I'll do my best to tie in loose ends if you approve.

This is how the "girls" folder would need to look (or something similar, the idea is that the name of the "sex", "scene" and "torture" folders need to be changed):
 
Last edited:

qwertyu12359

Jack-o-nine-tails
Game Developer
Aug 1, 2017
1,639
1,824
Ok so I bypassed it. I moved the scene, sex and torture images in another folder and made a new image box that's a copy of the normal #bg and now it works. Way tf is this so hard coded? That thing is fighting with itself for fucks sake

qwertyu12359 if you're ok with moving the pictures to another folder then it's doable, if not, then I think it's kind of a roadblock for any progress in this direction. That damned image randomizer... I'll do my best to tie in loose ends if you approve.

This is how the "girls" folder would need to look (or something similar, the idea is that the name of the "sex", "scene" and "torture" folders need to be changed):
If the only solution in order to easily add pictures is to change the way folder are named... well let's do that! On the ratio of downside vs. benefits, I think the later wins by a mile!
 

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
If the only solution in order to easily add pictures is to change the way folder are named... well let's do that! On the ratio of downside vs. benefits, I think the later wins by a mile!
Great! I'm almost done replacing the pic choosing in "interactinos" with my thing. I just have to do the same for the active sex, tie in some loose ends and do some testing to make sure everything in stable.

I think I'll finish it a couple hours. How will I give you the code? I'm guessing your .qsp is way ahead of everyone else's.

Also in which location will you put the actual code that chooses the picture? I kinda need to know if you want to change it from "lok_display" cause I need to change the "func" to that location (no prob if you want to, i just need to know if you think it would fit better in another existent file)


Changed files: "interaction", "interaction_screen", "sex_interaction", "sex_interaction_screen"
I also have one line of code in "menu_form"
 

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
Also, a few questions:

Did the game used to have specific pictures for dp, self_torture etc? cause I'm seeing things like $dp[save_type] and $self_torture[slave_type] but they have no value. Do I comment them out or just leave them and hope nothing bad happens...

For fun time rewards "$special_bg" gets the value "$games"
The value of "$games" is "scene\" meaning it's pointing to "content/pic/scene". but to no picture? this seams weird. what pictures are supposed to show up for fun rewards??

Also these two lines:
$special_bg = 'girls\sex\dog_brown.png'
if rand(0,1) = 1: $special_bg = 'girls\sex\dog_white_2'
Those pictures don't exist.
 
Last edited:
  • Like
Reactions: qwertyu12359

Lokplart

- I can code, I guess :D
Game Developer
Jul 28, 2018
566
500
qwertyu12359 I'm done (I hope :LOL:)

When you can, gimme a bullet list with answers to the questions above so I can finish up and give you everything.

Updated list of modified locations:
  • interaction
  • interaction_result
  • interaction_screen
  • #varbase
  • end_day_screen
  • sex_interaction
  • sex_interaction_screen

Tell me for which ones I can just give you the whole file.
 
Last edited:
4.00 star(s) 64 Votes