You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've modified my own launcher to do this for me, but I think it's useful enough that others might want it.
It would be really nice to have some way to pass functions to a the renpy builder that would allow us to modify / do preprocessing on files, etc.
For example the way I'm using it is that I've added some code to the archiver.Archive class add method, which runs all png files through pngquant (png compressor/optimizer), before adding them to the archive. This lets me produce a game with compressed images, while still letting me keep the uncompressed files pre-build.
Granted, this does cause the build to take 4 times as long because each file needs to be compressed, but it's still useful.
I currently just use this for processing files before adding to the game or archive, but I can see some other possible use cases as well.
I probably will end up doing that, though I still think my initial suggestion of having a way people can hook into the build process and alter things would be beneficial, since then the community could make some "plug and play" scripts that can be implemented simply by dropping an rpy file in a folder somewhere.
It's a super low priority thing, just thought it would be a nice thing to have.
I've modified my own launcher to do this for me, but I think it's useful enough that others might want it.
It would be really nice to have some way to pass functions to a the renpy builder that would allow us to modify / do preprocessing on files, etc.
For example the way I'm using it is that I've added some code to the
archiver.Archive
classadd
method, which runs all png files through pngquant (png compressor/optimizer), before adding them to the archive. This lets me produce a game with compressed images, while still letting me keep the uncompressed files pre-build.Granted, this does cause the build to take 4 times as long because each file needs to be compressed, but it's still useful.
I currently just use this for processing files before adding to the game or archive, but I can see some other possible use cases as well.
Maybe something like:
build.preprocess("game/**.png",processPng)
The text was updated successfully, but these errors were encountered: