Guide to spriting: Difference between revisions

1,345 bytes removed ,  12:49, 7 January 2015
Updating the "Required sprites by object category" section and removing the outdated "Locating sprites" section that couldn't be used.
imported>Kosmos
m (Added Nienhaus'/Errorage's PNG to DMI -tutorial.)
imported>Nienhaus
(Updating the "Required sprites by object category" section and removing the outdated "Locating sprites" section that couldn't be used.)
Line 66: Line 66:
=== Mobs ===
=== Mobs ===


*Mobs require sprites in 4 directions. If you want them to be able to wear clothes, hold items, wear gloves, glasses, etc. then the part which you'd like to keep needs to be in the same place as on the human sprite in all 4 directions. Yeah, this limits you a lot.
*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.


=== Turfs ===
=== Turfs ===


*Floors are in icons/turf/floors.dmi - Check the file for examples
*Floors are in icons/turf/floors.dmi - Check the file for examples.
*Walls are in icons/turf/walls.dmi - Check the file for examples
*Walls are in icons/turf/walls.dmi - Check the file for examples.
*And some other stuff is in other files in icons/turf/
*Shuttle walls and floors are in icons/turf/shuttle.dmi - Check the file for examples.
*I think these are pretty self explanatory
*Space tiles are in icons/turf/space.dmi - Check the file for examples.
*I think these are pretty self explanatory.


=== Objects ===
=== Objects ===


*Items, stuff that you can pick up and use generally require an item sprite and an in-hand sprite. The item sprite can be put in icons/obj/items.dmi or other dmi files, while the in-hand sprite needs to be in icons/mob/items_lefthand.dmi and icons/mob/items_righthand.dmi
*Objects sprites are located in the icons/obj folder.
*Clothing: Stuff that you can wear: Generally requires an item sprite in the appropriate dmi file in icons/obj/clothing/ , and in-hand sprite in icons/mob/items_lefthand.dmi and items_righthand.dmi as well as the on-mob sprite in the appropriate file in icons/mob/
*Items sprites are spread throughout said folder.
*Machinery: Usually either just one sprite or separate on-off sprites. It tends to differ from machine to machine
*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.
== Locating sprites ==
*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.
For most objects if you double-click them in the object tree (on the left side of the dream maker window) you will be taken to their definition in code. In the variables below what is highlighted you will often see:
*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.
  icon = 'abc.dmi'
*Blast doors only require opening and closing sprites and sprites for when it is open and closed.
  icon_state = "sprite_name"
 
The icon variable defines the file which contains the sprites and the icon_state defines the name of the sprite in the specified file.
Sometimes the icon or even icon_state variable will not be set under the definition. This means they're set on a parent level. If you're looking for /obj/item/weapon/storage/belt/full and can't see it, try looking at /obj/item/weapon/storage/belt. If it isn't there try looking for /obj/item/weapon/storage and so on.
 
Note that sometimes double-clicking an object in the object tree will not bring you to the object definition. You will know this by the highlighted line not being the same as the path to the object you double-clicked in the object browser. Searching for the definition in such cases can be a bit hard, so I've prepared a list of the most commonly used dmi files for certain objects:
 
'''/obj/machinery'''<br>
icon = 'stationobjs.dmi'<br>
definition in: [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/obj/machinery.dm code/defines/obj/machinery.dm]
 
'''/obj/item/weapon/storage'''<br>
icon = 'storage.dmi'<br>
definition in: [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/obj.dm code/defines/obj.dm]
 
'''/obj/item/weapon'''<br>
icon = 'weapons.dmi'<br>
defined in: [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/obj/weapon.dm code/defines/obj/weapon.dm]
 
'''/obj/item'''<br>
icon = 'items.dmi'<br>
definition in: [http://code.google.com/p/tgstation13/source/browse/trunk/code/defines/obj.dm code/defines/obj.dm]


== Contributing sprites and finding sprite requests ==
== Contributing sprites and finding sprite requests ==
Anonymous user