Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Texture pack creation. How do?  (Read 878 times)

XhAPPYSLApX

  • Bay Watcher
  • Making a big thing this time
    • View Profile
Texture pack creation. How do?
« on: December 26, 2015, 01:01:55 am »

I'm completely new to modding DF, only made a couple of races that I basically copy-pasted together. But I thought that since I'm at least slightly experienced in the realm of pixel art, that I would have a try at making a tileset.

Only problem is, I do NOT know where to even start :/
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: Texture pack creation. How do?
« Reply #1 on: December 26, 2015, 01:09:17 am »

Depends on where you want to start.

A tileset is an image used by the game to figure out world-tiles, for things such as terrain and furniture, while a graphics set is used to give specific creatures graphics.

I haven't toyed much with tilesets, but I do know how to go about creating a graphics set.

What you want to do is first create your graphics image. Be sure that every individual graphic 'tile' is the same size on the sheet as a whole. Then after you are finished the graphics, you will want to create a text file to assign the graphics to creatures. Be sure that your image and your graphics texts are in the graphics folder, and not the object folder.
Spoiler (click to show/hide)

Unit-type tokens can be used to create different graphics for different professions.
« Last Edit: December 26, 2015, 01:15:00 am by BlackFlyme »
Logged

XhAPPYSLApX

  • Bay Watcher
  • Making a big thing this time
    • View Profile
Re: Texture pack creation. How do?
« Reply #2 on: December 26, 2015, 01:14:39 am »

Depends on where you want to start.

A tileset is an image used by the game to figure out world-tiles, for things such as terrain and furniture, while a graphics set is used to give specific creatures graphics.

I haven't toyed much with tilesets, but I do know how to go about creating a graphics set.

What you want to do is first create your graphics image. Be sure that every individual graphic 'tile' is the same size on the sheet as a whole. Then after you are finished the graphics, you will want to create a text file to assign the graphics to creatures. Be sure that your image and your graphics texts are in the graphics folder, and not the object folder.
Spoiler (click to show/hide)

Unit-type tokens can be used to create different graphics for different professions.

Thanks for the quick reply, and thanks for the info :D
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: Texture pack creation. How do?
« Reply #3 on: December 26, 2015, 01:15:48 am »

Not a problem. I do wish I knew of a guide to point people to.

And I added a little bit more info since you posted.
Logged

XhAPPYSLApX

  • Bay Watcher
  • Making a big thing this time
    • View Profile
Re: Texture pack creation. How do?
« Reply #4 on: December 26, 2015, 01:31:26 am »

Not a problem. I do wish I knew of a guide to point people to.

And I added a little bit more info since you posted.

Do you know anything that would be as helpful as the graphics set advice, that would pertain to tilesets? Even if you just know bare minimum basics, it'd be very helpful :D

And thanks again for graphics advice at the very least.

EDIT: I know you already said you didn't know much about tilesets, but any help would be welcome.
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: Texture pack creation. How do?
« Reply #5 on: December 26, 2015, 01:34:55 am »

Well, a lot of stuff tied to the tileset is hardcoded. You can change what number of the tileset is used by some things, such as some rock walls, plants and trees, or tools, but not everything.

It's a lot to read through, but here is what every tile is used for in an unmodded game. It marks what can and cannot be changed.
Logged

Rydel

  • Bay Watcher
    • View Profile
Re: Texture pack creation. How do?
« Reply #6 on: December 28, 2015, 10:00:14 am »

For a tileset, you would determine how big your want your tiles to be, then make an image that can fit 16 tiles in each direction.  For example, 16x16 tiles mean you would use a 256x256 image.

Each of those tiles, in order, replaces one of the ASCII characters in the game.  The easiest way to see which is which is to look at one of the ASCII tilesets in Data\Art for comparison.  Alpha transparency is used for the background color, so you will want to use an image program that supports that, like Photoshop or GraphicsGale Free.  Tiles that display things defined by the raws can be moved by changing the raws to match what you want; everything else is hard coded.  When this is finished, but the image in Data\Art.

Once you have that image set up, you will need to modify init.ini to use your tileset.
Open Data/init/init.txt and make these changes:
Change FONT and FULLFONT to list the filename of your tileset.
Change WINDOWEDX and WINDOWEDY to the width and height you want the game to be in windowed mode.  These should be a multiple of the width and height of your tileset.
Change FULLSCREENX and FULLSCREENY to match the resolution of your tileset.  FULLSCREENX should be the tile width * 80.  FULLSCREENY should be the tile height * 25.

To distribute it, you'll want to create a ZIP file with the tileset, init.txt, and any raw files you've changed.  You should keep the original folder structure to make installation easier.

XhAPPYSLApX

  • Bay Watcher
  • Making a big thing this time
    • View Profile
Re: Texture pack creation. How do?
« Reply #7 on: December 28, 2015, 06:41:27 pm »

For a tileset, you would determine how big your want your tiles to be, then make an image that can fit 16 tiles in each direction.  For example, 16x16 tiles mean you would use a 256x256 image.

Each of those tiles, in order, replaces one of the ASCII characters in the game.  The easiest way to see which is which is to look at one of the ASCII tilesets in Data\Art for comparison.  Alpha transparency is used for the background color, so you will want to use an image program that supports that, like Photoshop or GraphicsGale Free.  Tiles that display things defined by the raws can be moved by changing the raws to match what you want; everything else is hard coded.  When this is finished, but the image in Data\Art.

Once you have that image set up, you will need to modify init.ini to use your tileset.
Open Data/init/init.txt and make these changes:
Change FONT and FULLFONT to list the filename of your tileset.
Change WINDOWEDX and WINDOWEDY to the width and height you want the game to be in windowed mode.  These should be a multiple of the width and height of your tileset.
Change FULLSCREENX and FULLSCREENY to match the resolution of your tileset.  FULLSCREENX should be the tile width * 80.  FULLSCREENY should be the tile height * 25.

To distribute it, you'll want to create a ZIP file with the tileset, init.txt, and any raw files you've changed.  You should keep the original folder structure to make installation easier.

Thanks muchly for the info :D
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Texture pack creation. How do?
« Reply #8 on: December 30, 2015, 12:42:15 pm »

Well, a lot of stuff tied to the tileset is hardcoded. You can change what number of the tileset is used by some things, such as some rock walls, plants and trees, or tools, but not everything.

Unless you use Text Will Be Text! For DFHack users TWBT allows you to use two (or more) tile sheets, with the ability to override individual tiletypes and items with custom graphics, just like you can do for creatures. For example my custom tileset has different graphics for each kind of track ramp, so you can see the track direction, and bridges use a different set of tiles from smooth walls.

Some of the newer tilesets are starting to require TWBT now, so you can take a look at one of them to see what they do.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS