If you would like to contribute to the LEGO Universe News! Minifig Wizard, you will want to read this.
- Fork the repository by clicking
- Clone the fork onto your computer by running
git clone https://github.com/yourusername/LUN-Minifig-Wizard.gitor from your GUI frontend. - Install node.js and run
npm installto install all dependencies. - Read up on the documentation (see Editing below).
- Edit away! You are allowed to edit this project as much as you want, because it is Open Source! Be sure to read the Licenses before you start though.
- Once you finish your work, you can either leave your work on your fork, or if it is a good change that may improve the Minifig Wizard,
submit a Pull Request by clicking
- If everything checks out, your changes will be merged into the LEGO Universe News! Minifig Wizard!
- Don't forget to
- The HTML5 spec should be followed at all times, though heavy use of CSS3 is currently not suggested. Follow the formatting already in the scripts.
- Make sure your code is valid! Run
grunt lintto ensure your code is valid. Also use the W3C HTML5 Validator and the W3C CSS Validator as a final test. (Hint: a full list of all tasks, including minifying the code, rungrunt default). Developer/Scripts/makejson.pyis used to generate a newimg/images.jsonfile, which lists all the available images for use. This should be run every time images are added/updated. It is written in Python and requires a Python interpreter to run. While Python 2.7 backward-compatibility is present, support for that version is limited. It is recommended to use a Python 3.3+ interpreter.
###Textures###
- All textures in the LEGO Universe News! Minifig Wizard, were created by @rioforce and are initially available in his LEGO Textures repository.
The textures need to fit a the Minifigure model's UV Map, which you can find in the
Developer/Models/Minifigsfolder. When creating textures, you should use a LEGO color pallet (such as the one from Bricklink) to ensure all colors match. If you are planning on submitting a texture Pull Request, please submit a project (.PSD,.PDN, etc.) along with a usable.pngfile.
- The Minifigure was also created by rioforce using Blender (free and open source software).
- The Blender file (.blend file) for the Minifigure and Accessories is located in
Developer/Models/Minifigs/LUN Minifig Wizard - Minifigure.blend. This file contains the minifigure (Head on Layer 11, Torso on Layer 12, Legs on Layer 13, Hat on Layer 14, Right-Hand Item on Layer 15, Left-Hand Item on Layer 16, and already-rendered items on Layer 10). - The Blender Internal render engine is used to render the images of the minifigure.
- The materials of the models are all equipped with a reflection map (found in
Developer/Textures/Reflection Map.png). The minifigure model has two more texture slots: One for the decals (found inDeveloper/Textures), and another for a bump map (found inDeveloper/Models/Minifigs/Spec Map.png). - The render process is automated. A script located in
Developer/Scripts/Render-Script.py. This script controls the rendering of the minifig (and accessory) thumbnails and full images (the images displayed in the Minifig Wizard). The desired full size image and accompanying thumbnail is rendered by changing the value ofpartNumberto the appropriate index onimgTypes(be sure to start counting from zero!). For example, if a new right-hand item (Sword) is to be rendering, change the value ofpartNumberto5. The line would then look likepartNumber = 5. All masking to create seamless placement with other images, image size, and output location is automatically handled for you. - Full size and thumbnail images are rendered at the same time.
- Rendering images are saved to
/tmp\\Minifig-Wizard\\img\\{0}\\PART\\, whereFOLDERis the name of the part you rendered, andPARTis either thethumbandfullsubfolder. This matches the folder structure used by the Minifig Wizard directly, allowing for the folders to be merged directly into the already existent folders. - If there is a folder merge conflict, the new image is never to overwrite the old one unless it is a better re-render of the same image. Rather, new images are to renamed to the next available number (e.g. if
Head024.pngis the last image, the new one is to be namedHead025.png).


