Search found 1432 matches

by xavimat
Tue Apr 30, 2019 9:48 am
Forum: Ren'Py Questions and Announcements
Topic: Why does my textbutton work in a weird way?
Replies: 11
Views: 283

Re: Why does my textbutton work in a weird way?

If Alex solution does not work, try passing the argument in the "Function" action: textbutton "BUY": xalign 0.7 yalign 0.95 sensitive selected if selected_item != None: action Function(inventory.buy, item=selected_item) Explanation: Your weird behavior probably is caused by "screen prediction". Scre...
by xavimat
Sun Apr 28, 2019 4:41 pm
Forum: Development of Ren'Py
Topic: Create Characters Renpy
Replies: 1
Views: 301

Re: Create Characters Renpy

Hi, FurFles-!Welcome to the forums! I think your question does not belong to this subforum (This is "Development of Ren'Py, the program itself, not development of games). Maybe it fits better in "Creator Discussion". Anyway, a couple of answers to you: 1. Look first for free assets. You'll find a go...
by xavimat
Wed Apr 10, 2019 2:21 pm
Forum: Ren'Py Questions and Announcements
Topic: Releasing a game in .exe
Replies: 4
Views: 571

Re: Releasing a game in .exe

If I understand you correctly, what you want to do is called an "installer". Renpy does not create 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.jrs...
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: 228

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: 228

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: 125

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: 133

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: 282

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: 116

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: 333

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: 296

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: 296

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: 290

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: 325

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...