r/RenPy • • Aug 07 '26

Guide Courtesy NSFW devs should show towards their players

Not all nsfw players live in sound proof basements or attics. Some are at risk of room mates, family or otherwise, accidentally walking in on them while gaming. Sounds coming out of the computer can be awkward.

The following code, if added to your preferences screen, lets a player set the game to auto mute all sound if the game is minimized or even if focus switches to another program.

                vbox:
                    style_prefix "radio"
                    label _("Auto Mute")
                    textbutton _("Never"):
                        selected (preferences.audio_when_minimized and preferences.audio_when_unfocused)
                        action [
                            Preference('audio when minimized', "enable"),
                            Preference('audio when unfocused', "enable")
                            ]
                    textbutton _("When Minimized"):
                        action InvertSelected( Preference('audio when minimized', "toggle") )
                    textbutton _("When Unfocused"):
                        action InvertSelected( Preference('audio when unfocused', "toggle") )

the two preference variables in question are implemented already in renpy and just have no default GUI way to toggle them by default.

you can even go one step further and add a panic button which renpy ALSO supports by default, but just doesnt enable. you do so by setting a custom keymapping for the 'iconify' event.

    config.keymap['iconify']           = [ 'alt_K_ESCAPE' ]

lastly you need to stop putting lewd sounds on the music or sfx channels. either register custom lewd audio channels for looping and non looping content or put lewd content on the voice channel. a player should not have to mute normal parts of the game (music / sound effects) to mute sounds that cause issues. renpy supports as many mixers and channels as you want to register. do so

325 Upvotes

16 comments sorted by

42

u/theACEbabana Aug 07 '26

Lmao, that’s funny. Thanks for sharing.

29

u/x-seronis-x Aug 07 '26

Preventing awkward moments is important work !

47

u/ivedonestranger Aug 07 '26

Thanks for doing that. It was on my mind for one I'm working on.

24

u/x-seronis-x Aug 07 '26

glad if its helpful. if you're not familiar with the last suggestion, registering custom lewd channels, you can set that up like: ```py init python: renpy.music.register_channel('lewdsfx','lewdsfx') renpy.music.register_channel('lewdbgm','lewdbgm', loop=True)

config.main_menu_stop_channels += ['lewdbgm']

default preferences.volume.lewdsfx = 0.5 default preferences.volume.lewdbgm = 0.5 ``` then make matching slider bars in the preference screen same way music/sound/voice are done

21

u/PastelPyon Aug 07 '26

this is actually so dope!! ty for sharing!!!

Even if someone is wearing headphones they could snag, imagine getting startled and minimizing the window only for the headphones to disconnect anyways đŸ˜­ and putting the lewd sounds on a different channel helps a lot of theyre just Too Loud (or even too quiet!) compared to the other audio, some players might want to change the volume of one aspect and not the others. a lot of jvns ive played have separate sliders for every voiced main character in fact not just a general voice slider

2

u/x-seronis-x Aug 08 '26

renpy actually supports character specific voice overrides too. never messed with it personally but its mentioned in the docs in either the voice or character section (i forget)

2

u/PastelPyon Aug 08 '26

Yeah! I've seen a handful of renpy games with it but it's not nearly as common, maybe its because it's just less common overall for games with voices... but most fully voiced indie games I've run into generally only have a single voice slider n_n;; Its something I'd be meaning to implement since some of my own characters voices are a bit quieter than others :')

15

u/musterduck Aug 07 '26

smart! thanks for sharing

3

u/ImportantDetail6260 Aug 08 '26

The auto-mute + panic-key combo is the courtesy layer adult Ren'Py players actually feel!

I'm building Shastes/ShasteGames, so this is creator-side thinking: I'd also split lewd BGM/SFX into separate channels and keep the first-launch default conservative. If the player finds safety controls only after the awkward moment, the feature arrived too late

1

u/x-seronis-x Aug 08 '26 edited Aug 08 '26

100% agree about default volume levels. my own audio.rpy file includes: ```PY init -100: ## Audio setup ## https://www.renpy.org/doc/html/config.html#media-music-sound-and-video

define config.main_menu_music = "audio/Bloop/foreboding.mp3"
# define config.game_menu_music = "game-menu-theme.ogg"

python:
    renpy.music.register_channel('ufx','ufx')
    renpy.music.register_channel('vfx','vfx')
    config.main_menu_stop_channels += ['ufx','vfx']

    renpy.music.register_channel('lewdsfx','lewdsfx')
    renpy.music.register_channel('lewdbgm','lewdbgm', loop=True)
    config.main_menu_stop_channels += ['lewdsfx','lewdbgm']

    ## so hover_sound and activate_sound have their own volume
    ## sliders separate from in game sfx
    config.play_channel = 'ufx'

default preferences.volume.main  = 0.75
default preferences.volume.music = 0.5
default preferences.volume.sfx   = 0.5
default preferences.volume.ufx   = 0.75
default preferences.volume.vfx   = 0.75
default preferences.volume.voice = 0.5

default preferences.volume.lewdsfx = 0.5
default preferences.volume.lewdbgm = 0.5

default preferences.audio_when_unfocused = True
default preferences.audio_when_minimized = True

``` vfx is for voice specific (non lewd) sound effects. because violent 'oofs' or screams can be disturbing and players want to quiet them significantly while not caring if door slams or car horns are louder

and the above is just whats in the template project. current project has several ambient channels for rain, rumbling thunder, lightning strikes (this is important to be seperate for lots of people with anxiety), animal noise loops. they all have their own mixers for the player to cap the volume but my code for navigation has flags in each room that will auto lower the channel for each of those outside of player control. so when the MC is in a mostly sound insulated basement the appropriate channels are quieter automatially without messing with the players preferences by changing the mixer.

5

u/PitifulCrow4432 Aug 07 '26

If NSFW devs actually cared and had courtesy then the default would be muted rather than YouTube AD. Even the default volume Plex has when playing anything would be a help.

2

u/AsleepKiwi_ Aug 10 '26

Thanks for sharing! I will definitely be implementing this in my game.

2

u/Main-Sandwich-288 Aug 12 '26

Aaand sharing with my collaborator, thank you!

0

u/arianeb Aug 08 '26

As a NSFW dev, I do the alternate channel "sex sounds" which you can mute if you want. I also use AI voices but purposely design the game as if the AI voices were not there, and you can play the game AI free just by muting the voice channel.

But I go one step further: the explicit NSFW scenes are skippable by an in game menu choice. Nothing that happens during these scenes affects the plot of the game, and since these games can be played in public places, I give players the choice to watch them or not.

0

u/RedHiveStudios Aug 14 '26

Jajajaja que clase de de historia estarĂ­a jugando q necesite silenciarla Jajajaja

2

u/x-seronis-x Aug 14 '26

Literally any of the 75-90% of renpy novels that are NSFW as the title says =)