Tutorial Ren'Py Enabling Developer & Command Consoles In Ren'py

scrumbles

Engaged Member
Jan 12, 2019
2,243
2,285
Is it possible to perform function calls from the console?
If it's a Ren'py function, iirc we must prefix "renpy." to our statement. For instance:
Code:
renpy.call_replay("SceneName")
When replaying a scene, the game may crash because some variables are unassigned. We can set them through a dictionary:
Code:
renpy.call_replay("SceneName", {"mc_name":"Chad", "mom_name":"landlady"})
See also or wait for more expert players, I could be wrong.
 
  • Like
Reactions: Pigfarmer

Pigfarmer

Member
May 25, 2019
274
617
If it's a Ren'py function, iirc we must prefix "renpy." to our statement. For instance:
Code:
renpy.call_replay("SceneName")
When replaying a scene, the game may crash because some variables are unassigned. We can set them through a dictionary:
Code:
renpy.call_replay("SceneName", {"mc_name":"Chad", "mom_name":"landlady"})
See also or wait for more expert players, I could be wrong.
Fantastic reply, just what I was looking for!

EDIT: You can also use dir(renpy) command to list all functions and properties of the renpy module, pretty handy.
 
Last edited:
  • Like
Reactions: scrumbles

firefly66

Newbie
Jan 26, 2019
79
59
Is it possible to perform function calls from the console? I tried inputting Start() and Replay("SceneName") but instead of starting the game it would only print - what I would assume is - a function pointer variable. I'm trying to see if it's possible to replay scenes without a gallery menu.
I have successfully called functions before, like:
setLove( "Anna", 10)
 

Machinencio

Member
Oct 22, 2017
212
76
Guys, idk if this is the correct thread to post this, but i found this online tool to edit VN and other games save files: , used with Witcher Trainer Hunter and works perfect.
 

supermario5895

New Member
Dec 15, 2018
6
0
to make it easier, if the option.rpy file does not exsist in the common folder download the one up top and drop it in the common folder. if there is an options.rpy already but no config.developer = True or config.developer = False statement in it, add config.developer = True right below another config.xxx statement (with same spaces) as long as it is below the python hide statement.

You might wish to download the 00_console.rpy file from here as well to make it easier.

Following this I am 100% so far at loading the dev console at all games I have tried and using the variable viewer to cheat my ass off in the console!

I keep the console & options files in the root of my game folder and drop them into every new renpy game that I play. (after looking for a legit options.rpy or 00options.rpy file of course)
it's not working i can't open it
 

Jackyll48

Member
Aug 23, 2018
124
122
You can Use the Variable Viewer accessible With Shift-D (this opens the dev menu) and all the variables there you can than change in the Console
 

AtotehZ

Well-Known Member
Aug 24, 2018
1,889
1,247
It has been asked 9 times how to enable console on android in this thread.
You don't have permission to view the spoiler content. Log in or register now.
I'll make it an even 10.

How do you enable console in a Ren'Py game on android?

Noone has even recognized it being asked so far. Is it not possible? Does no-one know?
 
Last edited:

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,790
It has been asked 9 times how to enable console on android in this thread.
And perhaps that the lack of answer is an answer by itself...

But since you ask so nicely :
How do you enable console in a Ren'Py game on android?
Basically speaking :
  1. You extract the APK archive ;
  2. You restore the files names to their none "x-" leading names ;
  3. You edit the renpy/common/00console.rpy file like said in OP ;
  4. You use the SDK to generate a new APK version of the game.

And then you'll be able to tell me if the console is still unavailable in Android ports, since it's 100% useless without a keyboard.
 

AtotehZ

Well-Known Member
Aug 24, 2018
1,889
1,247
And perhaps that the lack of answer is an answer by itself...

But since you ask so nicely :


Basically speaking :
  1. You extract the APK archive ;
  2. You restore the files names to their none "x-" leading names ;
  3. You edit the renpy/common/00console.rpy file like said in OP ;
  4. You use the SDK to generate a new APK version of the game.

And then you'll be able to tell me if the console is still unavailable in Android ports, since it's 100% useless without a keyboard.
Thanks a lot. That's all I needed to know.

I can't imagine the keyboard would be an issue unless virtual keyboards are unusable.
The amount of work that would have to go into it is too much for most users though.

Again, thanks.
 

DeathyDeathDeath

New Member
Jul 26, 2018
4
8
hey everyone
when i try to change things in the Ren'Py files of the game "Clockwork posion" (v0.9), i can't seem to edit the 00console.rpy file at all. i am able to open the file and view it, but other than that? not a single thing. it won't even let me copy lines from it let alone edit and change things around. i did not try any apps or link that i have seen you guys post so far. mainly because editing 00console.rpy files is usually pretty easy and doesn't give me this issue.
any suggestions or ideas of what i can do? (without downloading anything if possible)
 

RaXorX

Newbie
Dec 24, 2018
37
5
I can't imagine the keyboard would be an issue unless virtual keyboards are unusable.
Unfortunately normal keyboards are useless on the phone (by normal I mean virtual, or display keyboards). There's this keyboard that's called hacker's keyboard. Unfortunately that doesn't work either because it can't detect the space where to type it up. Basically, android (virtual) keyboards work when they detect a type-able space. Which means when the option to type comes up that space needs to be made aware to the virtual keyboards. And when that happens the keyboard automatically pops up. The thing is, Hacker's keyboard can be made to pop from the notification bar too. But alas, from my experimenting the android ports are not able to detect the inputs. Majorly because when the Hacker's keyboard pops up there's a layer in between courtesy of android itself. One thing you could do instead of a physical keyboard was to use teamviewer. I never tried that one before but hey, there's always time for something like that. But then again you'd need to use the teamviewer any time you want to enable to console. One thing that could be done is if someone was able to make an overlay or add menu options for these once it was developer mode was unlocked.
 
  • Like
Reactions: AtotehZ

AtotehZ

Well-Known Member
Aug 24, 2018
1,889
1,247
Some good answers now :) What I was dissatisfied with was that so many had asked before, but they had just been ignored. It's not only for me, it's to have an answer for the people who are looking for it in the thread.

To begin with I asked here because I was asked elsewhere.
 
  • Like
Reactions: Morgoth666

RaXorX

Newbie
Dec 24, 2018
37
5
To be honest no one talks about it because it's already tried and tested enough by other modders. And I think I once asked Tom about it and whether it would work or not. I think he said something about or maybe it was someone else. But someone asked for a virtual renpy keyboard. Now of course, there are possibilities with that easily. But you do realise it will never be like the android keyboard and the capacitive touch sensitivity and all. Even if someone manages a keyboard for changing the names and all, and then even if you were able to use it anytime to get to the console you do realise how much of a pain it would be to use that if the variables have a long ass names. There's a lot that would make the experience so bad to have a console working. My suggestion if you really need to use console and you can't play it on a desktop/laptop (not to mention you'd need to have a laptop/desktop to recompile the apk file and let's say even if someone else does and posts it here)

Best bet would be is to buy a portable small handheld keyboard for your phone. One of those mini Bluetooth ones. That's the best advice. Since Tom won't be putting it in and doesn't make sense to make the ports keyboard aware just for using the console commands. Since console is there just for debugging purposes for the developers not to cheat. So yeah, there's really no point in doing that.

And if you're really adamant on doing it then renpy is open source. Study the code and try to make one yourself. If it works then submit the code on the GitHub repo and that's about it. Also, btw these renpy VNs these are made mostly for desktops not android. Or phones. If one was actually thinking of making it for a phone he or she would have considered about a virtual in game keyboard on their own.
 

AtotehZ

Well-Known Member
Aug 24, 2018
1,889
1,247
You don't have to think too much if you asked here :) that's for sure. You're one of the people I quoted as asking, but was ignored. I'm not nearly as dissatisfied with it not working as I was with people leaving the thread about enabling console without an answer. It's all good now.
 
  • Like
Reactions: RaXorX

RaXorX

Newbie
Dec 24, 2018
37
5
AtotehZ Lol, I wasn't aware you'd go that far behind haha. But yes, I once asked something similar here and soon learned that i would need to recompile the apk back too. Tried various ways but it didn't work. At that time I also did not have a laptop at that moment.
 

AtotehZ

Well-Known Member
Aug 24, 2018
1,889
1,247
AtotehZ Lol, I wasn't aware you'd go that far behind haha. But yes, I once asked something similar here and soon learned that i would need to recompile the apk back too. Tried various ways but it didn't work. At that time I also did not have a laptop at that moment.
There are only 10 pages. Searching for "mobile" and "android" didn't produce that many results. I quoted them all so they'd be notified if anyone answered, in case they still needed it, and to prove a point that is no longer relevant(since it was answered).
 

str8up

Engaged Member
Jun 4, 2020
3,359
1,521
surprised nobody has mentioned this method that i learned from an unrelated posted game link somewhere on this site
goto your game folder with the games exe and once there look for this folder renpy open it and look for this folder common open it
and then look for this file 00console.rpy and open it with your txt editor (note pad or what ever)look for this line
# If true, the console is enabled despite config.developer being False.
config.console = False

change this to config.console = True
save/exit and its case sensitive do exactly as ive explained
now go back to your game folder with the games exe file and play your game
press shift and o and then your console will open

i notice alot of people saying to use UnRen-dev.bat or UnRen.bat which is fine too (Linux users use wine to open these)
HOW EVER sometimes theres games that wont run those at all ive encountered this MANY TIMES
the method i explained you wont have any problems with opening console

dont play harder play smarter thats what i always say ...im not a modder or anything like that im just a person that learns and shares knowledge
KNOWLEDGE IS POWER :D
 
Last edited: