I'm not an experienced coder. At best I'd describe myself as a determined dabbler. I think I've figured out a fix for the special serum lactation trait, but it took some bit of testing. My initial tries didn't pan out because the roles weren't being reinstantiated on each load so (assuming this doesn't break anything) if you make these changes you'll have to run a line in the console to make it stick. I'm going to post my whole process before summing it up at the end in case someone smarter than me sees a mistake and can correct me
Vren notes in role_trance.rpy line 16 that he intends on_day to run two instances of on_turn in order to match the decay rate of serums, but the name of the on_turn in role_lactating_serum.rpy line 3
def lactating_serum_on_turn(the_person):
does not match what's on lines 16-17 for the on_day:
lactation_serum_on_turn(the_person)
Even though it'd be easier to change line 3 to match 16-17, I would probably change 15-17 (the on_day too for consistency) because then they would all match the name of the role. But that doesn't fix our problem which is nobody can be milked more than once because recently_milked is never being reset to False (and I'd hazard nobody is getting any milk on that first milking either)
I think that's because _role_definitions.rpy line 288 is missing some details:
lactating_serum_role = Role("Lactating Serum", [milk_for_serum_action], hidden = True)
It doesn't define an on_turn or on_day for the role, unlike almost all other roles. Assuming you've edited role_lactating_serum.rpy lines 15-17 to match line 3 I think the line needs to be edited to be
lactating_serum_role = Role("Lactating Serum", [milk_for_serum_action], hidden = True, on_turn = lactating_serum_on_turn, on_day = lactating_serum_on_day)
But that still didn't fix the problem, but fortunately I spotted _role_definitions.rpy lines 14-15
#This section instantiates all of the key roles in the game. It is placed here to ensure it is properly created, saved, ect. by Renpy.
#If this is in an init block each Role is reinstantiated on startup, meaning role references become confused.
Which I think finally put me on the path to a fix, if not the cleanest and most correct fix. After making all the edits, one still needs to open the console and run
call instantiate_roles()
in order to correct the entry for lactating_serum_role
If anyone knows how to reinstantiate ONLY that role, please tell me, ditto for if I'm full of crap and misunderstood the thing lol
After making ALL of those changes and reinstantiating the roles, I tried again and I was able to milk someone! And a turn later I was able to milk them again! Huzzah! Maybe fixed? Oh, and I found another error, which I'll post below in the summary of changes
Summary of changes:
_role_definitions.rpy line 288, change to
Code:
lactating_serum_role = Role("Lactating Serum", [milk_for_serum_action], hidden = True, on_turn = lactating_serum_on_turn, on_day = lactating_serum_on_day)
role_lactating_serum.rpy lines 15-17 change to
Code:
def lactating_serum_on_day(the_person):
lactating_serum_on_turn(the_person)
lactating_serum_on_turn(the_person)
To fix a crash error I found while testing this, role_lactating_serum.rpy lines 256 & 259 change
the_person.intelligence
to
the_person.int
And finally, open the console once in-game to run
call instantiate_roles()