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

5.00 star(s) 37 Votes

bat2897

Newbie
May 5, 2017
97
128
Does URM not work with Empress Game? I can't seem to find anything on this.

Here is the error I get. Any assistance would be much appreciated

```
I'm sorry, but an uncaught exception occurred.

While running game code:
File "0x52-URM/classes/main.rpy", line 33, in <module>
File "0x52-URM/classes/textbox.rpy", line 14, in __init__
TypeError: __init__() got an unexpected keyword argument 'image'

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

Full traceback:
File "0x52-URM/classes/main.rpyc", line 18, in script
File "E:\path\EmpressGame-0.3.2a-pc\EmpressGame-0.3.2.Alpha-pc\renpy\ast.py", line 1138, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "E:\path\EmpressGame-0.3.2a-pc\EmpressGame-0.3.2.Alpha-pc\renpy\python.py", line 1122, in py_exec_bytecode
exec(bytecode, globals, locals)
File "0x52-URM/classes/main.rpy", line 33, in <module>
File "0x52-URM/classes/textbox.rpy", line 14, in __init__
TypeError: __init__() got an unexpected keyword argument 'image'

Windows-10-10.0.19045 AMD64
Ren'Py 8.1.0.23051307
EmpressGame 0.3.2.Alpha
Sat Aug 17 02:11:15 2024
```
 

MiltonPowers

Twins Basil! Twins!
Donor
Jul 26, 2023
7,645
14,772
Hello, can someone tell me how I can make the background in the text box transparent? I've tried many things but can't get it to work.
Go one youtube and search for this video "Universal Ren'Py Mod version 2.0 tour"
The video will run you through the features of URM. Within that they'll also showcase Textbox manipulation. It's SUPER useful. Once you create your ideal textbox you can save it then load it in other games as long as the saved file exists in your "game" folder
Links to how-to videos are all in the OP.

Screenshot 2024-08-17 105203.png
 
  • Like
Reactions: 0x52

elricsecret

Newbie
Feb 8, 2024
39
34
Such a great mod I discovered this too late and cant live without this anymore.
I have only a tiny little problem.

when I press alt-m mod window opens. but when I press alt-m again, it doesnt close the window.
is this normal or is there something wrong with my settings?
 

MiltonPowers

Twins Basil! Twins!
Donor
Jul 26, 2023
7,645
14,772
Such a great mod I discovered this too late and cant live without this anymore.
I have only a tiny little problem.

when I press alt-m mod window opens. but when I press alt-m again, it doesnt close the window.
is this normal or is there something wrong with my settings?
I don't think ALT-M closes it (it never has for me). Use the red-x Top right, or ESC key.
 

0x52

Ren'Py Magician
Modder
Donor
Game Developer
May 23, 2019
1,674
6,504
Oooooo that's why some games I played didn't show variable changes on choices.
Idk much abt coding or modding. But I'm kinda curious, why is that?
Is it bc it is too complicated to do? Or is that smt you're planning to add?
URM has to stop looking ahead at some point in the code and this makes the most sense.
If we didn't do this we could theoretically be looking ahead indefinitely.

Oh sry I think I didn't word myself correctly. Ik you don't have a "timeline". What I meant is more where'd you say they are situated on your priority list, or maybe you just go with how you feeling it?
The order is not set

Does URM not work with Empress Game? I can't seem to find anything on this.

Here is the error I get. Any assistance would be much appreciated

```
I'm sorry, but an uncaught exception occurred.

While running game code:
File "0x52-URM/classes/main.rpy", line 33, in <module>
File "0x52-URM/classes/textbox.rpy", line 14, in __init__
TypeError: __init__() got an unexpected keyword argument 'image'

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

Full traceback:
File "0x52-URM/classes/main.rpyc", line 18, in script
File "E:\path\EmpressGame-0.3.2a-pc\EmpressGame-0.3.2.Alpha-pc\renpy\ast.py", line 1138, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "E:\path\EmpressGame-0.3.2a-pc\EmpressGame-0.3.2.Alpha-pc\renpy\python.py", line 1122, in py_exec_bytecode
exec(bytecode, globals, locals)
File "0x52-URM/classes/main.rpy", line 33, in <module>
File "0x52-URM/classes/textbox.rpy", line 14, in __init__
TypeError: __init__() got an unexpected keyword argument 'image'

Windows-10-10.0.19045 AMD64
Ren'Py 8.1.0.23051307
EmpressGame 0.3.2.Alpha
Sat Aug 17 02:11:15 2024
```
Seems like they assigned something to Ren'Py's "Character", this actually breaks Ren'Py itself.
I will probably implement a workaround for this in a future release of URM.
 

Johan_0000

Active Member
Apr 14, 2023
650
479
URM has to stop looking ahead at some point in the code and this makes the most sense.
If we didn't do this we could theoretically be looking ahead indefinitely.
Wouldn't it be possible to make smt like a variable change detection that we could turn on or off in the settings? It could appear like followed variables notif.

Or would it be possible to look for the code only when detecting a jump to a different label?


I'm sry if I may seem arrogant btw (kinda feels like that bc Idk anything abt coding lol), I'm just rly curious,.
Btw, if smn other than the dev/s want to answer my questions I'm open to it guys.




THX
[EDITED]
 
Last edited:
  • Like
Reactions: darlic

Tiur

Well-Known Member
Nov 13, 2021
1,209
3,322
Wouldn't it be possible to make smt like a variable change detection that we could turn on or off in the settings? It could appear like followed variables notif.

Or would it be possible to look for the code only when detecting a jump to a different label?
The main thing is, there will almost always be a jump to a different label. That's one of the fundamental basics of how Ren'Py works. Different devs order things differently, and while human brains can somewhat perceive "this is a completed conceptual 'scene'", code just can't (unless the original dev specifically coded their scenes to mark where conceptual scenes start and finish). On top of that, most games' devs are amateurs just figuring out how to code at all, so expecting any coding best practices from them is useless at best, and more often foolish.

The current choice/variable detection does seem to work well for most situations... But it probably isn't an outlandish feature request to ask for a "follow jumps" option, with a variable threshold sensitivity. Something like "during Show results in Choice Detection, follow jumps to additional labels if they occur within [configurable value from, say, 0 to 20] lines of code after the choice".
 

Johan_0000

Active Member
Apr 14, 2023
650
479
The main thing is, there will almost always be a jump to a different label. That's one of the fundamental basics of how Ren'Py works. Different devs order things differently, and while human brains can somewhat perceive "this is a completed conceptual 'scene'", code just can't (unless the original dev specifically coded their scenes to mark where conceptual scenes start and finish). On top of that, most games' devs are amateurs just figuring out how to code at all, so expecting any coding best practices from them is useless at best, and more often foolish.

The current choice/variable detection does seem to work well for most situations... But it probably isn't an outlandish feature request to ask for a "follow jumps" option, with a variable threshold sensitivity. Something like "during Show results in Choice Detection, follow jumps to additional labels if they occur within [configurable value from, say, 0 to 20] lines of code after the choice".
Ooooh that's why I see some modders getting rly excited abt modding some well coded games lol. Honestly I don't know much abt code but I can understand the pleasure of decorating a clean and good looking place lol.

Tell me if I understood correctly, but you're basically saying that there will alway label jumps in Renpy games bc it's one of its core function. The problem is that they don't always mark a label as finished and another as starting right on the choice bc some of them are just beginners trying to figure it all out (some of them may do so by choice Ig)?

However you're saying it'd be possible during a choice to order the code to look for labels within a certain threshold. As to not look for them indefinitely, only then we could identify if there is a variable change?

MAaan I feel like a parrot lol. At least it helped me understand.

Btw,


THX
 

Tiur

Well-Known Member
Nov 13, 2021
1,209
3,322
Ooooh that's why I see some modders getting rly excited abt modding some well coded games lol. Honestly I don't know much abt code but I can understand the pleasure of decorating a clean and good looking place lol.

Tell me if I understood correctly, but you're basically saying that there will alway label jumps in Renpy games bc it's one of its core function. The problem is that they don't always mark a label as finished and another as starting right on the choice bc some of them are just beginners trying to figure it all out (some of them may do so by choice Ig)?

However you're saying it'd be possible during a choice to order the code to look for labels within a certain threshold. As to not look for them indefinitely, only then we could identify if there is a variable change?
Kinda. Here's a few examples. I'm working completely off memory, so syntax might be slightly off, but this is the best way I can think of to explain the issue.

You don't have permission to view the spoiler content. Log in or register now.

All of those are valid code (and I have in fact seen every single one of those used in games), and all have the desired effect: change a variable based on choice, and show the dialogue associated to that choice, before resuming the combined story after the choice was made.

Now, if these were the only variations, that'd be fine, but they're not. There are custom choice screens which are a lot harder for URM to detect in the first place, and there may be additional variation/choices/code/labels in each of the branch choices, too, and so on. Humans can generally understand "sets" of things that may be somewhat ambiguous, but code cannot, so it's extremely hard for URM to consistently, definitively, and universally know when to "stop" looking forward for variable changes.
 

shmurfer

Well-Known Member
Dec 29, 2019
1,225
1,049
Now, if these were the only variations, that'd be fine, but they're not. There are custom choice screens which are a lot harder for URM to detect in the first place, and there may be additional variation/choices/code/labels in each of the branch choices, too, and so on. Humans can generally understand "sets" of things that may be somewhat ambiguous, but code cannot, so it's extremely hard for URM to consistently, definitively, and universally know when to "stop" looking forward for variable changes.

And if the project is big enough / the dev is lax enough they'll mix several of these in the same project.
 

walkerin

New Member
Aug 16, 2024
8
11
hi everytime I play a renpy game I open screens.rpy and add
"
init python:
config.has_autosave = False
config.autosave_on_quit = False
config.autosave_on_choice = False
"
to disable autosave.
can I use URM to automate this process? Is it possible?
 

MiltonPowers

Twins Basil! Twins!
Donor
Jul 26, 2023
7,645
14,772
hi everytime I play a renpy game I open screens.rpy and add
"
init python:
config.has_autosave = False
config.autosave_on_quit = False
config.autosave_on_choice = False
"
to disable autosave.
can I use URM to automate this process? Is it possible?
Not automated. You would need to open it and change the variable (afaik).

Screenshot 2024-08-20 130135.png
 
  • Like
Reactions: 0x52 and walkerin
Jul 17, 2020
402
278
thank u. I pretty sure with this new information I can automate it with autohotkey
can't you just make your own mod file ie make a new text doccument and name it AutosaveKiller.rpy or something with
Python:
################################################################################
## Initialization
################################################################################

## The init offset statement causes the initialization statements in this file
## to run before init statements in any other file.
init offset = 99

config.has_autosave = False
config.autosave_on_quit = False
config.autosave_on_choice = False
or
Python:
init 99 python:
    config.has_autosave = False
    config.autosave_on_quit = False
    config.autosave_on_choice = False
then just drop a copy of the mod file into every new renpy game you play?
 
Last edited:

walkerin

New Member
Aug 16, 2024
8
11
can't you just make your own mod file ie make a new text doccument and name it AutosaveKiller.rpy or something with
Python:
################################################################################
## Initialization
################################################################################

## The init offset statement causes the initialization statements in this file
## to run before init statements in any other file.
init offset = 99

# code here
or
Python:
init 99 python:
    config.has_autosave = False
    config.autosave_on_quit = False
    config.autosave_on_choice = False
then just drop a copy of the mod file into every new renpy game you play?

I have 0 Python knowledge . and thx to great community I never felt the need of learning.
this is the first time I need a mod that doesnt already exist

I just tried putting these codes to a new AutosaveKiller.rpy file but it didnt work.
dunno what kind of stupid noob mistake I made xd

Python:
init 99 python:

    config.has_autosave = False

    config.autosave_on_quit = False

    config.autosave_on_choice = False
 
Jul 17, 2020
402
278
snip

I just tried putting these codes to a new AutosaveKiller.rpy file but it didnt work.
dunno what kind of stupid noob mistake I made xd

snip
idk what to tell you i assumed one of those would work, all "init 99 python:" does is delay the game 'reading' the code block till after "init python:" and "init 1 python:"-"init 98 python:"

but maybe config.XXX varibiles shouldn't be in a python block?

if so
Python:
init offset = 99

define config.has_autosave = False
define config.autosave_on_quit = False
define config.autosave_on_choice = False
should work unless i am mistaken and i could be i am no expert lol
 
Last edited:
  • Like
Reactions: walkerin

walkerin

New Member
Aug 16, 2024
8
11
idk what to tell you i assumed one of those would work, all "init 99 python:" does is delay the game 'reading' the code block till after "init python:" and "init 1 python:"-"init 98 python:"

but maybe config.XXX varibiles shouldn't be in a python block?

if so
Python:
init offset = 99

config.has_autosave = False
config.autosave_on_quit = False
config.autosave_on_choice = False
should work unless i am mistaken and i could be i am no expert lol
its ok thx for trying
 
Jul 31, 2021
224
765
Hi so I'm not sure if it's something on my end and I've only seen maybe one post about this on here but whenever I launch COTE: Red Sonata [v0.14.3] it sends me a traceback error followed by the URM mod getting deleted. I'm using the latest version so I'm not sure what it is that I'm missing. Was this something the dev of that game did intentionally and if so, is there a way to bypass that or am I SOL? Cheers.
 

theMickey_

Engaged Member
Mar 19, 2020
2,194
2,828
Hi so I'm not sure if it's something on my end and I've only seen maybe one post about this on here...
If you did search for "red sonata" you should have found 0x52's reply on this issue though...?! The game dev intentionally deletes any modification to the game, but 0x52 does mention a "workaround" for that -- I haven't tested it myself, so I can't tell if it's still working.
 
Jul 31, 2021
224
765
If you did search for "red sonata" you should have found 0x52's reply on this issue though...?! The game dev intentionally deletes any modification to the game, but 0x52 does mention a "workaround" for that -- I haven't tested it myself, so I can't tell if it's still working.
I actually didn't see that they posted a reply to that other post, sorry mate. Will try the workaround and see if that helps. Cheers.

Edit: That did the trick, but it doesn't want to open the URM menu when I press alt + m. :confused:

Edit 2: Nevermind, I guess it was just the prologue that wasn't allowing me to use it? :FacePalm:
 
Last edited:
  • Like
Reactions: theMickey_
5.00 star(s) 37 Votes