Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Introducing dwile, a dwarf tileset previewer!  (Read 1803 times)

ardekantur

  • Escaped Lunatic
    • View Profile
Introducing dwile, a dwarf tileset previewer!
« on: September 17, 2009, 05:05:16 pm »

I'm working on putting the finishing touches on a little project I decided to start the other day. One of the offshoots of this project is a small library that can generate images of a screen of Dwarf Fortress, using a specified color scheme and tileset.

For example, here is an image on the DF wiki, displaying a custom tileset and color scheme:



Here is the bottom half of that image, re-rendered in the default color scheme and tileset:



It's not perfect, and I know I screwed up some of the text on there, but it does the job, and it's pretty fast. I have no plans for introducing tilesets, but I may be amiable to it if there's enough interest. The screen to be rendered has to be specified, which means actually writing out the characters on it, though I plan on writing helper functions to make it easier. Right now a snippet of the code that produced the above image looks like this, to get a general idea:

Code: [Select]
... t('     Swordmasters    ', :black, :lcyan) + i([2], :black, :lcyan) + t('  None ', :black, :dgray) + side +
    side + t('  Displayed:       ', :black, :lmagenta) + t('65169', :black, :brown) + i([15], :black, :brown) + t('    Metalsmiths     ', :black, :dgray) + i([1], :black, :dgray) +
      t('  4', :black, :white) + t('     Macedwarves     ', :black, :red)   + i([2], :black, :red)  + t('  None ', :black, :dgray) + side +
    side + t('  Held/Worn:       ', :black, :brown) + t('5535', :black, :brown) + i([15], :black, :brown) + t('     Jewelers        ', :black, :lgreen) + i([1], :black, :lgreen) +
      t('  8', :black, :white) + t('     Mace Lords      ', :black, :lred)  + i([2], :black, :lred) + t('  None ', :black, :dgray) ...

I'll clean up the code and put it up in a couple of days. This is the precursor to the actual project:

A tileset repository. Ranked, downloadable tilesets with instant previews so you can see how the stock screen, fortress screen, etc look with the tileset and color scheme you've chosen. Good idea? Bad idea?
Logged

Shurhaian

  • Bay Watcher
    • View Profile
Re: Introducing dwile, a dwarf tileset previewer!
« Reply #1 on: September 17, 2009, 05:55:54 pm »

I should note that I don't much mess with tilesets myself.

However, DF setting so many things at runtime is something that's caused me grief in the past. A good number of the init.txt options, it'd really make some sense to have as configurable in game. Perhaps only in the main menu, for some of them, but others there's no reason that I can see changing would be a problem(fluid depth display, autosave, FPS, idlers top/bottom, population cap).

Graphics and tilesets would be a good candidate for in-game swapping. But until that's here, this seems like a GREAT idea - a much faster way to compare and see what you like than messing with the tilesets and loading up a fort one at a time.
Logged
Working on: drakes - making the skies(mostly) a bit more varied

My guards need something better to do than make my nobles happy with hugs and justice.

ardekantur

  • Escaped Lunatic
    • View Profile
Re: Introducing dwile, a dwarf tileset previewer!
« Reply #2 on: September 17, 2009, 06:10:23 pm »

Here's it working with another tileset, this one with grayscale, to show its versatility.


Logged

MMad

  • Bay Watcher
    • View Profile
Re: Introducing dwile, a dwarf tileset previewer!
« Reply #3 on: September 18, 2009, 04:35:44 am »

Good idea? Bad idea?

Awesome idea. :) I would love to see this.
Logged
"Ask not what your fortress can do for you - ask what you can do for your fortress."
Unapologetic ASCII abolitionist.

DennyTom

  • Bay Watcher
  • !!Urist!!
    • View Profile
Re: Introducing dwile, a dwarf tileset previewer!
« Reply #4 on: September 18, 2009, 07:05:31 am »

Very clever - allows for much faster and more comfortable deciding witch tileset use
Logged
It is so much easier to measure life in experience points...

Ironhand

  • Bay Watcher
  • the llama is laughing
    • View Profile
Re: Introducing dwile, a dwarf tileset previewer!
« Reply #5 on: September 18, 2009, 07:07:18 am »

Nice!

When I was making my tile set, I hated having to boot up the game every time I changed a pixel.
Maybe with this I'll actually get around to making my custom color set.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Introducing dwile, a dwarf tileset previewer!
« Reply #6 on: September 18, 2009, 12:07:56 pm »

Very clever - allows for much faster and more comfortable deciding witch tileset use

Or helping tileset makers find oddities when making their own new ones.
Logged