Update codebase, readme

This commit is contained in:
oitsjustjose 2022-06-01 23:03:10 -05:00
commit e773ef480f
2 changed files with 26 additions and 5 deletions

17
README.md Normal file
View file

@ -0,0 +1,17 @@
# MinecraftOreTextureGenerator
A batch method of overlaying a set of textures onto a set of base layers
## Usage
Just download the latest `.zip` file from the [Releases](https://github.com/oitsjustjose/MinecraftOreTextureGenerator/releases/latest) page and unzip it. Once you're done, open the unzipped archive and run `generate.exe` once to generate the folders. You should now see two folders:
### `base_layers`
In here, place your background layers - these need to be in `.png` format, but the name doesn't matter and as long as they are the same dimensions as all your other sprites (presumably 16x16 but I'm not your mom), you are good to go.
### `overlay_layers`
Likewise to `base_layers`, place the layers you want overlaid onto your base layers in here - once again these need to be the same resolution as your other sprites and they need to be in `.png` format.
Once you've gotten all this set up done, run `generate.exe` again - this time you should see an `out` folder be generated, and within it should be all permutations of the files you wanted overlaid!

View file

@ -16,27 +16,31 @@ def main() -> None:
python[3] generate.py <PATH_TO_BASE_LAYER>.png
"""
if not os.path.exists("./out"):
os.mkdir("./out")
err = False
if not os.path.exists("./base_layers"):
os.mkdir("./base_layers")
err = True
print("Base Layers folder not found!")
print(
"Please place your Base Layer Textures in a new folder adjacent to this file named `base_layers`"
)
input("Press Enter to Exit")
sys.exit(0)
if not os.path.exists("./overlay_layers"):
os.mkdir("./overlay_layers")
err = True
print("Overlay Layers folder not found!")
print(
"Please place your Overlay Textures in a new folder adjacent to this file named `overlay_layers`"
)
if err:
input("Press Enter to Exit")
sys.exit(0)
if not os.path.exists("./out"):
os.mkdir("./out")
for base_fn in os.listdir("./base_layers"):
if not base_fn.endswith(".png"):
continue