A downloadable template

Download NowName your own price

Overview

This template is intended to make it easier to replace the default GUI of Ren'Py. The template has ripped out most of the GUI properties so that you are only left with the defaults, and simplifies styles so they are easier to understand and modify.

This template is also available to easily clone on GitHub!

Description

Whether you're new to Ren'Py screen language or very experienced, you've likely struggled against the default template, which is designed primarily around reskinning the defaults rather than modifying them. As a result, small changes to a default Ren'Py project can have a ripple effect on the rest of the styling of your project, and even experienced users often end up with a bunch of gui files and styles that go unused out of fear of breaking the game.

This template is designed to strip away the default project to its essentials without losing any of the visual structure - it's the most what-you-see-is-what-you-get code you'll find for Ren'Py screen language. Wherever possible, hidden or obtuse code is made explicit. If Ren'Py complains it can't find an image, that image is explicitly declared in the code somewhere and you can search your project for it. Screen relationships are overall decoupled, so if you want to style the main menu differently from the game menu, you won't find yourself accidentally messing up every screen in your game.

Instructions

Note: A slightly different set of instructions is included on the GitHub if you'd like to clone this project right into your own GitHub account as a separate project.

Download the project and unzip it to get a folder called EasyRenPyGui. Rename this folder to your project's title and put it in your Ren'Py project folder.

Next, open game/options.rpy and change the three values at the top (config.name, build.name, and config.save_directory) to something unique for your project.

You may also freely remove any files inside the optional files/ folder that you don't need, as they are all standalone and can be removed without consequence.

You can then start the Ren'Py launcher, launch your new game template, and begin adding to and modifying it.

Template Project Note

As of Ren'Py 7.7/8.2, Ren'Py also allows for the use of template projects when creating a new project. Easy Ren'Py Gui is set up to be a template project, with the following caveat: currently template projects require screens.rpy and gui.rpy to be present in the game/ folder. You can simply create blank files with these names inside EasyRenPyGui/game/. Then, so long as the EasyRenPyGui folder is in your Ren'Py project folder, it will be a template option when generating a new project. You can delete the blank screens.rpy and gui.rpy files in the new project.

Features

A complete list of features and changes is included in the README inside the template, or you can read it on GitHub. Some key features include:

  • Styles which previously had references to gui values in gui.rpy have had those values substituted directly into the styles that use them to make them easier to adjust
  • Screens have been reorganized into different files for improved organization
  • The remaining gui.rpy and screens.rpy code has been condensed down into one file, styles.rpy, which includes general styling and a few choice gui values to make it simpler to set up project-wide fonts and text sizes
  • The game_menu and main_menu screens do not share code
  • Menu screens do not organize their contents inside game_menu and use their own containers for easier modification
  • A few bonus files are added with features that are useful for new Ren'Py projects. Each is self-contained and can be removed if unneeded:
    • adjust_attributes.rpy with an Aliases class to simplify setup for config.adjust_attributes
    • afm_indicator.rpy with an auto-forward indicator that functions like the skip indicator, but for auto forward
    • confirm_action.rpy with a special CConfirm action to easily write confirm prompts and popups that only have one "Confirm" button
    • gallery.rpy with a basic gallery screen and declaration
    • mobile_input.rpy with an InputValue class and example code. You have to click into the input, and pressing enter dismisses the keyboard. Useful for mobile or screens with more than one input.
    • special_labels.rpy includes blank declarations for the splashscreen and after_load labels

Compatibility

This template is created for a 1920x1080 game resolution and is based off of the default game files generated for a game made with Ren'Py 8.2. It should also be compatible with 7.6/8.1. Earlier versions should pick up the 8.0 template from the GitHub Releases page. The template can be updated however you like to retain compatibility with older or newer versions of Ren'Py, and I will update it if there are any significant changes needed to work on modern Ren'Py.

You may also use the template for different project sizes, but you'll need to adjust more of the styles and screens at the start rather than relying on the initial values and layouts.

This template is also generally compatible with other tools like npckc's Caption Tool and Theo's Accessibility Add-On (may require some tweaks on the user's end to declare gui.preference versions of line spacing and text colour styles).

Terms of Use

You may:

  • Use this code in commercial and noncommercial projects
  • Modify and edit the code to suit your needs

You may not:

  • Resell all or part of the code as-is or sell it with modifications

Attribution can be credited as Feniks, with a link to either the page with this code or https://feniksdev.com

Final Notes

If you encounter any issues with this code, especially after an engine update, you can use the forums below to report the issue. Consider also checking out my other Ren'Py tools, linked on my profile: https://feniksdev.itch.io/

For more Ren'Py tutorials, check out my website https://feniksdev.com

Download

Download NowName your own price

Click download now to get access to the following files:

EasyRenPyGui.zip 261 kB

Development log