Making story events in a Dating Sim/Stat Raising game
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Making story events in a Dating Sim/Stat Raising game
I have two ideas. One is mainly a story VN but with some stat-raising elements that would affect the storyline. So it's mostly story, but you can go off to read in the library or train fighting every once in a while, and it will increase "stats" that would affect later events. The second is mainly stat-raising with a story. I guess it's something like Hanako's game "Long Live the Queen" (or whatever the correct title is).
I'm not sure I quite understand how to arrange that. I think I can try using the DSE from the cookbook for the second idea, but how do I insert the events? And I'm not sure which is better for the first idea. A basic VN system with a lot of "ifs" and scene blocks or use the DSE.
Any ideas, guys?
I'm not sure I quite understand how to arrange that. I think I can try using the DSE from the cookbook for the second idea, but how do I insert the events? And I'm not sure which is better for the first idea. A basic VN system with a lot of "ifs" and scene blocks or use the DSE.
Any ideas, guys?
- Spiky Caterpillar
- Veteran
- Posts: 253
- Joined: Fri Nov 14, 2008 7:59 pm
- Completed: Lots.
- Projects: Black Closet
- Organization: Slipshod
- Location: Behind you.
- Contact:
Re: Making story events in a Dating Sim/Stat Raising game
Yes, Long Live the Queen is the correct title.
Personally, I prefer working with a basic VN structure with lots of ifs, and a set of functions (Python functions, screens, called Ren'Py blocks, depending on what works best where) to handle anything that will be done repeatedly or needs to be accessed from multiple places in the story/code. That's actually the approach we used with LLtQ, rather than using the DSE.
Personally, I prefer working with a basic VN structure with lots of ifs, and a set of functions (Python functions, screens, called Ren'Py blocks, depending on what works best where) to handle anything that will be done repeatedly or needs to be accessed from multiple places in the story/code. That's actually the approach we used with LLtQ, rather than using the DSE.
Nom nom nom nom nom LEAVES.
Re: Making story events in a Dating Sim/Stat Raising game
Is that so? can you recommend me samples/tutorials to look at?
I'm still rather new at this. I can do basic Ren'py coding, but I'm not sure where to declare the stuff if I need to call them multiple times.
I'm still rather new at this. I can do basic Ren'py coding, but I'm not sure where to declare the stuff if I need to call them multiple times.
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Making story events in a Dating Sim/Stat Raising game
Simple if games can be done with the following 3 sample labels:
I forgot ren'py has the if statement or not. If it has, the 3rd syntax becomes simpler.
Combination of jump allows you to repeats events. It's a basic math/algorithm matter more than programming.
Code: Select all
start:
$money=0
$love=0
menu:
"work":
$money = moeny +1
"talk":
$love = love+1
checkpoint:
python:
if money > 100:
renpy.jump("event1")
else:
renpy.jump("event2")Combination of jump allows you to repeats events. It's a basic math/algorithm matter more than programming.
- Spiky Caterpillar
- Veteran
- Posts: 253
- Joined: Fri Nov 14, 2008 7:59 pm
- Completed: Lots.
- Projects: Black Closet
- Organization: Slipshod
- Location: Behind you.
- Contact:
Re: Making story events in a Dating Sim/Stat Raising game
I can't think of any tutorials to recommend off the top of my head, sorry. As for declarations, Python functions go in an init python: block, callable labels and screens can go wherever you like.AERenoir wrote:Is that so? can you recommend me samples/tutorials to look at?
I'm still rather new at this. I can do basic Ren'py coding, but I'm not sure where to declare the stuff if I need to call them multiple times.
Vague, untested, and almost certainly buggy skeletal example using UI widgets:
Code: Select all
init python:
def set_activity(day, activity):
activities[day] = activity
sets_activity = renpy.curry(set_activity)
def draw_activitybutton(day, activity):
# It's its own function to make it easier to add consistent stylefluff if you later decide to.
ui.textbutton(activity, action=sets_activity(day, activity))
def draw_day(day):
ui.vbox()
draw_activitybutton(day, 'Lift')
draw_activitybutton(day, 'Stack Trilobites')
draw_activitybutton(day, 'Code')
draw_activitybutton(day, 'Troll')
ui.close()
def draw_dayplanner():
ui.vbox()
ui.hbox()
draw_day('Monday')
draw_day('Tuesday')
draw_day('Wednesday')
draw_day('Thursday')
draw_day('Friday')
ui.close()
ui.textbutton('Done',action=day_planned)
ui.close()
def day_planned():
return 1
label start:
python:
day = 32
label plan_day:
python:
activities = dict()
draw_dayplanner()
ui.interact()
$ today = 'Monday'
call do_day
$ today = 'Tuesday'
call do_day
$ today = 'Wednesday'
call do_day
label do_day:
if today in activities:
$ activity = activities[today]
else:
$ activity = 'do nothing in particular'
"On %(today)s, you %(activity)s." # Note oldstyle variable substitutions.
if day==33:
"It's the 33rd! You get a pie to celebrate."
$ day += 1
return
Nom nom nom nom nom LEAVES.
Re: Making story events in a Dating Sim/Stat Raising game
Ah, screens? What difference does it make from putting the codes in the main script?
Who is online
Users browsing this forum: No registered users
