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

dacris69

M, TI
Donor
Nov 20, 2017
2,106
5,982
Hi is there a command to increase font size in games? or somewhere to modify in a file for renpy games?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
9,944
14,546
Can't use it. Put the file into the folder and I get error screen opening the game.
[...]
The label sloose is defined twice, at
The error already exist in the game, it's just that the script also enable the developer mode, which cause Ren'py to complain about the shitty quality of the game.
 

vettec5

New Member
Jul 5, 2017
2
0
Been trying all of these options on Girls in the Big city (final release) with no luck. No console and if I select panic mode in options and try to bring up the console it kicks me out to an ms paint screen. Very confused...
 

Ragnarok6699

Member
Nov 2, 2017
239
41
the game is GirlsInTheBigCity ver1.1 in renpy/common found the 00console and changed to "
# If true, the console is enabled despite config.developer being False.
config.console = True" (was "config.console = False" before change) if panic mode is enabled i get the same pic from panic mode when i press Shift+O as i would get by just pressing Q the panic mode key. If panic mode is disabled Shift+O does nothing at all any ideas how to bring the console up in this game ? and btw its PC version
 

Zotri

New Member
Aug 18, 2016
8
2
What do I need to type, to change my stats in game.
I go to devmod and see the list variable.
Now I see the variable "Dylan = 14" now I open the console l but if I type "Dylan = 20" nothing changes.

Can someone help me, it's the first time I use the console.

P. S. The game is "A Mother and Wife"
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
9,944
14,546
Anyone else running into?:
dir()
needs two statements you have one
Probably not.
  1. dir is a Python built-in function, something that is deep inside the core of Python, haven't change in year and will probably never change ;
  2. When used without arguments at all, dir return the content of the global namespace, so you'll never see Python complain that there isn't enough arguments for it.
What you encounter is probably the result of a badly wrote game. Ren'py don't prevent you to redefine built in functions, and that's almost surely what you are facing ; the author created his own function named dir. To correct this you need to use the real buit-in dir.
On the console :
Code:
import __builtin__
mydir = __builtin__.dir
Then now every time you want to use dir, type mydir instead.
 
Aug 13, 2017
327
248
Probably not.
  1. dir is a Python built-in function, something that is deep inside the core of Python, haven't change in year and will probably never change ;
  2. When used without arguments at all, dir return the content of the global namespace, so you'll never see Python complain that there isn't enough arguments for it.
What you encounter is probably the result of a badly wrote game. Ren'py don't prevent you to redefine built in functions, and that's almost surely what you are facing ; the author created his own function named dir. To correct this you need to use the real buit-in dir.
On the console :
Code:
import __builtin__
mydir = __builtin__.dir
Then now every time you want to use dir, type mydir instead.
Thank you!
 

Panda135

Newbie
Mar 10, 2018
40
6
This file works on Kelly's family .093, extract to renpy/common folder and choose ctrl+d for dev console or ctrl+o for console.

This file has worked for every renpy game I have ever played. If it did not come up, I save my game, open the file in notepad and change:
init +1: to init -1:
I'm trying to enable the console for the game 'Girls in big city' but literally nothing is working.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
9,944
14,546
Is there a way to do this for mac users?
There's a mac version, you can find it .

Edit: Oops, wrong thread, it's not the unren one here. Well, anyway it will enable the console, so...
 

HeavyEavy

Member
Feb 8, 2018
430
360
Sorry if this is the wrong place (it's the closest I can find here).

I've noticed on some games when I open the Interactive Director Viewport there is an arrow that moves the viewport to the bottom/top of the page. I can't figure out what/how this is done. I've been through renpy.org documentation and it's not mentioned anywhere that I can find. I want this functionality in my Dev environment. So any pointers or help would be greatly appreciated! Thanks in advance!
 
Aug 13, 2017
327
248
Sorry if this is the wrong place (it's the closest I can find here).

I've noticed on some games when I open the Interactive Director Viewport there is an arrow that moves the viewport to the bottom/top of the page. I can't figure out what/how this is done. I've been through renpy.org documentation and it's not mentioned anywhere that I can find. I want this functionality in my Dev environment. So any pointers or help would be greatly appreciated! Thanks in advance!
are you talking about the one that appears if you hold down the center mouse button for a few seconds?
 

HeavyEavy

Member
Feb 8, 2018
430
360
@Vousetesconnard
I'm not sure, my middle mouse button is "wired" different cause I have limited mobility(use) of my hands. If you do a shift + D it opens the Dev console, from there you can select Interactive Director(menu option D). Here's what the Ren'Py site has, it's not much:
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
9,944
14,546
I've been through renpy.org documentation and it's not mentioned anywhere that I can find.
It's not on the documentation that you'll find something like this, but on the code itself.
In this particular case, it's in renpy/common/00director.rpy,
  • line 28: you'll find the default position of the screen ;
    You don't have permission to view the spoiler content. Log in or register now.
  • line 1424 and following: You'll find the two styles defining if the frame will be on top or at the bottom ;
    You don't have permission to view the spoiler content. Log in or register now.
  • line 1477 and following: You'll find the screen with the button to move the screen up or down ;
    You don't have permission to view the spoiler content. Log in or register now.
  • lines 1555 and 1641 : This add the screen above in the main screen ;
    You don't have permission to view the spoiler content. Log in or register now.
  • line 1828: This is where the magic happen. It will choose one of the two style above, depending of the position wanted ;
    You don't have permission to view the spoiler content. Log in or register now.

But it's far to be the more efficient way to do it ; the screen for the moving button have way too much lines, and you don't need two style for just a single change. As example, a tweak of the original director screen :
You don't have permission to view the spoiler content. Log in or register now.
 
  • Like
Reactions: Vousetesconnard

HeavyEavy

Member
Feb 8, 2018
430
360
@anne O'nymous I learned something today!...
Thanks!! I really appreciate it! And thanks for the quick RenPy lesson too!
Who'd a thought that a 'major' function/tool(that imho should be 'on' by default) wouldn't be doc'd for a game dev platform!?
 

harry19

Member
Oct 25, 2017
127
102
Figured I'd add this for everyone so they can modify Ren'Py games.

To enable Developer Console:

OPTION 1:
Download the options.rpy file at

it goes into the /renpy game xxx../game/ folder.

OPTION 2:
in "renpy game xxx" folder enter /game folder. create file "options.rpy"
type this text in it --
init -1:
python hide:
config.developer = True
--save and exit.
*Important!!!!! second line needs 4 spaces before python hide:
Third line needs 8 spaces before config.developer = True*

Now to enable Console Commands:

Go to "Renpy game xxx"/ Renpy / Common / 00console.rpy
ctrl+f and enter config.console
Set config.console variable to True
Example..... config.console = True
Save file
in game press shift O (letter)
Can you tell me, where to find things to write in to console ?
 

muttdoggy

Dogerator
Staff member
Moderator
Aug 6, 2016
7,793
43,337
1- Enable the config.developer through this thread or use UnRen.
2- Run the game and load a save.
3- Press Shift+d and it should show a gray screen with options.
4- One of the options is "Variable Viewer"

The list in that "Variable Viewer" are the codes you can use in the console. Be aware that those are codes that are already in the game. Altering those to a point should be safe.

The other option is to open script.rpy with a text editor and look at the variables it sets. Be careful because setting a variable incorrectly or too early can freeze or screw up your game.

This is how variables are set - (Depending on developer, they may use . or _ to separate the character and variable)
character_variable = XX
or
$ character_variable = XX
 

blind

Newbie
Mar 16, 2017
70
84
Say, is there anyway to view contains inside a store object? I'm talking about variables that goes like:

label[<store object at 0x...>, ...]

And I would like to edit values inside one of the objects.

Edit: nvm, figured it out.
How do you did that?
Cheers!