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.

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.

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.

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:

$ 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:

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:

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.

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.

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?

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).

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!

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

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.