Create and Fuck your AI Slut -70% OFF
x

Mod Ren'Py Universal Ren'Py Mod / URM [2.6.2] (mod any Ren'Py game yourself)

5.00 star(s) 49 Votes

theMickey_

Engaged Member
Mar 19, 2020
2,335
3,159
357
The crash happens every time I try to search for variables/labels, after that the rest of the mods functions work perfectly.
Ok, thanks for letting me know, I was able to reproduce it.

The instructions for this no longer work...
Here's a fix (based on the one from the FAQ, just in different files & places):

If you search existing *.RPY files for _getframe, you will find three files:
  • renpy\common\00action_data.rpy
  • renpy\common\00barvalues.rpy
  • renpy\common\00inputvalues.rpy
Open each of those files with a text editor and find the occurrence of _getframe and add a single line like follows:

00action_data.rpy:
1759158376738.png

00barvalues.rpy:
1759158421290.png

00inputvalues.rpy:
1759158479733.png

IMPORTANT: Make sure to only use SPACES in front of the "import sys" statement, otherwise it won't work!

Now searching for variables does work for me as well.
 

reidanota

Well-Known Member
Nov 1, 2021
1,120
1,112
254
You don't have permission to view the spoiler content. Log in or register now.
Be doing this they broke a function inside Ren'Py that URM needs.
I got this error when trying to run URM with Wife Trainer Files. It happens when I start a new game. If I start the game without URM, save, exit, add URM and load the saved game, it runs but URM is not loaded.

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 158, in script
    call screen package_select(persist.packages)
  File "renpy/common/000statements.rpy", line 671, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "renpy/common/00action_data.rpy", line 157, in __init__
    super(LocalVariable, self).__init__(sys._getframe(1).f_locals,
AttributeError: 'ADVCharacter' object has no attribute '_getframe'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 158, in script
    call screen package_select(persist.packages)
  File "renpy/ast.py", line 1971, in execute
    self.call("execute")
  File "renpy/ast.py", line 1953, in call
    return renpy.statements.call(method, parsed, *args, **kwargs)
  File "renpy/statements.py", line 349, in call
    return method(parsed, *args, **kwargs)
  File "renpy/common/000statements.rpy", line 671, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "renpy/exports.py", line 3420, in call_screen
    rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
  File "renpy/ui.py", line 301, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "renpy/display/core.py", line 2166, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
  File "renpy/display/core.py", line 2688, in interact_core
    root_widget.visit_all(lambda d : d.per_interact())
  File "renpy/display/displayable.py", line 431, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/displayable.py", line 431, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/displayable.py", line 431, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/screen.py", line 480, in visit_all
    callback(self)
  File "renpy/display/core.py", line 2688, in <lambda>
    root_widget.visit_all(lambda d : d.per_interact())
  File "renpy/display/screen.py", line 491, in per_interact
    self.update()
  File "renpy/display/screen.py", line 697, in update
    self.screen.function(**self.scope)
  File "0x52-URM/screens/main.rpy.x52", line 20, in execute
  File "0x52-URM/screens/main.rpy.x52", line 20, in execute
  File "0x52-URM/screens/main.rpy.x52", line 69, in execute
  File "0x52-URM/screens/main.rpy.x52", line 70, in execute
  File "0x52-URM/screens/progress.rpy.x52", line 16, in execute
  File "0x52-URM/screens/progress.rpy.x52", line 16, in execute
  File "0x52-URM/screens/progress.rpy.x52", line 19, in execute
  File "0x52-URM/screens/progress.rpy.x52", line 19, in keywords
  File "0x52-URM/screens/progress.rpy.x52", line 26, in <module>
  File "renpy/common/00action_data.rpy", line 157, in __init__
    super(LocalVariable, self).__init__(sys._getframe(1).f_locals,
AttributeError: 'ADVCharacter' object has no attribute '_getframe'

Windows-10-10.0.26100 AMD64
Ren'Py 7.7.3.24061702
The Wife Trainer Files 0.7r
Wed Oct  1 02:26:15 2025
0x52 URM 2.6.1
Tried the fix in the quoted post, but in this game, renpy/common/00action_data.rpy does not contain any "def SetLocalVariable(name, value)". The line 157 that shows in the traceback.txt file reads:

1759283248471.png
Should I try and add "import sys" somewhere above or below the "def __init__(...)" block?
 

Patan

Active Member
May 28, 2017
922
1,381
407
I got this error when trying to run URM with Wife Trainer Files. It happens when I start a new game. If I start the game without URM, save, exit, add URM and load the saved game, it runs but URM is not loaded.

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 158, in script
    call screen package_select(persist.packages)
  File "renpy/common/000statements.rpy", line 671, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "renpy/common/00action_data.rpy", line 157, in __init__
    super(LocalVariable, self).__init__(sys._getframe(1).f_locals,
AttributeError: 'ADVCharacter' object has no attribute '_getframe'

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 158, in script
    call screen package_select(persist.packages)
  File "renpy/ast.py", line 1971, in execute
    self.call("execute")
  File "renpy/ast.py", line 1953, in call
    return renpy.statements.call(method, parsed, *args, **kwargs)
  File "renpy/statements.py", line 349, in call
    return method(parsed, *args, **kwargs)
  File "renpy/common/000statements.rpy", line 671, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "renpy/exports.py", line 3420, in call_screen
    rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
  File "renpy/ui.py", line 301, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "renpy/display/core.py", line 2166, in interact
    repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, pause=pause, pause_start=pause_start, pause_modal=pause_modal, **kwargs) # type: ignore
  File "renpy/display/core.py", line 2688, in interact_core
    root_widget.visit_all(lambda d : d.per_interact())
  File "renpy/display/displayable.py", line 431, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/displayable.py", line 431, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/displayable.py", line 431, in visit_all
    d.visit_all(callback, seen)
  File "renpy/display/screen.py", line 480, in visit_all
    callback(self)
  File "renpy/display/core.py", line 2688, in <lambda>
    root_widget.visit_all(lambda d : d.per_interact())
  File "renpy/display/screen.py", line 491, in per_interact
    self.update()
  File "renpy/display/screen.py", line 697, in update
    self.screen.function(**self.scope)
  File "0x52-URM/screens/main.rpy.x52", line 20, in execute
  File "0x52-URM/screens/main.rpy.x52", line 20, in execute
  File "0x52-URM/screens/main.rpy.x52", line 69, in execute
  File "0x52-URM/screens/main.rpy.x52", line 70, in execute
  File "0x52-URM/screens/progress.rpy.x52", line 16, in execute
  File "0x52-URM/screens/progress.rpy.x52", line 16, in execute
  File "0x52-URM/screens/progress.rpy.x52", line 19, in execute
  File "0x52-URM/screens/progress.rpy.x52", line 19, in keywords
  File "0x52-URM/screens/progress.rpy.x52", line 26, in <module>
  File "renpy/common/00action_data.rpy", line 157, in __init__
    super(LocalVariable, self).__init__(sys._getframe(1).f_locals,
AttributeError: 'ADVCharacter' object has no attribute '_getframe'

Windows-10-10.0.26100 AMD64
Ren'Py 7.7.3.24061702
The Wife Trainer Files 0.7r
Wed Oct  1 02:26:15 2025
0x52 URM 2.6.1
Tried the fix in the quoted post, but in this game, renpy/common/00action_data.rpy does not contain any "def SetLocalVariable(name, value)". The line 157 that shows in the traceback.txt file reads:

View attachment 5299927
Should I try and add "import sys" somewhere above or below the "def __init__(...)" block?
Try this method, worked for other game.
 

CigarRex

Truly, the Rex of all Cigars...
Donor
Game Developer
Sep 23, 2022
545
1,859
267
If you wouldn't mind looking at The interactions with The sin Within that makes it crash when saving, but only in free roam mode? It's both regular save and Quicksave that brings up the fault.

I saw the last request being somewhat lackluster, so I hope I've got the info you need.

I'm guessing they're doing something fucky with ren'py, but I thought their "It's not my fault" was a little on the nose.
Heh, good to know the warning worked.
I mean no ill will towards 0x52, his mod is great and I wish this bug didn't exist. But getting complaints thrown at me for a freak bug caused by a third party mod were a bit nonsensical, so I had to rub that warning over the screen for these guys to get it. It was funny to implement, though...

I hope it gets fixed, I want people to be able to mess around with my game if that's what they want to get out of it. But I have no clue what did I do to RenPy for my game to be the only one causing this issue with the mod afaik, there shouldn't be anything out of the ordinary for sandbox code standards.

I'm open to cooperate on this if 0x52 needs help, if it involves figuring something out of my codebase. Godspeed :coffee:
 
  • Like
Reactions: Rohse

Deulym

New Member
Mar 16, 2021
8
14
37
I don't know if this is related to URM or not because I'm a slightly code illiterate moron:
I get an error whenever accessing history menu in Elmwood university, found no mentions in official thread so thought I'd check here.
You don't have permission to view the spoiler content. Log in or register now.

Is this like the import sys and _get frame discussed, or completely unrelated?
 

CCrusader

Member
Nov 29, 2020
300
753
269
Ok, thanks for letting me know, I was able to reproduce it.


Here's a fix (based on the one from the FAQ, just in different files & places):

If you search existing *.RPY files for _getframe, you will find three files:
  • renpy\common\00action_data.rpy
  • renpy\common\00barvalues.rpy
  • renpy\common\00inputvalues.rpy
Open each of those files with a text editor and find the occurrence of _getframe and add a single line like follows:

00action_data.rpy:

00barvalues.rpy:

00inputvalues.rpy:

IMPORTANT: Make sure to only use SPACES in front of the "import sys" statement, otherwise it won't work!

Now searching for variables does work for me as well.
hacker-pc.gif
 

boyin

Newbie
May 9, 2023
21
18
127
May be an FAQ problem:

How do I remap Alt-M to another key, perhaps Shift-M, on a Mac using WINE?
 

reidanota

Well-Known Member
Nov 1, 2021
1,120
1,112
254
That sounds like your persistent file isn't saving. Did you modify your save token?
I also think it’s a persistent save issue. I saved the game normally and didn’t touch the save token.
Been using URM for a long time but not familiar with that the persistent save file does. I'm having a problem with The Big Swap where the progress bar initially was at 95% and never progressed. I deleted the savegame folder and also the files copied to appdata/roaming/ren-py/the big swap (or whatever). Now the progress bar is at 0% and still not progressing.

It's weird that the game shipped with a 95% progress and even three savegame files. May have been packed from a play folder, not the author's distribution directly, or maybe the author packed it like that?

Anyway, what's the correct way to reset the progress bar and keep it functioning, assuming I reinstall the game and it's back to the point where the bar shows 95% progress? Thanks!
 

shmurfer

Engaged Member
Dec 29, 2019
3,075
4,724
387
Been using URM for a long time but not familiar with that the persistent save file does. I'm having a problem with The Big Swap where the progress bar initially was at 95% and never progressed. I deleted the savegame folder and also the files copied to appdata/roaming/ren-py/the big swap (or whatever). Now the progress bar is at 0% and still not progressing.

It's weird that the game shipped with a 95% progress and even three savegame files. May have been packed from a play folder, not the author's distribution directly, or maybe the author packed it like that?

Anyway, what's the correct way to reset the progress bar and keep it functioning, assuming I reinstall the game and it's back to the point where the bar shows 95% progress? Thanks!
Persistent file is a renpy functionality, not URM. It holds data that persists between saves, like whether you've seen a message before. I'm assuming your install came with a persistent file of its own which doesn't match your save token so you can't save changes to it. Deleting the persistent file should make a blank one generate and then you can start with it.

You should google how to delete renpy persistent file. Each game works a bit differently and I don't want to download the game to double check that game's project name (Try making a new save in that game, then in the appdata renpy folder arrange by last modified or something)
 

meladath

New Member
Apr 15, 2022
7
13
13
Love this mod, install it on every renpy game I play as I am a developer and I just enjoy the debugger-like functionality. However, I have discovered on some games (for example, just tried it with Shadow over Blackmore) that rolling back soon after the game starts can sometimes cause URM to break.

Alt+M no longer opens the UI and URM no longer displays anything on screen. Anyone encountered this before and know how to fix it? I run Linux and run the games through their sh script. I find it especially odd that it only seems to occur sometimes with no error screen displayed and nothing in the standard log file.
 
Last edited:

MiltonPowers

Twins Basil! Twins!
Donor
Jr. Uploader
Jul 26, 2023
18,092
45,819
922
Love this mod, install it on every renpy game I play as I am a developer and I just enjoy the debugger-like functionality. However, I have discovered on some games (for example, just tried it with Shadow over Blackmore) that rolling back soon after the game starts can sometimes cause URM to break.

Alt+M no longer opens the UI and URM no longer displays anything on screen. Anyone encountered this before and know how to fix it? I run Linux and run the games through their sh script. I find it especially odd that it only seems to occur sometimes with no error screen displayed and nothing in the standard log file.
I'm windows, but I had the same problem that every now and then ALT-M wouldn't work on certain games.

So I went into 'Options', then 'QuickMenu' and set up a global quickmenu with just a URM button in it (and an auto hide). I have it up the top in the middle so it doesn't affect anything, but it means I just have to move my mouse to the middle of the top and a shortcut to URM always pops up.

1760180889307.png

1760180774126.png
 
  • Like
Reactions: Juerhullycin

Calevala

Newbie
Oct 23, 2021
21
6
22
Is there a way to view the unreaded lines of text? Every time I turn on the tracker with F2, I see that many lines remain.
 

shmurfer

Engaged Member
Dec 29, 2019
3,075
4,724
387
Is there a way to view the unreaded lines of text? Every time I turn on the tracker with F2, I see that many lines remain.
There's no guarantee of seeing every line in a renpy novel, dev can easily / accidentally make lines of dialogue that are impossible to reach. Occasionally URM can let you view choices that are normally impossible to reach via normal gameplay but it doesn't and probably can't catch every single instance of it ever.


You don't have permission to view the spoiler content. Log in or register now.
 
  • Like
Reactions: Calevala

fpsgamer

Active Member
Nov 21, 2017
737
1,116
346
Tried on latest version of Null Hypothesis 0.8C which is based on renpy 8.5.0. it crashes game on startup.
Would be grateful on any help.
 

meladath

New Member
Apr 15, 2022
7
13
13
I'm windows, but I had the same problem that every now and then ALT-M wouldn't work on certain games.

So I went into 'Options', then 'QuickMenu' and set up a global quickmenu with just a URM button in it (and an auto hide). I have it up the top in the middle so it doesn't affect anything, but it means I just have to move my mouse to the middle of the top and a shortcut to URM always pops up.

View attachment 5332063

View attachment 5332059
Thanks, I will give this a try!
 
5.00 star(s) 49 Votes