Search found 1927 matches

by Ocelot
Wed Dec 07, 2022 9:33 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Multilingual Audio is working—but only English text is showing now!
Replies: 3
Views: 65

Re: Multilingual Audio is working—but only English text is showing now!

Try to regenerate translation files and see if there are new entries for these lines. Maybe their ID changed because of some significant edit?
by Ocelot
Wed Dec 07, 2022 7:32 am
Forum: Ren'Py Questions and Announcements
Topic: Is Ren'Py's Screen Language similar to any other front-end framework?
Replies: 2
Views: 73

Re: Is Ren'Py's Screen Language similar to any other front-end framework?

I would say it is a pretty typical declarative markup language with some sprinkles like the ability to use Python in it. Compare this xml example from Android documentation: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout...
by Ocelot
Tue Dec 06, 2022 8:35 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Execute function on custom tags
Replies: 2
Views: 61

Re: Execute function on custom tags

You can use {a} tag for that. init python: def handle_alert_with_parameters(arg): param = arg.split('|') renpy.show_screen("alert", *param) config.hyperlink_handlers['alert'] = handle_alert_with_parameters # . . . cimo "What? I can't believe you love {a=alert:eroge|It is a Japanese genre of erotic v...
by Ocelot
Tue Dec 06, 2022 5:36 am
Forum: Ren'Py Questions and Announcements
Topic: Weird error trying to make a subroutine
Replies: 2
Views: 86

Re: Weird error trying to make a subroutine

First of all: you didn't have to read source, syntax for music/sound . play is documented: https://www.renpy.org/doc/html/audio.html#renpy.music.play Second: use keyword arguments, it lets you not repeat default value over and over. After that is out of the way to your problem. First of all, im is i...
by Ocelot
Sat Dec 03, 2022 8:18 am
Forum: Ren'Py Questions and Announcements
Topic: attrgetter inventory problem in Renpy 8?
Replies: 3
Views: 208

Re: attrgetter inventory problem in Renpy 8?

Why do you use a list of a single element instead of directly using variable?
by Ocelot
Sat Dec 03, 2022 8:15 am
Forum: Ren'Py Questions and Announcements
Topic: How to make the parameter what_font in define character() change with the language
Replies: 2
Views: 83

Re: How to make the parameter what_font in define character() change with the language

Instead of providing what_font, what_size and other style parameters, I would just define a style for this character text and pass it in what_style argument. Then I would use style tranlations to change styles depending on language.
by Ocelot
Fri Dec 02, 2022 3:09 pm
Forum: Ren'Py Questions and Announcements
Topic: Creating a glossary page. Better way of doing it?
Replies: 3
Views: 134

Re: Creating a glossary page. Better way of doing it?

No, you don't have to use multiple text displayables. Here is an example: https://i.imgur.com/zFWEQsg.png That defines a single string (I used triple quoted string so I can use line breaks naturally). It is then is displayed by text displayable in viewport. Text does have some limits, as it didn't l...
by Ocelot
Tue Nov 29, 2022 2:33 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] isinstance(var,str) always returning False
Replies: 6
Views: 130

Re: isinstance(var,str) always returning False

Try to check for (str, pystr, future.utils.text_type) - that's it, tuple of three types. IIRC RenPy replaces standard string as part of Python3 compatibility fixes.

If it works, figure out concrete type you want. My bet is on pystr.
by Ocelot
Tue Nov 29, 2022 2:00 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] isinstance(var,str) always returning False
Replies: 6
Views: 130

Re: isinstance(var,str) always returning False

Are you on RenPy 7.5 by any chance?
by Ocelot
Tue Nov 29, 2022 1:27 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] isinstance(var,str) always returning False
Replies: 6
Views: 130

Re: isinstance(var,str) always returning False

How do you call that function?
And try to print actual object class before checking it. Then look in console to see what do you have. If you ever see something strange, usually you want to add a ton of print statements displaying everything you might need about processes that happen inside.
by Ocelot
Tue Nov 29, 2022 8:14 am
Forum: Ren'Py Questions and Announcements
Topic: How to make a screen of a list in a class object
Replies: 1
Views: 101

Re: How to make a screen of a list in a class object

Code: Select all

self.traits = [renpy.random.sample(TRAITS, 2)] 
sample returns a list. You are wrapping it in another list.
by Ocelot
Mon Nov 28, 2022 8:20 am
Forum: Ren'Py Questions and Announcements
Topic: Variable prefix for setting debug screen text properties?
Replies: 2
Views: 103

Re: Variable prefix for setting debug screen text properties?

Those are for translating launcher itself, not for use in normal projects.
by Ocelot
Sun Nov 27, 2022 4:06 am
Forum: Ren'Py Questions and Announcements
Topic: Android game over 2gb
Replies: 2
Views: 121

Re: Android game over 2gb

Here how it is done in other games: * Get write permissions * On startup check for existence of all files in some directory. * If not all files are present, put up a nice "Downloading data" screen. * Download missing files from your own server (not Google) * Restart the game. * Load files from exter...
by Ocelot
Sat Nov 26, 2022 12:39 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Calling a label/screen from 2 different files
Replies: 4
Views: 126

Re: Calling a label/screen from 2 different files

If you originally make your screen in a way that allows further additions (by dynamically creating buttons following description in some list, for example, like in my by-chapter game), you can control that. If not, you cannot. Alternatively, you can simply replace a single file containing that scree...
by Ocelot
Sat Nov 26, 2022 10:54 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Calling a label/screen from 2 different files
Replies: 4
Views: 126

Re: Calling a label/screen from 2 different files

From the game point of view there are no individual files. Game behase as if all files were pasted together in one large script. If you structure your game right to accept additional data and change its behavior based on that, you can do it. For example, in this thread I posted an example of game yo...