Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 149

Author Topic: Text Will Be Text - dfhack plugin  (Read 328740 times)

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Text Will Be Text - dfhack plugin
« on: May 21, 2014, 06:34:48 pm »

This plugin improves various aspects the game interface.

Originally I wrote a small plugin because I was tired seeing coffins instead of zeroes and all that stuff. It has greately evolved since then. Some functions may not work or have issues in Adventurer Mode. See readme for all details.

1. Main function is to use separate fonts (tilesets) for map tiles and for text. Text and map font may also have different sizes. Map tiles can have any size, no requirement to have at least 80x25 grid anymore.

2. Multi-level rendering.

3. Allows to override tile numbers for buildings, items and various tile types.

4. `mapshot` command saves image of entire map in full size. [currently broken]

Latest binaries are available from autobuild server (see below). There's no guarantee they will work on your OS, have any functions you expect, or even work at all. They're provided purely for people who want to test things as they're being developed rather than to wait. I read your error reports but don't expect them to be fixed straight away.

Spoiler: Screenshot (click to show/hide)

Home Page / Sources -- Latest Release -- Development Builds -- Report an Issue

Here are text fonts of various sizes to be used as, well, text font. Or you can make you own text font with this tool.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1 on: May 21, 2014, 08:54:58 pm »

...Holy crap.

Trapezohedron

  • Bay Watcher
  • Intrepid Lurker (Do PM if any questions)
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2 on: May 21, 2014, 09:05:54 pm »

Holy Eff.

Somebody needs to port this over to windows asap.
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #3 on: May 22, 2014, 05:27:44 am »

Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #4 on: May 22, 2014, 05:39:12 am »

You have my curiosity.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 141 countries visited :::

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #6 on: May 22, 2014, 07:47:41 am »

Hi
Just updated the plugin with correct support for more screens (embark, world gen, image export) and side menu modes (thx fricy for reminding). I'll try to make Windows build but things are so much more complicated there...

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #7 on: May 22, 2014, 08:11:58 am »

Hmm... It look like you are doing something strange with those vmethods. Wouldn't it be easier to just use inheritance? e.g. how we did it here: https://github.com/DFHack/dfhack/blob/develop/plugins/rendermax/renderer_opengl.hpp That way it would be cross os compatible. As for constant function offsets, if they are from graphics lib, i think they are somewhere dfhack too (though not sure...)
Logged
My stuff (i'm working/thinking about):
Mini mod collection
pretty lights

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #8 on: May 22, 2014, 09:13:18 am »

Yep, some things can and need to be done better. Just did it the way it was easier for me and with less code.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #9 on: May 22, 2014, 12:43:07 pm »

This is ttf-exclusive, correct? (people cant use ttf with opengl and cant run the plugin without opengl?)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 141 countries visited :::

scamtank

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #10 on: May 22, 2014, 12:52:55 pm »

Well, yeah. If all goes to plan, this could make TrueType an obsolete practice.

Does this have any DFHack prequisites? The few people I've seen test this report crashing.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #11 on: May 22, 2014, 01:02:10 pm »

Ttf allows for way longer texts ingame. Without ttf, reaction, item and character names get cut off way sooner.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 141 countries visited :::

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #12 on: May 22, 2014, 03:05:09 pm »

I haven't seen crashes so far, but switching to standard rendering means goodbye to TTF since the current renderer doesn't support TTF over OpenGL, and in windowed mode the graphics is blurred. In fullscreen it looks good.

And as for TTF: The current display code is in serious need of upgrading, I really hope Toady will consider opening this part of DF (on linux it's already done...) and we can go with lnxt's rewrite which has better TTF support, and then separating fonts from graphics could be done in the graphics code, and not in a dfhack plugin.

But even if he does not, we still have this option: If we can agree on a standard tileset for fonts I'm ok with lack of TTF, the cutoff can be annoying, but my preliminary testing didn't uncover anything serious. The possibilities are very good once the tile authors start supporting it, as they'll have much better freedom for creating graphics.

Bugreport: Both Ctrl-S (save macro) and Ctrl-M (browse mechanism dfhack plugin) refreshes the display to use only the font tileset. Changing Z-levels will reset the screen to the desired display. Overall I'm impressed with this, and will upload a new MacNewbie for beta testers.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #13 on: May 22, 2014, 05:19:35 pm »

I haven't seen crashes so far, but switching to standard rendering means goodbye to TTF since the current renderer doesn't support TTF over OpenGL, and in windowed mode the graphics is blurred. In fullscreen it looks good.

And as for TTF: The current display code is in serious need of upgrading, I really hope Toady will consider opening this part of DF (on linux it's already done...) and we can go with lnxt's rewrite which has better TTF support, and then separating fonts from graphics could be done in the graphics code, and not in a dfhack plugin.

But even if he does not, we still have this option: If we can agree on a standard tileset for fonts I'm ok with lack of TTF, the cutoff can be annoying, but my preliminary testing didn't uncover anything serious. The possibilities are very good once the tile authors start supporting it, as they'll have much better freedom for creating graphics.

Bugreport: Both Ctrl-S (save macro) and Ctrl-M (browse mechanism dfhack plugin) refreshes the display to use only the font tileset. Changing Z-levels will reset the screen to the desired display. Overall I'm impressed with this, and will upload a new MacNewbie for beta testers.
It's already open: https://github.com/Baughn/Dwarf-Fortress--libgraphics-
Logged
My stuff (i'm working/thinking about):
Mini mod collection
pretty lights

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #14 on: May 22, 2014, 08:50:51 pm »

Hi all
Just uploaded new package with minor fixes (not for Ctrl-S and Ctrl-M yet) and experimental Windows binary.

OS X version is tested with MacNewbie Pack ReBorn v0.8.4 on 10.9 and Windows version with PeridexisErrant's Dwarf Fortress Starter Pack r55 on XP and Win7.

fricy, what does this mean - "in windowed mode the graphics is blurred"?

As for TTF, yes, it would be ideal to separate graphics code on all platforms and do everything properly, but for now we have what we have. TTF rendering looks nicer than square font and allows longer text, but currently has problems with non-black "black" color (TTF background is always true black), not being used on some screens (I wonder why) and in text output by dfhack plugins. These are basically the reasons why I wrote this plugin. So I think people who are happy with TTF won't want this plugin so it's not a problem that they are incompatible.
Pages: [1] 2 3 ... 149