Dating Sim Engine (DSE) 4.1! Day Planner and Event Manager
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.
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.
- arowon
- Newbie
- Posts: 2
- Joined: Fri Feb 10, 2017 11:56 am
- Tumblr: mostlikelytomorrow
- Deviantart: karuni17
- Contact:
Re: Dating Sim Engine (DSE) 3.11! Day Planner and Event Mana
Thanks for the nice dating sim engine.
I was just wondering how to limit the number of days you have to reach a certain goal?
I was just wondering how to limit the number of days you have to reach a certain goal?
- qirien
- Miko-Class Veteran
- Posts: 541
- Joined: Thu Jul 31, 2003 10:06 pm
- Organization: Metasepia Games
- Deviantart: qirien
- Github: qirien
- itch: qirien
- Location: New Mexico, USA
- Discord: qirien
- Contact:
Re: Dating Sim Engine (DSE) 3.11! Day Planner and Event Mana
Well, you could easily put a check in to see what day it is, and jump to an end sequence at that point.
For example, in the sample code's main.rpy, when you increment the day, you could add something like this (set MAX_DAYS to however many days you want to run):
and later have:
Does that make sense?
For example, in the sample code's main.rpy, when you increment the day, you could add something like this (set MAX_DAYS to however many days you want to run):
Code: Select all
if (day >= MAX_DAYS):
jump ending
Code: Select all
label ending:
if ((strength >= 100) and (intelligence >= 100)):
jump superhero_ending
elif (strength >= 100):
jump strong_ending
elif (intelligence >= 100):
jump smart_ending
else:
jump slacker_ending
- arowon
- Newbie
- Posts: 2
- Joined: Fri Feb 10, 2017 11:56 am
- Tumblr: mostlikelytomorrow
- Deviantart: karuni17
- Contact:
Re: Dating Sim Engine (DSE) 3.11! Day Planner and Event Mana
Yeah, I'll try that. Thank you so much for your help.
- aliishaq
- Newbie
- Posts: 6
- Joined: Sun Jan 08, 2017 8:03 pm
- Completed: Gulungan Pengembara & Puteri
- Projects: Sim VN Setia
- Contact:
Re: Dating Sim Engine (DSE) 3.11! Day Planner and Event Mana
Hi, ... i'd try it, but i have problem when i use event.choose_one and event.solo together, is they can't work together? coz if i use event solo, the event.choose_one not working. Any solution?
the event.choose_one just call first label only.
Code: Select all
$ event("sekolah1", "act =='01class'", event.choose_one('01class'), event.solo(), priority=200)
$ event("sekolah2", "act =='01class'", event.choose_one('01class'), event.solo(), priority=200)
- qirien
- Miko-Class Veteran
- Posts: 541
- Joined: Thu Jul 31, 2003 10:06 pm
- Organization: Metasepia Games
- Deviantart: qirien
- Github: qirien
- itch: qirien
- Location: New Mexico, USA
- Discord: qirien
- Contact:
Re: Dating Sim Engine (DSE) 3.11! Day Planner and Event Mana
Yes, solo is meant for a single event, so you can't really use it with choose_one. Instead, you could change the priority on the events. The system will prefer events with a lower priority number, so if you have other events you want it to pick and only use these if none of those match, set those events to have a lower priority value.
Would that work for what you want to do?
Would that work for what you want to do?
- aliishaq
- Newbie
- Posts: 6
- Joined: Sun Jan 08, 2017 8:03 pm
- Completed: Gulungan Pengembara & Puteri
- Projects: Sim VN Setia
- Contact:
Re: Dating Sim Engine (DSE) 3.11! Day Planner and Event Mana
I Use for DSE 3.11.
Okay .. thank you Qirien.
Okay .. thank you Qirien.
-
- Newbie
- Posts: 1
- Joined: Sun Mar 19, 2017 12:13 pm
- Contact:
Re: Dating Sim Engine (DSE) 3.11! Day Planner and Event Mana
While calling the day_planner, I get the following exception.
What is causing this? I can't figure out how to make it not do this.
Code: Select all
While running game code:
File "game/script.rpy", line 144, in script
call screen day_planner(["Wee Hours","Early Dawn","Morning", "Afternoon", "Evening","Night"])
File "renpy/common/000statements.rpy", line 471, in execute_call_screen
store._return = renpy.call_screen(name, *args, **kwargs)
File "game/scheduling.rpy", line 50, in execute
screen day_planner(periods):
File "game/scheduling.rpy", line 50, in execute
screen day_planner(periods):
File "game/scheduling.rpy", line 53, in execute
window:
File "game/scheduling.rpy", line 56, in execute
use display_planner(periods)
File "game/scheduling.rpy", line 58, in execute
screen display_planner(periods):
File "game/scheduling.rpy", line 58, in execute
screen display_planner(periods):
File "game/scheduling.rpy", line 59, in execute
frame:
File "game/scheduling.rpy", line 61, in execute
vbox:
File "game/scheduling.rpy", line 63, in execute
hbox:
File "game/scheduling.rpy", line 65, in execute
for p in periods:
File "game/scheduling.rpy", line 66, in execute
vbox:
File "game/scheduling.rpy", line 71, in execute
$ selected_choice = getattr(store, this_period.var)
File "game/scheduling.rpy", line 71, in <module>
$ selected_choice = getattr(store, this_period.var)
AttributeError: 'StoreModule' object has no attribute 'early_act'
- qirien
- Miko-Class Veteran
- Posts: 541
- Joined: Thu Jul 31, 2003 10:06 pm
- Organization: Metasepia Games
- Deviantart: qirien
- Github: qirien
- itch: qirien
- Location: New Mexico, USA
- Discord: qirien
- Contact:
Re: Dating Sim Engine (DSE) 3.11! Day Planner and Event Mana
Sorry for the delay; I've been out of town.
At the very end, it says "'StoreModule' object has no attribute 'early_act'". Would you look at where you are defining the different events and see if you can find any errors in that code? It looks like perhaps you did not register that period with dp_period in main.rpy. Perhaps you could paste in the relevant code from main.rpy here.
At the very end, it says "'StoreModule' object has no attribute 'early_act'". Would you look at where you are defining the different events and see if you can find any errors in that code? It looks like perhaps you did not register that period with dp_period in main.rpy. Perhaps you could paste in the relevant code from main.rpy here.
- qirien
- Miko-Class Veteran
- Posts: 541
- Joined: Thu Jul 31, 2003 10:06 pm
- Organization: Metasepia Games
- Deviantart: qirien
- Github: qirien
- itch: qirien
- Location: New Mexico, USA
- Discord: qirien
- Contact:
Re: Dating Sim Engine (DSE) 3.11! Day Planner and Event Mana
Version 3.12 is now out!
https://github.com/renpy/dse/releases/tag/3.12
Thanks to Pneumonica for the new hidden stat feature.
https://github.com/renpy/dse/releases/tag/3.12
Thanks to Pneumonica for the new hidden stat feature.
Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana
First of all, thank you for creating this. Although I have a programming background, I'm a complete noob when it comes to Ren'Py (for that matter, Python too, lol) and it's a huge help to avoid having to write all of this logic myself. I'm starting to think about how to approach my first Ren'Py/DSE game and I am worried about starting off with a bad design that becomes a nightmare to deal with later on. I'm hoping I can draw on your experience and avoid this.
I initially thought that I'd create a series of generic stat building events which would always run when the player scheduled them, and then during the same period other events might also run if their criteria were met. This means I would not be using event.solo() or event.only() for most events, since both types of events would need to be able to occur in the same period, like:
"Afternoon" period
Having said all that, I feel like my initial approach above also has some potential issues. For instance, if I want certain events to interrupt studying (like the "borrow_pen" or "bookslide" events in the sample code), I'd have to use event.solo() with a higher priority to avoid running the generic study event. But then I'd be stuck if I ever need some other event to run in the same period (e.g., if I wanted to show events "A" and "B" but not the generic study event). Another potential pitfall would be special events that affected the stat changes (e.g., to provide a bigger or smaller stat change). And finally, since this design allows for many events to run in a single period, there may be situations where a completely unrealistic number of events trigger at once. I might be able to work around some of these issues (in particular the last two) with some extra code, but then again, maybe these issues are a sign I'm using DSE wrong.
What are your thoughts on the best way to approach this?
I initially thought that I'd create a series of generic stat building events which would always run when the player scheduled them, and then during the same period other events might also run if their criteria were met. This means I would not be using event.solo() or event.only() for most events, since both types of events would need to be able to occur in the same period, like:
"Afternoon" period
- Show generic study animation and increase intelligence stat
- Show scene "X" with character "Y" based on some criteria that has been met
- Period end
Having said all that, I feel like my initial approach above also has some potential issues. For instance, if I want certain events to interrupt studying (like the "borrow_pen" or "bookslide" events in the sample code), I'd have to use event.solo() with a higher priority to avoid running the generic study event. But then I'd be stuck if I ever need some other event to run in the same period (e.g., if I wanted to show events "A" and "B" but not the generic study event). Another potential pitfall would be special events that affected the stat changes (e.g., to provide a bigger or smaller stat change). And finally, since this design allows for many events to run in a single period, there may be situations where a completely unrealistic number of events trigger at once. I might be able to work around some of these issues (in particular the last two) with some extra code, but then again, maybe these issues are a sign I'm using DSE wrong.
What are your thoughts on the best way to approach this?
- qirien
- Miko-Class Veteran
- Posts: 541
- Joined: Thu Jul 31, 2003 10:06 pm
- Organization: Metasepia Games
- Deviantart: qirien
- Github: qirien
- itch: qirien
- Location: New Mexico, USA
- Discord: qirien
- Contact:
Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana
Hey, sorry for the delay, I've been thinking about your question...
The truth is, either way would work, but the approach you choose will affect how you structure your game.
It might be best to have an outline of events first, and then you can make sure that the structure you're choosing matches the way you want your game to go. And, yes, you will be somewhat limited by the approach you choose, but it will probably still be easier than coding it all by hand manually.
Remember that you can use "jump events_end_period" any time you want to skip the rest of the events for a period.
One thing you may want to consider is dividing up your "afternoon" into two separate periods: "afternoon1" and "afternoon2". Maybe afternoon1 always has 1 event, which is usually just studying, and afternoon2 might have no events or several events depending on criteria?
If you have some more specifics, let me know and I can take a look and try to help. I hope this is a little bit helpful!
The truth is, either way would work, but the approach you choose will affect how you structure your game.
It might be best to have an outline of events first, and then you can make sure that the structure you're choosing matches the way you want your game to go. And, yes, you will be somewhat limited by the approach you choose, but it will probably still be easier than coding it all by hand manually.
Remember that you can use "jump events_end_period" any time you want to skip the rest of the events for a period.
One thing you may want to consider is dividing up your "afternoon" into two separate periods: "afternoon1" and "afternoon2". Maybe afternoon1 always has 1 event, which is usually just studying, and afternoon2 might have no events or several events depending on criteria?
If you have some more specifics, let me know and I can take a look and try to help. I hope this is a little bit helpful!
Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana
Thanks for thinking it through and getting back to me. I'll try to plan things out a bit and go with the solution that best fits my events, as you recommended. The "afternoon1" and "afternoon2" type of idea had crossed my mind as well so I will probably incorporate that too.
Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana
Sorry, but I have another question. The quick version is - do I need to do anything special to make the day planner work with the new GUI? Given that I'm new to Ren'py I can't tell if I've made a dumb mistake or not. Here are the details behind my question...
In my earlier experiments, I had been playing around by just adding code to the original DSE files. Just now I decided to start fresh and created a new project with "+Create New Project" in Ren'py. I checked the skeleton VN that Ren'py creates and as expected everything worked fine. Next, to get the DSE, I copied the following DSE files into my new project:
day_planner.rpy
event_dispatcher.rpy
events.rpy
main.rpy
stats.rpy
styles.rpy
I got rid of the Ren'py-generated script.rpy and renamed the DSE main.rpy to script.rpy (just to follow the same naming convention), so I would have just one start label.
I didn't copy options.rpy from the DSE because Ren'py generated an options.rpy when I created the project.
When I launched the project, the first few bits worked. However, when I got to the day planner screen, the stats were at the bottom of the screen instead of the top and there was no day planner at all (see attachment for screenshot).
At this point I thought that maybe I had broken something by not copying the DSE options.rpy. I tried two things: a) copied DSE/options.rpy to my new project and replacing the Ren'py options.rpy, and b) copied DSE/options.rpy over as options2.rpy, leaving the Ren'py generated options.rpy in place. Although both of these attempts had an impact (for instance the window resolution was different) neither fixed the day planner screen.
Any ideas?
In my earlier experiments, I had been playing around by just adding code to the original DSE files. Just now I decided to start fresh and created a new project with "+Create New Project" in Ren'py. I checked the skeleton VN that Ren'py creates and as expected everything worked fine. Next, to get the DSE, I copied the following DSE files into my new project:
day_planner.rpy
event_dispatcher.rpy
events.rpy
main.rpy
stats.rpy
styles.rpy
I got rid of the Ren'py-generated script.rpy and renamed the DSE main.rpy to script.rpy (just to follow the same naming convention), so I would have just one start label.
I didn't copy options.rpy from the DSE because Ren'py generated an options.rpy when I created the project.
When I launched the project, the first few bits worked. However, when I got to the day planner screen, the stats were at the bottom of the screen instead of the top and there was no day planner at all (see attachment for screenshot).
At this point I thought that maybe I had broken something by not copying the DSE options.rpy. I tried two things: a) copied DSE/options.rpy to my new project and replacing the Ren'py options.rpy, and b) copied DSE/options.rpy over as options2.rpy, leaving the Ren'py generated options.rpy in place. Although both of these attempts had an impact (for instance the window resolution was different) neither fixed the day planner screen.
Any ideas?
- qirien
- Miko-Class Veteran
- Posts: 541
- Joined: Thu Jul 31, 2003 10:06 pm
- Organization: Metasepia Games
- Deviantart: qirien
- Github: qirien
- itch: qirien
- Location: New Mexico, USA
- Discord: qirien
- Contact:
Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana
Ooh, good question. I wasn't sure if I should redo it to use the new GUI or not... I've been trying to keep it as small as possible, so I didn't want to just include all the new gui files.
I have checked in a new version that should be compatible with the old or new GUI. The only files that have changed are styles.rpy and day_planner.rpy. Would you give it a try and make sure it works for you, too?
You can download the latest version (I haven't made it a new release yet) from GitHub by clicking the green "Clone or Download" button.
I have checked in a new version that should be compatible with the old or new GUI. The only files that have changed are styles.rpy and day_planner.rpy. Would you give it a try and make sure it works for you, too?
You can download the latest version (I haven't made it a new release yet) from GitHub by clicking the green "Clone or Download" button.
Re: Dating Sim Engine (DSE) 3.12! Day Planner and Event Mana
Thank you! I will check it out now and let you know.
Who is online
Users browsing this forum: Google [Bot]