Search found 115 matches

by rames44
Fri Apr 19, 2019 12:36 pm
Forum: Ren'Py Questions and Announcements
Topic: Using variables in dialog that need captialisation
Replies: 5
Views: 90

Re: Using variables in dialog that need captialisation

If you’re willing to add annotations, a custom text tag might work “{cap}[nickname]{/cap}”

https://www.renpy.org/doc/html/custom_text_tags.html
by rames44
Thu Apr 18, 2019 3:51 pm
Forum: Ren'Py Questions and Announcements
Topic: Using variables in dialog that need captialisation
Replies: 5
Views: 90

Re: Using variables in dialog that need captialisation

Well, Python strings have a capitalize() method that will convert the first character of a string to upper case. https://www.geeksforgeeks.org/string-capitalize-python/ The trick is to use Pythonic "stuff" in say statements. I came up with one VERY ugly way of doing it: define e = Character("Eileen"...
by rames44
Thu Apr 18, 2019 3:35 pm
Forum: Ren'Py Questions and Announcements
Topic: Console: OverflowError thrown when trying to open console
Replies: 5
Views: 113

Re: Console: OverflowError thrown when trying to open console

I think this is the one I used to fix this: config.console_history_size: the number of commands to store in history. default: 100 Found this in 00console.rpy As I recall, I tossed config.console_history_size=1 into my options.rpy , launched the app, opened the console and did something, then shut do...
by rames44
Thu Apr 18, 2019 12:33 pm
Forum: Ren'Py Questions and Announcements
Topic: Console: OverflowError thrown when trying to open console
Replies: 5
Views: 113

Re: Console: OverflowError thrown when trying to open console

I had this happen once. I think this can happen if your console gets overwhelmed with content, since the console tries to save previous lines. Basically, if you have a series of errors that generate a lot of lines of output, you can overwhelm an array somewhere, I think. As I recall, the way I got o...
by rames44
Thu Apr 18, 2019 12:22 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]Call a label when a variable changes
Replies: 2
Views: 72

Re: Call a label when a variable changes

Rather than directly updating the value, why not call a function to update it and do the checks at the same time?
by rames44
Mon Apr 08, 2019 6:14 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Game saves from previous versions when adding new variables
Replies: 5
Views: 136

Re: Game saves from previous versions when adding new variables

If your game defines a label called “after_load”, Ren’py calls it after loading all the data from a save, but before executing any statements after the point where the save occurred. So you have access to all the data, and can make any changes you need to. When you “return”, then Ren’py resumes the ...
by rames44
Mon Apr 08, 2019 11:45 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Game saves from previous versions when adding new variables
Replies: 5
Views: 136

Re: Game saves from previous versions when adding new variables

There are a couple of aspects to this. First, if necessary, you can use “after_load” to fix up an old save in a new game. Store a variable that will tell you what version of the game created the save, and you can write “conversion code” if necessary. Second, and this is just personal style, I try to...
by rames44
Tue Apr 02, 2019 12:08 pm
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] About Play video only once and Skip button, how?
Replies: 8
Views: 170

Re: About Play video only once and Skip button, how?

If you set up an “image” to reference your movie file, you can use renpy.seen_image(the_movie_image) to determine if the user already has seen the movie or not. You could use a screen that shows the movie image, optionally shows the “skip” button, and takes a duration. Call the screen with the movie...
by rames44
Sat Mar 30, 2019 12:43 pm
Forum: Development of Ren'Py
Topic: define setlclvar = SetLocalVariable (un expected result)
Replies: 3
Views: 204

Re: define setlclvar = SetLocalVariable (un expected result)

The concept of “pure” in Ren’py is “if called with the same inputs, you’ll always get the same output.” It implies that the item (function/object/whatever) doesn’t have any internal state that affects its behavior. I know that PyTom uses that information (pure or not) as an optimization when doing t...
by rames44
Thu Mar 28, 2019 11:49 am
Forum: Ren'Py Questions and Announcements
Topic: How to check if a program is running/ on computer.
Replies: 1
Views: 71

Re: How to check if a program is running/ on computer.

First, this sounds like a very invasive thing to be doing. However, this is almost certainly going to require platform-specific code. To determine if something is installed, well, you could look to see if the files are in the expected place. Checking to see if something is actually running is harder...
by rames44
Wed Mar 27, 2019 12:19 pm
Forum: Development of Ren'Py
Topic: define setlclvar = SetLocalVariable (un expected result)
Replies: 3
Views: 204

Re: define setlclvar = SetLocalVariable (un expected result)

I don’t know if this has anything to do with it, but the SetLocalVariable function is marked as “not pure” in the Ren’py source code, while most other actions are marked as pure. So there may be something “special” about SetLocalVariable.
by rames44
Sat Mar 23, 2019 2:23 pm
Forum: Ren'Py Questions and Announcements
Topic: Checking persistent data with a loop in a screen [Solved]
Replies: 11
Views: 170

Re: Checking persistent data with a loop in a screen (Solved)

The problem with your “while” loop approach is that you’re building an expression as a string into “checkending”, but then your “If” is just looking at the string value itself. To take the approach you’re trying to do, you’d have to force Python to actually evaluate the string as an expression. In o...
by rames44
Sat Mar 23, 2019 2:06 pm
Forum: Ren'Py Questions and Announcements
Topic: Ren'py support for 32-bit development environment?
Replies: 2
Views: 107

Re: Ren'py support for 32-bit development environment?

32-bit support was dropped for Android, because all new Android apps have to be 64-bit. But AFAIK Ren’py still generates output compatible with 32-bit Windows and Linux systems.
by rames44
Fri Mar 22, 2019 12:10 pm
Forum: Ren'Py Questions and Announcements
Topic: [RESOLVED] Changing screen modality
Replies: 4
Views: 140

Re: Changing screen modality

Are you trying to have it look like the user clicks somewhere and dialog progresses as if the image map was still there? If so, you could call the (modal) screen, have it jump to the label, and have the label use a “scene” statement to put up the same background the screen uses. The screen will have...
by rames44
Fri Mar 22, 2019 12:06 pm
Forum: Ren'Py Questions and Announcements
Topic: On Hide ATL with Call Screen possible?
Replies: 3
Views: 134

Re: On Hide ATL with Call Screen possible?

When the action is taken that would return from the screen, you could use an array of actions, hiding the screen first, then returning. I use this as a way of having “called” screens disappear with a transition, since you can pass a transition to the Hide.