Dating Sim Engine (DSE) 3.12! 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
Ceiyne
Newbie
Posts: 7
Joined: Thu Apr 13, 2017 9:57 am
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#91 Post by Ceiyne » Wed Apr 19, 2017 2:56 pm

I gave this a pretty good test and it looks like a success! The planner now displays correctly under the new GUI and all the interactions work. I also did some regression testing and the code also works if I run it under the legacy interface. :) There were a couple of things I thought I'd mention/ask about...

1. Under the new GUI, the buttons in the display planner don't have the same kind of visual as they did in legacy. They look like text rather than buttons. That might just be the way the new GUI works - I'm still wrapping my head around this stuff. :) (Note: the buttons still do everything they are supposed to - highlight on mouse over, change color when selected, etc.)

2. Also under the new GUI: right after you hit "Done Planning" you can see the default textbox graphic briefly transition in and then disappear right before it shows "Morning" in the center of the screen. I think this is probably more in the "DSE demo" part of the code and not really the "DSE engine", though. This may have also been there before, but the legacy interface doesn't seem to have a visible text box background by default so it would not have been apparent.

Thank you for all your help!

Ceiyne
Newbie
Posts: 7
Joined: Thu Apr 13, 2017 9:57 am
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#92 Post by Ceiyne » Thu Apr 20, 2017 3:06 pm

Me again with a couple more things...

With regard to #2 from my prior post: If you try to reproduce what I said, I realized that the problem isn't visible on all GUI color schemes (because apparently not all GUI color schemes have a visible text box). I am using the light blue accent with white background, which is the 2nd item in the 3rd row in the GUI wizard. I'll also just zip up and attach my project in case that helps. It's just the default project with the DSE incorporated.

In a legacy project, the message "What should I do today?" is visible when the day planner is displayed. However, in a new GUI project that message fades out and is invisible when the day planner shows up. Not sure if this may be related to #2 from my prior post as well.

In playing around with the above, I noticed there were two places in main.rpy where the "What should I do today?" message could be generated:
- Line 85, under the day label
- Line 165, under the dp_callback label

From my testing it looks like the message is coming from "day" and that dp_callback is never called. I saw dp_callback described in the DSE documentation, so has it been deprecated? I couldn't find anything in the DSE engine that was calling it.
Attachments
DSE GUI.zip
(801 KiB) Downloaded 22 times

User avatar
qirien
Veteran
Posts: 420
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
Location: New Mexico, USA
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#93 Post by qirien » Tue Apr 25, 2017 6:02 pm

First, as to #1 - yes, that's just the default look of the new GUI.
Yes, you are right, the dp_callback stuff is old. Looks like I forgot to take that bit out; thanks for finding that.

Since we are using screen language now, it might make more sense to add the user's prompt like this in day_planner.rpy:

Code: Select all

screen day_planner(periods):  
    # indicate to Ren'Py engine that this is a choice point
    $ renpy.choice_for_skipping()
    frame:
        style "dayplanner_frame"          
        use display_stats(name=True, bar=True, value=True, max=True)
        use display_planner(periods)
    use say(None,"What should I do today?")
I'm still thinking about if I want to include that in the DSE because then I would have to include a bunch of other files... but I hope that helps do what you want.

I'll take a look at that "say" screen that is fading in and out... I'm actually seeing that same problem with the game I'm working on, so I'm thinking it's probably not a DSE-specific thing, but probably something that has changed with the new-ish GUI.
Finished games:
Image
Image
Image
In progress: Our Personal Space 2: Space to Grow

Ceiyne
Newbie
Posts: 7
Joined: Thu Apr 13, 2017 9:57 am
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#94 Post by Ceiyne » Tue Apr 25, 2017 8:13 pm

Thanks as always. Regarding the minor issue of the "What should I do today" line disappearing, I did a little digging through the documentation and I found a couple of alternatives that seem to work. One involves adding a couple of lines around line 87 of main.rpy:

Code: Select all

    $ narrator("What should I do today?", interact=False)
    window show  # Force text box to be visible

    # Now, we call the day planner, which may set the act variables
    # to new values. We call it with a list of periods that we want
    # to compute the values for.
    call screen day_planner(["Morning", "Afternoon", "Evening"])
    window auto  # Put text box back to auto show/hide
The other thing I found was config.window_auto_hide. You can change this setting to make "call screen" not hide the text box:

Code: Select all

    $ config.window_auto_hide.remove("call screen")
Depending on the game you might need to add "call screen" back in (much like how I did a "window auto" in my sample code above).

User avatar
qirien
Veteran
Posts: 420
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
Location: New Mexico, USA
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#95 Post by qirien » Wed Apr 26, 2017 12:37 pm

OK, that looks like the proper way to do it. It doesn't work with the old code, though, so I will only include it once the rest of the code is updated to work better with the new stuff.
Finished games:
Image
Image
Image
In progress: Our Personal Space 2: Space to Grow

User avatar
Bruni Multimedia
Newbie
Posts: 17
Joined: Mon May 15, 2017 12:23 pm
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#96 Post by Bruni Multimedia » Wed May 17, 2017 6:20 am

Thank you very much! This is awesome!

Wap
Newbie
Posts: 12
Joined: Wed Jul 13, 2016 6:11 pm
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#97 Post by Wap » Fri May 26, 2017 6:50 pm

Thanks for this engine, qirien, it's great. I've modded some games that used it and I really like how it calls events based on criteria. That aspect is what I want to ask you about.

See, I don't want the day planner at all. I was wondering if the day planner can be removed entirely while still preserving the event management. My game is a more traditional adventure game where you move around, and would like events triggered from locations the player visits, actions the player takes, etc, but not chosen from a day planner. For example, if the player goes to sleep, it would grab a relevant 'sleep' event - maybe they have a dream, maybe they're awoken by something, etc. The code to call it would look something like:

Code: Select all

$ choice = "sleep"
call events_run
Does that make sense? How would I go about doing that?

User avatar
qirien
Veteran
Posts: 420
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
Location: New Mexico, USA
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#98 Post by qirien » Mon May 29, 2017 2:13 pm

Hmmm, I see what you're saying. You don't have to use the day planner, but could have some other kind of event loop where you call events_run_period every time the player enters a screen or something (instead of whenever they select from the day_planner). That part is in main.rpy.

Does that make sense?
Finished games:
Image
Image
Image
In progress: Our Personal Space 2: Space to Grow

Wap
Newbie
Posts: 12
Joined: Wed Jul 13, 2016 6:11 pm
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#99 Post by Wap » Sat Jun 03, 2017 11:01 am

qirien wrote:Hmmm, I see what you're saying. You don't have to use the day planner, but could have some other kind of event loop where you call events_run_period every time the player enters a screen or something (instead of whenever they select from the day_planner). That part is in main.rpy.

Does that make sense?
Yes, in fact I tried doing exactly that and it worked perfectly on my first attempt. So much simpler than I expected. Thanks.

For anyone interested, you add a generic period and the different categories of activity as periods.

Code: Select all

    dp_period("Any", "any")
    dp_choice("Sleep", "sleep")
    dp_choice("Jog", "jog")
    dp_choice("Internet", "internet")
Then you have the game set 'period' to "any" at the start and then set 'act' to whatever is necessary just before you call events_run_period.

Code: Select all

$ period = "any"

$ act = "sleep"
call events_run_period


Experimentation reveals that the dp_period and dp_choice part may be unnecessary, but I'll leave it in until I've tested it more thoroughly.

Thanks qirien!

texasstallion
Newbie
Posts: 2
Joined: Tue Jun 27, 2017 4:11 pm
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#100 Post by texasstallion » Tue Jun 27, 2017 4:15 pm

i have deleted everything in the new game folder and put the dse script in but it wont allow me to modify the game, also I i tried to do certain files but i keep getting errors, what do you have to delete in order to use the dse?

User avatar
qirien
Veteran
Posts: 420
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
Location: New Mexico, USA
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#101 Post by qirien » Thu Jul 13, 2017 9:37 pm

Hey, sorry for the delay, I was out of town.

I need to make some changes to the DSE in order to work with the new(ish) way of doing the GUI. You should still be able to download the DSE, put it in the folder where Ren'Py looks for games, and run it, as well as edit it to suit your needs (but it will use the old GUI).

Thanks for the reminder that I need to update that!
Finished games:
Image
Image
Image
In progress: Our Personal Space 2: Space to Grow

User avatar
SgurrDearg
Newbie
Posts: 2
Joined: Thu Jul 13, 2017 6:00 pm
Projects: "Kissing Aliens" <-- working title
Location: UK
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#102 Post by SgurrDearg » Sun Jul 16, 2017 2:17 pm

Hi, thanks so much for this! Think I've finally got my head around how to use it for my game.

However, does anyone have some guidance how to set the day planner up into a timetable grid where you click buttons (in their own separate little menu area- similar to the separation of the choices and the stats in the DSE at the moment) to select your choices and pop them in the grid, it would be much appreciated. As an example- if anyone has played Roommates or Backstage Pass, something similar to that. I know it's probably complicated but I'm ambitious and trying anyway!

Thanks :)

texasstallion
Newbie
Posts: 2
Joined: Tue Jun 27, 2017 4:11 pm
Contact:

Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana

#103 Post by texasstallion » Mon Jul 17, 2017 3:30 pm

o think i have it

yung
Newbie
Posts: 2
Joined: Thu Jul 27, 2017 11:05 pm
Contact:

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

#104 Post by yung » Tue Aug 01, 2017 12:51 pm

Hi there,

Is there anyway to make use of the events outside of the planner? I am planning to use the events for certain actions that don't consume a period so that players can continue doing whatever they want until major stuffs

Edit:

After reading through the thread and testing some stuffs, I managed to call the events without using the day planner. Apologies about this.

One other thing I would like to ask is that it seems like I can't use event depend without actually moving forward the day first. So if there's an event like introduction to character, and I would like to trigger this other event that depends on this, if I don't skip the time, this event will be missed. Is there any advice on how I could go around this?

Edit:
Found a solution to the 2nd thing. Instead of using event.Depends("Yourevent"), you can use event.happened("yourevent") instead. This will just require the event to have happened regardless of day. Should have read the documentation more. Hope this helps you guys if you face this issue

User avatar
qirien
Veteran
Posts: 420
Joined: Thu Jul 31, 2003 10:06 pm
Organization: Metasepia Games
Deviantart: qirien
Github: qirien
Location: New Mexico, USA
Contact:

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

#105 Post by qirien » Mon Aug 07, 2017 6:30 pm

yung, yes, event.happened is just the thing to use! Thanks for posting that here in case someone else has the same problem. :-)

SgurrDearg, I think I know what you mean. It's a bit complicated, like you said. If you want, you can take a look at some code I have for an in-progress game that kind of does this but with crops on a farm -- you click on the crop you want and then click on the spot you want it to go in. It doesn't use the DSE but the screen code would be sort of similar.

You can see the code on Github:
https://github.com/qirien/personal-spac ... n-farm.rpy
Finished games:
Image
Image
Image
In progress: Our Personal Space 2: Space to Grow

Post Reply

Who is online

Users browsing this forum: Imperf3kt