Workshop code doesn't replace files between the base game or other mods #7

Open
opened 2024-04-24 11:33:12 +00:00 by MapAnon · 0 comments
Owner

For any mod that has a file that has the same file path and filename as one from the base game, or even other mods, Ren'Py will try to index all files and then complain about similar files such as images that are auto-namespaced in the images directory.

This makes it pretty inconvenient to do meaningful or simple mods, especially compromising on compatibility. Ideally mods should be able to overwrite files as intuition would expect, but I don't know how to do this or if it's even possible without massively complicating the build patch.

Interestingly though, images thrown into the "tl" directory do replace images in the base game without issues - even when an image directly calls from the normal "images" directory, if there's a file of the same filepath and file name in the "tl" directory it will replace that. The load function in renpy/loader.py in the renpy source code might be responsible for handling that. See if it can be useful for making file hierarchy a reality for workshop mods.

For any mod that has a file that has the same file path and filename as one from the base game, or even other mods, Ren'Py will try to index all files and then complain about similar files such as images that are auto-namespaced in the images directory. This makes it pretty inconvenient to do meaningful or simple mods, especially compromising on compatibility. Ideally mods should be able to overwrite files as intuition would expect, but I don't know how to do this or if it's even possible without massively complicating the build patch. Interestingly though, images thrown into the "tl" directory do replace images in the base game without issues - even when an image directly calls from the normal "images" directory, if there's a file of the same filepath and file name in the "tl" directory it will replace that. The `load` function in `renpy/loader.py` in the renpy source code might be responsible for handling that. See if it can be useful for making file hierarchy a reality for workshop mods.
MapAnon added the
Medium Priority
help wanted
labels 2024-04-24 11:33:12 +00:00
Sign in to join this conversation.
No description provided.