Search found 2434 matches
- Sat Jun 01, 2024 10:11 am
- Forum: Ren'Py Questions and Announcements
- Topic: NameError despite the name being defined
- Replies: 8
- Views: 147
Re: NameError despite the name being defined
Everrything is written in documentation: https://www.renpy.org/doc/html/layeredimage.html You can do something like: init python: def adjust_avatar(attr): # remove stray attributes if nessesary attr = attr.difference({"lineart1", "lineart2", "lineart3"}) # maybe replace...
- Sat Jun 01, 2024 9:44 am
- Forum: Ren'Py Questions and Announcements
- Topic: NameError despite the name being defined
- Replies: 8
- Views: 147
Re: NameError despite the name being defined
What is the purpose of lineart == 5 on the last line and similar lines before? If you have mixed up comparison and assignment, then you cannot have assignment in the layered image body. If you want to automatically change lineart depending on value of skin, it is better done with a group and a bunch...
- Sat Jun 01, 2024 1:19 am
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED]Changing screenshots filename
- Replies: 8
- Views: 256
Re: Changing screenshots filename
1) Don't use default screenshot function, remove it from keymap
2) Create a function which will use current time to generate a filename and call renpy.screenshot with this filename
3) Make an invisible overlay screen with a key for taking screenshots bound to your screenshot taking function.
2) Create a function which will use current time to generate a filename and call renpy.screenshot with this filename
3) Make an invisible overlay screen with a key for taking screenshots bound to your screenshot taking function.
- Fri May 31, 2024 6:04 am
- Forum: Ren'Py Questions and Announcements
- Topic: [SOLVED] Writing more concise code
- Replies: 5
- Views: 158
Re: Writing more concise code
As it stands now it is pretty clear code. It is easily readable and you can change stuff easily. Anythin else would be unnessesary overcomplication. If you wish, you can delcare a constant store and make 2.5 and 0.7 named constants (if you have a lot of similar sequences and want pauses to be the sa...
- 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: 139
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: 151
- Tue May 28, 2024 2:35 am
- Forum: Ren'Py Questions and Announcements
- Topic: Python statement equivalent for the default statement
- Replies: 4
- Views: 296
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: 213
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: [SOLVED]What's the most efficient way to store variables?
- Replies: 19
- Views: 661
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: [SOLVED]What's the most efficient way to store variables?
- Replies: 19
- Views: 661
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: [SOLVED]What's the most efficient way to store variables?
- Replies: 19
- Views: 661
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: [SOLVED]What's the most efficient way to store variables?
- Replies: 19
- Views: 661
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: [SOLVED]What's the most efficient way to store variables?
- Replies: 19
- Views: 661
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: 360
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: 263
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()