Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: graphics set file structure?  (Read 2346 times)

PopTart

  • Bay Watcher
    • View Profile
graphics set file structure?
« on: May 23, 2016, 04:45:35 pm »

Hi all, I'm trying my hand at a graphics set. I have the beginnings of a decent tileset, and I want to extend the Latin and Greek characters and maybe add other alphabets. The idea is to have these characters stand for more specific creatures and objects, similar to the CLA set. I'm using the Graphic set wiki page to get started, as well as actual examples. From what I gather, CLA's system aligns well with the template on the wiki. For example, there's a mini-tileset for just goblins, and a text file that accompanies it. That part makes sense. But when I look at, for example, Phoebus's set, there's none of that. Instead, there's one huge file called overrides.txt, which corresponds to a huge picture called _Items.png. Why this difference? Does it allow you to add graphics for tools as well as creatures? Are tools and creatures handled differently?
« Last Edit: May 23, 2016, 07:28:16 pm by PopTart »
Logged

PopTart

  • Bay Watcher
    • View Profile
Re: making my first graphics set
« Reply #1 on: May 23, 2016, 04:48:53 pm »

I can now see that Phoebus has borrowed a bunch of sets and cobbled together a master set from this. That's apparently why elf graphics are in their own separate folder. I guess now my question is, why are there graphics in the data/art folder, and different graphics in the raw/graphics folder?

I just noticed that the wiki says only creature graphics can be modified. If this is true, then how do some graphics sets have all different graphics for shoes, socks, etc.?
« Last Edit: May 23, 2016, 07:47:49 pm by PopTart »
Logged

jecowa

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #2 on: May 23, 2016, 10:56:45 pm »

With vanilla Dwarf Fortress a tileset designer is able to replace the main tilesheet in data/art and can also add lots of tilesheets for creatures in raw/graphics.

In order to additional tilesheets for non-creatures, a tileset designer's only option is to use the Text Will Be Text (TWBT) mod for DFHack – This is what all those "_override" and other tilesheets with filenames starting with an underscore are for.

The reason there are multiple tilesheets in "raw/graphics" is mostly to help keep things organized, but there's also a limit of 1024 tiles. So a tilesheet that has 32 rows and 32 columns will give you the maximum number of tiles in a tilesheet if you are wanting to minimize the number of tilesheets you make.
Logged

PopTart

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #3 on: May 23, 2016, 11:48:57 pm »

Thanks, jecowa. Now I know I need to read the twbt stuff. It's hard to know what's vanilla, what's dfhack, what's twbt, etc.

jecowa

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #4 on: May 24, 2016, 01:22:28 am »

Thanks, jecowa. Now I know I need to read the twbt stuff. It's hard to know what's vanilla, what's dfhack, what's twbt, etc.

It was confusing for me at first too.

There's also a bunch of raw/objects files you can edit to make some items blink, change their different tile, or change their color. (This is a vanilla feature, btw.) The downside to editing objects files is that you have to update your pack for almost every single Dwarf Fortress update. Those objects files can be kind of tedious to maintain. Dawn Fortress and AutoReiv are an examples of graphics packs that don't edit any objects files. GemSet and Afro are examples of packs that edits lots of objects files.
Logged

Rydel

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #5 on: May 25, 2016, 11:28:13 am »

The vanilla stuff will be everything in the raws/graphics folder, and the main tileset in data/art
TWBT will be the overrides.txt file and all of the files specified in it from data/art.

PopTart

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #6 on: May 25, 2016, 12:10:00 pm »

The vanilla stuff will be everything in the raws/graphics folder, and the main tileset in data/art
TWBT will be the overrides.txt file and all of the files specified in it from data/art.


Sure, but files in the raw/objects folder can also specify graphics, right?

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: graphics set file structure?
« Reply #7 on: May 25, 2016, 12:30:11 pm »

The vanilla stuff will be everything in the raws/graphics folder, and the main tileset in data/art
TWBT will be the overrides.txt file and all of the files specified in it from data/art.


Sure, but files in the raw/objects folder can also specify graphics, right?
Not directly.  The raw/objects files specify a tile (or two or three) for a given creature/item (for example, 'E' for elephants).  Tilesets control what those tiles look like.  The raw/graphics files allow for pictures that override the tiles, and the graphics have more options (for example, a specific graphic for hammerdwarves, whereas raw/objects specifies a single tile for all military dwarves).

Text Will Be Text adds another set of overrides, this time including items and buildings.  It adds lots of flexibility, but depends on DFHack and has some stability issues.

Some of the other tilesets uses 'tile magic' to differentiate items a bit better.  To oversimplify a bit, that involved removing accented characters from the language files, then using the freed up tiles for other uses.  It's cumbersome to maintain, but does not rely on DFHack.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

CLA

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #8 on: May 25, 2016, 12:31:27 pm »

Sure, but files in the raw/objects folder can also specify graphics, right?

You can assign some objects in the raw/objects folder other tiles on the standard tileset, but not on separate tilesets.

So to reiterate, in vanilla Dwarf Fortress you can:

-assign any creatures to tiles on new tilesets (which you put in raw/graphics)
-change tiles on the main tileset (this often affects multiple items)
-change tile definitions of some things, but always only on the main tileset

For information on what can be changed and what can't, see the "tileset" page on the wiki. The "graphics" page has an overview, and you already found the graphic set page.
If you don't want to manually create all the necessary text files, use Quiet-Sun's Standardizer. This will create all text files for all creatures with all professions and states (child, undead, etc), and comments out all the ones you don't have (so everything).
You then can create the image files in your desired tile size and draw what you want. You just need to uncomment the entries in the text files and you're done.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

PopTart

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #9 on: May 25, 2016, 07:56:11 pm »

Cool, I finally understand what goes where and what text refers to what graphics objects. Unfortunately I'm on a Mac, so I can't use the Standardizer. But it's good to know there is a standard. So now I know how much customization I can get at various levels of complexity.

CLA

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #10 on: May 25, 2016, 08:19:22 pm »

Cool, I finally understand what goes where and what text refers to what graphics objects. Unfortunately I'm on a Mac, so I can't use the Standardizer. But it's good to know there is a standard. So now I know how much customization I can get at various levels of complexity.
I can just upload the standard creature text files if you want.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0

jecowa

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #11 on: May 25, 2016, 08:25:54 pm »

I use TextWrangler on the Mac. It's free software from Bare Bones. If you open up your copy of an objects file and open up the vanilla version of that file in TextWrangler, you can select them both, right-click them, and choose "compare" to see all the differences between the files. You can even compare entire folders with it. This is what I use to upgrade tilesets to the latest version of Dwarf Fortress.

Cool, I finally understand what goes where and what text refers to what graphics objects. Unfortunately I'm on a Mac, so I can't use the Standardizer. But it's good to know there is a standard. So now I know how much customization I can get at various levels of complexity.
I can just upload the standard creature text files if you want.

I'd appreciate having this too. I'm curious what it looks like.
Logged

PopTart

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #12 on: May 25, 2016, 09:33:16 pm »

I can just upload the standard creature text files if you want.

That would be much appreciated! I appreciate all the work that went into creating, organizing, and compiling these files.

CLA

  • Bay Watcher
    • View Profile
Re: graphics set file structure?
« Reply #13 on: May 27, 2016, 07:20:41 am »

I can just upload the standard creature text files if you want.

That would be much appreciated! I appreciate all the work that went into creating, organizing, and compiling these files.
I completely forgot about this, sorry!
Here we go:

http://dffd.bay12games.com/file.php?id=12090

Includes the text files (all creatures commented out), empty png files, and helper png files that show you which tile position is for which creature/profession. It's for 16x16 pixel tiles, if you want another size, replace all instances of [TILE_DIM:16:16] with [TILE_DIM:<your desired height>:<your desired width>] with any text editor's replace function. Don't forget to create all png files with the right size.
Logged
CLA - an ASCII-like Graphic Pack with simplified letter-like creature graphics. The simple and clean looks of ASCII with distinct creature graphics - best of both worlds!

http://www.bay12forums.com/smf/index.php?topic=105376.0