Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Some help with tilesets in general.  (Read 695 times)

Seriyu

  • Bay Watcher
    • View Profile
    • Springless Clock
Some help with tilesets in general.
« on: October 02, 2018, 08:54:03 pm »

So I'm not quite sure how tileset assignment is decided. I get the basics, the RAWs refer to a part of the tileset via a number, but apparently there are multiple tilesets? I've only ever seen the one (curses600x800 or whatever the dimensions are), and I'm not sure what tileset is being referred to when the RAWs call a tile, it all seems to be using the same tag?

In one case I do understand tile assignments, and that seems to be creatures (where it's just assigning a letter). However this raises another question, which is how are tiles being used for more then one thing. Is there really no tile usage overlap in DF?

I don't really know how tiles are determined beyond the very basics it seems like, and I'd like to figure out more, as I'd like to make a tileset for my mod at some point, and I obviously need to know how all this hooks up to do that!


In short...

1. RAW tile assignments don't seem to make sense to me, outside of letter assignments. I'll grab a tile ID from the tilesets page on the wiki, and it'll reference an entirely different tile then I was aware of.

2. RAW tile assignments make sense when there's a letter assignment ([TILE:'A'] or whatever), but I don't know how those tiles are being used for multiple things (if they are? is there really no creature tile overlap in the game? Regardless I'm pretty sure I've seen it used for multiple things in mods, and this was before dfhack TWBT support IIRC, but I'd be willing to accept that my assumptions are just wrong on this one)

3. There seem to be multiple tilesets? I don't know if these are legitimately multiple tilesets or just a tileset being used in a different way depending on what you're looking at (the biggest example I can think of is the overworld map vs fort mode viewing).

 Thanks in advance.

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: Some help with tilesets in general.
« Reply #1 on: October 03, 2018, 07:12:55 pm »

Bottom line: Find a tileset you like, find a graphics set, and expand graphics set for your modded creatures.


So I'm not quite sure how tileset assignment is decided. I get the basics, the RAWs refer to a part of the tileset via a number, but apparently there are multiple tilesets? I've only ever seen the one (curses600x800 or whatever the dimensions are), and I'm not sure what tileset is being referred to when the RAWs call a tile, it all seems to be using the same tag?

Yes, there many tilesets you can choose to drop in ``data/art`` folder, but you can only choose one at a time.  It is chosen in ``data/init/init.txt`` with the [FONT:my_tileset.png]
There are also FULLFONT, GRAPHICS_FONT, and GRAPHICS_FULLFONT which are explained on the wiki.  Only one is used at a time.
Note that "tile set" and "graphics set" are two different things.


In one case I do understand tile assignments, and that seems to be creatures (where it's just assigning a letter). However this raises another question, which is how are tiles being used for more then one thing. Is there really no tile usage overlap in DF?

There is VERY MUCH usage overlap in DF.  E.g. bridges and walls.  That's what makes tilesets difficult to make well.

I don't really know how tiles are determined beyond the very basics it seems like, and I'd like to figure out more, as I'd like to make a tileset for my mod at some point, and I obviously need to know how all this hooks up to do that!

See wiki (as you have).  Tinker.  See wiki again.  Rinse, repeat.


In short...

1. RAW tile assignments don't seem to make sense to me, outside of letter assignments. I'll grab a tile ID from the tilesets page on the wiki, and it'll reference an entirely different tile then I was aware of.

2. RAW tile assignments make sense when there's a letter assignment ([TILE:'A'] or whatever), but I don't know how those tiles are being used for multiple things.....

Be mindful of which one is decimal (base ten) versus hexadecimal (base sixteen).  Example, hexadecimal 20 (usually written 0x20) is decimal 32, which is the space character.
A good breakdown is on the wikipedia page for IBM ASCII Codepage 437.
This is important.  These are the numbers you see in raws.
There are exactly 256 tiles you can use, 0 through 255, and that's it.

3. There seem to be multiple tilesets? I don't know if these are legitimately multiple tilesets or just a tileset being used in a different way depending on what you're looking at (the biggest example I can think of is the overworld map vs fort mode viewing).

Same tileset.  Exact same graphics file.  Symbols just have different meanings in different contexts.
E.g. decimal charater 227 (hex 0xE3) represents the goblin Dark Tower in world view, but represents a cabinet in dwarf mode or adventure mode.
The Omega character (decimal 234, hex 0xEA) represents a Mountain Home (i.e. CAVE_DETAILED) in world view, but a statue in dwarf or adventure mode.
This use of extended ASCII is one aspect of the game being "Roguelike".


Aside from what you've asked, there are also graphics sets, which let you specify specific images for specific creatures, professions, undead status, and other things.
These are independent from the tileset, and are probably what you'd really want to customize for any of your modded creatures.


Good luck!

Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: Some help with tilesets in general.
« Reply #2 on: October 04, 2018, 01:24:40 pm »

For example, in Phoebus and Ironhand tilesets, which my OldGenesis uses, 70% of the gems and minerals use different tiles. More of the 255 tiles are allocated towards nicer mineral graphics in Ironhand than in Phoebus.
Also there are transparencies and "hardcoded" colors in the tiles, as illustrated by this red/green comparison of old-Ironhand:
and very old tilesets don't have minecart tracks tiles.

Plants, trees, gems, minerals can be nicely customized,
and some tools (helve, bookcase etc) command a tile.
Spoiler (click to show/hide)

creatures use separate graphics PNG files, not the main tileset:
Spoiler (click to show/hide)
« Last Edit: October 04, 2018, 01:26:30 pm by TomiTapio »
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

Seriyu

  • Bay Watcher
    • View Profile
    • Springless Clock
Re: Some help with tilesets in general.
« Reply #3 on: October 04, 2018, 11:36:07 pm »

Very helpful everyone, thank ya!