Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Tile Sets  (Read 2664 times)

diefortheswarm

  • Bay Watcher
    • View Profile
Tile Sets
« on: July 21, 2008, 01:52:42 am »

I have some questions about making custom tile and graphic sets.  The reason I am asking is because I have recently gotten addicted to this game.  I tried to get my brother to play but he can't handle the ASCII type tileset it comes with.  I read everything on the wiki on this subject and am still at loss.

1.  Is there a limit to the number of tiles you can create?  If there is, is it different for tiles and graphics?

3.  Can you make multiple images and use them all at the same time to have a massive tileset and graphics set?  If not can you have one massive image for each?

4.  When you create an image, how do you tell the game how to divide it up so it can find all the tiles?  I am confused with the way they tried to explain it in the wiki.

5.  I know some tiles are shared by several different things.  Is there a way to tell the game what tiles to use for what things?  Is there anything that you cannot change the tile for?

6.  How do you specify what to use each of the tiles for?

I may have more questions as I get this project underway so bare with me.
Logged

wallish

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #1 on: July 21, 2008, 03:54:24 am »

If I remember correctly, not every item/creature can be given a tile and other than creatures tiles cannot be made independant of the object.  So if a lever is ó and is replaced with a picture of a lever than any word that has that ó will instead have a lever (Olsle[lever]der or whatever).  Kind of annoying, but sacrifices are to be made.
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Tile Sets
« Reply #2 on: July 21, 2008, 04:55:46 am »

Well, there're 2 kinds of tilesets.

So, here goes the wall of text.
Character set = a look of all characters (beds, walls, letters etc.).
Graphic set = a look of  creatures.

A character set is used to represent actual ASCII tiles in game.
Most of the symbols from it are hardcoded (beds, gems, walls, hatches etc.) and some users even change some letters to pictures for the things indicated with letters to look like objects, i.e. wall corner ('O' tile) but it leads to weird names with pictures instead of letters.

The look of mineral tiles (displayed on unmined stone walls like "%" for microcline), tiles of trees/plants and tiles of creatures can be changed.
In their description (soils, trees, plants, creatures) there's a token [TILE:] which allows you to change the look of them.
-If you use a number in it, i.e. [TILE:154] it will use the tile from CHARACTER set #154. Remember that tiles are counted from left to right and from top to bottom in lines, like you read a book, but also remember that the first tile has the number 0 (not 1).
-If you use '' you can set a keyboard symbol, i.e. [TILE:'o'] will mean that the thing will have "o" letter as a tile.
Also colors are determined with [COLOR:A:B:C] token, where A = color, B = background color and C = brightness (actually 0 or 1 which means dark or bright). http://www.dwarffortresswiki.net/index.php/Color

And there's a special support for creature tiles. The creatures (and creatures only) can be replaced with pixel images. Firstly note that in your /data/init/init.txt there's [GRAPHICS:YES] not the [GRAPHICS:NO].

In /raw/graphics/ folder there are text files which determine it.
There's already graphics_example.txt file.
Let's look into the one from a graphic tileset.

00: graphics_example                 // the name of the file without the extension (.txt)
01:                                         // empty line
02: [OBJECT:GRAPHICS]             // every raw file has [OBJECT:] definition which tells the game what goes into this file. This one has graphics.
03:                                         // empty line
04: [TILE_PAGE:DWARVES]         // this means that we want to add an image file with dwarves' pictures and we call it DWARVES
05: [FILE:example/dwarves.bmp] // the location of the file (folder /example, file dwarves.bmp)
06: [TILE_DIM:16:16]                // the size of a tile for a creature inside bmp, 16x16 pixels here (Tile_dimesion(x)=16; Tile_dimension(y)=16)
07: [PAGE_DIM:9:22]                // the number of tiles, 9x and 22y (horizontal X vertical). The image size counts as [x*Tile_dim(x); y*Tile_dim(y)]
08:                                       // empty line
09: [CREATURE_GRAPHICS:DWARF]  // determines which creature will be described now
10: [DEFAULT:DWARVES:0:0:ADD_COLOR] // DEFAULT type image, the basic dwarven picture
11: [MINER:DWARVES:1:0:AS_IS:DEFAULT] // MINER profession image
12: etc.

Explanation of:
[MINER:DWARVES:1:0:AS_IS:DEFAULT]
MINER = profession for which the image is used
the possible professions are
Spoiler (click to show/hide)

DWARVES - the TILE_PAGE which we use to find this image, basically there can be more than one TILE_PAGE in 1 file (look at the string 04) and here we show that we look into file which we announced as "DWARVES".

:1:0: the position of the tile on the full image, x=1 and y = 0. Note that the first tile has not 1:1 but 0:0 coordinates.

AS_IS - uh, I don't know, I have never seen it changed.

DEFAULT - "texture"; the last parameter is used to define the "role".
It can be
Spoiler (click to show/hide)
So your "wrestler" may be DEFAULT, GUARD, ROYALGUARD or CASTLEGUARD.
Spoiler (click to show/hide)
Also the dog may be DEFAULT, SKELETON or ZOMBIE
Spoiler (click to show/hide)


Another note.
You can have more than one txt file for such descriptions if you want, i.e. you may want to have graphics_humans.txt for different humans, graphics_animals.txt for different animals etc.
The file structure should be the same.
Firstly the filename without the extension, then OBJECT:GRAPHICS token, then determination of TILE_PAGEs you want to use and then the description of creatures.

Also you may want to use an already prepacked version if it seems to hard or you don't want to spend your time on it, however I suggest you to try to get into it, it's much funnier to play with all the things as you want.

Prepacked versions of 39c with graphics:
http://dffd.wimbli.com/file.php?id=62
« Last Edit: July 21, 2008, 05:03:02 am by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Slith

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #3 on: July 22, 2008, 03:57:56 am »

Prepacked versions of 39c with graphics:
http://dffd.wimbli.com/file.php?id=62

What I'd like to know, is if anyone's ported mike mayday's graphic/tileset to the new dwarf fortress version.
Logged

Bromor Neckbeard

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #4 on: July 26, 2008, 04:24:53 pm »

I'd like to know that too, I'm having a hell of a time getting Mayday to work completely with 39e.
Logged

Neonivek

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #5 on: July 26, 2008, 09:43:07 pm »

Oddly people HAVE altered tilesets to work for the newest version yet no one has uploaded it. (except one I guess)

It is almost like they want to make sure there are less people around  ;)
Logged

Shadowlord

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #6 on: July 26, 2008, 10:12:20 pm »

What do you mean, altered tilesets? You don't need to alter tilesets for new versions of DF... You can just copy the needed files over to the new version and they'll work fine (as long as the init.txt is also set properly and all that).

Here's what I usually do:
  • Extract the new version of DF into a new folder, like C:\Games\Dwarf Fortress 28.181.39e. The old version that time was C:\Games\Dwarf Fortress 28.181.39d of course. I'm going to refer to these as 'new' and 'old' from now on, for simplicity.
  • Open up old/data/art and copy your font bmp (e.g. GuybrushASCII_curses_square_16x16.bmp or whatever) into new/data/art.
  • Delete everything in new/raw/graphics.
  • Copy everything from old/raw/graphics folder into new/raw/graphics
  • Merge the settings from your old init.txt into the new one (I'd recommend using WinMerge if you're on windows). If the text goes all FUBAR when you try to scroll, get WinMerge 2.6.14 instead. There was some kind of stupid bug introduced in a version after that which was still around in 2.8, and after trying half a dozen versions to get back to one that worked, I haven't bothered trying the new versions to see if they've fixed it.

Or, perhaps someone could link me to this thing that you're saying you can't get working. Maybe it's more complicated than this and mods some of the raws - in which case it could be turned into a ModBase mod. :P
« Last Edit: July 26, 2008, 10:14:11 pm by Shadowlord »
Logged
<Dakkan> There are human laws, and then there are laws of physics. I don't bike in the city because of the second.
Dwarf Fortress Map Archive

Andir

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #7 on: July 27, 2008, 02:40:26 am »

Prepacked versions of 39c with graphics:
http://dffd.wimbli.com/file.php?id=62

What I'd like to know, is if anyone's ported mike mayday's graphic/tileset to the new dwarf fortress version.
These instructions work for the latest version as well:
http://www.bay12games.com/forum/index.php?topic=20664.msg223139#msg223139
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

Shadowlord

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #8 on: July 27, 2008, 04:43:27 am »

P.S. Nevermind about sending me a link to it, I found it, when I actually got around to checking http://www.dwarffortresswiki.net/index.php/List_of_user_graphics_sets :P, but Mike Mayday's website's download link for it says "Get the latest version HERE! (v9, updated 26 VII 2008)" and the file it links to doesn't actually exist. (The v8 file still exists though. It looks like it should still work if you do what I said and do what that other thread says. I'm a bit surprised he would have gone and changed the interface keys, though.)
Logged
<Dakkan> There are human laws, and then there are laws of physics. I don't bike in the city because of the second.
Dwarf Fortress Map Archive

Andir

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #9 on: July 27, 2008, 01:06:59 pm »

P.S. Nevermind about sending me a link to it, I found it, when I actually got around to checking http://www.dwarffortresswiki.net/index.php/List_of_user_graphics_sets :P, but Mike Mayday's website's download link for it says "Get the latest version HERE! (v9, updated 26 VII 2008)" and the file it links to doesn't actually exist. (The v8 file still exists though. It looks like it should still work if you do what I said and do what that other thread says. I'm a bit surprised he would have gone and changed the interface keys, though.)
IMHO, using Shift + ./, is a horrible way to change Z-Levels :p  I change levels so much it's not funny.  Having a singular key to do it is awesome.  To be fair though I remapped my G15 and G18 keys to the / and * so they were on the left of my keyboard, but whatever.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

Mr.Person

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #10 on: July 27, 2008, 05:46:30 pm »

On the creature tileset page, the "AS_IS" part can be changed to "ADD_COLOR." If you do that, your image will have all the non-pink areas be colored with whatever DF is set to color the tile with (Carpenters will be yellow, nobles will be purple, Miners will be grey, ect.). I have no idea why you would want to do this except maybe to give dwarves a default image, like the one Toady drew, then set it to "ADD_COLOR", just so everything has a picture.
Logged
Youtube video of the year, all years.
Hmm...I've never been a big fan of CCGs - I mean, I did and still do collect Pokemon cards, but I never got heavily into the battling and trading thing.

By definition that makes you a fan since you still buy them.

Anikki

  • Escaped Lunatic
    • View Profile
Re: Tile Sets
« Reply #11 on: July 27, 2008, 06:17:37 pm »

Well, to pick up on what the OP actually wanted (pretty pictures to help understand whats going on) it should be said that as of now it is not possible to give every item / tile / thing in the game a separate unique graphic.

So for the time being we have to accept that some tiles are used for 1, 2, 3, 4, 5 ... different things and thus we need the tilesets to be kinda abstract.

Examples: (Make a tile that looks like)
- a barrel and a screw pump
- a cabinet and a dark fortress
- a chair and a bridgehead
- a chest, a backpack and a waterskin
- a Mug and an elven city
etc.

Actually with some imagination ... use to the "k" key ... and checking out the codepage on the wiki ... you'll soon find grafic-heavy tilesets quite confusing.

Its like Cypher says in The Matrix:
(pointing at the matrix wall of code) "All I see now is blonde, brunette, redhead."
« Last Edit: July 27, 2008, 06:20:49 pm by Anikki »
Logged

Shadowlord

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #12 on: July 27, 2008, 08:05:08 pm »

Not to mention the rivers made of bricks on the overland map... :P
Logged
<Dakkan> There are human laws, and then there are laws of physics. I don't bike in the city because of the second.
Dwarf Fortress Map Archive

Shadowlord

  • Bay Watcher
    • View Profile
Re: Tile Sets
« Reply #13 on: July 28, 2008, 10:47:32 am »

Examples: (Make a tile that looks like)
- a chest, a backpack and a waterskin
(and a quiver)

Here's my backpackquiverchest: , which I just drew in about 5 minutes, but had thought of a few days ago. :P

The barrel and screw pump I don't see a way to do, the cabinet and dark fortress is doable if you want to make your cabinets have fancy evil decorations, I changed chairs and mugs to the versions from Guybrush's ASCII tileset (the one without all the graphics), (and slightly modified the chairs) so they look like a backless chair or stool, and the mugs look like steins, and are still passable as giant trees or elven cities.

Edit: Meant to type dark *fortress*, not dark *forest*!

(I'm working on a tileset but haven't released it yet)

P.S. According to the tilesets article on the wiki, waterskins actually use the same icon as flasks, not the one that backpacks/chests/quivers use.
« Last Edit: July 28, 2008, 11:05:39 am by Shadowlord »
Logged
<Dakkan> There are human laws, and then there are laws of physics. I don't bike in the city because of the second.
Dwarf Fortress Map Archive