Difference between revisions of "Guide to spriting"
imported>Rockdtben (Created page with "This is not a technical guide on how to do sprites in a graphical program, this is a guide intended for people who know how to sprite, but need to know what exactly is needed ...") |
imported>XDTM (Some tips for human spriting) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
== Object overview == | == Object overview == | ||
− | |||
There are 4 types of objects in the game: | There are 4 types of objects in the game: | ||
Line 26: | Line 25: | ||
Now, hopefully that's all the information you need to sprite and make dmi files. | Now, hopefully that's all the information you need to sprite and make dmi files. | ||
− | == | + | === From PNG back to DMI === |
+ | |||
+ | [https://www.youtube.com/watch?v=kXDcYtAfjrM Here's Errorage's video tutorial (thanks Errorage!) on how to convert your beautiful PNG file into a DMI, you can watch this or follow the guide below, they are essentially the same.] | ||
+ | |||
+ | |||
+ | The [http://entropymine.com/jason/tweakpng/ first thing you want to do is download TweakPNG from here], | ||
+ | |||
+ | You then want to copy the .dmi and make it a .png. | ||
+ | |||
+ | [[File:Spriting1.png|frame|none|Dmi and png files here.]] | ||
+ | |||
+ | Open the .png file in a photo editing software like GImp or Paint.NET. | ||
+ | |||
+ | [[File:Spriting2.png|300px|frame|none|Png file opened.]] | ||
+ | |||
+ | Make any edits you want. | ||
+ | |||
+ | [[File:Spriting3.png|frame|none|Perfect.]] | ||
− | + | Save/Export the file. Along with opening TweakPNG. | |
− | + | Rename the .png to something new and make it a .dmi. | |
− | + | You can then drag your .dmi file into TweakPNG. | |
− | + | Copy the chunk named "zTXt". | |
− | + | Drag on the new .dmi and copy the "zTXt" chunk over and make sure it's anywhere under the "tRNS" chunk. | |
− | |||
− | |||
− | |||
− | + | [[File:Spriting4.gif|frame|none|Oh god what is going on.]] | |
− | + | Open your new .dmi to make sure it worked. | |
− | |||
− | |||
+ | [[File:Spriting5.png|300px|frame|none|Hey! It worked!]] | ||
− | == | + | == Required sprites by object category == |
− | + | Now to tell you what sprites different types of items need: | |
− | + | === Mobs === | |
− | |||
− | + | *Mob sprites for the most part require four directions. | |
− | + | *Mob sprites require dead sprites. | |
+ | *If you choose to you can make a laying sprite. | ||
+ | *If making a mob that can wear clothing you can use pixel_y, Pixel_x to shift clothing on when coding the mob. | ||
− | + | ==== Mobs with Limbs ==== | |
+ | *Humans and human species are composed of limbs - a head, a chest, two arms and two legs. | ||
+ | *The files are in icons/mob/human_parts.dmi for limbs that have a set color, and on icons/mob/human_parts_greyscale.dmi for limbs that can be recolored and begin greyscaled. | ||
+ | *Limbs have 4 dirs, like full icons. | ||
+ | *Limbs are also used as item icons in case of dismemberment. | ||
+ | *Naming is as follows: | ||
+ | **[race]_l/r_arm/leg for arms and legs. | ||
+ | **[race]_chest(_m/f) for the chest (m/f for male/female variants, optional) | ||
+ | **[race]_head(_m/f) for the head (m/f for male/female variants, optional) | ||
+ | *Extra bodyparts like lizard tails go in mutant_bodyparts.dmi | ||
− | + | === Turfs === | |
− | |||
− | |||
− | + | *Floors are in icons/turf/floors.dmi - Check the file for examples. | |
− | + | *Walls are in icons/turf/walls.dmi - Check the file for examples. | |
− | + | *Shuttle walls and floors are in icons/turf/shuttle.dmi - Check the file for examples. | |
+ | *Space tiles are in icons/turf/space.dmi - Check the file for examples. | ||
+ | *I think these are pretty self explanatory. | ||
− | + | === Objects === | |
− | |||
− | |||
− | + | *Objects sprites are located in the icons/obj folder. | |
− | + | *Items sprites are spread throughout said folder. | |
− | + | *Item sprites for the most part require in-hand sprites. They can be located in the icons/mob/items_lefthand.dmi and icons/mob/items_righthand.dmi section. | |
+ | *Clothing sprites are located in the icons/obj/clothing folder. | ||
+ | *Clothing sprites on mobs can be found in the icons/mob folder. | ||
+ | *Clothing sprites for the most part require in-hand sprites. They can be located in the icons/mob/items_lefthand.dmi and icons/mob/items_righthand.dmi section. | ||
+ | *Machinery sprites are located icons/obj/machines folder. Although a good amount of them are located in the icons/obj folder. | ||
+ | *Door sprites are located under icons/obj/door folder. | ||
+ | *Normal door sprite require door_closed, door_locked, door_opening, door_deny, door_closing, door_open, door_spark, o_door_opening, o_door_closing, panel_open, welded, and elights. I suggest looking over a door dmi. | ||
+ | *Blast doors only require opening and closing sprites and sprites for when it is open and closed. | ||
== Contributing sprites and finding sprite requests == | == Contributing sprites and finding sprite requests == | ||
See [[Guide to contributing to the game#Icons, glyphs, sprites, animations... images|here]] for details. | See [[Guide to contributing to the game#Icons, glyphs, sprites, animations... images|here]] for details. | ||
+ | |||
+ | == Guides For Making Sprites == | ||
+ | |||
+ | https://tgstation13.org/phpBB/viewtopic.php?f=11&t=687 | ||
[[Category:Guides]] [[Category:Game Resources]] | [[Category:Guides]] [[Category:Game Resources]] | ||
{{Contribution guides}} | {{Contribution guides}} |
Latest revision as of 07:20, 11 March 2017
This is not a technical guide on how to do sprites in a graphical program, this is a guide intended for people who know how to sprite, but need to know what exactly is needed when people want sprites done for them. Most sprites are 32x32 pixels. They use 32b colors (24b + alpha channel).
Object overview[edit | edit source]
There are 4 types of objects in the game:
- Area - we won't be interested in these as you can't see it ingame and wip graphics are sufficient,
- Mob - humans, monkeys, cyborgs, aliens and other living creatures on the station,
- Objects - machines, doors, items and anything else in the game,
- Turf - walls, floors and space
The DMI file format[edit | edit source]
Sprites in SS13 are packaged in .dmi files. To make a new dmi file, open up dream maker, select file > new and choose icon file (dmi) from the drop-down menu. Write a file path for it and hit ok.
A new window will open with a blank file. in the upper-right are two spaces for sprite dimensions. Most sprites are 32x32 pixels in size. One dmi file cannot hold sprites of different sizes, unfortunately.
Now right-click somewhere in the whiteness. There are two types of sprite: pixmap and movie. A pixmap is static while a movie can be animated and face multiple directions, that's all the difference. Let's make a movie sprite. (New movie)
A window opens with four directional arrows and 3 frames for each of them, all of them gray. Byond understands 8 directions. You can choose how many you wish to use below the sprites themselves: 1, 4 or 8. You can also select how many frames you wish the animation to have. If you're making a multi-directional static sprite, make a movie with 1 frame, so no animation, but with 4 or 8 directions, depending how many you need. If you wish to have the sprite animated it may also interest you that you can set the delay in 1/10 of a second above the particular frame. Okay, hopefully you'll know what to do from here. The built-in sprite editing tool is very primitive and the only thing worth mentioning in it is how to apply the alpha filter. If you double-click any image you'll get to the sprite editor, and at the right of it is a vertical slider, which controls the alpha channel. Also worth mentioning is that copying from the editor can behave a bit strange, by making full backgrounds despite the alpha filter being set. Just 'flood' the background with a color with an alpha value of 0 or use 'import', which works fine.
Now let's assume we've made your sprites sprites, go back to the dmi file (the screen which showed up when you first made the file). Assuming you've made a sprite, you'll see it in the list there. Double-click just below the actual sprite and a rename window should open, alternatively select the sprite and hit F2 on your keyboard. Give a name to your sprite. This name is often referred as an icon_state, as that's the variable name which defines it in code.
Also note that you can import and export image files of different sorts by selecting the files you wish to export in the editor (hold ctrl to select multiple) and right clicking and selecting export, or right clicking anywhere and selecting import to import. DMI is similar to PNG, so if you rename a DMI's extension to PNG it should work in all graphical editing software. It usually works in reverse too. This makes recoloring quicker.
Now, hopefully that's all the information you need to sprite and make dmi files.
From PNG back to DMI[edit | edit source]
The first thing you want to do is download TweakPNG from here,
You then want to copy the .dmi and make it a .png.
Open the .png file in a photo editing software like GImp or Paint.NET.
Make any edits you want.
Save/Export the file. Along with opening TweakPNG.
Rename the .png to something new and make it a .dmi.
You can then drag your .dmi file into TweakPNG.
Copy the chunk named "zTXt".
Drag on the new .dmi and copy the "zTXt" chunk over and make sure it's anywhere under the "tRNS" chunk.
Open your new .dmi to make sure it worked.
Required sprites by object category[edit | edit source]
Now to tell you what sprites different types of items need:
Mobs[edit | edit source]
- Mob sprites for the most part require four directions.
- Mob sprites require dead sprites.
- If you choose to you can make a laying sprite.
- If making a mob that can wear clothing you can use pixel_y, Pixel_x to shift clothing on when coding the mob.
Mobs with Limbs[edit | edit source]
- Humans and human species are composed of limbs - a head, a chest, two arms and two legs.
- The files are in icons/mob/human_parts.dmi for limbs that have a set color, and on icons/mob/human_parts_greyscale.dmi for limbs that can be recolored and begin greyscaled.
- Limbs have 4 dirs, like full icons.
- Limbs are also used as item icons in case of dismemberment.
- Naming is as follows:
- [race]_l/r_arm/leg for arms and legs.
- [race]_chest(_m/f) for the chest (m/f for male/female variants, optional)
- [race]_head(_m/f) for the head (m/f for male/female variants, optional)
- Extra bodyparts like lizard tails go in mutant_bodyparts.dmi
Turfs[edit | edit source]
- Floors are in icons/turf/floors.dmi - Check the file for examples.
- Walls are in icons/turf/walls.dmi - Check the file for examples.
- Shuttle walls and floors are in icons/turf/shuttle.dmi - Check the file for examples.
- Space tiles are in icons/turf/space.dmi - Check the file for examples.
- I think these are pretty self explanatory.
Objects[edit | edit source]
- Objects sprites are located in the icons/obj folder.
- Items sprites are spread throughout said folder.
- Item sprites for the most part require in-hand sprites. They can be located in the icons/mob/items_lefthand.dmi and icons/mob/items_righthand.dmi section.
- Clothing sprites are located in the icons/obj/clothing folder.
- Clothing sprites on mobs can be found in the icons/mob folder.
- Clothing sprites for the most part require in-hand sprites. They can be located in the icons/mob/items_lefthand.dmi and icons/mob/items_righthand.dmi section.
- Machinery sprites are located icons/obj/machines folder. Although a good amount of them are located in the icons/obj folder.
- Door sprites are located under icons/obj/door folder.
- Normal door sprite require door_closed, door_locked, door_opening, door_deny, door_closing, door_open, door_spark, o_door_opening, o_door_closing, panel_open, welded, and elights. I suggest looking over a door dmi.
- Blast doors only require opening and closing sprites and sprites for when it is open and closed.
Contributing sprites and finding sprite requests[edit | edit source]
See here for details.
Guides For Making Sprites[edit | edit source]
https://tgstation13.org/phpBB/viewtopic.php?f=11&t=687