Hi! I compiled this easy first time Ren'py making slideshow that will walk you through the bare basics of making a game in Ren'py. Adding text, a background, and character sprites as well as introducing simple menu choices, while they don't go into variables at the moment its a good base start for anyone interested in creating VNs.
It has some very basic video tutorials and are also broken down in their own slides with examples!
So You Wanna Make A Ren’py Game? The Basics
Link to the slideshow! Go forth and create!
I also plan to make more of these in varying degrees of complexity for more GUI customization and menu choices , ya know the likes.
has anyone every documented a solid way to make talking sprites in renpy from scratch? I'd like to accomplish whatever this guy has going on, but I'm still too new to programming to understand what he's doing 😭
does anybody here know how to help me with my ren'py project. i do not have reddit and i am reluctant to get it just so i can ask how to do this and get zero replies. more details below the cut cos its gonna be long
so, in my game, there's a section near the beginning where you'll be given a "contract of hire," and basically just a cute way of me asking the player their name and pronouns.
i'm using Feniks' customizeable pronoun pack for ren'py, and it's exactly what i want. but i don't know how to a.) add image buttons that look different when they're checked/unchecked and also idle/hover . ok. the thing that someone said about naming ur image smth like
sheher_selected_hover (and sheher_selected_idle) was helpful but i havent tried it yet so idk if it would work.
b.) i want u to be able to check multiple, if u want. and theres a built in screen for custom prns and terms so i want those check boxes to like. take you to those screens. ig
and ofc i'll add a "done" button and stuff but i figured thats gonna be wayyyy easier than trying to do this.
THOSE WHO HAVE UPLOADED REN’PY GAMES TO ITCH.IO I RECQUIRE HELP PLEASE
I uploaded a game using RenPyWeb and when I click the play button on its itch.io page it just stays on the Downloading screen.
Does anyone have some advice for what I can try? (I would prefer the game to be played in browser because I don’t want people to have direct access to all of the files.)
I’m not sure why it skewed my frame? And while I know I could totally remove the chibi on the far right, I already spent way too much time making it so uh if anyone can help I’d really appreciate it!
A common issue I've seen in Ren'Py's discord channel is adding conditions to menus and choices. I've decided to make a quick tutorial on this subject to help others and provide a quick reference. Please note, it is highly recommended that you know Ren’Py basics to use this tutorial. In this document, we’ll be talking specifically about flags and menus, so make sure to read up on that if you’re not familiar! The link will talk briefly about what’s below, but if you’d like a more in-depth talk about conditional menu choices, please continue reading!
What are Conditional Menu Choices?
Conditional Menu Choices are choices that appear only if the player has fulfilled certain conditions. Using these, we can lock a player from seeing a menu choice based on choices they've made before. How can we use this? By adding our flag/variable/condition directly onto our choice! Just like using "if" normally, we can use "if" to determine what options are shown to the player.
Adding Conditions to Menus
Here is the correct syntax for adding choices to menus.
menu: "Join the Art Club." if art_club: jump join_artclub "Join the Music Club." if music_club: jump join_musicclub "Join the Programming Club." if programming_club: jump join_programmingclub "Join the Writing Club." if writing_club: jump join_writingclub
Note how the format is
"Choice item." if variable:
In the above example, you can see the choices if art_club, music_club, programming_club, and writing_club are True. In practice, this would be used if you allow the player to visit a few different clubs and then choose which one to join. In this case, you’d only allow them to join clubs they have visited (or otherwise, if they have seen scenes that would mark these variables as True). However, this also works if you'd like to use string variables. For example,
"Ask Eileen on a date." if status == "single":
That choice will show up if your variable "status" is set to "single".
Point Value Conditions
Let's say you'd like a choice to only be available if you have a certain number of points. I'll post a full example code and then explain it.
$ eileen = 0 menu: "I think you're cute.": $ eileen += 10 e "I think you're cute too!" "So... Nice weather, huh?": e "Yeah!" #Later... e "Do you like me?" menu: "I love you!" if eileen >= 10: e "Really? I love you too!" jump eileen_route "I like someone else.": e "Oh, I understand." jump lucy_route
The first thing we do is establish "eileen" as a variable. We want to do this as close to our start label as possible so we don't forget!
Next, we create a choice. By complimenting Eileen, we get 10 eileen points. This doesn't come into play until later, but it's important to keep track. The game continues as normal from here on out.
Finally, you get another choice. In order to tell Eileen you love her, your points with her must be 10 or above. If you do not have at least 10 points, you can’t confess to Eileen, and will only be shown the “I like someone else” option.
Removing Choices
Finally, this is helpful if you'd like to let the player visit several areas before finally continuing the story. In the below example, we're letting the player visit three places in any order, but hiding the location if they've already been there.
$ town = False $ garden = False $ cafe = False menu visiting_places: "Go to town." if not town: "I went to town." $ town = True jump visiting_places "Go to the garden." if not garden: "I went to the gardens." $ garden = True jump visiting_places "Go to the cafe." if not cafe: "I went to the cafe." $ cafe = True jump visiting_places label after_visiting: "This text will show up once you have visited every choice, because it skips the menu and goes to the next available label."
You can continue the story however you want from there! Because you can jump to menus, you can jump to a scene in each area before jumping back to the menu again.
"Go to town." if not town: jump town_scene
Above will work, as long as your town_scene ends with $ town = True and jumps back to "visiting_places".
I hope this has been helpful! I’d like to continue documenting and explaining common issues I come across in the Ren’Py discord, so if this has been helpful please let me know. Thanks for reading, good luck everyone!
A Quick and Dirty Guide to In-Game Achievements in Ren’Py
Disclaimer: I just barely figured this out myself. It may not be the best way to do it, I don’t know. But I had an awful time trying to find any help with constructing the actual screen to display achievements, so I want to share what little I do know! Also, this is only regarding in-game achievements, and will NOT sync with Steam. Also, my intention here is NOT to give you a complete template, it’s just to help you get started with a very rough base to customize.
So, with that in mind, here’s my quick step-by-step guide.
I’ll put this under a read more, since there are images that make it kind of long.
Step One: Designate the Achievements
First, you need to tell Ren’py what achievements there are and when to assign them to the player. This is the easy part! For right now, everything I’m talking about goes in the script.rpy file.
So, here’s my test game file.
You’ll notice I’m not actually using the achievement.grant function. I’ll be entirely honest - I’m not sure how to make that work. But unless you’re releasing a game on Steam, you don’t really need to use achievement.grant. My intention here was simply to build an internal achievement system, so setting persistent data works just fine.
You should probably also include an alert to show the player that they did indeed get an achievement. There are different ways to do this and it’s really up to you. But in my test game for right now, I’m using a text screen like this:
So, now the achievements and alerts are in place. The only thing left to do is set up a page to display what achievements the player has and has not collected.
Step Two: Setting Up the Menu Page
Open up your screens.rpy file now. First, look for screen main_menu(). Under that screen you’ll find the code for the menu you see upon starting up the game. Add textbutton "Achievements" action ShowMenu("achievements") somewhere in that list.
That adds a button to view the achievement gallery, accessible from the main page. You can name it whatever you want.
Next, scroll down and paste this code (which I grabbed off of the Ren’py documentation for making an art gallery, and modified into this) basically anywhere:
init python:
# Step 1. Create the gallery object.
g = Gallery()
# Step 2. Add buttons and images to the gallery.
# A button that contains an image that automatically unlocks.
g.button("ACHIEVEMENT_NAME")
g.condition("persistent.ACHIEVEMENT_NAME")
g.button("ACHIEVEMENT_NAME")
g.condition("persistent.ACHIEVEMENT_NAME")
screen achievements:
# Ensure this replaces the main menu.
tag menu
# The background.
add "BACKGROUND"
# A grid of buttons.
grid 3 1:
xfill True
yfill True
# Call make_button to show a particular button.
add g.make_button("ACHIEVEMENT_NAME", "ACHIEVEMENT_NAME", xalign=0.5, yalign=0.5)
add g.make_button("ACHIEVEMENT_NAME", "ACHIEVEMENT_NAME", xalign=0.5, yalign=0.5)
textbutton "Return" action Return() xalign 0.5 yalign 0.5
Here’s what it looks like in my code, properly indented:
And here’s what that looks like when I open the game and go to the achievements gallery:
I didn’t want to spend time making graphics for this yet, since I was just trying to get the code to work, so I made some quick placeholder icons and threw in a background from Love Stomp for testing.
This will also look way better if you have more than 2 achievements, of course. I only had 2 for testing purposes, so I made the grid just 3 1. I’d recommend making it 3 3 - meaning 3 squares (including the “return” button) per row and 3 rows. Also note that Ren’py kind of breaks if you don’t fill up the whole grid.
Almost done now! The last thing to do is make sure the images will change from locked to unlocked when the player gets the achievement. Time to go back to the script.rpy file!
Step Three: Setting the Condition Switches
Condition switches basically do exactly what it sounds like they do - they switch an image out based on whether a certain condition is met. So, if you define each achievement image using a condition switch...
...you can set two images under that name. The first thing in quotation marks is the variable that I want the game to examine to determine which image to show. The first image (redachieve.png) is the image I want it to show when the achievement is unlocked. The second image, after “True”, is the image that will show when the player has not yet unlocked the achievement. You’ll need to set these condition switch images for each achievement.
So now, in my test game, I’ve gotten the “picked red” achievement but not the “picked birds” achievement, and the achievement page looks like this:
And there it is - a functional achievement system. The game will remember this information even after the player quits. It’ll be there basically forever - at least until the persistent data is deleted.