Hello again!
I don't know if my proposal will interest you, but I'll write everything as it is, and then see for yourself.
It is quite difficult not to notice that with each new chapter the conditions become longer and longer and they are not always correct. I reworked your code and made, so to speak, an unofficial mod. Its main feature now is its partner management system. No more checking to see if there was already a first partner and no more complicated checks to decide how many partners to add. We simply call the first_partner and add_partner functions, and write in them, respectively, the first partner and all participants, and the system itself will figure out whether anything needs to be changed or added. You will also no longer have to write long conditions to check whether Rita had a partner. It is enough to call the check_partner function.
Since I really don't want you to abandon the development of the game or go crazy because of complex checks, you can download this mod from here - (Link) (Link). In fact, this is a full-fledged version 0.19b, and you, if you wish, can use it instead of the original without changing anything in it. But there are pros and cons.
Pros:
1) The scenario flow, parameter counting, etc. have not been changed. All this is completely consistent with the original version.
2) Existing saves are 95% compatible with the mod. The updater performs all necessary actions to ensure the functioning of the new system.
Cons:
1) Changes have been made to the mod that are incompatible with the original code:
- Actually, the partner management system itself.
- Variable names have been changed for better readability.
- Variables with values "Yes"/"No" and 0/1 are converted to boolean.
So if you are interested in this, then there are two options for implementing this into the game:
1) Take just the partner management system (the sp_control.rpy file, the part of the updater.rpy file associated with the "sexp" variable), add it to the original code and then go through the entire code, changing those parts that are associated with partners. The mod archive contains a readme.docx file with examples of changes.
2) Take the mod as a new basis, and correct the code for version 0.20 according to it.
You can argue which option is better, but I doubt that anyone can convince me that if vir=="Yes": is better than if virgin: :-)
P.S. Hail Google Translator! :-)
UPD: Sorry, I found a few more checks that I missed. Updated the link.
UPD2: In addition - if you are interested, chose the second option and agree that you need to fix everything on the list in the previous comment - then here is a (link) (link) to the mod plus fixes for version 0.19b, except sections: 32,37,38,40 - these are graphical issue; 29,33,36 - my english is not very good; 35,39 - as I wrote before, I did not change the calculations.