How to implement a gore filter?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
izanami
Regular
Posts: 60
Joined: Fri Mar 06, 2020 10:03 pm
Completed: Minami [Demo],Hedonistic
Projects: Minami, "Project White Girl"
Organization: Izanami Paradox
itch: izanamiparadox
Contact:

How to implement a gore filter?

#1 Post by izanami » Mon Oct 10, 2022 8:57 pm

I'm looking to update my games with a gore filter. I don't know what to do.

I want the gore filter option to show up at the beginning of the game and in settings. How can I do this?

User avatar
_ticlock_
Veteran
Posts: 391
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: How to implement a gore filter?

#2 Post by _ticlock_ » Tue Oct 11, 2022 9:50 pm

Check this: https://patreon.renpy.org/custom-preferences.html

Example

Code: Select all

default persistent.gore_enable = True

label start:
#Adding gore filter option to show up at the beginning
menu:
     "Gore?"

     "Yes":
         $ persistent.gore_enable = True

     "No":
         $ persistent.gore_enable = False

Code: Select all

#screens.rpy
screen preferences():
    ....
                vbox:
                    style_prefix "check"
                    label _("Options")
                    textbutton _("Gore") action ToggleField(persistent, "gore_enable")

Code: Select all

label some_scene:
    if persistent.gore_enable:
        #Gore scene
    else:
        #Vanilla scene

Post Reply

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot]