Search found 162 matches

by MaydohMaydoh
Wed Jul 08, 2020 12:48 pm
Forum: Ren'Py Questions and Announcements
Topic: Translating a font for everything
Replies: 7
Views: 117

Re: Translating a font for everything

The translate_font function only seems to be for configuring translations in the launcher, not games.
As for the other way, the style for the choice button should be "choice_button_text" I would think.
by MaydohMaydoh
Sat Jul 04, 2020 11:19 am
Forum: Ren'Py Questions and Announcements
Topic: I can't load slots on one of my load screens
Replies: 2
Views: 99

Re: I can't load slots on one of my load screens

It's because of the screen name and the FileAction action. FileAction checks if the screen name is "load" and returns the FileLoad action else it returns the FileSave action. if renpy.current_screen().screen_name[0] == "load": return FileLoad(name, page=page, **kwargs) else: return FileSave(name, pa...
by MaydohMaydoh
Sat Jul 04, 2020 4:05 am
Forum: Ren'Py Questions and Announcements
Topic: Procedurally unlock menu options
Replies: 4
Views: 149

Re: Procedurally unlock menu options

Out of curiosity, I decided to mess around with a choices screen to see what can be done. Probably worse than doing it that other way but it works so far. screen unlock_choices(items): style_prefix 'choice' default controls = {} default sensitive = True ## Create a dict of item controls for i in ite...
by MaydohMaydoh
Fri Jul 03, 2020 5:45 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] How do you get the attribute (?) of an item?
Replies: 10
Views: 194

Re: How do you get the attribute (?) of an item?

First of all, self.fruit = False is wrong. This will set fruit attribute to false even if you set it to true when creating the object. Should be self.fruit = fruit. Second If hasattr(item,’fruit’) == True: $ Jump(“eatfruit”) is only checking if the attribute exists, which will return true for all of...
by MaydohMaydoh
Fri Jun 26, 2020 9:12 pm
Forum: Ren'Py Questions and Announcements
Topic: [solved] Having the main menu music not loop?
Replies: 3
Views: 280

Re: Having the main menu music not loop?

what is your code so we can help you better As it's related to the main menu, probably using the config.main_menu_music variable. So doing what Ray mentioned and using the before_main_menu label, (I can't remember what the no loop comment is, but it should be somewhere in the docs) label before_mai...
by MaydohMaydoh
Thu Jun 25, 2020 1:54 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]positioning menu lables so they are centered
Replies: 5
Views: 308

Re: positioning menu lables so they are centered

Labels are text within a container, so you need to move the label itself, not the label text.

Code: Select all

style game_menu_label:
    xalign 0.5
That should position the label at the centre.
Don't forget to remove the positional properties from the label text style.
by MaydohMaydoh
Sun Jun 21, 2020 5:55 pm
Forum: Ren'Py Questions and Announcements
Topic: Loading different Multi-game Persistence files
Replies: 2
Views: 183

Re: Loading different Multi-game Persistence files

Init blocks load when renpy starts up, so the init blocks in your menu are running at the very start. And because multi-persistents have to be loaded during init, you should load both and then have the user pick one: init python: mp1 = MultiPersistent("pt1Slot1") mp2 = MultiPersistent("pt1Slot2") mp...
by MaydohMaydoh
Thu Jun 18, 2020 5:55 pm
Forum: Ren'Py Questions and Announcements
Topic: Layered Images and Variables
Replies: 2
Views: 212

Re: Layered Images and Variables

I don't think you can set variables within layered images. Couldn't you just use the outfit variable to check the outfit? Instead of checking if $ towel is true or false, you could just check if $ outfit is 1. As for the new towel thing, you could use a condition switch for the image image towel = C...
by MaydohMaydoh
Wed Jun 17, 2020 5:55 pm
Forum: Ren'Py Questions and Announcements
Topic: Is it possible a texbutton with two colors? Doesn't work the hover color!
Replies: 3
Views: 210

Re: Is it possible a texbutton with two colors? Doesn't work the hover color!

Not sure if there's a good way to do this but you could use the hover unhover to set a text variable default button_text = "{color=#ff5a7d}DON'T{/color}" textbutton "Please, [button_text] choose me" action Return("continue") style "colorfulbutton": hovered SetScreenVariable('button_text', "DON'T") u...
by MaydohMaydoh
Thu Jun 11, 2020 11:51 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Textbutton set variable instead of jumping label?
Replies: 1
Views: 153

Re: Textbutton set variable instead of jumping label?

You'll want the SetVariable action https://www.renpy.org/doc/html/screen_a ... etVariable

Code: Select all

textbutton "blue" action SetVariable("color", "Blue")
by MaydohMaydoh
Wed Jun 10, 2020 4:13 pm
Forum: Ren'Py Questions and Announcements
Topic: Weird inconsistent error when displaying information with square brackets
Replies: 12
Views: 309

Re: Weird inconsistent error when displaying information with square brackets

Renpy creates defined variables during the init stage and defaulted variables when the game starts.

Also from what I can see, your problem is caused by the character definition, not the interpolation. Dynamic shouldn't be set to True.
by MaydohMaydoh
Sat Jun 06, 2020 9:30 am
Forum: Ren'Py Questions and Announcements
Topic: Bar value not updating (Solved)
Replies: 4
Views: 225

Re: Bar value not updating

Works for me when accessing the attributes directly. screen mc_hp_screen: vbar value FieldValue(player, "mc_hp", 100): xalign 1 yalign 0.008 xmaximum 70 ymaximum 65 left_bar Frame("gui/hearthealth0.png", 100, 0) right_bar Frame("gui/hearthealth.png", 100, 0) text "[player.mc_hp] / [player.mc_max_hp]...