Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.


Visit our new games list, blog aggregator, IRC channel, and Discord (new).
Activation problem? Email pytom@bishoujo.us.
It is currently Wed Mar 29, 2017 1:25 am

All times are UTC - 5 hours [ DST ]


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.



Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
PostPosted: Fri Feb 10, 2017 5:38 pm 
Newbie
User avatar

Joined: Fri Feb 10, 2017 11:56 am
Posts: 2
Twitter: @karuni17
Tumblr: mostlikelytomorrow
Deviantart: karuni17
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? :)


Top
 Profile Send private message  
 
PostPosted: Mon Feb 13, 2017 2:09 pm 
Veteran
User avatar

Joined: Thu Jul 31, 2003 10:06 pm
Posts: 406
Location: New Mexico, USA
Organization: Metasepia Games
Twitter: @Andrea_Landaker
Deviantart: qirien
Github: qirien
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):
Code:
    if (day >= MAX_DAYS):
        jump ending

and later have:
Code:
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


Does that make sense?

_________________
Finished games:

Image
Image
Image


Top
 Profile Send private message  
 
PostPosted: Wed Feb 15, 2017 1:14 pm 
Newbie
User avatar

Joined: Fri Feb 10, 2017 11:56 am
Posts: 2
Twitter: @karuni17
Tumblr: mostlikelytomorrow
Deviantart: karuni17
Yeah, I'll try that. Thank you so much for your help. :)


Top
 Profile Send private message  
 
PostPosted: Thu Feb 16, 2017 10:21 pm 
Newbie
User avatar

Joined: Sun Jan 08, 2017 8:03 pm
Posts: 3
Completed: Gulungan Pengembara & Puteri
Projects: Sim VN Setia
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?

Code:
    $ event("sekolah1", "act =='01class'", event.choose_one('01class'), event.solo(), priority=200)
    $ event("sekolah2", "act =='01class'", event.choose_one('01class'), event.solo(), priority=200)


the event.choose_one just call first label only.


Top
 Profile Send private message  
 
PostPosted: Fri Feb 17, 2017 1:41 pm 
Veteran
User avatar

Joined: Thu Jul 31, 2003 10:06 pm
Posts: 406
Location: New Mexico, USA
Organization: Metasepia Games
Twitter: @Andrea_Landaker
Deviantart: qirien
Github: qirien
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?

_________________
Finished games:

Image
Image
Image


Top
 Profile Send private message  
 
PostPosted: Tue Feb 21, 2017 9:55 pm 
Newbie
User avatar

Joined: Sun Jan 08, 2017 8:03 pm
Posts: 3
Completed: Gulungan Pengembara & Puteri
Projects: Sim VN Setia
I Use for DSE 3.11.
Okay .. thank you Qirien.


Top
 Profile Send private message  
 
PostPosted: Fri Mar 24, 2017 11:31 pm 
Newbie

Joined: Sun Mar 19, 2017 12:13 pm
Posts: 1
While calling the day_planner, I get the following exception.

Code:
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'


What is causing this? I can't figure out how to make it not do this.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 82 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group