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

5.00 star(s) 49 Votes

Tiur

Well-Known Member
Nov 13, 2021
1,317
3,677
398
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

Engaged Member
Dec 29, 2019
3,129
4,856
387
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

Newbie
Aug 16, 2024
31
27
28
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
Jr. Uploader
Jul 26, 2023
18,498
47,863
922
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
 

CurtimusPrime92

Active Member
Jul 17, 2020
589
464
152
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

Newbie
Aug 16, 2024
31
27
28
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
 

CurtimusPrime92

Active Member
Jul 17, 2020
589
464
152
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

Newbie
Aug 16, 2024
31
27
28
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
238
915
218
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,348
3,173
357
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
238
915
218
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_

CurtimusPrime92

Active Member
Jul 17, 2020
589
464
152
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.
game seems to run aggressive python scripting for anti-tamper? doesn't even want to run vanilla under sandbox environment (file access restrictions/networking blocked)
 
  • Like
Reactions: Fantasy Catharsis

SimReaper18

Member
Jan 11, 2019
219
314
226
Unity games aren't editable like Ren'Py games, so there's nothing you can really do without some proper hacking AFAIK. Unless the game creator allowed for some sort of scripting on top of the engine, which is unlikely for this genre.
More specifically, Unity games don't follow a particular pattern like RenPy does, such as some specific, set variables and whatnot. You can't just pop a file into Unity and expect to be able to change a character's name or whatever, because that game might use its own code to make a VN, so you'd have to know that code specifically and target it. It's practically impossible to make a "universal" Unity mod that has a lot of the same high-level functionality that URM has, just because of that variation and the nature of Unity as a game engine. A Unity game can be anything, anywhere from a VN to the next Fallout NV, and because of that fact, no Unity mod can be as universal as URM.

However, Unity games are editable like RenPy, if you're willing to use/learn BepInEx, MelonLoader, or any similar modding framework. Those are just easy-to-install modding frameworks that hooks into Unity games and allows certain plugins to be ran, such as or even my mod for Femboy Survival.

TL;DR: Unity can be as moddable (if not more) as RenPy, but there is no plug-and-play, "universal" Unity mod that functions like this one, especially not if the Unity game is a VN.
 
  • Like
Reactions: 0x52 and MaxRichard

Bingoogus

Forum Fanatic
Sep 5, 2021
4,310
13,045
628
I have a bit of a random question about this mod. In some games the mod is fluid as can be but in some it's really gluggy, typing into it or deleting text is very slow and i'm just curious what could be causing it? I know that's not giving useful details but i'm just hoping it's a simple sort of thing that really only has one answer, like the game takes up too much RAM or something, i dunno.
 
  • Like
Reactions: Guz007

0x52

Ren'Py Magician
Modder
Donor
Game Developer
May 23, 2019
1,774
7,301
712
this is great mod, r u considering launching a simplified Chinese language?
It's in my notes, but it's complicated to accomplish

I have a bit of a random question about this mod. In some games the mod is fluid as can be but in some it's really gluggy, typing into it or deleting text is very slow and i'm just curious what could be causing it? I know that's not giving useful details but i'm just hoping it's a simple sort of thing that really only has one answer, like the game takes up too much RAM or something, i dunno.
Does this always happen with specific games or when doing something specific?
 
  • Like
Reactions: Feyd

Bingoogus

Forum Fanatic
Sep 5, 2021
4,310
13,045
628
Does this always happen with specific games or when doing something specific?
I've only noticed it here or there, it's pretty rare, i can go a whole bunch of games without seeing it and then some odd one has it. Only real way to notice it is to try typing with the menu up, it's pretty consistent overall, if the game has the problem. Since it's so rare i've never managed to remember long enough to try and find a pattern but i was just figuring it was something simple you'd already know about, like old Renpy versions or a specific module some devs use when they should use another one instead but they're new and don't know better. The fact your asking tells me you're unfamiliar with it which actually surprises me and now i feel like a dipshit for not coming to you with actionable information.
 
  • Like
Reactions: Guz007

DaFinker

Well-Known Member
Apr 24, 2024
1,142
2,178
341
I'm going to assume the answer is "yes", but if attempting to use URM on a VN that has been finalized and had an independently developed WT mod merged into it, will this cause a conflict?

I'm playing a completed VN for whom someone had done a WT Mod, and the Dev incorporated that mod into the VN and re-issued the "Modded" VN after completion.

I'm trying to go back and change the MC name without restarting, but the script file is .rpyc (or .rpya - I always get those confused when I'm not looking directly at the directory) instead of .rpy, and the definition isn't showing up in any other .rpy file as I've usually found, suggesting that URM is my only real solution outside of completely rewriting the few files I can access with the simple tools I have, or completely restarting the routes from the beginning.

It isn't a huge deal, but there are many routes now, and I finally thought of a fitting name other than the default. Just a little point of "it would be better if", but it isn't an essential thing.
 

0x52

Ren'Py Magician
Modder
Donor
Game Developer
May 23, 2019
1,774
7,301
712
I'm going to assume the answer is "yes", but if attempting to use URM on a VN that has been finalized and had an independently developed WT mod merged into it, will this cause a conflict?
I don't see why this would cause a conflict
 
  • Like
Reactions: Feyd
5.00 star(s) 49 Votes