Script-writing and plot-branching
- PockieHoshi
- Regular
- Posts: 87
- Joined: Thu Sep 22, 2011 10:08 am
- Location: Between reality and a fictional realm
- Contact:
Script-writing and plot-branching
Sorry if this question sounds stupid but,
I was wondering,How do you go about making a branching,multi-pathed game on ren'py?
I mean its TOTALLY confusing ! I'm not exactly a genius at programming and coding things .
Also,Are there any codes for this? Any specific way of going about doing this?
Please explain it as simply as possible
Thank you!
I was wondering,How do you go about making a branching,multi-pathed game on ren'py?
I mean its TOTALLY confusing ! I'm not exactly a genius at programming and coding things .
Also,Are there any codes for this? Any specific way of going about doing this?
Please explain it as simply as possible
Thank you!
- Camille
- Eileen-Class Veteran
- Posts: 1227
- Joined: Sat Apr 23, 2011 2:43 pm
- Completed: Please see http://trash.moe
- Projects: the head well lost
- Organization: L3
- Tumblr: narihira
- Deviantart: crownwaltz
- itch: lore
- Contact:
Re: Script-writing and plot-branching
You'll want to read about menus, labels, and jumps as well as remembering user choices. That's about all you need to know in order to make a branching, multi-path game.
-
- Veteran
- Posts: 258
- Joined: Mon May 17, 2010 2:09 pm
- Completed: Alone
- Projects: Many failed ones
- Location: Massachusetts
- Contact:
Re: Script-writing and plot-branching
Having a game end in multiple ways is actually pretty easy. Yes, there's coding for ending a game, but you have to do all the work!
Here's a quick example:
What creates an ending is "return". That function ends the game. A game can have dozens and dozens of different endings. All you need is "return" where you want the game to end.
Here's a quick example:
Code: Select all
label start:
a "Hey let's get married!"
menu:
"Okay!":
jump married
"No!":
jump single
label married:
a "We got married!"
"Good Ending."
return
label single:
a "We didn't get married! A shame!"
"Bad ending"
return
Projects:
Alone- (Horror/Sci-Fi) Complete! Link
Demokratiya- (Adventure/Action) I'm kind of winging it with this one. Goal is 100,000 words. Yeah, it's gonna take a while.
{Last worked on Sept/28 : Word count (coding and all) ~4500}
Alone- (Horror/Sci-Fi) Complete! Link
Demokratiya- (Adventure/Action) I'm kind of winging it with this one. Goal is 100,000 words. Yeah, it's gonna take a while.
{Last worked on Sept/28 : Word count (coding and all) ~4500}
- PockieHoshi
- Regular
- Posts: 87
- Joined: Thu Sep 22, 2011 10:08 am
- Location: Between reality and a fictional realm
- Contact:
Re: Script-writing and plot-branching
I've just read up on both things and it actually seems pretty simple lol (^o^)/ Thank you!Camille wrote:You'll want to read about menus, labels, and jumps as well as remembering user choices. That's about all you need to know in order to make a branching, multi-path game.
Thank you so much for posting an example ! I think I sort of understand how to go about doing this now.cloudyssky wrote:Having a game end in multiple ways is actually pretty easy. Yes, there's coding for ending a game, but you have to do all the work!
Here's a quick example:
What creates an ending is "return". That function ends the game. A game can have dozens and dozens of different endings. All you need is "return" where you want the game to end.Code: Select all
label start: a "Hey let's get married!" menu: "Okay!": jump married "No!": jump single label married: a "We got married!" "Good Ending." return label single: a "We didn't get married! A shame!" "Bad ending" return
Thank you !
-
- Regular
- Posts: 36
- Joined: Wed Jul 06, 2011 11:23 am
- Projects: Tony T (Writer, programmer)
- Location: Under your chair >8D
- Contact:
Re: Script-writing and plot-branching
You could use a point system. With a variable like:
then girl1 has no points but if you add something like...
(Someone correct me if the code is wrong) But this means that girl1 now has +1 point
You could later put something on the lines of:
If anybody can correct me please do so... but that's the basic idea
Code: Select all
$ girl1_points = 0
Code: Select all
"girl1" "What to do...?"
menu:
"Do nothing":
girl1_points = +1
You could later put something on the lines of:
Code: Select all
if girl1_points = x:
jump girl1end
Bashing my head against the computer desk while programming since march 2011, and so far no brain damashii nanananananananana katamari damashii
- PockieHoshi
- Regular
- Posts: 87
- Joined: Thu Sep 22, 2011 10:08 am
- Location: Between reality and a fictional realm
- Contact:
Re: Script-writing and plot-branching
Point system ?gaoldart wrote:You could use a point system. With a variable like:
then girl1 has no points but if you add something like...Code: Select all
$ girl1_points = 0
(Someone correct me if the code is wrong) But this means that girl1 now has +1 pointCode: Select all
"girl1" "What to do...?" menu: "Do nothing": girl1_points = +1
You could later put something on the lines of:
If anybody can correct me please do so... but that's the basic ideaCode: Select all
if girl1_points = x: jump girl1end
I'd actually hadn't heard of that,thanks for mentioning it ^-^!
That actually looks alot simpler than the labels and such . (probably easier to code too)
So does it function similarly like the labels and jumps or is there some sort of difference between them?
Please explain it a bit more if you can (sorry if I'm asking for too much) .
Thank you! =]
-
- Regular
- Posts: 36
- Joined: Wed Jul 06, 2011 11:23 am
- Projects: Tony T (Writer, programmer)
- Location: Under your chair >8D
- Contact:
Re: Script-writing and plot-branching
Well for starters you have this: http://lemmasoft.renai.us/forums/viewto ... f=8&t=4205
And as far as i know, you still need the labels...
Please note that i was wrong is += 1 not = +1
And you continue there, later you can put up a road cone like:
The code adds to the points you put in the choice, but as a menuitem it still needs somewhere to jump to, so you need to put up a label for the choice.
You can also put it as part of the script so the points add thanks to the story. Just put them like you would put any line
It is still a bit more simple than to depend on flags...
If you get any problems, PM me and i might help you, unless you find a better answer, then i might need help from you
And as far as i know, you still need the labels...
Code: Select all
menu:
"Do nothing":
$ girl1_points += 1
jump nextscene
And you continue there, later you can put up a road cone like:
Code: Select all
if girl1_points >= 10:
jump goodend
else:
jump bad end
You can also put it as part of the script so the points add thanks to the story. Just put them like you would put any line
It is still a bit more simple than to depend on flags...
If you get any problems, PM me and i might help you, unless you find a better answer, then i might need help from you
Bashing my head against the computer desk while programming since march 2011, and so far no brain damashii nanananananananana katamari damashii
Who is online
Users browsing this forum: No registered users