Hello, I have some DLC for my game that I want to release but I need a toggle / radio option in the Settings in order to enable what this DLC adds. In this case, it allows the user to enable it to see the adult mode sprites in the game, and disable it if they don't.
After some research it seems that all I need to do is add the button into the preferences screen in screens.rpy so I did this:
Code: Select all
vbox:
style_prefix "radio"
label _("Oppai Mode")
textbutton _("Enabled") action Preference("oppai_mode", True)
textbutton _("Disabled") action Preference("oppai_mode", False)
And since this mode changes the sprites, in my definitions.rpy file, I added some conditionals to define the sprites:
Code: Select all
if oppai_mode is True:
## Adult sprites defined here
else:
## Regular sprites here
I also added a default for the prefence in options.rpy:
Code: Select all
default preferences.oppai_mode = False
And even added this into my definitions.rpy file just in case:
However when I run the game, I just keep getting a traceback.txt file pop up saying:
Code: Select all
Exception: Preference(u'oppai_mode', True) is unknown.
What am I doing wrong? I could use some advice here as I have not altered the default menus before.