Please excuse me if I have only repeated what someone else has already created. I am new to the minecraft modding community and thought that I would contribute a little script that I have created that helps me when packaging minecraft texture packs. What the script does is very simple. You tell it what folder to compress, and what to name the folder once zipped, and it will do so. It really helps when rapidly prototyping new textures because instead of going through a compression program every time you want to zip something, it will do it in a single click given the parameters that you provide. If this sounds like something that you would want, download the attachment and follow along.
1. Make sure that you have Python 2.6 or greater installed.
It is possible that it works on previous versions, but I have only tested on 2.6 and 3.1 which are the most commonly used. 2. Download the attachment and place it in your texture packs folder. To download from the site, click the download button on the top right. Make sure to save it as a .py instead of the default .txt. This is important. Then place it in your texture packs folder. For me, this would look like C:\Users\Seth1010\AppData\Roaming\.minecraft\texturepacks. Make sure that the python script is in the texturepacks folder. 3. Set up your working environment.
The way that I have it set up is that I am working with a folder that is inside the texturepacks folder. The folder is called "Minimalist" (the name of my texture pack), and inside this folder is the standard pack.txt, terrain.png and so on. This script is written for how I have my environment, but feel free to modify it to work with yours. 4. Edit the script.
You can open up the zip.py file in a standard text editor. Only worry about the three variables towards the top of the script. These variables are zipFile,folder, and printAll. The first two are absolutely necessary to change. The variable zipFile needs to be assigned to the name of what you want the zip file to be called. The variable folder is the folder that your working environment is. printAll is simply a variable that when set to True will print out all of the file names as they are compressed. 5. Run the script.
If you have python all set up correctly, you should be able to click on the python script and have it run. If windows asks for you to set up a program to run it, browse to where you have python installed and select python.exe.
I hope that I have helped someone out. If you have any questions or comments, feel free to ask them!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Download link:
http://pastebin.com/hmF3MmCj
1. Make sure that you have Python 2.6 or greater installed.
It is possible that it works on previous versions, but I have only tested on 2.6 and 3.1 which are the most commonly used.
2. Download the attachment and place it in your texture packs folder. To download from the site, click the download button on the top right. Make sure to save it as a .py instead of the default .txt. This is important. Then place it in your texture packs folder. For me, this would look like C:\Users\Seth1010\AppData\Roaming\.minecraft\texturepacks. Make sure that the python script is in the texturepacks folder.
3. Set up your working environment.
The way that I have it set up is that I am working with a folder that is inside the texturepacks folder. The folder is called "Minimalist" (the name of my texture pack), and inside this folder is the standard pack.txt, terrain.png and so on. This script is written for how I have my environment, but feel free to modify it to work with yours.
4. Edit the script.
You can open up the zip.py file in a standard text editor. Only worry about the three variables towards the top of the script. These variables are zipFile,folder, and printAll. The first two are absolutely necessary to change. The variable zipFile needs to be assigned to the name of what you want the zip file to be called. The variable folder is the folder that your working environment is. printAll is simply a variable that when set to True will print out all of the file names as they are compressed.
5. Run the script.
If you have python all set up correctly, you should be able to click on the python script and have it run. If windows asks for you to set up a program to run it, browse to where you have python installed and select python.exe.
I hope that I have helped someone out. If you have any questions or comments, feel free to ask them!