Search found 1923 matches

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: 183

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: 56

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: 103

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: 106

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: 106

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: 106

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: 78

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: 83

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: 106

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: 115

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: 115

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...
by Ocelot
Sat Nov 26, 2022 10:05 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved]Noob question abt text outlines
Replies: 1
Views: 98

Re: Noob question abt text outlines

You can set an outlines style property together with size: https://www.renpy.org/doc/html/style_properties.html#style-property-outlines outlines - list of tuple of (int, color, int, int) This is a list of outlines that are drawn behind the text. Each tuple specifies an outline, and outlines are draw...
by Ocelot
Fri Nov 25, 2022 5:41 am
Forum: Ren'Py Questions and Announcements
Topic: Command to reset "renpy.random" results?
Replies: 2
Views: 111

Re: Command to reset "renpy.random" results?

Instances of RenPy random generator are specificaly designed to work together with rollback and provide reproducible determenistic results. The whole point of rollback is to restore state of the whole game including generator states. You could create new generator instances independent from global s...
by Ocelot
Thu Nov 24, 2022 6:47 pm
Forum: Ren'Py Questions and Announcements
Topic: Does Renpy 8 work fine with Windows 7 (64-bit)?
Replies: 6
Views: 182

Re: Does Renpy 8 work fine with Windows 7 (64-bit)?

RenPy is mostly backward-compatible. Aside from specific differences between Python 2 and 3 (like ones explained there https://www.renpy.org/doc/html/changelog.html#python-3-support-ren-py-8-0 ) or version-specific incompatibilities (documented here: https://www.renpy.org/dev-doc/html/incompatible.h...
by Ocelot
Thu Nov 24, 2022 5:23 pm
Forum: Ren'Py Questions and Announcements
Topic: Does Renpy 8 work fine with Windows 7 (64-bit)?
Replies: 6
Views: 182

Re: Does Renpy 8 work fine with Windows 7 (64-bit)?

RenPy uses a custom-built version of Python which runs on Windows 7. In theory, future versions of RenPy can drop Windows 7 support, like it dropped XP and 32-bit support, but in this case you can just not upgrade to the new version. Not to mention that this is unlikely to happen anytime soon.