Search found 167 matches

by drKlauz
Mon Dec 23, 2019 1:31 pm
Forum: Development of Ren'Py
Topic: [patch] Vertical size_group?
Replies: 0
Views: 575

[patch] Vertical size_group?

Is there any proper way for frames to have same height? I can can get them same width using size_group, but it doesn't work for height. I looked where it used and made simple patch to force both width and height to be same, it works for my games and other test cases, i believe. Obviously it would be...
by drKlauz
Sun Oct 27, 2019 6:00 pm
Forum: Ren'Py Questions and Announcements
Topic: Arrays in Ren'Py
Replies: 7
Views: 8539

Re: Arrays in Ren'Py

Not exactly true, there are bytearrays what can store bytes, and with ctypes/structure you can get proper arrays of pretty much any kind. Tho that would be un-pythonic :D
by drKlauz
Sun Oct 27, 2019 5:59 pm
Forum: Ren'Py Questions and Announcements
Topic: How to output formatted text from file to a ren'py screen?
Replies: 7
Views: 449

Re: How to output formatted text from file to a ren'py screen?

I guess best approach would be writing conversion tool or even conversion function to be used by game itself, what will read RTF/HTML file, parse it and convert it into stream of RenPy text+tags, converting tables and images would be bit harder, but doable. But that is reasonably complex task, so yo...
by drKlauz
Thu Oct 24, 2019 2:21 pm
Forum: Ren'Py Questions and Announcements
Topic: Can you integrate Lua code in Ren'py scripts?
Replies: 10
Views: 480

Re: Can you integrate Lua code in Ren'py scripts?

I guess using ctypes you could interact with lua lib (or anything else outside of python/renpy).
Biggest problem will be integrating RenPy graphics/audio systems with these lua minigames.
Overall it is really not worth it.
by drKlauz
Mon Oct 21, 2019 2:44 pm
Forum: Ren'Py Questions and Announcements
Topic: Random number generator with blacklisted numbers
Replies: 3
Views: 344

Re: Random number generator with blacklisted numbers

You could use renpy.random.choice with list of allowed values.
Or you could make loop what will generate new random number until it is not in blacklist.

First approach is better, unless you want really wide range of values.
by drKlauz
Fri Oct 11, 2019 11:05 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Creating an explorable screen?
Replies: 10
Views: 534

Re: Creating an explorable screen?

If you use imagebuttons you can easily change positions, images use only needed space, you can have proper hit-testing and not just rectangle click area, you can have item over item. I haven't seen any usecase where imagemaps is better solution. As for position, if you don't need to place element at...
by drKlauz
Fri Oct 11, 2019 6:26 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED] Creating an explorable screen?
Replies: 10
Views: 534

Re: Creating an explorable screen?

When possible avoid imagemaps and use imagebuttons. They are much more flexible and easier to work with.
by drKlauz
Mon Oct 07, 2019 9:05 am
Forum: Ren'Py Questions and Announcements
Topic: RenPy alarm(?)
Replies: 8
Views: 472

Re: RenPy alarm(?)

I have strong feeling this is private pet project what will be shared with close friends only.
Just mentioned solutions, ability to implement them is another question :D
by drKlauz
Mon Oct 07, 2019 7:38 am
Forum: Ren'Py Questions and Announcements
Topic: RenPy alarm(?)
Replies: 8
Views: 472

Re: RenPy alarm(?)

On Windows you can use Task Scheduler system.
On Linux you can use cron.
Another option would be having another program running on background and checking if trigger conditions are met and main app is not running.
by drKlauz
Mon Oct 07, 2019 5:45 am
Forum: Ren'Py Questions and Announcements
Topic: [SOLVED]How to show emails in receiving order?
Replies: 5
Views: 483

Re: How to show emails in receiving order?

Code: Select all

## change this line
received_mails.append(number_of_mail)
## to this
received_mails.insert(0,number_of_mail)
or

Code: Select all

## change this line
for message in received_mails:
## to this
for message in reversed(received_mails):
by drKlauz
Tue Oct 01, 2019 12:42 pm
Forum: Ren'Py Questions and Announcements
Topic: SOLVED! Is there a way to "comment" an entire label
Replies: 9
Views: 502

Re: SOLVED! Is there a way to "comment" an entire label

Better yet add jump to start of label itself. So this label event_234: bob 'blablabla' bob 'bye!' return become this label event_234: jump event_234_skip bob 'blablabla' bob 'bye!' label event_234_skip: return # or jump or however else event_234 label supposed to end, can be nothing at all if you us...
by drKlauz
Sat Sep 28, 2019 7:49 pm
Forum: Ren'Py Questions and Announcements
Topic: is there an easy way of keeping the class attrebutes after reload?
Replies: 14
Views: 596

Re: is there an easy way of keeping the class attrebutes after reload?

Turn name/info into properties as well, i guess. Inside property check locked/unlocked persistent variables and show wanted content. It is really game-specific thing, so can't give generic advice.
by drKlauz
Sat Sep 28, 2019 2:24 pm
Forum: Ren'Py Questions and Announcements
Topic: is there an easy way of keeping the class attrebutes after reload?
Replies: 14
Views: 596

Re: is there an easy way of keeping the class attrebutes after reload?

Ok, i looked source file and re-read thread. You have to separate state of gallery entry from information how does it look. Locked attribute get reset when game is over, and rightly so as whole game get restarted. I would replace locked attribute with locked property what will read entry state from ...
by drKlauz
Sat Sep 28, 2019 6:34 am
Forum: Ren'Py Questions and Announcements
Topic: is there an easy way of keeping the class attrebutes after reload?
Replies: 14
Views: 596

Re: is there an easy way of keeping the class attrebutes after reload?

Your problem is this gall_bg not saving/loading properly? - inherit gallpic class from BaseClass (class GallPic(BaseClass):...) - use default or create gall_bg after start (default gall_bg=GallPic(name=...) ) If it still doesn't work, then problem might be somewhere else. In this case create minimal...