Search found 1369 matches

by xavimat
Wed Apr 10, 2019 2:21 pm
Forum: Ren'Py Questions and Announcements
Topic: Releasing a game in .exe
Replies: 3
Views: 262

Re: Releasing a game in .exe

If I understand you correctly, what you want to do is called an "installer". Renpy does not creates it automatically, but the files it builds can be put in an installer with another program. I've used "innosetup" for that, it's a free program to create installers. you can find it here: http://www.jr...
by xavimat
Sun Mar 31, 2019 3:34 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Saving games, classes, and constants. How to use init in the right way?
Replies: 6
Views: 162

Re: Saving games, classes, and constants. How to use init in the right way?

Because I independantly need the hair_color_list. But since it's been set in a init block, if you load the game, it will be gone/empty. Are you sure? Why it should be gone when loading? Are you emptying it? Declaring variables in an init python block causes problems with save/load (that's the reaso...
by xavimat
Sat Mar 30, 2019 3:47 pm
Forum: Ren'Py Questions and Announcements
Topic: [Solved] Saving games, classes, and constants. How to use init in the right way?
Replies: 6
Views: 162

Re: Saving games, classes, and constants. How to use init in the right way?

What's the problem with number 1? The code you've provided should work. Classes are defined in an "init python" block. On the other hand, your code does nothing in an actual game. You need to create instances of that class. If you create the instances in a label, they should be saved and loaded. If ...
by xavimat
Sat Mar 30, 2019 3:13 pm
Forum: Ren'Py Questions and Announcements
Topic: Letting player show or hide quick menu in preferences. [Solved]
Replies: 2
Views: 92

Re: Letting player show or hide quick menu in preferences.

Renpy already has a variable to control if the quickmenu is visible or not. It's called "quick_menu" and is already "defaulted" in screens.rpy (line 271). You only need to change that variable. You can toggle it with one button (style check) or use two buttons: On/Off (style radio) vbox: style_prefi...
by xavimat
Wed Mar 06, 2019 11:52 am
Forum: Ren'Py Questions and Announcements
Topic: [Solved] end of session hook for Python code
Replies: 2
Views: 102

Re: end of session hook for Python code

Probably you could use the "quit" special label. And put a "python" block in it (or normal label code, not necessarily python).
https://www.renpy.org/doc/html/label.ht ... ial-labels

But I'd ask what are you trying to achieve. Maybe there are other means (like persistent variables, maybe).
by xavimat
Wed Mar 06, 2019 11:38 am
Forum: Development of Ren'Py
Topic: Beginner questions
Replies: 1
Views: 188

Re: Beginner questions

1. you can include python code inside renpy. To define classes you can use an "init python" block. https://renpy.org/doc/html/python.html#init-python-statement 2. Yes. https://lemmasoft.renai.us/forums/viewtopic.php?f=4&t=53442&p=503389&hilit=rpy+files#p503306 3. It seems that code should work, if i...
by xavimat
Mon Mar 04, 2019 1:18 pm
Forum: Ren'Py Questions and Announcements
Topic: Loading renpy game from another dir
Replies: 2
Views: 80

Re: Loading renpy game from another dir

Put the scripts in your projects directory (if you have not defined it, you can choose that directory in the preferences of the launcher). If your programmer has sent the "game" directory, then you need to create a folder "MyGameName" in the projects directory and put the "game" directory there. If ...
by xavimat
Wed Feb 27, 2019 6:44 pm
Forum: Ren'Py Questions and Announcements
Topic: Un - labeled choices question.
Replies: 2
Views: 307

Re: Un - labeled choices question.

I'm not sure if I have understood the question correctly. Sorry if my answer doesn't make sense. The thing is: you must write every route if you give the player the option. If you don't want to write that route, then don't give the option. It's true that the Map of choices is hard to do, but the Map...
by xavimat
Wed Feb 27, 2019 2:21 pm
Forum: Ren'Py Questions and Announcements
Topic: What would be a way to "save game" on this case?
Replies: 3
Views: 247

Re: What would be a way to "save game" on this case?

(sorry for double post) I was trying a solution when I realized that, without knowing how variables are handled, it was not possible to know for sure if my solution will work. Anyway, you can try this: define persistent.started = False default _quit_slot = "mysave" label before_main_menu: if persist...
by xavimat
Tue Feb 26, 2019 2:44 pm
Forum: Ren'Py Questions and Announcements
Topic: What would be a way to "save game" on this case?
Replies: 3
Views: 247

Re: What would be a way to "save game" on this case?

Saving of variables depends on several things. If you initialize a variable in an "init python" block, it's possible that renpy won't save it in the saves. You should always initialize your variables with "default", so renpy knows that those variables must be saved. Also, it depends how are you chan...
by xavimat
Tue Feb 26, 2019 2:24 pm
Forum: Ren'Py Questions and Announcements
Topic: customized responses based on player input
Replies: 3
Views: 253

Re: customized responses based on player input

povname is a variable. You can use "if/elif/else" to check anything with it. (don't need the "python" part, put them inside a label with $ at the begining of the lines) define pov = Character("[povname]") label set_povname: $ povname = renpy.input("So. What is your name?").strip() if povname == "Eil...
by xavimat
Tue Feb 26, 2019 1:44 pm
Forum: Ren'Py Questions and Announcements
Topic: How can I disable the "Load" button when there are no existing save files?
Replies: 6
Views: 283

Re: How can I disable the "Load" button when there are no existing save files?

UPDATE: [/size] I took Remix's advice and it worked! if renpy.list_saved_games(fast=True): textbutton _("Load") action ShowMenu("load") else: textbutton _("Load") BUT when I try to delete the save and reload the game (to test it out), the Load button remains acessible :? Renpy saves your game infor...
by xavimat
Tue Feb 26, 2019 1:24 pm
Forum: Ren'Py Questions and Announcements
Topic: renpy.quit questions
Replies: 4
Views: 273

Re: renpy.quit questions

I strongly advise you against that kind of technique. It's possible that many players won't find it interesting or funny. I don't think it makes your game more interesting. That said, I've given it a try as a theoretical question, and I've managed to do it putting the "load" function inside the spec...
by xavimat
Tue Feb 26, 2019 12:31 pm
Forum: Ren'Py Questions and Announcements
Topic: Show the date of a save only when hovered
Replies: 4
Views: 270

Re: Show the date of a save only when hovered

My first idea is to change the color of the text to transparent, so it is not "hidden", but simply not visible. If you want to actually hide it, probably it will be more complicated because the space of the missing date and time will change the size of the button itself. So, try adding to the text ...
by xavimat
Mon Feb 25, 2019 4:28 pm
Forum: Ren'Py Questions and Announcements
Topic: Show the date of a save only when hovered
Replies: 4
Views: 270

Re: Show the date of a save only when hovered

My first idea is to change the color of the text to transparent, so it is not "hidden", but simply not visible. If you want to actually hide it, probably it will be more complicated because the space of the missing date and time will change the size of the button itself. So, try adding to the text t...