Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [FAQ] How do Graphics work? - Ask questions here  (Read 979 times)

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
[FAQ] How do Graphics work? - Ask questions here
« on: February 20, 2010, 08:32:08 am »

Recently there's a lot of questions about graphic sets and tilesets. Let's start a separate thread for such answers to avoid similar questions and confusion.

Here's my short guide I salvaged from my own answers in different threads with such questions:


☢☢☢ Graphics explained ☢☢☢

[1] Tileset (the letters/symbols which you see which are used in text and to idicate doors, tables, hatches etc.), which is basically a "font" you can replace. There're 256 tiles and most of them are hardcoded to be used in other cases (thus there're problems to differ "X" and up/down staircase etc. Here's the list in the wiki:
Tileset explained (which tiles mean what etc.)
Tileset Repository

[2] Creature graphics, which are separate graphical files which are "linked" to every creature in a specific file (/raw/graphics/graphics_***.txt, where *** is the name of the file which was given by the creator).
Creature graphics set repository


[1] So, if you want to replace the tileset (first), then put the .bmp file (for 40d) or .png file (for 40d16/17) in your /data/art folder, then open your init.txt file.
Spoiler (click to show/hide)

[2] As I told, creature graphics are located in /raw/graphics, so if you get someone's creature graphics pack, it's usually accompanied with a .txt file to place there or with text to make your own txt file (it's the easiest thing to do :P).
  If you're interested to know how does the setting of creature graphics work, here's my explanation:
Spoiler (click to show/hide)


« Last Edit: February 20, 2010, 12:03:36 pm by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

xoen

  • Bay Watcher
    • View Profile
Re: [FAQ] How do Graphics work? - Ask questions here
« Reply #1 on: February 20, 2010, 11:15:29 am »

Deon, tell me, why authors did not leave empty spaces(row or so) in tileset gfx, for populating with custom content?
It could be SO useful(it could be used by custom, new OBJECT, plant, whatever)..
I realized it's quite a problem after creating plant...
Is such thing planned to be used in future?
---
Another useful link fot tileset creators, imho:
http://df.magmawiki.com/index.php/Character_set
« Last Edit: February 20, 2010, 11:40:25 am by xoen »
Logged

Truean

  • Bay Watcher
  • Ok.... [sigh] It froze over....
    • View Profile
Re: [FAQ] How do Graphics work? - Ask questions here
« Reply #2 on: February 20, 2010, 11:37:06 am »

For ease of use from a end user standpoint your init file will look something like this when opened. Displayed below is the relevant section for implementing graphics with the lines Deon mentioned:

Spoiler (click to show/hide)

Clearly, change [GRAPHICS:NO] to YES and replace as Deon suggested.

My question is, how do you know the name of the file you are supposed to reference in the FONT and FULLFONT, section? What if you have multiple files as in the case of Chariot's Graphics?
Logged
The kinda human wreckage that you love

Current Spare Time Fiction Project: (C) 2010 http://www.bay12forums.com/smf/index.php?topic=63660.0
Disclaimer: I never take cases online for ethical reasons. If you require an attorney; you need to find one licensed to practice in your jurisdiction. Never take anything online as legal advice, because each case is different and one size does not fit all. Wants nothing at all to do with law.

Please don't quote me.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: [FAQ] How do Graphics work? - Ask questions here
« Reply #3 on: February 20, 2010, 12:01:00 pm »

OK, I think I didn't make it clear enough.

This is the TILESET which you use in the INIT.TXT:


You can use only ONE of those, and it determines the "font" of your output.

I think by multiple files you mean creature graphics, and those go to /raw/graphics/ and are determined there, if you want to know how then look at [2] in OP.

Quote from: Xoen
Deon, tell me, why authors did not leave empty spaces(row or so) in tileset gfx, for populating with custom content?
Because the original author is Toady One, and he hardcoded the size of a tileset to be 16 tiles x 16 tiles (256 tiles total) and which tiles mean what.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

xoen

  • Bay Watcher
    • View Profile
Re: [FAQ] How do Graphics work? - Ask questions here
« Reply #4 on: February 20, 2010, 12:04:10 pm »

ahh, so FF limit is hardcoded?
Damn..not very evolutionary..short perspective, sigh.
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: [FAQ] How do Graphics work? - Ask questions here
« Reply #5 on: February 20, 2010, 12:14:10 pm »

It's just a placeholder for real graphics. When the graphics arc hits (if ever), it'll be expanded.

Note that there're still ◙ ♪ ↕ ↔ ₧ ª ¬ ½ ¼ ╢ ╟ ⌡ tiles which mean nothing, and the 256th tile (lower right corner) isn't being used for anything too (at least I wasn't able to find a use for it).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

xoen

  • Bay Watcher
    • View Profile
Re: [FAQ] How do Graphics work? - Ask questions here
« Reply #6 on: February 20, 2010, 12:29:07 pm »

Note that there're still ◙ ♪ ↕ ↔ ₧ ª ¬ ½ ¼ ╢ ╟ ⌡ tiles which mean nothing, and the 256th tile (lower right corner) isn't being used for anything too (at least I wasn't able to find a use for it).
yup, i noticed this moment ago, excellent :)
Logged

Veggie Lamb

  • Escaped Lunatic
    • View Profile
Re: [FAQ] How do Graphics work? - Ask questions here
« Reply #7 on: February 21, 2010, 10:36:38 am »

I've had a hard time getting a graphic set to work even though the creator had a file to go with it, and I suspect it's related to the fact that I haven't seen instructions for how to tell the game to look at the new graphic txt file. Is the example text file the only file the game recognizes for displaying graphics?

And yes, I've turned on the graphics in the init.txt, and am successfully using a tileset.


*UPDATE* The files were .png files, which apparently doesn't work with the newest version of DF. Convert them to .bmp files.
« Last Edit: February 21, 2010, 10:43:56 am by Veggie Lamb »
Logged

FatedTemp

  • Bay Watcher
    • View Profile
Re: [FAQ] How do Graphics work? - Ask questions here
« Reply #8 on: February 21, 2010, 03:25:55 pm »

The files were .png files, which apparently doesn't work with the newest version of DF. Convert them to .bmp files.

The latest (though that should soon change) official DF release by Toady doesn't support .png but the d# versions do. Go to http://www.bay12games.com/forum/index.php?topic=44829.0 download d17 (it has some issues and bugs to be aware of though and is itself soon to be out dated). Once the new release is out the d# branch will be merged into so the official version should support .png.
Logged