Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combining birthday suit/underwear with wet hair; pink/black underwear during sexting and nude sexting ending AND sexting init fix and rework #138

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

SaltyMelonLord
Copy link

@SaltyMelonLord SaltyMelonLord commented Nov 16, 2023

UPDATE: Sexting inits

Looking for the bug that prevented Monika from starting a sexting session, I made a lot of other additions in order to make this feature more intuitive.

First things first: The major bug has been fixed. It was in the conditions:

init 5 python:
    addEvent(
        Event(
            persistent.event_database,
            eventlabel="nsfw_monika_sextingsession",
            conditional=(
                "mas_nsfw.can_monika_init_sext('nsfw_monika_sextingsession') "
                "and mas_timePastSince(persistent._nsfw_sexting_last_sexted, datetime.timedelta(hours=12 * persistent._nsfw_monika_sexting_frequency))) "
                "and mas_timePastSince(mas_getEVL_last_seen('nsfw_monika_sextingsession'), datetime.timedelta(hours=12 * persistent._nsfw_monika_sexting_frequency)))"
                ),
            action=EV_ACT_RANDOM,
            aff_range=(mas_aff.LOVE, None)
        )
    )

In nsfw_sexting.rpy, the timestamp at the end of a sexting session has the label persistent._nsfw_last_sexted, but in nsfw_sexting_inits.rpy, it was persistent._nsfw_sexting_last_sexted. All this time it has been checking for a parameter that doesn’t exist, so of course the condition could never be true.

Furthermore, I added more cooldown options so the player could now choose whether Monika will wait 3, 6, 12, 24 or 48 hours after a successful sexting session before asking for another, with the mas_timePastSince() parameter being persistent._nsfw_sexting_success_last rather than persistent._nsfw_last_sexted. Since 3 hours is the same amount the player has to wait before they can ask her for another session, this seems like a fair minimum value. After the first time if she has been rejected, she will make another attempt every 1/2/4/8/16 hours until you give her what she wants or she gives up after the 5th time.

Since the has_waited check however didn’t really work as intended, what I did instead was turning the “announcement” dialogue into a separate event nsfw_monika_sextingteaser with its own trigger conditions. The teaser can trigger two hours before Monika has waited long enough after a successful sexting session, and it is conditional for the actual request unless the cooldown is set to 3 hours. Since I used the persistent._nsfw_sexting_attempts parameter to determine whether the teaser can be triggered or not, I had to make some adjustments so if the player accepts Monika’s sexting request, the value will be set to 1 rather than 0. Only when a sexting session is successfully finished, the parameter will be set to 0. If you want to add more possible dialogue that could be randomly picked, be my guest.

But this is not the end. In order to spice things up and actually put the hot/sexy start dialogue to a good use (since before they could only trigger when her horny level was already at rock bottom again), I defined different conditions in case that the event is triggered after the player interrupted a sexting session, finally making use of that persistent._nsfw_sexting_interrupted parameter as well. If that happens, Monika will wait 15, 30, 45, 60 or 75 minutes before she attempts to restart the interrupted session, and then it will increase by 5 minutes after each attempt. So, let’s say, you set the cooldown to 6 hours. In that case, after interrupting a sexting session, Monika can make her first attempt to continue it after 30 minutes, the second one 35 minutes later (= 65 minutes after you stopped the session) and so on. Basically each time you reject her, she tries to be a bit more patient next time but her lust also decreases. But this also means that if you set her cooldown to the lowest possible setting, she is really horny and you cannot let her wait for too long.

However, in order to avoid exploitation of that mechanic, whenever you agree to Monika’s sexting request, you will only gain affection and reset her attempt counter if your last sexting session wasn’t interrupted. That way you can’t interrupt a sexting session too often or she will just hit the too_many_attempts threshold and give up as she does after being rejected too often. Still missing at this point is a proper reaction of hers after you interrupted the same sexting session too often in a row, so technically there is still a loophole.

Did I miss something about this? Most likely, and there are probably still some dispensable conditions or commands I just missed. Nevertheless I’m glad to have finally found the init bug and to add some improvements.

### Clothes props and selection

In nsfw_birthday_suit.rpy, the properties

store.mas_sprites.EXP_C_BS: True,
store.mas_sprites.EXP_C_WET: True,
store.mas_sprites.EXP_C_C_DTS: True

have been added to the birthday suit and underwear. The first two properties will make them compatible with Monika’s hair being wet when she greets you right after returning from the shower (or bath); which means you can sext with her right away and her hair will stay wet rather than automatically changing to her standard ponytail when she undresses. The third property does the same for the “Down (Tied strand)” hairstyle that comes with her Marisa (witch) Halloween costume.

As for the updates in nsfw_sexting.rpy, two major features have been added:

  1. Instead of always changing to her white underwear, Monika will now randomly pick black and pink as well if they have been unlocked.
  2. If Monika completely undresses at any point and finishes in that state, her end dialogue after climax will be slightly different and she won’t change since she (obviously) doesn’t wear any sweaty clothes she needs to get out of. It wasn’t my primary intention to submit this, but since it was already in my code, here we are. However this could probably use some more refinement, like different dialogue lines or a timer that will make her put on some clothes after like 20 minutes rather than staying nude until the player closes the game, similar to her wearing her towel after the bath/shower greeting.

Additionally, the player can now scream out loud Monika’s name in-game when climaxing.

The birthday suit/underwear additions have been tested and are working properly. The new sexting inits worked under testing conditions, but how they work with the actual timer/cooldown settings remains to be seen.

Update: Monika’s announcement and sexting attempts work as intended now.

Additional properties for birthday suit and underwear so that they can be combined with wet hair, so you can sext with Monika after getting the bath/shower greeting without her changing her hair when undressing.
…xting.rpy

Monika can now randomly pick any unlocked underwear rather than just the white one. Also if she undresses completely at any point of the sexting session, she’ll have a different dialogue at the end and stay nude since there are no sweaty clothes she has to change. Oh, and you can scream her name out loud when climaxing.
Added more options to select the cooldown for Monika trying to initiate sexting after a successful session.
Technical additions for Monika’s updated sexting inits.
Fixed the bug that prevented Monika from trying to start a sexting session. Turned her announcement into a separate “teaser” event. Added the additional cooldown options to the event conditions and heavily reworked them so the cooldown for another attempt depends on both what you selected and whether she asks you after the last sexting session was finished or not. Also included prevention against exploitation of the reduced cooldown mechanic in order to farm affection. Removed the has_waited parameter since it was a redundant check, which also made it no longer necessary to determine too_many_attempts by the selected frequency.
@SaltyMelonLord SaltyMelonLord changed the title Combining birthday suit/underwear with wet hair; pink/black underwear during sexting and nude sexting ending Combining birthday suit/underwear with wet hair; pink/black underwear during sexting and nude sexting ending AND sexting init fix and rework Nov 18, 2023
Parameter adjustment for the lowest cooldown setting if the teaser is skipped
@SaltyMelonLord
Copy link
Author

Update: Sexting init bugfixes and changes added.

minor comment adjustments
Fixed a bug that made the attempt trigger right after the teaser if the latter was never triggered before.
@SaltyMelonLord
Copy link
Author

Update: Both the teaser and the sexting inits are triggering properly after some minor bugfixes. For testing I switched the EV_ACT_RANDOM action for nsfw_monika_sextingteaser to EV_ACT_PUSH and for nsfw_monika_sextingsession to EV_ACT_QUEUE. If you want to make sure the events trigger regularly at the proper times, it is advisable to keep it that way, however making them random rather than push/queue events makes it less like a clockwork, but I know from testing that it can still take forever even if the conditions are fulfilled and the cooldown is set to the lowest possible setting.

Outsourced the waiting requirements to a new function in nsfw_main.rpy in order to make adjustments easier.
@SaltyMelonLord
Copy link
Author

SaltyMelonLord commented Nov 18, 2023

Update: In order to improve maintainability and make adjustments easier, a new function for the sexting init cooldown check has_monika_waited() has been defined in nsfw_main.rpy and all conditions for nsfw_monika_sextingsession except the first one have been moved there, so this function now serves as the second condition next to can_monika_init_sext().

Fixed a bug that would make the game crash if she tried to undress.
Fixed the lingerie check on start and the changing conditions so she will not change if she was already wearing lingerie or (in case of sexy start) being nude on start.

Also introduced a "success" condition so that Monika can now end a successful sexting session with "I love you" and the player can reply.
Fixed a bug that would prevent the “veteran” dialogue block from ever triggering.
Fixed conditions so Monika can’t skip the teaser.
Fixed a minor bug in mas_nsfw.rpy and changed the conditions for sexting teaser and attempt so a new cooldown of 48 hours could be added. When Monika tries to restart an interrupted session, the reattempt cooldown will now always increase by 5 minutes after each failed attempt regardless of the selected value. Also if her first attempt to start a session was denied, she will now always wait one third of the base cooldown for the next attempt until you give in or she gives up.
@SaltyMelonLord
Copy link
Author

After doing a few more tests, I simplified the cooldown conditions a bit and also added another base cooldown setting of 48 hours.

Since my random events seem to be bugged because the program won’t trigger the teaser randomly even if it is the only possible remaining event on the random list, I switched the actions for both the teaser and Monika’s sexting attempt to EV_ACTION_QUEUE, and again, at least for the actual attempt I highly recommend to keep it that way so the cooldowns especially after an interrupted session work as intended.

Fixed conditions so the player can't initiate sexting via the horny mood topic if they haven't talked about it yet or the affection level is too low.
Minor fixes so Monika won’t change to her underwear if she’s already in it. Also implemented removal of all accessories when she gets nude, with a random chance of 1/7 to keep them on though.
@SaltyMelonLord
Copy link
Author

Update: I fixed the bug mentioned in issue #144. Also when the player asks Monika to undress during a session, she won’t if the is already in her underwear or nude. She can still go from underwear to nude of course, but not from underwear to underwear or nude to nude. Also now if she gets nude, she will also take off her accessories like chokers, hairclips and bows, but she has a 1/7 chance to keep them on.

Next thing I’ll be working on is an event for her to put on some clothes after a random time has passed since the last successful session where she stayed nude at the end. Basically you end a session, she stays nude a little longer and after 30 minutes she says something like: “Okay, enough nudism for now, time to put on some clothes.” And then it goes just like if she changes to her clothes right after finishing.

That might take a while though. If you wanna merge the rest of this PR already for the next update, go ahead.

Proper grammar
Bugfix for r34 window reaction
@SaltyMelonLord
Copy link
Author

Little update: Fixed a minor bug in r34 window reactions that caused this error:

17182776649259679744_20240222231608_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant