Customizing Ren’Py: Part 3: Style Inspector and Overriding Styles


Working with Ren’Py:

Advanced Ren’Py:

Customizing Ren’Py:

Ren’Py + Python:

Ren’Py is a engine for creating visual novels. It comes with a suite of tools for taking code and transforming it into programs that can be run on Windows, Mac, Linux, and even, with a little more work, mobile platforms like Android and iOS.

Beyond the showing of text and images, Ren’Py can also be extended through introducing new user interface elements, changing its defaults images, and combining Python with its own code to create even more interactive projects.


Style Inspector

Screenshot 2018-07-18 08.56.09

When starting projects with the Ren’Py Launcher, the Style Inspector can be opened at any point by pressing SHIFT+I on the keyboard.

The Displayable Inspector listing will show the current screen, its components, and their size, style, and location where they are defined in the project’s files.

Screenshot 2018-07-18 09.02.19

When clicking on style in the listing, the Style Inspector will show the current properties and any defaults.

Screenshot 2018-07-18 09.04.00

Clicking on the Location will open the selected editor to the location of the definition in the file.


Overriding Styles

Screenshot 2018-07-18 09.37.05

As the Style Inspector shows, all displayables have style and properties based on options defined in gui.rpy. However, as with much of Ren’Py, these styles can be overridden in order to customize the colors and layout of different elements.

Screenshot 2018-07-18 09.40.56

Creating a new files called “custom_styles.rpy” (or other name) and adding styles with the same name as existing ones will override them. Using the Style Inspector to examine and find the exact style to override can help in crafting a different user interface experience.

Screenshot 2018-07-18 09.42.55