Dating Sim Engine (DSE) 4.0! Day Planner and Event Manager

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
verysunshine
Veteran
Posts: 210
Joined: Wed Sep 24, 2014 5:03 pm
Projects: No Good Wife
Organization: Wild Rose Interactive
Contact:

Re: Dating Sim Engine (DSE) 4.0! Day Planner and Event Manager

#151 Post by verysunshine » Mon Feb 05, 2018 3:48 am

I thought the if statements had ended the last of these bugs. It did, but there's another problem.

The call for "work event" fails to load an event.

Code: Select all

label work:
    if check_skip_period():
        jump afternoon
        
    if weekend == True:
        jump afternoon
        
    centered "Work"

    $ period = "work"
    $ act = work_act

    call events_run_period
    
#   calls the work_act

    $ event("atwork", "act == 'at_work'", event.solo(), priority=200)
    
label atwork:
    "Default work event."
    if day == 2 or day == 9 or day == 10:
        "It's Friday, so my boss gives me my paycheque."
        $ items["pounds"] += 20
    return
In afternoon, it crashes when trying to call any event. The crash is the syntax error "unbound method eval".

The relevant variables right before the crash (When "Afternoon" is displayed):
  • act = u'atwork'
    events_executed = {u'garden': True}
    period = u'work'
    work_act = u'actwork'
My afternoon code:

Code: Select all

label afternoon:

    # It's possible that we will be skipping the afternoon, if one
    # of the events in the morning jumped to skip_next_period. If
    # so, we should skip the afternoon.
    if check_skip_period():
        jump evening

    # The rest of this is the same as for the morning.

    centered "Afternoon"

    $ period = "afternoon"
    $ act = afternoon_act

    call events_run_period
Pressing "ignore" allows the game to continue.

EDIT: My initial events were flawed. I missed the brackets in event.only().

However, return goes to call another event instead of going to the next period. It looks like this should be easy to fix, so I'll see what I can do. I don't want the events to always appear in a specific order, so event.depends won't work for me.

"Date for the romance. Marry for the truth." - No Good Wife (Alpha available for Mac and PC.)

verysunshine
Veteran
Posts: 210
Joined: Wed Sep 24, 2014 5:03 pm
Projects: No Good Wife
Organization: Wild Rose Interactive
Contact:

Re: Dating Sim Engine (DSE) 4.0! Day Planner and Event Manager

#152 Post by verysunshine » Mon Feb 12, 2018 7:32 am

I managed to add a "ranking" argument to the stats screen and set it up so it can display one of three different formats.

"numbers_only" resembles the old state.
dse_rank_numbers_only.JPG
"rank_only" just shows the rank tied to a stat.
dse_rank_rank_only.JPG
The default shows both.
dse_rank_default.JPG
(Oh, and I fixed all of the issues I had before. I just figured this was more interesting.)

"Date for the romance. Marry for the truth." - No Good Wife (Alpha available for Mac and PC.)

Post Reply

Who is online

Users browsing this forum: No registered users