├── logo.png ├── .gitattributes ├── .gitignore ├── requirements.txt ├── skin_pack_maker_banner.jpg ├── skin_pack_maker_gui.py ├── README.md ├── LICENSE └── skin_pack_maker.py /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geoffery10/MC-Skin-Pack-Creator/HEAD/logo.png -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.png 2 | *.mcpack 3 | *.lang 4 | *.json 5 | skin_packs.lnk 6 | env 7 | .idea 8 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | ###### Requirements without Version Specifiers ######` 2 | beautifulsoup4 -------------------------------------------------------------------------------- /skin_pack_maker_banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Geoffery10/MC-Skin-Pack-Creator/HEAD/skin_pack_maker_banner.jpg -------------------------------------------------------------------------------- /skin_pack_maker_gui.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Mon Jun 8 10:10:13 2020 4 | 5 | @author: powel 6 | """ 7 | 8 | import os 9 | import shutil 10 | from os.path import basename 11 | from zipfile import ZipFile 12 | import requests 13 | import PySimpleGUI as sg 14 | 15 | #================================METHODS======================================= 16 | 17 | def checkForDir(path): 18 | if not os.path.exists(path): 19 | os.mkdir(path) 20 | 21 | def getUUID(id_value): 22 | #Scrape UUID from Online UUID Generator's Developer API 23 | UUID_API = "https://www.uuidgenerator.net/api/version4" 24 | response = requests.get(UUID_API) 25 | soup = BeautifulSoup(response.text, 'html.parser') 26 | results = soup.prettify() 27 | print("Genereated: UUID", id_value, ": ", results, end = '') 28 | return str(results) 29 | 30 | #==============================DRIVER CODE===================================== 31 | 32 | #Create Directories If Missing 33 | checkForDir(".\Skins") 34 | checkForDir(".\Temp") 35 | checkForDir(".\Temp/texts") 36 | 37 | #Count Skins (This should only look for PNGs) 38 | numberOfSkins = sum([len(files) for r, d, files in os.walk(".\Skins")]) 39 | 40 | if (numberOfSkins <= 0): 41 | #No skins! 42 | skinStrings = "No skins found in Skins folder..." 43 | else: 44 | #Display Found Skins 45 | skinFiles = os.listdir(".\Skins") 46 | skinStrings = "Skins in the \"Skins\" folder will be used. Number of Skins:" + str(numberOfSkins) 47 | 48 | 49 | sg.theme('DarkGreen') # Add a touch of color 50 | 51 | # All the stuff inside your window. 52 | layout = [ [sg.Text(skinStrings)], 53 | [sg.Text(skinFiles)], 54 | [sg.Text("Please your name: "), sg.InputText()], 55 | [sg.Text("Please your pack's name: "), sg.InputText()], 56 | [sg.Text("Please your pack's description: "), sg.InputText()], 57 | [sg.Button('Ok'), sg.Button('Cancel')] ] 58 | 59 | # Create the Window 60 | window = sg.Window('Minecraft Skin Pack Creator', layout) 61 | # Event Loop to process "events" and get the "values" of the inputs 62 | while True: 63 | event, values = window.read() 64 | if event == sg.WIN_CLOSED or event == 'Cancel': # if user closes window or clicks cancel 65 | break 66 | print('You entered ', values[0], values[1], values[2]) 67 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | # MC Skin Pack Creator 6 | Create Minecraft Bedrock Skin Packs. These Skin Packs can be used in the Windows 10 and Pocket. Just add your skins to the Skins folder and run the code. After entering some info your pack will be built for you! 7 | 8 | ## Table of Contents 9 | * [Getting Started](https://github.com/Geoffery10/MC-Skin-Pack-Creator#getting-started) 10 | * [Prerequisites](https://github.com/Geoffery10/MC-Skin-Pack-Creator#prerequisites) 11 | * [File Stucture](https://github.com/Geoffery10/MC-Skin-Pack-Creator#file-stucture) 12 | * [Built With](https://github.com/Geoffery10/MC-Skin-Pack-Creator#built-with) 13 | * [Authors](https://github.com/Geoffery10/MC-Skin-Pack-Creator#authors) 14 | * [License and Acknowledgments](https://github.com/Geoffery10/BMC-Skin-Pack-Creator#license) 15 | 16 | 17 | ## Getting Started 18 | * [Make sure your prerequisites are done before beginning.](https://github.com/Geoffery10/MC-Skin-Pack-Creator#prerequisites) 19 | * Download the latest zip file from [releases](https://github.com/Geoffery10/MC-Skin-Pack-Creator/releases). 20 | * Export them into a folder alone. 21 | * Add skins to the Skins folder (create one if missing) 22 | * Run the skin_pack_maker.exe or open the command prompt or terminal depending on your platform and type "skin_pack_maker.py". 23 | * On Windows open a command prompt in the folder. [How To Open Command Prompt Anywhere](https://www.thewindowsclub.com/how-to-open-command-prompt-from-right-click-menu/) 24 | * Follow the on screen instructions to create your pack. 25 | * Once completed you will have a .mcpack the you can open to automatically add the pack to minecraft! 26 | 27 | ### Prerequisites 28 | 29 | * [Python 3.8.1](https://www.python.org/downloads/) 30 | 31 | ### File Stucture 32 | ``` 33 | Folder 34 | |-- skin_pack_maker.py 35 | |-- skin_pack_maker.exe 36 | `-- Skins 37 | `-- {YOUR SKINS HERE} 38 | ``` 39 | 40 | ## Built With 41 | 42 | * [Python 3.8.1](https://www.python.org/downloads/) 43 | 44 | ## Authors 45 | 46 | * **Geoffery Powell - [Geoffery10](https://github.com/Geoffery10)** - Developer 47 | 48 | ## License 49 | 50 | **LINCENSE NOT COMPLETE** 51 | * This project is licensed under the GNU Lesser General Public License v3.0 - see the [LICENSE](LICENSE) file for details. 52 | 53 | ## Acknowledgments 54 | * Minecraft 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | -------------------------------------------------------------------------------- /skin_pack_maker.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Thu May 28 13:51:48 2020 4 | 5 | This is a Minecraft Skin Pack Creator for Bedrock 6 | 7 | manifest.json needs: 8 | packName 9 | 2 uuid 10 | version 11 | 12 | skins.json needs: 13 | localization_name - file (all lower skin name no spaces) 14 | geometry - geometry.humanoid.customSlim or .custom 15 | texture - file (including .png) 16 | serialized_name - creator (no spaces) 17 | 18 | en_US.lang nees: 19 | skin.serialized_name.localization_name=skin.name 20 | """ 21 | 22 | import os 23 | import shutil 24 | from os.path import basename 25 | from zipfile import ZipFile 26 | import uuid 27 | 28 | 29 | # ================================CLASSES======================================= 30 | 31 | class skin: 32 | def __init__(self, name, file, bodyType): 33 | self.name = name 34 | self.file = file 35 | self.bodyType = bodyType 36 | 37 | 38 | # ================================METHODS======================================= 39 | 40 | def checkForDir(path): 41 | if not os.path.exists(path): 42 | os.mkdir(path) 43 | 44 | 45 | def createSkins(skinFiles): 46 | skins = [] 47 | for i in skinFiles: 48 | print("\n\tCurrent Skin:", i) 49 | file = i 50 | name = input("\nPlease skin name: ") 51 | bodyValue = int(input("Please body type (0 for Steve and 1 for Alex/Slim): ")) 52 | bodyType = convertBodyValue(bodyValue) 53 | skins.append(skin(name, file, bodyType)) 54 | 55 | return skins 56 | 57 | 58 | def convertBodyValue(bodyValue): 59 | if (bodyValue == 1): 60 | bodyType = "geometry.humanoid.customSlim" 61 | else: 62 | bodyType = "geometry.humanoid.custom" 63 | return bodyType 64 | 65 | 66 | def copySkins(skinsArr): 67 | for obj in skinsArr: 68 | shutil.copy("./Skins/" + obj.file, "./Temp/" + obj.file, follow_symlinks=True) 69 | 70 | 71 | def spaceAndTooLower(name): 72 | name = name.replace(" ", "") 73 | name = name.lower() 74 | return name 75 | 76 | 77 | # THESE 3 METHODS GENERATE THE FILES 78 | 79 | def generateManifest(packName, uuidA, version, uuidB): 80 | manifest_file = open("./Temp/manifest.json", 'w+') 81 | temp = "{\n\t\"format_version\": 1,\n\t\"header\": {\n\t\t\"name\": \"" + \ 82 | packName + "\",\n\t\t\"uuid\": \"" + uuidA + \ 83 | "\",\n\t\t\"version\": [\n\t\t\t" + \ 84 | str(version[0]) + ",\n\t\t\t" + \ 85 | str(version[1]) + ",\n\t\t\t" + \ 86 | str(version[2]) + "\n\t\t]" + \ 87 | "\n\t},\n\t\"modules\": [\n\t\t{\n\t\t\t\"type\": \"skin_pack\"," \ 88 | "\n\t\t\t\"uuid\": \"" + uuidB + "\",\n\t\t\t\"version\": [" \ 89 | "\n\t\t\t\t6,\n\t\t\t\t" + \ 90 | "0,\n\t\t\t\t" + \ 91 | "0\n\t\t\t]\n\t\t}\n\t]\n}" 92 | 93 | manifest_file.write(temp) 94 | manifest_file.close 95 | 96 | 97 | def generatePackManifest(uuidA, packName, version, description, uuidB): 98 | pack_manifest_file = open("./Temp/pack_manifest.json", 'w+') 99 | temp = "{\n\t\"header\": {\n\t\t\"pack_id\": \"" + uuidA + "\",\n\t\t\"name\": \"" + packName + "\",\n\t\t\"packs_version\": \"" + str( 100 | version[0]) + \ 101 | "." + str(version[1]) + "." + str(version[ 102 | 2]) + "\",\n\t\t\"description\": \"" + description + "\",\n\t\t\"modules\": [\n\t\t\t{\n\t\t\t \"description\": \"" 103 | temp = temp + description + "\",\n\t\t\t \"version\": \"6.0.0\",\n\t\t\t \"uuid\": \"" + uuidB + "\",\n\t\t\t \"type\": \"skin_pack\"\n\t\t\t}\n\t\t]\n\t}\n}" 104 | pack_manifest_file.write(temp) 105 | pack_manifest_file.close 106 | 107 | 108 | def generateSkins(skinsArr, packName, creatorID): 109 | skins_file = open("./Temp/skins.json", 'w+') 110 | temp = "{\n\t\"geometry\": \"skinpacks/skins.json\",\n\t\"skins\": [" 111 | for obj in skinsArr: 112 | name = spaceAndTooLower(obj.name) 113 | bodyType = obj.bodyType 114 | file = obj.file 115 | temp = temp + "\n\t\t{\n\t\t\t\"localization_name\": \"" + name + "\",\n\t\t\t\"geometry\": \"" + str( 116 | bodyType) + \ 117 | "\",\n\t\t\t\"texture\": \"" + str(file) + "\",\n\t\t\t\"type\": \"free\"\n\t\t}," 118 | temp = temp[:-1] 119 | temp = temp + "\n\n\t],\n\t\"serialize_name\": \"" + packName + "\",\n\t\"localization_name\": \"" + creatorID + "\"\n}" 120 | skins_file.write(temp) 121 | 122 | skins_file.close 123 | 124 | 125 | def generateLangs(creatorID, skinsArr, lang_id, packName): 126 | langs_file = open("./Temp/texts/" + lang_id + ".lang", 'w+') 127 | temp = "" 128 | for obj in skinsArr: 129 | name = spaceAndTooLower(obj.name) 130 | temp = temp + "skin." + creatorID + "." + name + "=" + obj.name + "\n" 131 | temp = temp + "skinpack." + creatorID + "=" + packName 132 | langs_file.write(temp) 133 | langs_file.close 134 | 135 | 136 | def makeMCPACK(packName, skinsArr, lang_id): 137 | # create a ZipFile object 138 | with ZipFile(packName + ".mcpack", 'w') as zipObj: 139 | for obj in skinsArr: 140 | # Save Skins 141 | filePath = "./Temp/" + obj.file 142 | zipObj.write(filePath, basename(filePath)) 143 | # Save text files 144 | zipObj.write("./Temp/manifest.json", basename("./Temp/manifest.json")) 145 | zipObj.write("./Temp/pack_manifest.json", basename("./Temp/pack_manifest.json")) 146 | zipObj.write("./Temp/skins.json", basename("./Temp/skins.json")) 147 | zipObj.write("./Temp/texts", basename("./Temp/texts")) 148 | zipObj.write("./Temp/texts/" + lang_id + ".lang", "texts/" + lang_id + ".lang") 149 | zipObj.close() 150 | 151 | 152 | def getUUID(id_value): 153 | # Scrape UUID from Online UUID Generator's Developer API 154 | result = uuid.uuid4() 155 | print("\nGenereated: UUID", id_value, ": ", result, end='') 156 | return str(result) 157 | 158 | 159 | def cls(): 160 | os.system('cls' if os.name == 'nt' else 'clear') 161 | 162 | 163 | # ==============================DRIVER CODE===================================== 164 | 165 | # Variables 166 | lang_id = "en_US" # This should be set by the user in final version 167 | version = [2, 0, 0] # I believe this is the pack version 168 | uuidA = "" 169 | uuidB = "" 170 | creator = "" 171 | creatorID = "" 172 | packName = "" 173 | description = "" 174 | numberOfSkins = 0 # The number of skins in the skins folder 175 | 176 | # Print Header 177 | cls() 178 | print("\nMinecraft Skin Pack Creator\n by Geoffery Powell\n") 179 | 180 | # Create Directories If Missing 181 | checkForDir(".\Skins") 182 | checkForDir(".\Temp") 183 | checkForDir(".\Temp/texts") 184 | 185 | # Count Skins (This should only look for PNGs) 186 | numberOfSkins = 0 187 | for file in os.listdir(".\Skins"): 188 | if file.endswith(".png"): 189 | numberOfSkins += 1 190 | 191 | if (numberOfSkins <= 0): 192 | # No skins! 193 | print("No skins found in Skins folder...") 194 | else: 195 | # Display Found Skins 196 | print("Skins in the \"Skins\" folder will be used.\n") 197 | print("\tNumber of Skins:", numberOfSkins) 198 | skinFiles = os.listdir(".\Skins") 199 | print(skinFiles) 200 | 201 | # Get info 202 | creator = input("\nPlease your name: ") 203 | packName = input("Please your pack's name: ") 204 | description = input("Please your pack's description: ") 205 | 206 | # Get UUID 207 | print("Trying to get UUID from the internet...") 208 | try: 209 | # Internet UUID 210 | from bs4 import BeautifulSoup 211 | 212 | uuidA = getUUID(1) 213 | uuidB = getUUID(2) 214 | print("\nSuccess!") 215 | except: 216 | # Manual UUID 217 | print("Failed to get UUID from the internet... ") 218 | print("You might be missing beautifulsoup4: https://pypi.org/project/beautifulsoup4/") 219 | print("Recommended UUID Generator: https://www.uuidgenerator.net/version4") 220 | uuidA = input("Please your first UUID: ") 221 | uuidB = input("Please your second UUID: ") 222 | 223 | # Get skin info 224 | skinsArr = createSkins(skinFiles) 225 | 226 | # Print Skin Values 227 | print("\n\tSkin Data") 228 | for obj in skinsArr: 229 | print("Name:", obj.name, "- File:", obj.file, "- Body Type:", obj.bodyType, sep=' ') 230 | 231 | creatorID = (creator + uuidA[len(uuidA) - 4:]) 232 | # Time to make the files 233 | # Copy Skins 234 | copySkins(skinsArr) 235 | print("\n\nCopied skins to pack.") 236 | # Write to Files 237 | generateManifest(packName, uuidA, version, uuidB) 238 | print("Created manifest.json.") 239 | generatePackManifest(uuidA, packName, version, description, uuidB) 240 | print("Created pack_manifest.json.") 241 | generateSkins(skinsArr, packName, creatorID) 242 | print("Created skins.json.") 243 | generateLangs(creatorID, skinsArr, lang_id, packName) 244 | print("Created " + lang_id + ".lang") 245 | # Pack Zip 246 | # CODE HERE 247 | makeMCPACK(packName, skinsArr, lang_id) 248 | print("Packed into .mcpack file") 249 | shutil.rmtree("./Temp") 250 | print("\n\tDONE!") 251 | --------------------------------------------------------------------------------