NickWildish / Mas-NSFW-Submod

A submod dedicated to bring you and Monika THAT much closer. How close you ask? Like, THIS close 🤏
39 stars 86 forks source link

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

Open SaltyMelonLord opened 8 months ago

SaltyMelonLord commented 8 months ago

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.

SaltyMelonLord commented 8 months ago

Update: Sexting init bugfixes and changes added.

SaltyMelonLord commented 8 months ago

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.

SaltyMelonLord commented 8 months ago

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().

SaltyMelonLord commented 8 months ago

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.

SaltyMelonLord commented 7 months ago

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.

SaltyMelonLord commented 5 months ago

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

17182776649259679744_20240222231608_1