Bronya-Rand / DDLCModTemplate2.0

A new template for producing DDLC mods that adhere to Team Salvato's guidelines based off DDLC itself.
58 stars 18 forks source link

Include Ren'Py Base Files by adding 'all' to build.package #77

Closed pianoboycaleb closed 3 months ago

pianoboycaleb commented 8 months ago

This PR allows mods to be installed more easily on Ren'Py 7 (and 8 if the same options are applied to the Python-3 branch) by only needing to copy the 3 DDLC rpa files into the /game/ folder. This still follows the Team Salvato IP Guidelines, as it would only make sure that all of the open source Ren'Py files are added to the project. DDLC assets wouldn't get added to the published zip, and the game would force an exception still without them.

Previously, you would have to move the entire mod into the DDLC folder, as it merges the new Ren'Py and Python files with the old ones. This is only necessary because DDLC's Ren'Py files include default assets such as fonts that aren't included in current mod builds. (Internally, Ren'Py classifies any .py or .rpyc files as 'renpy', which is already included. Assets such as fonts are only included in 'all'.)

Adding the 'all' function to packages allows these to be included, which is required for at least one specific new feature in Ren'Py 8.2/7.7, being the native emoji support (the emojis use a new font in the Ren'Py common files).

Because of this change, files that Android needs have been changed from 'all' to 'android', to make sure that they aren't included in newer PC builds.

Bronya-Rand commented 8 months ago

Took me a bit to notice this PR but I have slight concerns I will have to talk to Mithost about this.

The reason why the R7/R8 formats are as such (and Android requiring the all check) is to prevent the mod from being bundled as DDLC + Mod in 1 as that is against the IPG. Allowing this for emoji support in 8.2/7.7 will basically allow people to either intentionally or accidentally bundle the game's files for a ZIP package and not make mod ZIPs made by the template IPG compliant.

Android has a exception to this rule as I told Mit years ago in 2020 the limitations of DDLC on Android and he was okay with my assessment of all as long as the user self-extracts the archives (which are needed as Android dislikes RPAs [IDK if that holds up to this day now]). Unless Mit gives me this exception or this is clarified as to how it doesn't violate the IPG while allowing more Ren'Py stuff to be added, this PR is sort of in a limbo state for me to add to either Python 2 or 3 branches.

pianoboycaleb commented 8 months ago

Android builds still can't just use rpa files, no. But from my understanding, what adding 'all' here does isn't include all of the project files in the build, but instead just includes all of the Ren'Py source files.

From some testing I did, a build with these settings only generates a scripts and mod_assets archive, and while running the exe technically launches, it forces an in-game, un-ignorable exception of not having the DDLC rpas installed, and only works once you add those in. Additionally, the base game images and assets themselves aren't anywhere in these archives or build files.

You could also add a safeguard to not include anything in a build from an images, bgm, or sfx folder in the base game directory, since those are what the extracted DDLC rpas turn into.

Feel free to do some testing if you want, but as far as I've seen, 'all' only applies to Ren'Py files, being the open-source assets included with a normal sdk. There might also be a way to only add in the new Ren'Py 7.7/8.2 font into a build, which I'll update you on if I find something out about it.

Bronya-Rand commented 8 months ago

Currently being discussed with Dan/Mit.

pianoboycaleb commented 8 months ago

Alright, sounds good. I don't want to go against the guidelines or anything, aha.

If this ends up being against the IPG, either a workaround could be added or the credits screen would need to at least be slightly altered, since the copyright symbol in the template credits is being automatically converted to an emoji in the missing font in the newest versions of Ren'Py (which is how I realized this issue in the first place).

Either that, or just warn people about the issue if they're using the template on the newest Ren'Py release.

Bronya-Rand commented 3 months ago

Doesn't seem to gotten a response from TS about this so closing this for now unless later talks change.