Cheat Mod Ren'Py The Null Hypothesis Cheat Injector [v1.9] [Sleepingkirby]

sleepingkirby

Active Member
Aug 8, 2017
706
1,033
Alright, to everyone that's watching this thread. I'm testing v1.9beta of the cheat injector and I noticed that the characters clean off their cum before they leave a room IF their clothes was changed. As some of you might know, I've made it so that they won't clean off the cum on them IF they've agreed to wear your cum 10 or more times. However:
Code:
            if C in all_Companions:
                clean = False

                if any(C.spunk[location] for location in C.spunk):
                    if not C.check_traits("wearing_cum"):
                        clean = True
                    elif C.destination in public_locations and not C.check_traits("exhibitionist"):
                        clean = True

                if clean:
                    if renpy.showing(f"{C.tag}_sprite") and not instant and not black_screen:
                        clean_cum(C)
                    else:
                        for location in C.spunk:
                            C.spunk[location] = 0
Now, this is interesting. What this says is:
"If the character has cum on them, and if they're not wearing cum, clean the cum off. But ALSO, if the character is in a public place AND they're not an exhibitionist"

I'm pretty sure this segment of code is new.

The question I have now is, should I apply the same condition here as I did before where they won't clean off the cum if they've agreed to wear it for 10 times. OR, should I let sleeping dog lies and see where RonChon takes up in terms of exhibitionism?
 

Nevrius

Member
Jun 10, 2020
266
317
Alright, to everyone that's watching this thread. I'm testing v1.9beta of the cheat injector and I noticed that the characters clean off their cum before they leave a room IF their clothes was changed. As some of you might know, I've made it so that they won't clean off the cum on them IF they've agreed to wear your cum 10 or more times. However:
Code:
            if C in all_Companions:
                clean = False

                if any(C.spunk[location] for location in C.spunk):
                    if not C.check_traits("wearing_cum"):
                        clean = True
                    elif C.destination in public_locations and not C.check_traits("exhibitionist"):
                        clean = True

                if clean:
                    if renpy.showing(f"{C.tag}_sprite") and not instant and not black_screen:
                        clean_cum(C)
                    else:
                        for location in C.spunk:
                            C.spunk[location] = 0
Now, this is interesting. What this says is:
"If the character has cum on them, and if they're not wearing cum, clean the cum off. But ALSO, if the character is in a public place AND they're not an exhibitionist"

I'm pretty sure this segment of code is new.

The question I have now is, should I apply the same condition here as I did before where they won't clean off the cum if they've agreed to wear it for 10 times. OR, should I let sleeping dog lies and see where RonChon takes up in terms of exhibitionism?
I think it depends on how that trait is defined, if at all at this point. If there already is something there beyond this code segment, I would opt to wait and see. If not, then my vote goes to the 10 times version.
 
  • Like
Reactions: sleepingkirby

sleepingkirby

Active Member
Aug 8, 2017
706
1,033
I think it depends on how that trait is defined, if at all at this point.
Oh, see, that's the best part. As far as I can see, as of now, there's no way to get the trait at all. And I thought Shiny said (or at least implied) that public nudity wasn't going to be allowed. So this is, like, brand new.

If there already is something there beyond this code segment, I would opt to wait and see. If not, then my vote goes to the 10 times version.
As far as I can find, there are 3 checks for exhibitionist.
  1. When you change outfits
  2. The function named "does_Character_want_privacy" (which reads like it's the function to run when the game checks if they'll string down to get changed when someone else is in the room)
  3. The function that runs when a character has to leave.

Like, I'm kind of excited for what this little line of code means
 

Nevrius

Member
Jun 10, 2020
266
317
Oh, see, that's the best part. As far as I can see, as of now, there's no way to get the trait at all. And I thought Shiny said (or at least implied) that public nudity wasn't going to be allowed. So this is, like, brand new.


As far as I can find, there are 3 checks for exhibitionist.
  1. When you change outfits
  2. The function named "does_Character_want_privacy" (which reads like it's the function to run when the game checks if they'll string down to get changed when someone else is in the room)
  3. The function that runs when a character has to leave.

Like, I'm kind of excited for what this little line of code means
Hm, it does sound like the team is setting something up there. Kinda excited myself now XD
Still, for now, I say keep the 10 times condition for now and watch what occurs with that bit of code.
Given that Shiny said that 1.0 is gonna be the one where their 'core systems' are gonna be fully implemented, I'd be willing to bet that you're gonna have to modify the injector a few times due to code changes :p And I do think that this exhibitionist trait factors into that.
 

shadowtempered

Active Member
Aug 22, 2020
709
1,399
sleepingkirby said:
Previously, I mentioned I would like to add allow someone to change their reputation (new mechanic introduced in the game). For now, I've decided against this as reputation is a direct calculation, not a value that's held that can be modified.
Would it be easier to calculate if we could just edit the class / danger room value instead? It'll still reset with each scoreboard, but at least the game is getting the value from the intended sources in it's calculations?

sleepingkirby said:
As far as I can find, there are 3 checks for exhibitionist.
I hope they let us do something. Letting Rogue have a transparent shirt but not being able to tell her no to wearing something underneath is kinda sucks lol
 

sleepingkirby

Active Member
Aug 8, 2017
706
1,033
Would it be easier to calculate if we could just edit the class / danger room value instead? It'll still reset with each scoreboard, but at least the game is getting the value from the intended sources in it's calculations?
It's not a value. Here's the code for the score calculation:

Academic:
Code:
            if season_day > 13:
                academic_sum = self.History.check("studied", after = day - 13) + self.max_stamina*self.History.check("attended_class", after = day - 13)

                exponent = 0.185

                if self.scholarship == "academic":
                    exponent *= 1.5

                reputation["academic"] = (4.0 - 1.0)*(1.0 - math.exp(-exponent*academic_sum)) + 1.0

                if reputation["academic"] >= 3.999:
                    reputation["academic"] = 4.0
Combat:
Code:
            combat_sum = self.History.check("trained", after = day - 27)

            exponent = 0.005

            if self.scholarship == "athletic":
                exponent *= 1.75

            if self.check_traits("healthy_diet"):
                exponent *= 1.75

            reputation["combat"] = (10.0 - 1.0)*(1.0 - math.exp(-exponent*(self.level/max_level[-1])*combat_sum)) + 1.0

            if reputation["combat"] >= 9.9:
                reputation["combat"] = 10.0
Artistic:
Code:
            if day > 14:
                social_sum = 0.0

                for event in ["barbecue", "pool"]:
                    if event not in self.scores:
                        continue

                    for C in self.scores[event]:
                        for d in self.scores[event][C]:
                            if d <= day - 27:
                                continue

                            social_sum += self.scores[event][C][d]

                exponent = 0.08
                bias = 10.0

                if self.scholarship == "artistic":
                    exponent *= 1.5

                reputation["social"] = 1.0 - math.exp(-exponent*(social_sum + bias))

                if reputation["social"] >= 0.99:
                    reputation["social"] = 1.0
                elif reputation["social"] < 0.0:
                    reputation["social"] = 0.0
Sex (yes, you get a sexual reputation)
Code:
            sexual_sum = 0.0

            if "sex" in self.scores:
                for C in self.scores["sex"]:
                    for d in self.scores["sex"][C]:
                        if d <= day - 13:
                            continue

                        for score in self.scores["sex"][C][d]:
                            sexual_sum += score

            reputation["sexual"] = sexual_sum
And you might think "Oh, just increase Player.History['attended_class']". Nope, not how it works. It's reading Player.History.persistent.completed, and that object is an array. The History.check() function literally makes a copy of the item in question (academic, trained, etc.) according to the conditions and return the *length* of the array. I've been toying with this just a few minutes ago and the best, data-safe way to increment this is to append to the array. Which means that I should *not* implement a slider bar to increase/decrease as that would be messy and mess up a whole bunch of things.

So, at the moment, I'm thinking a button to add entries to each history tracker. But I'm gonna stew on that a little more just to make sure it makes sense as I don't know yet what the values in the array means. For "trained", it's something like (137,0,2). I'm guessing the first number is day and the last number is how you're training (alone, with someone else, etc), but I don't know for sure. Let alone what the middle number is. And all that could, in the future, have an impact on other calculations.

So yeah, gonna play with it and think about it.
 

shadowtempered

Active Member
Aug 22, 2020
709
1,399
So, at the moment, I'm thinking a button to add entries to each history tracker. But I'm gonna stew on that a little more just to make sure it makes sense as I don't know yet what the values in the array means. For "trained", it's something like (137,0,2). I'm guessing the first number is day and the last number is how you're training (alone, with someone else, etc), but I don't know for sure. Let alone what the middle number is. And all that could, in the future, have an impact on other calculations.

So yeah, gonna play with it and think about it.
Just talking out of my ass: but the first number being so high makes me wonder if it's an exp value. You earn more, or at least visually given notification, exp during a class study vs. studying on your own. So perhaps XP gained, class / solo study, participants (as they also get credit on the scoreboard when studying together).

If it is something like that, then you're right the slider won't work. You'd need a button that just adds a study session to the array. Whether or not that's the best way to do it, I don't know. My coding knowledge is junior at best and that was mostly js/python. I'm still dabbling though :/
 

sleepingkirby

Active Member
Aug 8, 2017
706
1,033
Just talking out of my ass: but the first number being so high makes me wonder if it's an exp value. You earn more, or at least visually given notification, exp during a class study vs. studying on your own. So perhaps XP gained, class / solo study, participants (as they also get credit on the scoreboard when studying together).
Not on my gaming laptop so I can't copy the array, but the first numbers that's put into an array is in order. So something like:
[(0,0, 1), (0, 0, 1), (1,0,2), (3,0,1), (6,0,0)...]
It could be exp, but it being sequential like that makes me think time. Like hours rather than days. Of course, I could be waaaaayyy off. We'll find out when I have more time to dig into code.

If it is something like that, then you're right the slider won't work. You'd need a button that just adds a study session to the array. Whether or not that's the best way to do it, I don't know. My coding knowledge is junior at best and that was mostly js/python. I'm still dabbling though :/
Well, good news, this is all python, which I'm actually not an expert at (I actually hate the language). But basically, This is an object (Player.History), that's storing a dictionary (Player.History.persistent), of which, is storing a list (Player.History.persistent.completed) of objects. The history object is from a class where RonChon has written mutators and accessors into (History.update() and History.check() respectively) that knows which dictionary entry[ies] to look into/count/aggregate. I just call it an array because that's what every other language (C, C++, Java, JS, PHP, Perl, Bash, Go, C#, etc.) calls it. I think there's only 2 languages that calls it a list. Python and another language that I don't remember the name of, but it's a very niche/small language. Maybe lisp or cobol? I don't remember, it's been too long.


Edit: Back on gaming computer. Here's the output of my game for Player.History.persistent['trained'].completed (forgot the "trained" index on my previous explanations. And apparently, it's 2 numbers, not 3. Sorry about that.).
Code:
{'completed': [(3, 0), (4, 0), (5, 0), (6, 0), (6, 0), (7, 0), (7, 0), (9, 0), (11, 0), (14, 0), (16, 0), (16, 0), (17, 0), (18, 0), (19, 0), (21, 0), (21, 0), (22, 0), (23, 0), (25, 0), (26, 0), (27, 0), (28, 0), (29, 0), (29, 0), (30, 0), (31, 0), (37, 0), (39, 0), (39, 0), (40, 0), (40, 0), (41, 0), (42, 0), (43, 0), (45, 0), (48, 0), (49, 0), (49, 0), (49, 0), (50, 0), (50, 0), (50, 0), (51, 0), (53, 0), (53, 0), (55, 0), (55, 0), (55, 0), (55, 0), (56, 0), (56, 0), (56, 0), (57, 0), (57, 0), (58, 0), (58, 0), (58, 0), (59, 0), (59, 0), (59, 0), (108, 0), (108, 0), (109, 0), (109, 0), (110, 0), (110, 0), (112, 0), (112, 0), (112, 0), (113, 0), (113, 0), (115, 0), (115, 0), (116, 0), (116, 0), (116, 0), (117, 0), (117, 0), (118, 0), (118, 0), (120, 0), (120, 0), (120, 0), (123, 0), (123, 0), (128, 0), (128, 0), (128, 0), (128, 0), (129, 0), (130, 0), (130, 0), (130, 2), (131, 0), (131, 0), (131, 0), (131, 0), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (134, 0), (134, 0), (134, 0), (134, 0)]}
 
Last edited:

Epigonid

Member
Nov 16, 2023
112
62
Not on my gaming laptop so I can't copy the array, but the first numbers that's put into an array is in order. So something like:
[(0,0, 1), (0, 0, 1), (1,0,2), (3,0,1), (6,0,0)...]
It could be exp, but it being sequential like that makes me think time. Like hours rather than days. Of course, I could be waaaaayyy off. We'll find out when I have more time to dig into code.


Well, good news, this is all python, which I'm actually not an expert at (I actually hate the language). But basically, This is an object (Player.History), that's storing a dictionary (Player.History.persistent), of which, is storing a list (Player.History.persistent.completed) of objects. The history object is from a class where RonChon has written mutators and accessors into (History.update() and History.check() respectively) that knows which dictionary entry[ies] to look into/count/aggregate. I just call it an array because that's what every other language (C, C++, Java, JS, PHP, Perl, Bash, Go, C#, etc.) calls it. I think there's only 2 languages that calls it a list. Python and another language that I don't remember the name of, but it's a very niche/small language. Maybe lisp or cobol? I don't remember, it's been too long.


Edit: Back on gaming computer. Here's the output of my game for Player.History.persistent['trained'].completed (forgot the "trained" index on my previous explanations. And apparently, it's 2 numbers, not 3. Sorry about that.).
Code:
{'completed': [(3, 0), (4, 0), (5, 0), (6, 0), (6, 0), (7, 0), (7, 0), (9, 0), (11, 0), (14, 0), (16, 0), (16, 0), (17, 0), (18, 0), (19, 0), (21, 0), (21, 0), (22, 0), (23, 0), (25, 0), (26, 0), (27, 0), (28, 0), (29, 0), (29, 0), (30, 0), (31, 0), (37, 0), (39, 0), (39, 0), (40, 0), (40, 0), (41, 0), (42, 0), (43, 0), (45, 0), (48, 0), (49, 0), (49, 0), (49, 0), (50, 0), (50, 0), (50, 0), (51, 0), (53, 0), (53, 0), (55, 0), (55, 0), (55, 0), (55, 0), (56, 0), (56, 0), (56, 0), (57, 0), (57, 0), (58, 0), (58, 0), (58, 0), (59, 0), (59, 0), (59, 0), (108, 0), (108, 0), (109, 0), (109, 0), (110, 0), (110, 0), (112, 0), (112, 0), (112, 0), (113, 0), (113, 0), (115, 0), (115, 0), (116, 0), (116, 0), (116, 0), (117, 0), (117, 0), (118, 0), (118, 0), (120, 0), (120, 0), (120, 0), (123, 0), (123, 0), (128, 0), (128, 0), (128, 0), (128, 0), (129, 0), (130, 0), (130, 0), (130, 2), (131, 0), (131, 0), (131, 0), (131, 0), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (134, 0), (134, 0), (134, 0), (134, 0)]}
hey can you look at my friend save file, his ability point get into minus 23 after the game update, he government official so he kind afraid joining, starting from version 5b his ability point always get minus after using the cheat tool from me ( although its always the right version) when loaded to new version of game the ability point keep decreasing and because he afraid to join here plus dont want to use cheat tool anymore and dont want to restart from beginning maybe you can help look at this save file View attachment 2-4-LT1.save
 

sleepingkirby

Active Member
Aug 8, 2017
706
1,033
hey can you look at my friend save file, his ability point get into minus 23 after the game update, he government official so he kind afraid joining, starting from version 5b his ability point always get minus after using the cheat tool from me ( although its always the right version) when loaded to new version of game the ability point keep decreasing and because he afraid to join here plus dont want to use cheat tool anymore and dont want to restart from beginning maybe you can help look at this save file View attachment 4159283
I actually don't need to look at it, I know what's going on. Ability points have been removed. Previously, the game had a variable called "ability_points". That doesn't exist anymore. Now, ability points that's displayed is a calculation. Player.level - SUM(all the skill costs of all the abilities that you bought). So let's say your friend is at level 1 and he got ALL the skills and the cost of that is 25. So 1 - 25 = -24 (not the exact math, but you get the idea). There's only 2 fixes. 1) Play the game and grind levels until it goes back to 0 or greater or 2) reapply the patch as I've solved this in v1.9. You can read about it here and here.
 

Epigonid

Member
Nov 16, 2023
112
62
I actually don't need to look at it, I know what's going on. Ability points have been removed. Previously, the game had a variable called "ability_points". That doesn't exist anymore. Now, ability points that's displayed is a calculation. Player.level - SUM(all the skill costs of all the abilities that you bought). So let's say your friend is at level 1 and he got ALL the skills and the cost of that is 25. So 1 - 25 = -24 (not the exact math, but you get the idea). There's only 2 fixes. 1) Play the game and grind levels until it goes back to 0 or greater or 2) reapply the patch as I've solved this in v1.9. You can read about it here and here.
I already read that you point on but don't really understand, so in short version is he need to always use the cheat tool right?

Sorry I'm not that smart
 

sleepingkirby

Active Member
Aug 8, 2017
706
1,033
I already read that you point on but don't really understand, so in short version is he need to always use the cheat tool right?

Sorry I'm not that smart
No worries. It's also not your native language. I frequently get that resopnse to my explanations from native English speakers.

But yes. Just apply the cheat (proper version) to the new version of the game and re add the ability points.

He can also grind levels legitimately to where the number gets to 0.
 
  • Like
Reactions: Epigonid

shadowtempered

Active Member
Aug 22, 2020
709
1,399
Edit: Back on gaming computer. Here's the output of my game for Player.History.persistent['trained'].completed (forgot the "trained" index on my previous explanations. And apparently, it's 2 numbers, not 3. Sorry about that.).
Code:
{'completed': [(3, 0), (4, 0), (5, 0), (6, 0), (6, 0), (7, 0), (7, 0), (9, 0), (11, 0), (14, 0), (16, 0), (16, 0), (17, 0), (18, 0), (19, 0), (21, 0), (21, 0), (22, 0), (23, 0), (25, 0), (26, 0), (27, 0), (28, 0), (29, 0), (29, 0), (30, 0), (31, 0), (37, 0), (39, 0), (39, 0), (40, 0), (40, 0), (41, 0), (42, 0), (43, 0), (45, 0), (48, 0), (49, 0), (49, 0), (49, 0), (50, 0), (50, 0), (50, 0), (51, 0), (53, 0), (53, 0), (55, 0), (55, 0), (55, 0), (55, 0), (56, 0), (56, 0), (56, 0), (57, 0), (57, 0), (58, 0), (58, 0), (58, 0), (59, 0), (59, 0), (59, 0), (108, 0), (108, 0), (109, 0), (109, 0), (110, 0), (110, 0), (112, 0), (112, 0), (112, 0), (113, 0), (113, 0), (115, 0), (115, 0), (116, 0), (116, 0), (116, 0), (117, 0), (117, 0), (118, 0), (118, 0), (120, 0), (120, 0), (120, 0), (123, 0), (123, 0), (128, 0), (128, 0), (128, 0), (128, 0), (129, 0), (130, 0), (130, 0), (130, 2), (131, 0), (131, 0), (131, 0), (131, 0), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (132, 2), (134, 0), (134, 0), (134, 0), (134, 0)]}
With that much of an increment, I'm inclined to go with "day". Especially since you have a big junk (like 134) where you have 4. Would think that part would be relatively easy to check if there's an internal day counter, just match it up. Oddly, you have 0/2, but I don't see any 1's. So either you always study alone or you always study with 2 people? Seems unlikely.
 

sleepingkirby

Active Member
Aug 8, 2017
706
1,033
With that much of an increment, I'm inclined to go with "day". Especially since you have a big junk (like 134) where you have 4. Would think that part would be relatively easy to check if there's an internal day counter, just match it up.
According to the save game, I'm only on day 23.

Oddly, you have 0/2, but I don't see any 1's. So either you always study alone or you always study with 2 people? Seems unlikely.
It wasn't until this version that I trained with 2 person at once (this is "trained" not studying). Any, you're right. It's impossible even considering there are some events/quests that require you to study with someone.

But yeah, when I get time, I'll dive back into the code and figure it out. Until then, it's a fun little mystery. ^^

edit: I looked it up since I'm eating and had some time. You called it, the first number is the day.
Code:
                    self.trackers[tracker][Item].completed.append((day, time_index))
The second code is time_index, which is most likely time of day (morning, afternoon, etc.). "Wait, what? Then why does your save game say day 23? Does the day count persist across games?" It turns out there are 2 day variables. day (total number of days) and season_day. And season_day is what's reporting 23.
 
Last edited:

shadowtempered

Active Member
Aug 22, 2020
709
1,399
According to the save game, I'm only on day 23.


It wasn't until this version that I trained with 2 person at once (this is "trained" not studying). Any, you're right. It's impossible even considering there are some events/quests that require you to study with someone.

But yeah, when I get time, I'll dive back into the code and figure it out. Until then, it's a fun little mystery. ^^

edit: I looked it up since I'm eating and had some time. You called it, the first number is the day.
Code:
                    self.trackers[tracker][Item].completed.append((day, time_index))
The second code is time_index, which is most likely time of day (morning, afternoon, etc.). "Wait, what? Then why does your save game say day 23? Does the day count persist across games?" It turns out there are 2 day variables. day (total number of days) and season_day. And season_day is what's reporting 23.

Haha, just saw your edit. I came back to ask if you were looking at total days or season day lol
 
  • Like
Reactions: sleepingkirby

Epigonid

Member
Nov 16, 2023
112
62
No worries. It's also not your native language. I frequently get that resopnse to my explanations from native English speakers.

But yes. Just apply the cheat (proper version) to the new version of the game and re add the ability points.

He can also grind levels legitimately to where the number gets to 0.
He said now when using clean new extract with cheat he always get 4 ability point when open save file but when not using cheat it's - 23 when open the sane save file

He said he give up and gonna try level up normally

He said thank you for helping him with his problems
 
  • Like
Reactions: sleepingkirby

sleepingkirby

Active Member
Aug 8, 2017
706
1,033
He said now when using clean new extract with cheat he always get 4 ability point when open save file but when not using cheat it's - 23 when open the sane save file

He said he give up and gonna try level up normally

He said thank you for helping him with his problems
No problem. If I might ask though, if he's using the cheat and he's seeing 4 ability points, isn't that what he wanted? Or is he looking to have ability points not in the negative when playing the game without the cheat?
 

Epigonid

Member
Nov 16, 2023
112
62
No problem. If I might ask though, if he's using the cheat and he's seeing 4 ability points, isn't that what he wanted? Or is he looking to have ability points not in the negative when playing the game without the cheat?
just not in negative like 0 but 4 ability point always automatically appear
 

BitesZaDusto

Member
Jul 4, 2017
104
358
Due to the new dynamic outfits feature in the game now. I’m wondering if it might be possible to cap off Love/Trust values to the actual in-game limit (1000) because since I’ve been playing with the mod primarily for the last few versions and have almost 2000 Love/1500 Trust with Rogue, I’ve been getting some weird dynamic outfits that aren’t being checked due to the shame threshold not being an issue since love/trust is so high.

To better explain, in non-mod saves with maxed out love/trust the shame limit is 500 for public outfits and 800 for private outfits, but due to high love/trust values which are intertwined the shame limit I have variations such as this outfit that just randomly appeared due to the higher shame limits, which wouldn’t really happen in the previous versions since the default outfits were always consistent.

screenshot0001.png

I’m not a big fan of the dynamic outfit feature anyway, but I thought it might be something to look into.