Ren'py config.archives namespace collision bypass

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
lordpidey
Newbie
Posts: 6
Joined: Sat Apr 21, 2018 10:48 pm
Contact:

Ren'py config.archives namespace collision bypass

#1 Post by lordpidey »

Hello,

I'm attempting to do something a bit unusual with Ren'py.

I am attempting to mod an episodic game, by merging the episodes together, as well as adding new content to the merged version, and making choices last between episodes.

The author has said modding is okay, so long as I don't distribute any files created by them.

So I am trying to figure out the best way to distribute the finished mod fusion, and came across https://www.renpy.org/doc/html/config.h ... g.archives , which seems to fit what I need almost perfectly, as I could just write a batch file to search for steam installs of the originals, and copy/rename the archive.rpa files into the new directory. However, I foresee one minor problem. Some assets in each game's archive.rpy share names. CG_1 in episode 1, and CG_1 in episdode 2 are completely separate and unrelated for example. There are many assets in common between the different archive.rpy's, but not all.

So, this raises the question: How can I dictate WHICH entry from config.archives each individual asset is pulled from?

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Ren'py config.archives namespace collision bypass

#2 Post by gas »

Something unclear there. How you can distribute the merged episodes if the author told not to distribute files created by them and that EXACTLY what you are doing?
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

lordpidey
Newbie
Posts: 6
Joined: Sat Apr 21, 2018 10:48 pm
Contact:

Re: Ren'py config.archives namespace collision bypass

#3 Post by lordpidey »

The original versions are distributed solely by steam, this means it's easy to locate the archive.rpas of the originals, and thus automate renaming/copying them into a new location.

kivik
Miko-Class Veteran
Posts: 786
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: Ren'py config.archives namespace collision bypass

#4 Post by kivik »

What gas is saying is that how can you merge the episodes and redistribute - without breaking the "don't distribute any files created by them." clause. Modifying someone's source code and redistributing them doesn't negate distributing source files.

I think the author's saying you can mod - where additional files only are downloaded by players and run on top of the author's own game files which the player already have.

Given the setup you've mentioned (turning an episodic game - multiple Ren'py projects, into a single game - a single Ren'py project), I'm not really sure how you can achieve this without breaking that agreement?

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

Re: Ren'py config.archives namespace collision bypass

#5 Post by Ocelot »

Taking data from already installed game is a pretty common pattern used by translators or modders. It requires user to provide game files himself, leaving distribution itself free of copyrighted data. In short, you must own the game before you can play derived games.
Console emulators usually use similar system by requiring you to supply copy of BIOS dumped from your own console.
< < insert Rick Cook quote here > >

lordpidey
Newbie
Posts: 6
Joined: Sat Apr 21, 2018 10:48 pm
Contact:

Re: Ren'py config.archives namespace collision bypass

#6 Post by lordpidey »

I plan on having the installation batch file use IPS patching to modify the script.rpyc, as well as any other rpyc files that need changing.

This can't be done on files larger than 16MB, due to the limitations of IPS patching, so it's not an option for the rpa files.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'py config.archives namespace collision bypass

#7 Post by PyTom »

I don't directly support modding. Not that I'm morally opposed to it, but I can't give good support to someone that isn't the original creator of a game. It's very difficult to give support without being able to ask someone "why did you do <x>", so I generally don't.

That being said, the archives listed in config.archives are searched in order, with the first one having the file winning out.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

lordpidey
Newbie
Posts: 6
Joined: Sat Apr 21, 2018 10:48 pm
Contact:

Re: Ren'py config.archives namespace collision bypass

#8 Post by lordpidey »

I very much understand your hesitance to provide support to those other than the original author, as they will not have as much insight for the reason behind some of the more esoteric design decisions in the original game.

That is why I am attempting to be as specific as possible about my problem.

That said, A thought just popped into my mind.

Can I swap the order of config.archives on the fly? I will only ever need to switch the order in two locations: when starting a new game, and at a specific spot in the story.

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Ren'py config.archives namespace collision bypass

#9 Post by PyTom »

No, you can't. And that's a fundamental limit - with how Ren'Py caches images and things, fundamental assumptions are violated if a file on disk or in an archive could change.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Bing [Bot], bonnie_641, Google [Bot]