Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Easy Ren'Py GUI

A simplified Ren'Py template for easy GUI coding. 路 By Feniks

Need Support? Post here! Sticky

A topic by Feniks created Jul 27, 2023 Views: 539 Replies: 22
Viewing posts 1 to 8
Developer

If you're having trouble or run into any bugs with the code, post a comment here! I will try to get back to you within a few days.

Hey, thanks for this! Looking forward to using this template. Only thing I've noticed so far is that I can't seem to change the character name font/font size? No matter what I change it to, it seems to default to the values for dialogue.

Developer(+1)

Ooh, good catch! Looks like I missed adding that to the style. I've fixed it on GitHub, and I'll upload it again here shortly; in the meantime, you can see the fix here on lines 67-68: https://github.com/shawna-p/EasyRenPyGui/blob/main/game/screens/dialogue_screens...

If you're ever having trouble finding a style property (like the size of the font), don't forget you can hover over it and hit shift+i to get the Displayable Inspector! If you do so hovering over the name, it'll tell you that the size comes from style say_label, which you can then search the project for and find in the dialogue_screens.rpy file (which is where the fix went!).

Awesome, thanks! I didn't know about that, that's going to be really helpful. :)

Hi, I just started a new project with Easy Ren'Py GUI and I'm kind of confused on what I'm meant to do with the  config.save_directory

Developer(+1)

The save directory starts as None in the template, which means that Ren'Py will only save files inside the base game folder (and doesn't make an additional, "special" backup in AppData or similar - depends on the OS). You should give it a unique name so it can make that extra backup folder - typically, Ren'Py auto-generates this, but since this is a template, I can't auto-generate them for each new person who downloads it. So it's up to you to fill something out there. 

The name itself just has to be a string, but keep in mind it has to be unique, and probably shouldn't contain spaces or special characters to avoid problems. A typical save directory name, as noted in the comment above that config value, is something like "FreshProject-4689753165" (quotes included, it's a string). FreshProject is probably the name of your game - BaldursGate or ANightInTheWoods or whatever - and then the numbers can honestly be whatever; by default they're generated from the timestamp the project was created at so it's unique, but you'll have a fairly equal amount of making a unique name by just smashing together however many numbers you want.

This name isn't really visible to the player! It's just a special folder for saves and persistent info - they can find it if they need to, but it mostly exists behind the scenes as a backup for their saves. Basic rule is to use the name of your game with no spaces or special characters (so no &, exclamation marks, periods, etc), and then do a dash and just keysmash some numbers to the end of it. Once you've set it you should generally not change it. Hope that helps answer your question!

Alright cool, thank you very much! I'm sure this will help my first game along quite a bit

Hey, so sorry to bother you, I can't find where to change the main menu's hover text button's color to change it. I did the inspect thing but I don't understand where it is still. Thank you for your time and excellent tools and resources for renpy

Developer

No worries! So the main menu buttons just take the regular button style, in styles.rpy - style button and style button_text. Changing that will change all buttons that inherit from it, so if you want to just change the style on the main menu, I suggest you write style_prefix "mm" on the main_menu screen, and then your buttons will have the style style mm_button and style mm_button_text, which you can adjust however you like. You can also directly assign a style to a given button, e.g. textbutton _("Start") style "main_menu_btn" will make that button use the styles main_menu_btn and main_menu_btn_text. Hope that helps!

It did! Thank you! I managed to get it replaced with the main game color. I'm just trying to find where the link style is defined, and it will be done ^^

Hi there, thank you so much for this amazing template - it really makes things much easier!

However I'm having difficulty in using it to build a project in a language other than English. When creating a new project, its language should be the same as RenPy's language. Yet for this project, I create a new project in French and the language of the project is still English. 

The main language of this game would not be English, so I tried to add define config.language in options.rpy, but it didn't work. I'm pretty new to RenPy and am not sure how to fix this. Could you please give some advice?

Developer

As it's just a template, you'd need to change the text in the screens and script  to the language you want the project to be. Unfortunately the template system can't grab translated strings to replace when creating the project. I suggest you modify the template itself with your language changes so you can generate new projects with that as the base!

Thanks for your reply, I'll give it a try!

Would adding an outline to dialogue be different for this template than for non-template Ren'py projects? Trying to add one and it isn't working for whatever reason. Help appreciated

Developer

Generally you'll just add the outlines property to whichever style you need it for! This template does mean that doing something like gui.dialogue_outlines = ... will not work because the whole point is to avoid all those implicit gui-style properties. But if you want outlines for the dialogue text, you can add it to style say_dialogue, or for all text, to style default. In general, if you want to add a property to something, hover over it with your mouse and hit shift+i to find the style you need to add that property to.

Still stuck 馃様

^The result of this:

outlines ("#000000", 2)

Seriously don't know what's up. Or how to format the outlines property, anyways

Developer

Follow the examples in the docs: https://www.renpy.org/doc/html/style_properties.html#style-property-outlines

The standard is outlines [(1, "#000")] for example, which will be one outline, 1px wide, that's black.

ohhh thank you!

I haven鈥檛 changed anything to the code yet, but it keeps giving this error and I don鈥檛 know how to fix it and the text in the text box is aligned weirdly, but that only happens when a character is talking which I also don鈥檛 know how to fix pls help

Developer

This looks to me like you pasted the new files into an existing project - don't do that. It's a complete replacement. If you're on 8.2+ you can put this project into your Ren'Py project folder and then create a new game and select Easy Ren'Py Gui as the template.

I'm not sure if it's on renpy or your template file, but I recently discovered a bug that causes the first choice in an enumerate to start glitching out before resuming as normal.  This doesn't appear to happen in a normal renpy project.  As of writing, I tested it on both the stable release and the current nightly (8.3.4). This only happens on the nightly build but stable is working fine, at least for now. 

Developer (1 edit)

Can you elaborate? The choice screen in this template is the exact same choice screen as a regular default project, just with the styling made explicit. You'd need to share this new enumerate and animation code you're adding and ideally how you're testing. I believe I recently saw an issue relating to ATL on the Ren'Py GitHub as well which may be relevant.

(3 edits)

https://drive.google.com/file/d/1vKiHhnhVPRcAF_f98zCb3PUqa3fCgAM9/view?usp=drive...

here's a renpy project stripped of everything to make sure there's nothing else that might be the cause. 



transform enter(p=0.0):

    alpha 0.0

    pause p
    easein 1 alpha 1.0

transform leave:

    on hide:

        alpha 1.0

        easein 1 alpha 0.0

screen choice(items):

    style_prefix "choice"

    vbox at leave:

        for n, i in enumerate(items):

            textbutton i.caption action i.action at enter(n*0.75)


and code case you need it