Search found 2400 matches
- Fri May 12, 2017 1:25 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Too much Variables?
- Replies: 10
- Views: 1380
Re: Too much Variables?
I am interested in what do you have before elif statement in your code. Remember: elif block is considered only if corresponding if statement evaluated to false. Consider: if cond1: if cond2: '1 and 2' else: 'only 1' elif cond3: if cond4: '3 and 4' else: 'only 3' else: 'nothing' In case when cond2 i...
- Fri May 12, 2017 1:09 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Characters with image attributes: menu and python equivalent
- Replies: 7
- Views: 865
Re: Characters with image attributes: menu and python equiva
One situation, where defining new character would not work properly: image eileen formal_dress = #... image eileen formal_dress happy = #... image eileen swimsuit = #... image eileen swimsuit happy = #... # . . . if current_outfit == 'swimsuit': show eileen swimsuit else: eileen formal_dress # much ...
- Wed May 10, 2017 12:02 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Protect your game against piracy!
- Replies: 12
- Views: 5183
Re: Protect your game against piracy!
Assuming dedicated hacker, archiving and encryption would not help at all. There is always who knows how to decrypt/unpack resources: your own game. You just have to ask it nicely. I used RenPy to unpack rpa archives before I got standalone tool; I know that functions to manipulate .mpq files, used ...
- Tue May 09, 2017 9:53 am
- Forum: Ren'Py Questions and Announcements
- Topic: Why doesn't my image load?
- Replies: 4
- Views: 437
Re: Why doesn't my image load?
I suspect it is loaded and is showing. It is just it is behind all other images shown afterwards. I suggest to make use of RenPy autoreplace feature which will automaticly replace images with a tage when another image with the same tag is shown (saves the need to hide prevous one and gives other use...
- Tue May 09, 2017 3:59 am
- Forum: Ren'Py Questions and Announcements
- Topic: No module named Mixer when using pygame.mixer
- Replies: 5
- Views: 2025
Re: No module named Mixer when using pygame.mixer
Imports only work in init pyton blocks IIRC
- Sat May 06, 2017 10:42 am
- Forum: Ren'Py Questions and Announcements
- Topic: Windowed mode checkbox in the options menu ignores me :<
- Replies: 2
- Views: 530
Re: Windowed mode checkbox in the options menu ignores me :<
It is a known problem. This button would only be ticked when game render window is exactly the size you provided in config (In your case 1920x1080). This is only possible if resolution of your display is higher (To display a rectangle with width 1920 you need about 1960 pixels — window borders take ...
- Sat May 06, 2017 9:01 am
- Forum: Ren'Py Questions and Announcements
- Topic: How do I make my game "compatible" for different resolutions
- Replies: 3
- Views: 717
Re: How do I make my game "compatible" for different resolut
... or good old 4:3 monitor, which is better suited for some tasks, so some people still have it.
- Fri May 05, 2017 3:33 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Scene Background Image Problem
- Replies: 2
- Views: 760
Re: Scene Background Image Problem
You missed an image: image bg sononbed1 = "sononbed1.jpg"
- Thu May 04, 2017 12:46 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Random sounds at random intervals and volumes?
- Replies: 5
- Views: 1621
Re: Random sounds at random intervals and volumes?
Here is a basic example of how you can achieve this: 1) Create a new project and replace content of script.rpy with this: define sounds = ['sounds/explosion.wav', 'sounds/glass.wav', 'sounds/shot.wav'] init python: def s_callback(): if s_callback.queue_silence: silence = "<silence {0}>".fo...
- Wed May 03, 2017 1:34 pm
- Forum: Ren'Py Questions and Announcements
- Topic: Random sounds at random intervals and volumes?
- Replies: 5
- Views: 1621
Re: Random sounds at random intervals and volumes?
I am not going to write any code right now, but I will point to functions you can use to accomplish what you want: 1) renpy.music.set_queue_empty_callback can be used to constantly queue new sounds. 2) renpy.music.queue to add sounds to play next. 3) renpy.music.set_volume to change sound volume bef...
- Wed May 03, 2017 1:21 pm
- Forum: Ren'Py Questions and Announcements
- Topic: save user's information online
- Replies: 2
- Views: 737
Re: save user's information online
is it possible if we want to save our players information or results from the game to a website RenPy itself does not have any networking capability (it does not need it: it is just a VN framework). However it allows you to access Python from within, and Python has a lot of network libraries. To cr...
- Sun Apr 30, 2017 5:05 am
- Forum: Ren'Py Questions and Announcements
- Topic: Urgent - Cannot Load Game
- Replies: 3
- Views: 424
Re: Urgent - Cannot Load Game
In almost every case this error is caused by two or more labels with the same name. Check your script. Also, if lately you deleted some script files (for example after spliting its content to several smaller files), remove .rpyc file with the same name. Actually, to be safe, remove all .rpyc (not .r...
- Sat Apr 29, 2017 4:44 am
- Forum: Ren'Py Questions and Announcements
- Topic: Check if Player saved [[SOLVED]]
- Replies: 3
- Views: 1647
Re: Check if Player saved
Here is an example of using json information in saves. Create a new project and replace content of script.rpy define help = Character('Help') # By defult we do not know about ambush. # It is only set at specific point of the game. default ambush_knowledge = False init python: # A function which take...
- Sun Apr 23, 2017 3:29 am
- Forum: Ren'Py Questions and Announcements
- Topic: How to show thousands separator for variable?
- Replies: 7
- Views: 1423
Re: How to show thousands separator for variable?
The obvious way: transform number to string, insert separator as needed and print that string instead of raw number. You can easily do that using format: $ money_string = '{:,}'.format(money) Correct way would be to define your class to hold money, with proper methods to add and substract money with...
- Sun Apr 23, 2017 2:05 am
- Forum: Ren'Py Questions and Announcements
- Topic: Check if Player saved [[SOLVED]]
- Replies: 3
- Views: 1647
Re: Check if Player saved
RenPy abstracts interacting with filesystem and, for the sake of portability, I would not mess with that. Instead, you can save some information (save time, important variable state, etc.) alongside saves: Add a custom function to save_json_callbacks config variable , then, when you need it, extract...