Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: DFA (DwarfFortressAnnouncements) version 1.0! Overlays gamelog on game GUI.  (Read 3353 times)

uBdead

  • Escaped Lunatic
    • View Profile

Presenting DFA: customizable overlay for displaying the announcements in real time in the game itself

After playing on my laptop for a while I noticed that it was not very comfortable to use the defacto AnnouncementsWindow+ GUI as it is a separate window. I often miss the little red combat "C" and I wanted to make my own version that could be a direct integration in the DF game window. After using DFHack for many years I only feel like it would be fair to share my new GUI to return the favour.

You can try it out, by downloading it here from the "releases" (or compile it yourself):

https://github.com/ZEN-ben/DwarfFortressAnnouncements

Let me know if you have issues and I'll do my best to help. I still have a lot of ideas to improve it, but I think this is already a huge help to a lot of people.

Logged

myk

  • Bay Watcher
    • View Profile

This looks very nice. If I may ask, why is this implemented as an external utility and not as a dfhack script? DFHack has facilities for overlays.
Logged

uBdead

  • Escaped Lunatic
    • View Profile

Good question! The only reason is actually that I estimated that it would be far too difficult (for me) to implement a DFHack plugin compared to this overlay. I also assumed that having the overlay would give me a bit more flexibility. I would love to have some more access to game data other then just the text from the gamelog.txt. For example i'm currently not able to judge if an action is "good" (my dwarf hits enemy) or bad (enemy decapitates dwarf).

But it's a great suggestion, I might need to read up on DFHack for sure!
Logged

myk

  • Bay Watcher
    • View Profile

This would probably be better off as a Lua script rather than a C++ plugin, but either would likely work.

You might be interested in the onReport event from EventManager, which could give you access to announcement metadata. For the overlay, you could subclass DwarfOverlay and use a Label widget to display the scrollable, colored text.

One thing you might lose, though, is truetype text, which might be a dealbreaker, considering how long the announcement text can be.
« Last Edit: May 28, 2022, 11:48:27 pm by myk »
Logged