Dating Sim Engine - how to remove the "done planning" button?

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
Posts: 8
Joined: Tue Jan 09, 2018 7:25 am

Dating Sim Engine - how to remove the "done planning" button?

#1 Post by LightAndDark » Sun Jun 02, 2019 1:50 pm

Hello all,
I am using the DSE and I have split the day planner into separate parts for each time period. So in the morning you do not pick what you're going to do in the evening, you only pick the morning activity.

Then in the evening, the planner appears again and asks what you want to do in the evening.

As a result, I want to get rid of the "done planning" button because it's redundant as the user is only picking one single option at any given time. How can I do this without breaking the script?

Obviously I can't just delete the button itself because then the player wouldn't be able to progress, they need to be able to proceed just by clicking the option.

Code: Select all

# Our Day Planner displays the stats, and buttons for the user to choose
# what to do during each period of time defined in "periods".
screen day_planner(periods):  
    # indicate to Ren'Py engine that this is a choice point
    $ renpy.choice_for_skipping()
        style "dayplanner_frame"          
        use display_stats(name=True, bar=True, value=True, max=True)
        use display_planner(periods)
screen display_planner(periods):            
        style_group "dp"        
            text "Day Planner" yalign 0.0 xalign 0.5
                $ can_continue = True
                for p in periods:
                        label p
                        if p not in __periods:
                            $ raise Exception("Period %r was never defined." % p)
                        $ this_period = __periods[p]
                        $ selected_choice = getattr(store, this_period.var)

                        $ valid_choice = False
                            style "dp_choice_vbox"                                                    
                            for name, curr_val, enable, should_show in this_period.acts:
                                $ show_this = eval(should_show)
                                $ enable = eval(enable)

                                $ selected = (selected_choice == curr_val)
                                if show_this:
                                    if enable:
                                        textbutton name action SetField(store, this_period.var, curr_val)
                                        textbutton name
                                if show_this and enable and selected:
                                    $ valid_choice = True

                            if not valid_choice:
                                $ can_continue = False
            if (can_continue):
                textbutton dp_done_title style "dp_done_button" action Return()
                textbutton dp_done_title style "dp_done_button"

User avatar
Lemma-Class Veteran
Posts: 2218
Joined: Fri Dec 11, 2009 5:25 pm

Re: Dating Sim Engine - how to remove the "done planning" button?

#2 Post by Alex » Sun Jun 02, 2019 4:36 pm

Looks like this action Return() is necessary to progress the game. So, if you don't need it as a separete button just add this action to the choice button. Try something like

Code: Select all

                               if show_this:
                                    if enable:
                                        textbutton name action [SetField(store, this_period.var, curr_val), Return()]
(you can set a list of actions for buttons/hotspots)

Post Reply

Who is online

Users browsing this forum: Google [Bot], Remix