Search found 2417 matches

by Ocelot
Sat May 11, 2024 6:16 am
Forum: Ren'Py Questions and Announcements
Topic: the number of dice and the modifier do not change the value
Replies: 3
Views: 138

Re: the number of dice and the modifier do not change the value

And as those are not global variables, you need to use SetScreenVariable instead. Or, even better: IncrementScreenVariable
https://www.renpy.org/doc/html/screen_a ... enVariable
by Ocelot
Sat May 11, 2024 3:46 am
Forum: Ren'Py Questions and Announcements
Topic: the number of dice and the modifier do not change the value
Replies: 3
Views: 138

Re: the number of dice and the modifier do not change the value

Your buttons are working fine and changing values as expected. There just a litlle thing to remember about screens: their code is constantly rerun. For example before each interaction, which happens to be after you press the button and it execute its actions. Mainly I am talking about this piece of ...
by Ocelot
Fri May 10, 2024 2:26 pm
Forum: Ren'Py Questions and Announcements
Topic: Screeen not Refreshing after Shift + R
Replies: 2
Views: 111

Re: Screeen not Refreshing after Shift + R

Besides, I suspect that "init" blocks might be not refreshable, because they run before all those game loads and reloads (meaning, they might be unaffected by reloads). Shift+R reloads make use of neat undocumented functionality which utterly restarts the game, including reloading and rer...
by Ocelot
Thu May 09, 2024 5:41 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Variable as a part of another variable's name?
Replies: 9
Views: 349

Re: Variable as a part of another variable's name?

1) You can use rp["bob"] in developer console to check specific variable you want.
2) You can use long command in developer console to switch to the long display mode. After that " rp " will show you full info instead of shortened data.
by Ocelot
Thu May 09, 2024 2:00 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Variable as a part of another variable's name?
Replies: 9
Views: 349

Re: Variable as a part of another variable's name?

The Pythonic way is to use dictionaries: default rp = { "linda": 0, "bob": 0, "rose": 0, "max": 0, } defaul num_random = 0 default cha_name = " " label question: Linda "Puppies are cute! Right?" menu: "Yes!": $ rp['linda'] += 1 $ ...
by Ocelot
Tue May 07, 2024 12:02 pm
Forum: Ren'Py Questions and Announcements
Topic: Binding keymap dynamically: Missing the key code
Replies: 1
Views: 97

Re: Binding keymap dynamically: Missing the key code

Not an answer, but collections of funny facts. 1) Look where clear_keymap_cache is documented. That's right, nowhere. It was undocumented sometime ago, since it was broken and didn't actually work in all cases. 2) Config variables are not saved. If you reload the game after changing keymap, it will ...
by Ocelot
Wed May 01, 2024 12:43 am
Forum: Ren'Py Questions and Announcements
Topic: Trouble Iterating Loop
Replies: 4
Views: 187

Re: Trouble Iterating Loop

ATL ≠ RenPy Script. It is another language. You can only use ATL statements in image definitions. Python statements are not part of ATL (with a good reasons), so you cannot do that.
by Ocelot
Mon Apr 29, 2024 2:47 am
Forum: Ren'Py Questions and Announcements
Topic: Making an imagebutton move from within python function
Replies: 10
Views: 348

Re: Making an imagebutton move from within python function

(Sidenote: I don't understand how your move_testcar function is supposed to work in the context of the game, but I assume that's due to it being edited for posting here.) I am pretty sure that the intention was to move through all points from path in order. Like animating moving through the city ma...
by Ocelot
Mon Apr 29, 2024 2:43 am
Forum: Ren'Py Questions and Announcements
Topic: Unsupported Locale Setting
Replies: 2
Views: 151

Re: Unsupported Locale Setting

In short: locales on windows are broken. Older versions were using non BCP47 language names, some only allows for hyphens instead of underscores in locale names, some combinations of settings set some globabl flags that setlocale cannot change, but are incompatible with some other locales. Windows 1...
by Ocelot
Sat Apr 27, 2024 6:50 pm
Forum: Ren'Py Questions and Announcements
Topic: How to use functions defined inside screen?
Replies: 4
Views: 257

Re: How to use functions defined inside screen?

That's the beauty of the undefined behavior: anything can happen. Even that incorrect code will work. While RenPy wants python functions to be defined during init phase, it does not take any additional steps to ensure that code that violates that principle won't work. Your callback simply didn't tri...
by Ocelot
Sat Apr 27, 2024 12:26 pm
Forum: Ren'Py Questions and Announcements
Topic: How to use functions defined inside screen?
Replies: 4
Views: 257

Re: How to use functions defined inside screen?

It is simple: you cannot.

Function definition should happen in init phase and Screen Language does not have any way to execute code in init phase.
by Ocelot
Fri Apr 26, 2024 3:55 pm
Forum: Ren'Py Questions and Announcements
Topic: Steam API functions other than achievements?
Replies: 6
Views: 322

Re: Steam API functions other than achievements?

It is hard to tell what exactly happens here, but is the steam support installed? Was the Steam integrated properly? Do achievements work?
by Ocelot
Fri Apr 26, 2024 8:35 am
Forum: Ren'Py Questions and Announcements
Topic: Should I be using imagemaps or imagebutton for an interactive flowchart (zooming, mouse navigation, etc)
Replies: 4
Views: 364

Re: Should I be using imagemaps or imagebutton for an interactive flowchart (zooming, mouse navigation, etc)

And that is exactly the problem. If you are applying zoom to the displayable with children, they would be zoomed automatically. All children are already drawn before zoom is applied and are transformed together with the displayable. See this: https://drive.google.com/file/d/1bOui-Sx_4HbgQQ3pgNRp87y6...
by Ocelot
Fri Apr 26, 2024 8:10 am
Forum: Ren'Py Questions and Announcements
Topic: Steam API functions other than achievements?
Replies: 6
Views: 322

Re: Steam API functions other than achievements?

Well, firstly you are doing it wrong. SteamAPI documentation states that Member functions for ISteamApps are called through the global accessor function SteamApps(). https://partner.steamgames.com/doc/api/ISteamApps So correct way to do that would be $ achievements.steamapi.SteamApps().InstallDLC(&q...