This is a Python package containing scripts for working on repositories of resource pack patches, such as Soartex-Modded-1.12.x or JSTR-Modded-1.12.x.
# example python usage
from resource_wrangler import scripts
scripts.merge_patches("~/graphics/fanver/Modded-1.12.x/","~/graphics-merged/fanver/Modded-1.12.x/",pack_format=3)
The package also has a "pipeline" system to run multiple scripts sequentially with preset paths.
wrangle_resource 1.12_merge_fanver
This terminal command runs the 1.12_merge_fanver
pipeline.
A pipeline runs multiple tasks sequentially.
Each task runs a script with filesystem paths pulled from resources.
Resources contain paths to a patch directory, pack directory, git remote, locations of mod directories, etc.
Feel free to edit pipelines and resources in resource_wrangler/configs to your liking.
One useful terminal command is wrangle_resource 1.12_dev_soartex
.
This pipeline merges patches, creates symlinks to the merged pack from your minecraft instances, and starts a file-system watcher that re-applies changes made in the patches repository to the merged resource pack.
While the terminal session is running, any edits made to the patch repository will appear when you refresh assets with F3+T in-game.
- Install Python
- at least version 3.6
- If using an installer, be sure to enable "Add Python 3.x to PATH"
- Install Git
- Windows: consider 'Git for Windows'
- Mac or Linux: try typing
git
in the terminal
- Run the following in the terminal.
git clone [email protected]:Soartex-Modded/Resource-Wrangler.git
cd Resource-Wrangler
pip3 install -r requirements.txt
pip3 install -e .
- Edit any relevant paths in resources.toml to suit your filesystem.
Unzip resources from a list of folder paths containing mod jars.
Merge mod patches (soartex, invictus, default, jstr, etc.) into a single resource pack.
Create the symbolic links described in the resource link_dirs
to the pack_dir
.
Script to live-maintain multiple resource packs built from mod patches, from multiple repositories of mod patches.
Use MD5 hashes to detect identical files between two different resources. Then port textures from one resource to the other, based on the discovered mapping.
Delete files from a directory of mod patches that are not present in a merged default pack. This task does not delete files from a patch if no textures from the patch are detected in the merged default pack. This task moves files into a temporary directory, instead of deleting them.
Uses the CurseForge api to download the top k most downloaded mods for each specified minecraft version into a mods folder.
Clones or downloads the necessary assets from a git repository or CurseForge. The default resources.toml contains all the necessary info for automatically collecting all of the resources.
Log files that are present in multiple patches.
Logs inconsistencies and enforces proper formatting in mod.json files.
Detects templates in default GUI files and uses a bank of resource pack textures to reconstruct textured versions.
Inserts resized textures prefixed with __default_
for any untextured assets into the patches directories they belong in.
Creates a workspace containing textures similar to an example. Once you finish texturing assets in the workspace, they are moved into the patches directory. If the watch changes script is running, the merged resource pack will also be updated with your changes.
A task that runs another pipeline by name.