Any way to ignore some .rpyc files during load?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
Victorius
Regular
Posts: 30
Joined: Thu Jan 14, 2021 7:02 pm
Projects: Astral Lust
Github: Victorius-Astral
Contact:

Any way to ignore some .rpyc files during load?

#1 Post by Victorius »

Hey! I wanted to add mod manager to my game, the only thing I don't know how to do is how to make some scripts be ignored when loading game. I guess if it's doable, it would have something to do with python early, I've found these two options in docs:

Code: Select all

define config.searchpath = [ 'common', 'game' ]
A list of directories that are searched for images, music, archives, and other media, but not scripts. This is initialized to a list containing "common" and the name of the game directory.

Code: Select all

define config.search_prefixes = [ "", "images/" ]
A list of prefixes that are prepended to filenames that are searched for.

Something like these two, but they don't work for scripts, there is a mention of archives, but I guess it won't work with script archives. Anyone know if it's doable?

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2402
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Any way to ignore some .rpyc files during load?

#2 Post by Ocelot »

No, there is not. The only way to not load rpyc file is to make sure it isn't int the game folder. But there is a solution which doesn't involve deleting them or moving the outside: rename it. if the new file is called something like 123.rpycu, it won't be loaded. However, if there is a corresponding rpy file, rpyc will be regenerated, so you would ant to rename rpy files too.

I believe, that you cannot do it from inside of the game, because files might be locked for reading by RenPy, so an out-of-the-game launcher would be needed.
< < insert Rick Cook quote here > >

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot]