I'm using Photoshop to start creating a tileset... I wanted to work with one layer per tile, with layer masks, etc. but didn't want to do that effort manually times 256. So I made a script.
This is javascript. Change tilePixelSize in the first line to 32,64,128,etc if you're doing a HD tileset, or leave at 16 for standard size. Copy the script below into a file "MCPrepareTiles.jsx" and place in Photoshop's Presets/Scripts folder. Restart Photoshop and the command should be available in the File > Scripts menu.
Calling the script will create a new image with 256 layers, each with the appropriate mask and tile name. It leaves a white background layer, which you can either delete or fill with some other tileset that you want to work over. Anyone using photoshop should know how to do that already. Also, you'll have to export as png to get something usable for game.
I am not certain I have tile names correct, so if you see errors there, please post corrections. Also, there is little to no error checking, so if you run into errors, post details here.
Finally, my instructions above are for Mac; I don't have Windows nor Windows PS to test. If Windows/PS users run into problems, check out the scripting documentation:
This is javascript. Change tilePixelSize in the first line to 32,64,128,etc if you're doing a HD tileset, or leave at 16 for standard size. Copy the script below into a file "MCPrepareTiles.jsx" and place in Photoshop's Presets/Scripts folder. Restart Photoshop and the command should be available in the File > Scripts menu.
Calling the script will create a new image with 256 layers, each with the appropriate mask and tile name. It leaves a white background layer, which you can either delete or fill with some other tileset that you want to work over. Anyone using photoshop should know how to do that already. Also, you'll have to export as png to get something usable for game.
I am not certain I have tile names correct, so if you see errors there, please post corrections. Also, there is little to no error checking, so if you run into errors, post details here.
Finally, my instructions above are for Mac; I don't have Windows nor Windows PS to test. If Windows/PS users run into problems, check out the scripting documentation:
http://www.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop_cs4_scripting_guide.pdf
http://www.adobe.com/content/dam/Adobe/en/devnet/photoshop/pdfs/photoshop_cs4_javascript_ref.pdf
var tilePixelSize = 16; // CHANGE THIS TO 32,64,128,etc for HD tilesets var numTilesAcross = 16; // DO NOT CHANGE var numTilesTotal = numTilesAcross * numTilesAcross; var imagePixelSize = numTilesAcross * tilePixelSize; app.preferences.rulerUnits = Units.PIXELS; var docRef = app.documents.add(imagePixelSize, imagePixelSize, 72, "Minecraft Tileset", NewDocumentMode.RGB, DocumentFill.TRANSPARENT, 1.0, BitsPerChannelType.EIGHT); var tileNames = [ "Grass", "Stone", "Dirt", "Grassy-Dirt", "Wood", "2-HalfBlocks-Side", "HalfBlock-Top", "Brick", "TNT-Side", "TNT-Top", "TNT-Bottom", "?", "Rose", "Flower", "Water?", "Sapling", "Cobblestone", "Bedrock", "Sand", "Gravel", "Log-Side", "Log-End", "Iron-Block-1", "Gold-Block-1", "Diamond-Block-1", "Chest", "Chest-Back?", "Chest-Front?", "Red-Shroom", "Brown-Shroom", "?", "Fire?", "Gold Ore", "Iron Ore", "Coal", "Bookshelf", "Mossy Cobble", "Obsidian", "Iron-Block-2", "Gold-Block-2", "Diamond-Block-2", "Wide-Chest-Front-Left", "Wide-Chest-Front-Right", "Craft-Box-Top", "Furnace-Off-Front", "Furnace-Side", "?", "?", "Sponge", "Glass", "Diamond Ore", "Redstone Ore", "Leaves Transl", "Leaves Opaque", "Iron-Block-3", "Gold-Block-3", "Diamond-Block-3", "Wide-Chest-Back-Left", "Wide-Chest-Back-Right", "Craft-Box-Side-1", "Craft-Box-Side-2", "Furnace-On-Front", "?", "?", "Cloth", "Spawner", "Snow", "Ice", "Ice-Grass-Dirt", "Cactus-Top", "Cactus-Side", "Cactus?", "Clay", "Reed", "Jukebox", "Jukebox-Top", "?", "?", "?", "?", "Torch", "Wood-Door-Top", "Iron-Door-Top", "Ladder", "RS-Off-4way", "RS-Off-Horz", "Tilled Damp", "Tilled Dry", "Wheat 1", "Wheat 2", "Wheat 3", "Wheat 4", "Wheat 5", "Wheat 6", "Wheat 7", "Wheat 8", "Lever", "Wood-Door-Bottom", "Iron-Door-Bottom", "RS-Torch-On", "RS-On-4way", "RS-On-Horz", "Pumpkin-Top", "Netherrack", "Slow-Sand", "Lightstone", "?", "?", "?", "?", "?", "?", "Rails-Curved", "?", "?", "RS-Torch-Off", "???", "???", "Pumpkin-Side", "Pumpkin-Face-Off", "Pumpkin-Face-Lit", "?", "?", "?", "?", "?", "?", "?", "Rails-Vert", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "Water-Anim-0?", "Water-Anim-1?", "Water-Anim-2?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "Water-Anim-3?", "Water-Anim-4?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "Magma-0?", "Magma-1", "Magma-2", "Magma-3", "Block-Breakage-0", "Block-Breakage-1", "Block-Breakage-2", "Block-Breakage-3", "Block-Breakage-4", "Block-Breakage-5", "Block-Breakage-6", "Block-Breakage-7", "Block-Breakage-8", "Block-Breakage-9", "?", "?", "?", "?", "Magma-4", "Magma-5", ]; // This function found at: http://forums.adobe.com/message/1889486#1889486 function makeLayerMask(maskType) { //makeLayerMask('HdSl'); //This needs a selection and that selection will be hidden //makeLayerMask('RvlS'); //This needs a selection and that selection will be shown //makeLayerMask('RvlA'); //This is a complete mask no selection required if( maskType == undefined) maskType = 'RvlS' ; //from selection var desc140 = new ActionDescriptor(); desc140.putClass( charIDToTypeID('Nw '), charIDToTypeID('Chnl') ); var ref51 = new ActionReference(); ref51.putEnumerated( charIDToTypeID('Chnl'), charIDToTypeID('Chnl'), charIDToTypeID('Msk ') ); desc140.putReference( charIDToTypeID('At '), ref51 ); desc140.putEnumerated( charIDToTypeID('Usng'), charIDToTypeID('UsrM'), charIDToTypeID(maskType) ); executeAction( charIDToTypeID('Mk '), desc140, DialogModes.NO ); } docRef.activeLayer.name = "Background"; docRef.activeLayer.isBackgroundLayer = true; for (var i = 0; i < numTilesTotal; ++i) { var x = i % numTilesAcross; var y = (i - x) / numTilesAcross; docRef.artLayers.add().name = tileNames[i]; var selRegion = Array( Array(x*tilePixelSize , y*tilePixelSize ), Array(x*tilePixelSize + tilePixelSize, y*tilePixelSize ), Array(x*tilePixelSize + tilePixelSize, y*tilePixelSize + tilePixelSize), Array(x*tilePixelSize , y*tilePixelSize + tilePixelSize), Array(x*tilePixelSize , y*tilePixelSize ) ); docRef.selection.select(selRegion); makeLayerMask(); }-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThanks for giving it a test!