Bay 12 Games Forum

Please login or register.

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

Author Topic: DF Assistant: Never miss game events with 5 advisors keeping track (update v1.3)  (Read 10644 times)

DarkDvr

  • Bay Watcher
    • View Profile




Hey there bearded bast.. friends!

I'm releasing a utility I've made for myself to make my DF fortress mode plays more enjoyable.

Get the latest version (now resizable!):
- Download full version: https://dffd.bay12games.com/file.php?id=16567
- Download light version (smaller filesize version without music): https://dffd.bay12games.com/file.php?id=16568

Changelog:
Spoiler (click to show/hide)


What is it and what can it do?

Game events are split between advisors, each responsible for a separate aspect of your fortress:
  • Chief Advisor: keeps track of only the most important events that you don't want to miss
  • Military Advisor: combat injuries, deaths, big fights, etc
  • Engineering Advisor: building, maintenance, material shortages, etc
  • Creature Advisor: anything that lives in and around your fortress, what they think, how they feel, etc.
  • Miscellaneous Advisor: rest of the events, like weather, trading, thievery, etc.

Alongside that:
  • Each advisor has a unique sound effect to announce when it has something to say.
  • Shows current conditions like season & weather.
  • Background music with the ability to pause/skip/change volume and add your own music

App is designed to fit vertically alongside other DF utilities on a 1080p screen. Everything's resizable, window and every advisor panel.
Besides, app is made to very configurable - all parsing is done with the use of regex defined in an XML file, and the sounds are read from the directories (so music tracks and sfx are easily added/removed).


How do I use it?

  • Unzip it to wherever you want
  • Launch DFAssistant.exe
  • File -> Locate Gamelog.txt (it'll be in your Dwarf Fortress main folder)
You don't have to start a new game. It'll process the last 10000 lines of game events. Events after that will be timestamped.


How do I change the rules or configure the app?

There are some settings in the 'Edit' menu up top, check that first.

To change other stuff:
Spoiler (click to show/hide)


Your app is missing important events I need my advisors to mention!

Yep, most likely they're missing some, I couldn't add all possible events. You can easily add qualifiers to the XML to have them mention in. See above for instructions.
You can also post here (or better yet, email me) the lines you want advisors to mention (and which advisor it should go to, in your opinion). I'll consider adding it to the default config XML.


I've created a MUCH better ruleset XML than yours!

That's excellent news! Post the DFAssistant.xml file here (and tell me I'll mention it in the OP) for others to use. Mention why you think it's a better set of rules so people know.


Can I repost/add to a pack/integrate into something?

Reposting: please only link to this post, as this is where the latest info/links will be kept.
Packs: Feel free to add it to whatever pack you want (LNP/Masterwork/etc), just mind that most of the app size is the music that's included. Ideally I want to keep it, but if size is an issue, remove most of the music tracks, but keep the advisor notification sfx.
Integration: Let's talk - darkdvr1@ya.ru


Mandatory mention for copyright materials

Click "Copyright" in the upper right corner of the app to see the mentions for the licensed content. Most of it is free even for commercial use, and some for non-profit use, which this is.
If you own some of it, and want me to remove it - email me and I'll do that.


Hey! I actually enjoy this utility and I want to support future development, how do I do that?

Paypal: darkdvr1@ya.ru


Special thanks to Simon Swerwer (https://soundcloud.com/simonswerwer) for the incredible DF music tracks!
« Last Edit: April 10, 2023, 12:13:51 pm by DarkDvr »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DF Assistant - Never miss game events with 6 advisors keeping track
« Reply #1 on: December 10, 2020, 04:31:19 am »

Nice!

deepfield

  • Bay Watcher
    • View Profile
Re: DF Assistant - Never miss game events with 6 advisors keeping track
« Reply #2 on: December 10, 2020, 06:19:46 am »

Very awesome. I was looking for a more modern alternative to Announcement window and this does perfect. The planned resizable features will be welcome. Is there a way to have it remember the location of the gamelog.txt file instead of having to point to it each time its run?
Logged

DarkDvr

  • Bay Watcher
    • View Profile
Re: DF Assistant - Never miss game events with 6 advisors keeping track
« Reply #3 on: December 10, 2020, 06:48:41 am »

Very awesome. I was looking for a more modern alternative to Announcement window and this does perfect. The planned resizable features will be welcome. Is there a way to have it remember the location of the gamelog.txt file instead of having to point to it each time its run?

Yes and yes. As soon as I'm done with the CP2077 run I'll work on new feature  :D
Logged

DarkDvr

  • Bay Watcher
    • View Profile
Re: DF Assistant - Never miss game events with 6 advisors keeping track
« Reply #4 on: December 23, 2020, 09:07:46 am »

Is there a way to have it remember the location of the gamelog.txt file instead of having to point to it each time its run?

Done!
Logged

ldog

  • Bay Watcher
    • View Profile

A categorized announcement viewer with bells and whistles? Heresy!
Why is this not in the LNP!
Really awesome, looking forward to giving this a whirl.
Can it filter out sparring?
« Last Edit: January 28, 2021, 08:16:13 pm by ldog »
Logged
Quote from: Dirst
For example, if you wanted to check if a unit was eligible to be a politician or a car salesman, you'd first want to verify that there is no soul present...

Quote from: gchristopher
The more appropriate question becomes, are they awesome and dwarven enough.

DarkDvr

  • Bay Watcher
    • View Profile

A categorized announcement viewer with bells and whistles? Heresy!
Why is this not in the LNP!
Really awesome, looking forward to giving this a whirl.
Can it filter out sparring?

It's filtered by default in a way - the gamelog doesn't specify whether it's the real combat or just training, so with default filters DFAssistant only shows combat events that result in someone(thing) losing a body part or dying. That way it filters out all sparring, since usually training doesn't result in maiming.

Also, in terms of spam, it's especially an issue when dwarves are constrained to a borrow, and they can't reach something. Gamelog generates a stupid amount of spam in those cases. The way DFA handles that is two-fold: it'll simply "count" repeating messages that go one after another ("dwarf can't reach ale (x178)") and you can also disable the sound alerts for the Engineering advisor to not hear its notification sound during heavy log spam.

Thirdly, if you really don't want to see certain messages, remember that you can also edit the filters in the settings file to your liking.
« Last Edit: January 29, 2021, 02:53:22 am by DarkDvr »
Logged

ldog

  • Bay Watcher
    • View Profile

A categorized announcement viewer with bells and whistles? Heresy!
Why is this not in the LNP!
Really awesome, looking forward to giving this a whirl.
Can it filter out sparring?

It's filtered by default in a way - the gamelog doesn't specify whether it's the real combat or just training, so with default filters DFAssistant only shows combat events that result in someone(thing) losing a body part or dying. That way it filters out all sparring, since usually training doesn't result in maiming.

Also, in terms of spam, it's especially an issue when dwarves are constrained to a borrow, and they can't reach something. Gamelog generates a stupid amount of spam in those cases. The way DFA handles that is two-fold: it'll simply "count" repeating messages that go one after another ("dwarf can't reach ale (x178)") and you can also disable the sound alerts for the Engineering advisor to not hear its notification sound during heavy log spam.

Thirdly, if you really don't want to see certain messages, remember that you can also edit the filters in the settings file to your liking.

Very cool! Thanks!
Logged
Quote from: Dirst
For example, if you wanted to check if a unit was eligible to be a politician or a car salesman, you'd first want to verify that there is no soul present...

Quote from: gchristopher
The more appropriate question becomes, are they awesome and dwarven enough.

Frango Nicolbidok

  • Bay Watcher
  • Legendary Peasant
    • View Profile

Hi! A very nice Dwarf recommended this program and I love it!

However I've run into an issue where when I run the .exe and set my gamelog.txt directory, it will load the existing events in the gamelog.txt file and then watch for new events for only a few seconds before it grinds to a halt and nothing further is shown for any of the Advisors.

I'm running your 1.2 (no music) version and I'm running it on DF version 0.47.05 (entirely vanilla).

The gamelog.txt directory is D:\Games\All DF\0.47.05

(I considered whether having spaces or dots in the directory path could somehow cause an issue).

Please let me know what you think and if there are other details I can share. Great work by the way, it looks fantastic.
Logged
However, now I wanted some more challenge and embarked to evil biome.
"Terrifying screams come from above!"

DarkDvr

  • Bay Watcher
    • View Profile

However I've run into an issue where when I run the .exe and set my gamelog.txt directory, it will load the existing events in the gamelog.txt file and then watch for new events for only a few seconds before it grinds to a halt and nothing further is shown for any of the Advisors.

Huh, that's a first I hear about it, interesting. I've ran tests on a game with a gamelog with hundreds of thousands of entries and it kept on processing (reason being that DFA never reads the whole file, only the lines it needs, because that gamelog gets way too big to read in its entirety). So I can't seem to reproduce this on my end.
Could you check your gamelog txt filesize, and zip it up on max compression? See how large the archive is, and maybe you could upload it somewhere so I can get it?
In the meantime, double-check and see that your log actually gets new events in it as you play, maybe there are simply no new events to process by the DFA. Or, alternatively, perhaps you're only getting events that are not matched by the rules in the settings xml.
Logged

Frango Nicolbidok

  • Bay Watcher
  • Legendary Peasant
    • View Profile

Could you check your gamelog txt filesize, and zip it up on max compression? See how large the archive is, and maybe you could upload it somewhere so I can get it?
In the meantime, double-check and see that your log actually gets new events in it as you play, maybe there are simply no new events to process by the DFA. Or, alternatively, perhaps you're only getting events that are not matched by the rules in the settings xml.

Here are two screenshots and two gamelogs (hopefully Google Drive is okay to share these.)

First Gamelog, zipped: https://drive.google.com/file/d/1GYQqCdhxFBEyg-435E_fFCFFfWnGaTMp/view?usp=sharing
First Screenshot: https://drive.google.com/file/d/1H43PuRbMioOdzn7ygJOKfwVjM7XjRRaK/view?usp=sharing

You'll notice that the one and only event that was displayed afterwas the one marked by the timestamp at 2:45, which happened just after I loaded and unpaused the game (the game was re-paused until 2:51 PM when I took the screenshot and zipped the file)

Second Gamelog, zipped: https://drive.google.com/file/d/1dBioUV_gPhk8dbRUyC9MLcZEWM4wkkuU/view?usp=sharing
Second Screenshot: https://drive.google.com/file/d/1OxgyRFLfHecvAySm6Fq3vB6vJbj2umGw/view?usp=sharing

The screenshots are identical aside from the time, but the gamelog has events such as X charges at Y (military) and X has been completed (engineering) that aren't in the second screenshot.

In the meantime, double-check and see that your log actually gets new events in it as you play, maybe there are simply no new events to process by the DFA.

Or, alternatively, perhaps you're only getting events that are not matched by the rules in the settings xml.

I considered that but the logs seem like they're updating.

I also wanted to mentioned that a similar program, "Announcement Window" works just fine with the same exact gamelog, so I thought it was strange.
Logged
However, now I wanted some more challenge and embarked to evil biome.
"Terrifying screams come from above!"

DarkDvr

  • Bay Watcher
    • View Profile

Here are two screenshots and two gamelogs (hopefully Google Drive is okay to share these.)

First Gamelog, zipped: https://drive.google.com/file/d/1GYQqCdhxFBEyg-435E_fFCFFfWnGaTMp/view?usp=sharing
First Screenshot: https://drive.google.com/file/d/1H43PuRbMioOdzn7ygJOKfwVjM7XjRRaK/view?usp=sharing

You'll notice that the one and only event that was displayed afterwas the one marked by the timestamp at 2:45, which happened just after I loaded and unpaused the game (the game was re-paused until 2:51 PM when I took the screenshot and zipped the file)

Second Gamelog, zipped: https://drive.google.com/file/d/1dBioUV_gPhk8dbRUyC9MLcZEWM4wkkuU/view?usp=sharing
Second Screenshot: https://drive.google.com/file/d/1OxgyRFLfHecvAySm6Fq3vB6vJbj2umGw/view?usp=sharing

Ah, excellent, thank you so much for helping me find this bug. Not sure why I didn't see this issue with my logfile, but yours definitely exposed it.
I fixed it, was a simple issue not resetting a certain flag.

Please try this version with your logfile and see if you get regular updates as you should.
Another thing I've changed is to remove the rule for "X charges Y" in the settings xml, since when you get a lot of training, it gets super spammy. Military advisor now mostly matches serious issues like someone losing a limb or dying.

Try this, and please let me know, if all works fine for you, I'll release this as an official update:
https://drive.google.com/file/d/1CZkrlUN7xn5CYmm0bWL5LSx4OvM0jUc4/view?usp=sharing
Logged

Frango Nicolbidok

  • Bay Watcher
  • Legendary Peasant
    • View Profile

Ah, excellent, thank you so much for helping me find this bug. Not sure why I didn't see this issue with my logfile, but yours definitely exposed it.
I fixed it, was a simple issue not resetting a certain flag.

Please try this version with your logfile and see if you get regular updates as you should.
Another thing I've changed is to remove the rule for "X charges Y" in the settings xml, since when you get a lot of training, it gets super spammy. Military advisor now mostly matches serious issues like someone losing a limb or dying.

Try this, and please let me know, if all works fine for you, I'll release this as an official update:
https://drive.google.com/file/d/1CZkrlUN7xn5CYmm0bWL5LSx4OvM0jUc4/view?usp=sharing

That did seem to fix it! I'm getting events now as they pop up! Thanks a bunch!

I did want to point out that it seems like the weather display is bugged and doesn't change (in the screenshot you'll see it is "STORM," and maybe it's just because a weather event hasn't happened lately in my save, though I can definitely confirm it's not raining in my save presently.) That minor detail aside though, the main issue seems to be fixed so I appreciate it!
Logged
However, now I wanted some more challenge and embarked to evil biome.
"Terrifying screams come from above!"

DarkDvr

  • Bay Watcher
    • View Profile

That did seem to fix it! I'm getting events now as they pop up! Thanks a bunch!

I did want to point out that it seems like the weather display is bugged and doesn't change (in the screenshot you'll see it is "STORM," and maybe it's just because a weather event hasn't happened lately in my save, though I can definitely confirm it's not raining in my save presently.) That minor detail aside though, the main issue seems to be fixed so I appreciate it!

Glad that fixed it, hopefully I've covered all the cases where it could stop processing due to file access issues or something else.
Regarding the weather - I've changed the rules a bit, done some additional testing, seems to be working fine. DF is sometimes inconsistent in how it reports weather effects, so it could be that you're getting an entry that DFA isn't matching. You could double-check the logfile, and if you see a line that an advisor is missing, just send me that line, I'll take care of it. Could also be that there weren't any weather changes since you've got the fixed version.

So please delete the version I sent you and get the latest from the OP =)

And thanks again for helping me test!
Logged

forsaken1111

  • Bay Watcher
    • View Profile
    • TTB Twitch

ptw this looks nice
Logged
Pages: [1] 2