Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Color translation modder's tool  (Read 1080 times)

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Color translation modder's tool
« on: March 28, 2009, 04:25:49 pm »

Good afternoon!

I'm moving on to phase 2 of my MMO (Metals and Minerals Overhaul) project, and I could really use a little help. Has anyone written a utility that would take the three color values (4:5:0) and display them in some way? I get easily confused, and while the wiki does explain the system adequately, I frequently trip over issues with the tileset foreground/background and colors. Of course, I CAN go through the process of changing the values, replacing the raws, and opening a saved game to check it, but that takes quite a bit of time each cycle.

Ideally, what would be incredibly useful would be a tool that lets the user:

Specify a tileset
Specify a character IN that tileset
Specify a color code (1:2:1)

Then displays the rendered character (either alone, or on some kind of generic background

Even the last two would be helpful, assuming a fixed character (Uppercase D from curses_square_16x16 or something).

Has this been done before? I couldn't find any threads that looked promising, but my search was not exhaustive.

Rochndil, who can put phase 1 into beta if anyone is interested, everything is pretty well tested...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

woose1

  • Bay Watcher
  • Yay for bandwagons!
    • View Profile
Re: Color translation modder's tool
« Reply #1 on: March 28, 2009, 04:31:27 pm »

MMO?
I thought of something completely different.
Logged

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: Color translation modder's tool
« Reply #2 on: March 28, 2009, 04:40:25 pm »

Of course, that's why it's a funny name. Not to mention that one of my main characters is a cow. Moo! :)

Rochndil, who always enjoys messing with expectations...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

Karadan

  • Bay Watcher
    • View Profile
Re: Color translation modder's tool
« Reply #3 on: March 28, 2009, 06:09:42 pm »

No such tool that I know of, but as a suggestion you could try and set up several objects in a big square (All of different materials or whatever will cause the colors to change) then change them all to something like 0:0:1, 0:0:2, and so on.  Take a screenshot of it so you have all the colors, apend the screenshot with notes as to which color is which.  If you can't get enough objects to do all the colors at once (Very likely) you could do it multiple times.

Perhaps not the most efficient way (no idea how many color options there are) but it would work with notably less effort then checking every single time.

Barring that I'm guessing the colors correspond to simple RGB color pallet, and you could use something as simple as paint to generate the colors yourself.
Logged
and have no idea ... if building buildings out of water is a bad idea.

GENERATION 27:
The first time you see this, copy it into your signature on any forum and add 1 to the generation. Social experiment.

Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: Color translation modder's tool
« Reply #4 on: March 28, 2009, 06:24:56 pm »

Thanks for the suggestion.

In theory, there are 256 (unless I did the math wrong, which is QUITE possible - I'm a writer not a programmer) possible color combinations. So it could be done, but it'd take a while. I looked into doing an automatic display in Excel, but (great surprise) the program is too limited (stupid) to handle that many possibilities. IF I knew VB, I could probably write a routine that would do it, but I wouldn't even know where to start. My only real programming experience was about a century ago, when I was studying Borland Turbo Pacal version 3.0.

I'm pretty sure that a little web-based app could be thrown together by one of our talented resident programmers. I had good luck with the raw-to-CSV request I made a week or so back, and have already used it to great success.

Rochndil, who has skills, but not in every field...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!

ChocoHearts

  • Bay Watcher
    • View Profile
Re: Color translation modder's tool
« Reply #5 on: March 28, 2009, 06:36:24 pm »

Well, at the risk of pointing out the obvious... data/init/init.txt:

Code: [Select]
These are the display colors in RGB.  The game is actually displaying extended ASCII characters in OpenGL, so you can modify the colors.

[BLACK_R:20]
[BLACK_G:20]
[BLACK_B:20]
etc.

So, you could map THOSE, using HTML or something. It's just a 0-255 scale for RGB, so it'd be easy to convert.

[edit] Oops, forgot to mention, I've modded my colors some. Black, obviously, is normally 0, 0, 0. :P [/edit]
« Last Edit: March 28, 2009, 06:44:37 pm by ChocoHearts »
Logged
Feeling dumb is just nature's way of telling you you're still learning.
Elfy McElf: We are here to hug trees and kill dwarves. And it's your fault we are all out of trees.

Taritus

  • Bay Watcher
    • View Profile
Re: Color translation modder's tool
« Reply #6 on: March 28, 2009, 07:41:18 pm »

Search for DFPaint.  That ought to help you out a lot.  It's on DFFD somewhere...
Logged



Rochndil

  • Bay Watcher
  • Mad Modder
    • View Profile
Re: Color translation modder's tool
« Reply #7 on: March 28, 2009, 08:42:43 pm »

Thanks for the suggestions. I've thought about using a tile edit utility, but I've never fooled with one before. I'll have to give it a spin.

Rochndil, learning all the time...
Logged
Build an Elf a fire, keep him warm for a day.
Drown an Elf in magma, keep him warm for the rest of his life!