Trollden

Member
Aug 8, 2017
253
326
Version 0.23.1 is out for the public

PC:
Mac:
Android:

You don't have permission to view the spoiler content. Log in or register now.
You don't have permission to view the spoiler content. Log in or register now.
 

aka chi

New Member
Aug 9, 2016
10
16
EDIT: This one breaks the random event system. I wrote another fix further down the thread.

There's a problem that breaks saves in 23.1. I think I managed to fix it but I don't want to make a Patreon account just to comment for this.

I replaced line 3471 in script.rpy with the following:
Code:
return object.__getattr__(self.the_action, attr)
It unbroke previously broken saves for me but they also take longer than expected to load (usually loading only gets slow after you do a lot of hiring right?) so something might still be wrong.
 
Last edited:
  • Like
Reactions: Hank Miller

toolkitxx

Well-Known Member
Modder
Donor
Game Developer
May 3, 2017
1,473
1,789
There's a problem that breaks saves in 23.1. I think I managed to fix it but I don't want to make a Patreon account just to comment for this.

I replaced line 3471 in script.rpy with the following:
Code:
return object.__getattr__(self.the_action, attr)
It unbroke previously broken saves for me but they also take longer than expected to load (usually loading only gets slow after you do a lot of hiring right?) so something might still be wrong.
Not to be rude - but breaking saves isnt a big secret. Vren has always made it very clear that until ALL base core mechanics are finished save will most probably break and has always recommended to start a new game. The changelog alone should tell you that there has been a major change in a core system.
 

aka chi

New Member
Aug 9, 2016
10
16
Not to be rude - but breaking saves isnt a big secret. Vren has always made it very clear that until ALL base core mechanics are finished save will most probably break and has always recommended to start a new game. The changelog alone should tell you that there has been a major change in a core system.
I'm aware that saves don't work between versions; I mean you can start a new game with 23.1 and make a save and not be able to load it. You'll see other people in the new version comments with the same issue.
 
Last edited:

aka chi

New Member
Aug 9, 2016
10
16
That said, my previous attempt at a fix apparently breaks the event system instead. This one maybe fixes both. You'll want to replace lines 3464 to 3471.

Code:
    class Limited_Time_Action(Action): #A wrapper class that holds an action and the amount of time it will be valid. This acts like an action everywhere
        #except it also has a turns_valid value to decide when to get rid of this reference to the underlying action
        the_action = None
        turns_valid = 0
        def __init__(self, the_action, turns_valid):
            self.the_action = the_action
            self.turns_valid = turns_valid

        def __getattr__(self, attr): # If we try and access an attribute not in this class return the matching attribute from the action. This is likely going to be a funciton like "check_is_active" or "call_action"
            if attr in self.__dict__:
                return getattr(self, attr)
            return getattr(self.the_action, attr)
 

toolkitxx

Well-Known Member
Modder
Donor
Game Developer
May 3, 2017
1,473
1,789
I'm aware that saves don't work between versions; I mean you can start a new game with 23.1 and make a save and not be able to load it. You'll see other people in the new version comments with the same issue.
That little piece of info was simply missing in your first post. This is F95 and a different site - Patreon posts are not visible for anyone here and without a reference your post couldnt be read any different than i did.
 
  • Like
Reactions: Yakis0ba

Car4man

Newbie
May 17, 2017
38
13
I'm aware that saves don't work between versions; I mean you can start a new game with 23.1 and make a save and not be able to load it. You'll see other people in the new version comments with the same issue.
a new game too!


I'm sorry, but an uncaught exception occurred.

While running game code:
File "renpy/common/00action_file.rpy", line 441, in __call__
renpy.load(fn)
File "game/script.rpy", line 3471, in __getattr__
return getattr(self.the_action, attr)
File "game/script.rpy", line 3471, in __getattr__
return getattr(self.the_action, attr)
File "game/script.rpy", line 3471, in __getattr__
return getattr(self.the_action, attr)
File "game/script.rpy", line 3471, in __getattr__
return getattr(self.the_action, attr)
File "game/script.rpy", line 3471, in __getattr__
return getattr(self.the_action, attr)
File "game/script.rpy", line 3471, in __getattr__
return getattr(self.the_action, attr)
 

srksrk 68

Forum Fanatic
Modder
Sep 17, 2018
4,398
5,614
That said, my previous attempt at a fix apparently breaks the event system instead. This one maybe fixes both. You'll want to replace lines 3464 to 3471.

Code:
    class Limited_Time_Action(Action): #A wrapper class that holds an action and the amount of time it will be valid. This acts like an action everywhere
        #except it also has a turns_valid value to decide when to get rid of this reference to the underlying action
        the_action = None
        turns_valid = 0
        def __init__(self, the_action, turns_valid):
            self.the_action = the_action
            self.turns_valid = turns_valid

        def __getattr__(self, attr): # If we try and access an attribute not in this class return the matching attribute from the action. This is likely going to be a funciton like "check_is_active" or "call_action"
            if attr in self.__dict__:
                return getattr(self, attr)
            return getattr(self.the_action, attr)
Thanks, mate. I was just about to post that bug here (did not yet fix it, though) but got hit by a power shortage. We have a nice weather here currently ;)

I can confirm your fix saved my saves so far.

And I have a fix for you and everybody else: In sex_mechanics.rpy, you would want to replace lines 269 to 277 with the following:

Code:
label girl_choose_position(the_person):
    $ position_option_list = []
    python:
        for position in list_of_girl_positions:
            if mc.location.has_object_with_trait(position.requires_location):
                if position.her_position_willingness_check(the_person):
                    position_option_list.append(position)
        picked_position = get_random_from_list(position_option_list)
    return picked_position
I wonder if anybody ever played this game. I mean, not being able to load a save, common...
 
  • Like
Reactions: aka chi

Hank Miller

Newbie
Mar 4, 2019
15
4
There's a problem that breaks saves in 23.1. I think I managed to fix it but I don't want to make a Patreon account just to comment for this.

I replaced line 3471 in script.rpy with the following:
Code:
return object.__getattr__(self.the_action, attr)
It unbroke previously broken saves for me but they also take longer than expected to load (usually loading only gets slow after you do a lot of hiring right?) so something might still be wrong.
Working, thanks a lot!
 

toolkitxx

Well-Known Member
Modder
Donor
Game Developer
May 3, 2017
1,473
1,789
My hairs go straight up whenever i read something that includes a code snippet and the words maybe/probably/eventually fix it. Please guys - i understand that you dont mean bad with it but untested quick-shots are not a solution.
If you feel like you can do better and fix it address it directly with Vren or if you dont want to at least test extensively before posting stuff as 'fix'.
 
  • Like
Reactions: Yakis0ba

Marraden

New Member
Nov 2, 2019
9
2
Here's another fun one - I'm caught in a fuck date loop where I have too little energy to do anything, but Stephanie won't let me leave! (AHHH! Her husband will definitely catch us now!)

From what it looks like, I can probably find this in the role_affair section, probably didn't account for energy properly yet or something.

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 8647, in script call
    $ picked_option.call_action()
  File "game/script.rpy", line 8933, in script call
    call advance_time from _call_advance_time_5
  File "game/script.rpy", line 9376, in script call
    $ crisis.call_action()
  File "game/game_roles/role_affair.rpy", line 167, in script
    if mc.current_energy < 40 and energy_gain_amount <= 20: #Forced to end the fuck date, so we set done to True.
  File "game/game_roles/role_affair.rpy", line 167, in <module>
    if mc.current_energy < 40 and energy_gain_amount <= 20: #Forced to end the fuck date, so we set done to True.
AttributeError: 'MainCharacter' object has no attribute 'current_energy'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 8647, in script call
    $ picked_option.call_action()
  File "game/script.rpy", line 8933, in script call
    call advance_time from _call_advance_time_5
  File "game/script.rpy", line 9376, in script call
    $ crisis.call_action()
  File "game/game_roles/role_affair.rpy", line 167, in script
    if mc.current_energy < 40 and energy_gain_amount <= 20: #Forced to end the fuck date, so we set done to True.
  File "C:\Users\XXXX\Downloads\Games\Lab_Rats_2-v0.23.1-pc\renpy\ast.py", line 1729, in execute
    if renpy.python.py_eval(condition):
  File "C:\Users\XXXX\Downloads\Games\Lab_Rats_2-v0.23.1-pc\renpy\python.py", line 1943, in py_eval
    return py_eval_bytecode(code, globals, locals)
  File "C:\Users\XXXX\Downloads\Games\Lab_Rats_2-v0.23.1-pc\renpy\python.py", line 1936, in py_eval_bytecode
    return eval(bytecode, globals, locals)
  File "game/game_roles/role_affair.rpy", line 167, in <module>
    if mc.current_energy < 40 and energy_gain_amount <= 20: #Forced to end the fuck date, so we set done to True.
AttributeError: 'MainCharacter' object has no attribute 'current_energy'

Windows-8-6.2.9200
Ren'Py 7.0.0.196
Lab Rats 2 - Down to Business v0.23.1
Mon Dec 09 01:19:01 2019
For those curious, edit "mc.current_energy" -> "mc.energy" in game_roles\role_affair; this fixed the problem for me since it doesn't seem that current_energy is a real variable.
 
Last edited:

srksrk 68

Forum Fanatic
Modder
Sep 17, 2018
4,398
5,614
My hairs go straight up whenever i read something that includes a code snippet and the words maybe/probably/eventually fix it. Please guys - i understand that you dont mean bad with it but untested quick-shots are not a solution.
If you feel like you can do better and fix it address it directly with Vren or if you dont want to at least test extensively before posting stuff as 'fix'.
Sorry, the "saves cannot be loaded" bug is game breaking. Any fix that solves that is a good thing, and cannot make it worse by definition.

And I was addressing bugs directly to Vren since two or three releases now. Guss what: those bugs are still there. Unfortunatelly he is not very interested in bug reports, it seems. Otherwise someone please explain me how a "saves cannot be loaded" bug can make it into the final game after one week of patreon testing...
 
  • Like
Reactions: Marraden

toolkitxx

Well-Known Member
Modder
Donor
Game Developer
May 3, 2017
1,473
1,789
Sorry, the "saves cannot be loaded" bug is game breaking. Any fix that solves that is a good thing, and cannot make it worse by definition.

And I was addressing bugs directly to Vren since two or three releases now. Guss what: those bugs are still there. Unfortunatelly he is not very interested in bug reports, it seems. Otherwise someone please explain me how a "saves cannot be loaded" bug can make it into the final game after one week of patreon testing...
I am not disagreeing to the game-breaking part and why it didnt show during Patreon testing.

But throwing out fast untested 'fixes' that break other things is as stupid. Threads like this are not only read by professional coders but mostly by people looking for solutions without having the expertise to separate between a real fix, untested fix or even worse.
There is always the possibility to keep using 0.22 until this thing is properly fixed.
 
3.40 star(s) 127 Votes