Unlockable post-game content & Newgame+/NG+

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
OldGoateye
Newbie
Posts: 24
Joined: Fri Oct 09, 2015 4:31 am
Contact:

Unlockable post-game content & Newgame+/NG+

#1 Post by OldGoateye »

Hello, all! In the interest of making this as easily retrievable by further searches as possible, I may restate my questions several times; though I'm a long time Ren'py-er, it's solely for my amusement and that of a relatively small audience. In other words, I'm on a purely amateur/for fun basis, and had a question that you might all be able to help with; and it might be a good idea for other games, too!

Let's get right to the point:
  1. I want my game to have unlock-able content. On the first playthrough, all neutral and bad routes are unlocked and playable.
  2. Completing ANY route gives the player more dialogue options, as well as unlocking all good routes.
  3. Completing ANY good route colours most text choices to hint at the route they swing towards, and unlocks the true route.
  4. Finishing the true route allows different options at the very beginning of the game; not full playthroughs, but other perspectives.
For I: This is the base state of the game, accomplished through labels and choices.

For II: I believe I can accomplish this through a persistent variable that is set after the player reaches their first ending state. Something like -

Code: Select all

$ persistent.completed_once = True
With the following condition called before the game starts:

Code: Select all

if persistent.completed_once = True 

jump newgameplus
But this necessitates copying over a lot of the script into this label, which means more to edit; or using multiple script files. Does anyone have recommendations for a more elegant way of doing this?

For III: Colouring text for choices can be done easily enough by making my menu choices images, like so.

Code: Select all

menu: 

"{image=It kills me not being able to indent}":

"{image=That being said, I don't particularly think of myself as a good coder}":
Where every option is written in the same typeface, but the font colour has variations based on whether or not it branches towards a specific route.
In addition, the last route - a completely new story/label, is unlocked. Since I'm using colours pretty thematically, I'm hoping this will also make the true ending and it's immediate 'branch' fairly obvious for those still hunting around what's new, but who want to see the conclusion, since the colour doesn't correspond with any other theme in game so far. :mrgreen:

For IV: At the moment, the start pops up with a single-choice menu. Like so:

Code: Select all

menu:

"{image=Main path, narrator's perspective}":
After unlocking the true end ( persistent.true_end? ), a menu is called before it that looks something like this:

Code: Select all

if persistent.true_end = True 
menu:

"{image=Main path, narrator's perspective}":

"{image=Secondary character's perspective}":

"{image=Tertiary character's perspective}":

"{image=Antagonist's perspective}":
Where the last three call up their own short stories.


Whew! I think that's everything, feel free to call me out on if something won't work or can be done better; and naturally, if you feel like doing the same, go for it! :) Thanks so much!

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Unlockable post-game content & Newgame+/NG+

#2 Post by mobychan »

use [ code][ /code](without spaces) to show your code with correct indentations ;)

For II:
it's two equal signs in ifs:

Code: Select all

if persistent.completed_once == True 
You can just use this if everywhere you have changes, eg:

Code: Select all

"You see this in all playthroughs!"
if (persistent.completed_once == True):
    "You see this when you completed the game at least once!"

menu:
    "This option is always available!":
        #do something
    "This option is always available!":
        #do something else
    "This option is only available after you played through at least once!" if (persistent.completed_once == True):
        #do something special
For III I'm not sure what your question is?

For IV you can use if controlled options:

Code: Select all

menu:
    "This option is always available!":
        #do something
    "This option is always available!":
        #do something else
    "This option is only available after you played through at least once!" if (persistent.completed_once == True):
        #do something special

OldGoateye
Newbie
Posts: 24
Joined: Fri Oct 09, 2015 4:31 am
Contact:

Re: Unlockable post-game content & Newgame+/NG+

#3 Post by OldGoateye »

Oh, wow! Thanks for the quick reply! I actually signed up and thought, "I could've sworn there was a code quote here..."
Then I started looking at some of the other questions and noticed there was and I'd somehow missed it. Another reason I shouldn't post while tired, I suppose. :lol:
Anyway, thanks for both the response and the tip!

For II (and IV): D'oh! :oops:

For III:

A menu choice which would previously look like -
"Let's go roast s'mores!"

"Let's go roast hot dogs!"

"Let's go roast campers!"
Would look like -
"Let's go roast s'mores!" #Indicates this pleases people who someone who like the colour blue

"Let's go roast hot dogs!" #Indicates that this has no effect on anything

"Let's go roast campers!" #Indicates the player should consult their conscience/pleases people who like the colour red :lol:
Hopefully that helps put my plan into context. I'm glad to know I was on the right path; thanks a million!

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Unlockable post-game content & Newgame+/NG+

#4 Post by mobychan »

So it's basically like this?

Code: Select all

"{color=#00ff00}Green{/color}"

OldGoateye
Newbie
Posts: 24
Joined: Fri Oct 09, 2015 4:31 am
Contact:

Re: Unlockable post-game content & Newgame+/NG+

#5 Post by OldGoateye »

Ah, yes - does the color command work with menu choices?!
Neat, though I'm shocked the solution was so simple - and little embarrassed, ehehe!

(I'd considered using socketed images for choices due to an earlier idea I'd had, where bad ends drip blood or otherwise give off spooky omens, neutral ends have sparkles or the text fades slightly, and good ends have hearts around them.
I settled on colours because it seemed a gentle 'hint' as opposed to a sledgehammer.)

User avatar
mobychan
Veteran
Posts: 275
Joined: Fri Apr 24, 2015 6:31 am
Projects: The Chosen - Sakura Pink & Gentian Blue
Organization: Foresoft
Location: Germany
Contact:

Re: Unlockable post-game content & Newgame+/NG+

#6 Post by mobychan »

It will work with all texts, yes^^
If you want more options take a look at the documentation:
http://www.renpy.org/doc/html/text.html ... -text-tags

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot], piinkpuddiin