Search found 2430 matches
- Thu May 30, 2024 2:55 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Is it possible to have a flattened copy of a layered image respect the layered image attributes?
- Replies: 3
- Views: 83
Re: Is it possible to have a flattened copy of a layered image respect the layered image attributes?
I think Flatten just takes the image with its default parameters and creates a single texture: It takes parameters you provide. Flatten("character angry glasses") should work as expected, for example. I don't know what is the problem with transparency. Could Transform() with alpha work? (...
- Wed May 29, 2024 1:25 pm
- Forum: Ren'Py Questions and Announcements
- Topic: how to make in-game cmd?
- Replies: 1
- Views: 123
- Tue May 28, 2024 2:35 am
- Forum: Ren'Py Questions and Announcements
- Topic: Python statement equivalent for the default statement
- Replies: 4
- Views: 275
Re: Python statement equivalent for the default statement
Well, python is not best known for information hiding and in Ren'Py you don't even get module (file) variable scope. So I'm packing everything in objects. This way I can get an okey'ish separation. Technically RenPy already does this. It hides everything related to engine itself and gives you acces...
- Sat May 25, 2024 1:33 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Rolling back array
- Replies: 4
- Views: 197
Re: Rolling back array
Can't say without looking at the code. The simplest explanation would be that maze array is not declared using default, but I suspect that it could be something more nuanced.
- Thu May 23, 2024 5:29 pm
- Forum: Ren'Py Questions and Announcements
- Topic: What's the most efficient way to store variables?
- Replies: 19
- Views: 625
Re: What's the most efficient way to store variables?
This is why I've never understood why people choose to code in things like C which are almost impossible to understand without a degree in computer science and a manual the size of War and Peace, when there's no reason code written in any other simpler language couldn't compile down to exactly the ...
- Thu May 23, 2024 9:31 am
- Forum: Ren'Py Questions and Announcements
- Topic: What's the most efficient way to store variables?
- Replies: 19
- Views: 625
Re: What's the most efficient way to store variables?
In most compiled languages variable names do not exist in final binary (function and by proxy class names often still exist in debug info, if included). It a convenience for a programmer, names given to arbitrary memory areas before they are discarded and transformed into bunch of memory adresses an...
- Thu May 23, 2024 8:07 am
- Forum: Ren'Py Questions and Announcements
- Topic: What's the most efficient way to store variables?
- Replies: 19
- Views: 625
Re: What's the most efficient way to store variables?
One way I've always done this - especially in older programs on computer systems with little memory (16K in the 80s, for example), was to store answers in a single text string. This uses way less memory than allocating memory space for separate variables, and allows for 10 different answers to each...
- Thu May 23, 2024 6:10 am
- Forum: Ren'Py Questions and Announcements
- Topic: What's the most efficient way to store variables?
- Replies: 19
- Views: 625
Re: What's the most efficient way to store variables?
Because those are two ways to approach the problem. You pick one and use it. Either question names or numbers. Dictionary or list.
You can add more to the list later, but it wouldn't be so trivial. If you exspect number of questions to change, I suggest dictionary approach.
You can add more to the list later, but it wouldn't be so trivial. If you exspect number of questions to change, I suggest dictionary approach.
- Thu May 23, 2024 4:07 am
- Forum: Ren'Py Questions and Announcements
- Topic: What's the most efficient way to store variables?
- Replies: 19
- Views: 625
Re: What's the most efficient way to store variables?
1) You are overthinking it. Unless you have tens of thousands of unused variables you don't even have to consider perfomance impact. Namespace pollutuion could be the problem when you accidentally reuse variable name because there are so many of them. 2) Instead of having 100 individual variables, u...
- Thu May 23, 2024 3:50 am
- Forum: Ren'Py Questions and Announcements
- Topic: Outlining only certain text in dialog
- Replies: 7
- Views: 339
Re: Outlining only certain text in dialog
Be aware that adding transparent outline to the text will increase letter spacing.
If you do not want that, then giorgi1111 has the link that can help you (second to last message in that thread)
If you do not want that, then giorgi1111 has the link that can help you (second to last message in that thread)
- Wed May 15, 2024 2:58 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Help with in-screen audio player issues (restarting music, unable to truly 'pause') [SOLVED]
- Replies: 7
- Views: 249
Re: Help with in-screen audio player issues (restarting music, unable to truly 'pause'))
Code: Select all
changed playSignal()
Code: Select all
$ x = playSignal()
changed x
Code: Select all
$ playSignal()
changed None
TL;DR:
Remove () from playSignal()
- Wed May 15, 2024 12:39 pm
- Forum: Ren'Py Questions and Announcements
- Topic: How to replicate the id generated by Ren'Py?
- Replies: 1
- Views: 177
Re: How to replicate the id generated by Ren'Py?
Long story short, it is generated from current label name, hash of line contents and potentially a number if ID collides with any other previous ID.
Relevant code is here:
https://github.com/renpy/renpy/blob/8f2 ... __.py#L297
Relevant code is here:
https://github.com/renpy/renpy/blob/8f2 ... __.py#L297
- Wed May 15, 2024 12:27 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Help with in-screen audio player issues (restarting music, unable to truly 'pause') [SOLVED]
- Replies: 7
- Views: 249
Re: Help with in-screen audio player issues (restarting music, unable to truly 'pause'))
I think it may be an issue with me running the $ playSignal() command in my screen, and why it's restarting every time. However, I want the tracks to change in real time with the slider, so I need something there that tracks and changes what is playing, which is what that function does. Your functi...
- 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: 254
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
https://www.renpy.org/doc/html/screen_a ... enVariable
- 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: 254
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 ...