Bay 12 Games Forum

Please login or register.

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

Author Topic: DF Announcement Filter 1.01, filter out that pesky cancellation spam!  (Read 38192 times)

TheGazelle

  • Escaped Lunatic
    • View Profile

UPDATED!
Changelog:
-Bugfix: Changing the path should now should work without needing to restart the program now.
-Bugfix: log-region plugin setting can actually be turned off and on now.
-Added: Text to the filter setting screen to make it's functionality clearer.

This utility gives you a live feed of announcements without having to pause the game to check the announcement page. It's configurable, allowing you to only see the announcements you're actually interested in, and you can also have combat announcements show up in the feed rather than checking the reports screen.

Requires a JRE (Java Runtime Environment) to run, get the latest one here :
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Make sure you grab the regular JRE and not the server JRE or JDK.

Usage :
Just run it and it will show you a live feed of announcements in a running Df game,
according to whatever filter settings you have set.

DFHack plugin support:
Currently only supports the log-region plugin (it's the only one I could find that actually
writes anything to the gamelog, which is what this program reads announcements from).

If you have a plugin that adds announcements and you want them supported, make it so the
plugin will also write the announcement to the gamelog.txt file, let me know what it writes,
and I'll add support for it.


Custom filters:
You can add your own filters. The way this works is you specify a particular bit of text
that you want it to KEEP, so any line in the gamelog.txt which is found that contains the
specified text will be displayed.

Note that this will only work with exact matches, so if you add a filter that says
"herp derp", and the gamelog has a line that says "herp da derp", it will NOT be matched.


Download
http://dffd.wimbli.com/file.php?id=7905

Questions/Concerns/Comments/Suggestions/Bugs:
Please email to dfstorymaker@gmail.com, or send a me a pm or post in the thread here. You can also pm TheGazelle on Reddit (which i'm probably more likely to check).
« Last Edit: August 18, 2013, 03:16:18 pm by TheGazelle »
Logged

Ravendarksky

  • Bay Watcher
    • View Profile
    • DFMon.exe - Get rid of DF SPAM
Re: DF Announcement Filter 1.0, filter out that pesky cancellation spam!
« Reply #1 on: August 18, 2013, 03:39:31 am »

Hi there,

This seems like a nice tool and great idea... I can't get it working though!

- Opened DF Fortress
- Loaded up fort
- unpaused
- opened your tool

Is it possible to have partial matches?
Also can we have specific filters to IGNORE rather than display?
I'd also like to be able to remove filters individually :)
It's also not clear if ticking a filter box will SHOW or HIDE that text, however I guess this will be obvious once I get the thing working.

Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DF Announcement Filter 1.0, filter out that pesky cancellation spam!
« Reply #2 on: August 18, 2013, 05:57:46 am »

Looks like a nice concept, and clearly relevant to Story Maker ;-)

I'm having trouble getting it to work too - if I delete the settings file to get back to defaults, I can browse to the absolute path but nothing shows up.  I also have trouble getting it to even open when I've set a relative path - I tried most of the syntax variations I could think of, and just get (for example)
Code: [Select]
java.nio.file.NoSuchFileException: %CD%\..\..\..\Dwarf Fortress 0.34.11\gamelog.txt
Oh, and PTW because this looks pretty cool, to have a more usable announcement feed. 

My config for distribution in the LNP once I get it working will probably just mirror the colours of the standard log, for ease of use, but I can see why you distribute without any settings at all.  While I think of it, are there any license issues with this?  GPL3 would be cool if you decide now...

Thanks!
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

TheGazelle

  • Escaped Lunatic
    • View Profile
Re: DF Announcement Filter 1.0, filter out that pesky cancellation spam!
« Reply #3 on: August 18, 2013, 01:45:24 pm »

Hi there,

This seems like a nice tool and great idea... I can't get it working though!

- Opened DF Fortress
- Loaded up fort
- unpaused
- opened your tool

Is it possible to have partial matches?
Also can we have specific filters to IGNORE rather than display?
I'd also like to be able to remove filters individually :)
It's also not clear if ticking a filter box will SHOW or HIDE that text, however I guess this will be obvious once I get the thing working.

Did you turn some of the filters on?

Sorry, I probably should make that clearer, but having the boxes checked means that those things WILL be shown, so if you left everything unchecked thinking that would show you everything, that would explain why nothing comes through.

Another possible thing, did you set the path for gamelog.txt file? In the settings window, if you go to the path tab, you can browse to your main DF folder (the one with dwarffortress.exe) and save that.

As for ignoring things, just leave them unchecked in the settings and they won't be displayed.

I'm not sure what you mean by removing filters individually.

Looks like a nice concept, and clearly relevant to Story Maker ;-)

I'm having trouble getting it to work too - if I delete the settings file to get back to defaults, I can browse to the absolute path but nothing shows up.  I also have trouble getting it to even open when I've set a relative path - I tried most of the syntax variations I could think of, and just get (for example)
Code: [Select]
java.nio.file.NoSuchFileException: %CD%\..\..\..\Dwarf Fortress 0.34.11\gamelog.txt
Oh, and PTW because this looks pretty cool, to have a more usable announcement feed. 

My config for distribution in the LNP once I get it working will probably just mirror the colours of the standard log, for ease of use, but I can see why you distribute without any settings at all.  While I think of it, are there any license issues with this?  GPL3 would be cool if you decide now...

Thanks!

For things not showing up, try the same stuff i mentioned to Ravendarksky. I'll probably open source this and the cross-platform version of storymaker basic once I get that done and get the code cleaned up.

Quickly testing now I seem to be having the same issue.. which is odd as it was working fine before.. I'll look into it and see if I can't get this fixed.
« Last Edit: August 18, 2013, 01:56:21 pm by TheGazelle »
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #4 on: August 21, 2013, 07:32:45 pm »

OK, I've now got it working for me and it really is beautiful - I just need more screens!

For posterity:  the relative path syntax is as follows (example for a placement in a Lazy Newb Pack)
Code: [Select]
[DFPath]
..\..\..\Dwarf Fortress 0.34.11

I'd really like to see better handling of invalid paths or file not found though, they got me nastily stuck for quite a while. 

Edit:  would work well paired with dfhack-ery to stop the announcements showing up at the bottom of the screen. 
« Last Edit: August 29, 2013, 10:24:02 pm by PeridexisErrant »
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #5 on: August 22, 2013, 10:11:19 am »

If I understood this correctly you play DF on one screen, and have this running on a second one to see all the announcements. And in theory you could even run DF in background and only see the announcements while wasting time on the internet waiting for something exciting to happen in DF. And, judging from the last two posts, it might be possible to actually stop announcement-spam ingame?
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 - 148 countries visited :::

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #6 on: August 22, 2013, 11:48:39 pm »

No idea about a way to disable announcement spam - that would be a separate project, though this would mean you don't need to worry about missing stuff after blocking the pop-ups. 


And suggestion time:  (I love it already, but always room for getting even better)
 - the colours in the settings file should match what they would be in the announcements screen in DF - I'll implement this if someone can point to a list of what announcements are which colours and post the settings. 
 - I noticed a problem when getting this:  it adds new announcements to the list without scrolling down, which makes it a lot easier to miss the important stuff again.  Changing this to stick to the bottom of the log would be great.
 - Finer control over the combat reporting - I got four pages of a Kapoko retching, vomiting, standing up, and then falling over again.  There was a lot of other stuff in there too, but being able to ditch the vomiting and retching alone would cut it by ~60% without losing valuable information.  An option to indent combat reports would also be cool, and make it obvious what type each line is. 
 - soundsense comes with two dfhack scripts that write to the gamelog, 'soundsense' and 'soundsense-season'. 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Ravendarksky

  • Bay Watcher
    • View Profile
    • DFMon.exe - Get rid of DF SPAM
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #7 on: August 28, 2013, 06:47:56 pm »

Hi,

I'm making a similar program to yours and after parsing several hundred megabytes of game log I came up with the following filters. I thought you might find them useful as well, as I think your program currently misses a few things.

http://www.filedropper.com/filters

Logged

TheGazelle

  • Escaped Lunatic
    • View Profile
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #8 on: August 29, 2013, 12:28:25 am »

If I understood this correctly you play DF on one screen, and have this running on a second one to see all the announcements. And in theory you could even run DF in background and only see the announcements while wasting time on the internet waiting for something exciting to happen in DF. And, judging from the last two posts, it might be possible to actually stop announcement-spam ingame?

Don't even need a second screen really, you could just size the DF window so that you have space for this.

As for removing the announcements in game, i have no idea about that as I haven't really touched dfhack at all. That being said, it only really shows at the very bottom of the df screen, so it's not a huge deal as you no longer need to open the in-game announcement screen at all.

And suggestion time:  (I love it already, but always room for getting even better)
 - the colours in the settings file should match what they would be in the announcements screen in DF - I'll implement this if someone can point to a list of what announcements are which colours and post the settings. 
 - I noticed a problem when getting this:  it adds new announcements to the list without scrolling down, which makes it a lot easier to miss the important stuff again.  Changing this to stick to the bottom of the log would be great.
 - Finer control over the combat reporting - I got four pages of a Kapoko retching, vomiting, standing up, and then falling over again.  There was a lot of other stuff in there too, but being able to ditch the vomiting and retching alone would cut it by ~60% without losing valuable information.  An option to indent combat reports would also be cool, and make it obvious what type each line is. 
 - soundsense comes with two dfhack scripts that write to the gamelog, 'soundsense' and 'soundsense-season'. 

1. I would've done this myself if I could've found a default colour scheme. If you do find one anyways link it here and I'll change it.

2. It doesn't scroll? Shit, thought it did. I'll get that fixed.

3. I'll get that in too, not particularly hard, just tedious. School will be starting up again so i'll probably end up with more free time sitting around campus to work on this. Indenting should be a simple matter, as for making it obvious, do you mean within combat reports? It would be easy enough to just allow color-coding of specific combat elements.
Hi,

I'm making a similar program to yours and after parsing several hundred megabytes of game log I came up with the following filters. I thought you might find them useful as well, as I think your program currently misses a few things.

http://www.filedropper.com/filters

Thanks! I'll check this out and see what might be missing.

Also, to everyone, sorry for the delayed response, I've been away for the past week and didn't get much chance to look at anything.
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #9 on: August 29, 2013, 03:58:51 am »

Sounds like we all have no idea about the colours... if I find a list I'll post again, but don't' hold your breath or anything. 

My suggestion about combat reports was kinda a two-parter: 
 - indent them, so it's obvious what is a combat report and what isn't; and
 - allow for filtering of combat reports, to (eg) remove lines about 'the X vomits/retches'; for much the same reasons as cancel-spam. 

I might head over to the dfhack thread, and ask if anyone knows of a way to disable the announcement ticker along the bottom of the screen.  That's a completely different project, but obviously complementary if someone else pulls it off - and it worked to get the log-region script, so who knows. 
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Ravendarksky

  • Bay Watcher
    • View Profile
    • DFMon.exe - Get rid of DF SPAM
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #10 on: August 29, 2013, 02:00:35 pm »

Hi again,

There is a file in DF called description_color_standard.txt which has lots of colours in it.

Perhaps these are the ones used for the text as well as the game? These are the ones I'm using for my monitor tool

Dwarf Fortress 0.34.11\data\save\XXXX\raw\objects\description_color_standard.txt

Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #11 on: August 29, 2013, 03:47:30 pm »

Some text colours, in no particular order or organisation (I hope that's what you meant by default colour scheme):

Spoiler (click to show/hide)

More can be added as they come up -- there are some rather obscure announcements.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #12 on: August 29, 2013, 10:22:21 pm »

I'd actually love to see a way to stick combat reports into a separate column, so the wouldn't get so jumbled up; and finer colour control would be pretty useful. 

I got '<citizen> has organised a party at <furniture>', which didn't display.  Another filter?  It was light green, BTW.  Likewise '<citizen> has created <artifact>'; yellow.  Deaths, light purple. 

The settings pane needs to be resizeable or preferably in the same window, it's currently fixed higher than my screen which is a bit of a problem. 

Here's the settings.txt I've got at the moment, with most of the colours filled in. 
Spoiler (click to show/hide)
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

TheGazelle

  • Escaped Lunatic
    • View Profile
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #13 on: September 02, 2013, 02:13:28 pm »

Sounds like we all have no idea about the colours... if I find a list I'll post again, but don't' hold your breath or anything. 

My suggestion about combat reports was kinda a two-parter: 
 - indent them, so it's obvious what is a combat report and what isn't; and
 - allow for filtering of combat reports, to (eg) remove lines about 'the X vomits/retches'; for much the same reasons as cancel-spam. 

I might head over to the dfhack thread, and ask if anyone knows of a way to disable the announcement ticker along the bottom of the screen.  That's a completely different project, but obviously complementary if someone else pulls it off - and it worked to get the log-region script, so who knows.

Once I get around to splitting combat into separate types of reports the filtering will function the same way all the others do anyway.

Some text colours, in no particular order or organisation (I hope that's what you meant by default colour scheme):

Spoiler (click to show/hide)

More can be added as they come up -- there are some rather obscure announcements.

Awesome! Thanks. Colours are already user configurable, I just have all combat lumped into one thing right now, so once that's split up each element will be configurable.

Quote
I got '<citizen> has organised a party at <furniture>', which didn't display.  Another filter?  It was light green, BTW.  Likewise '<citizen> has created <artifact>'; yellow.  Deaths, light purple. 
I'm assuming these are probably covered by the filters stuff that Ravendarksky posted, so I should have these in the next version (I'll check specifically to make sure though).

Quote
The settings pane needs to be resizeable or preferably in the same window, it's currently fixed higher than my screen which is a bit of a problem. 

That's totally my fault. Didn't even think about screens with lower than 1080 pixel height. I've already got the custom filters working with a scrollbar so it shouldn't be a problem to just adjust the other setting tabs to do the same and have the main window resizable.
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: DF Announcement Filter 1.01, filter out that pesky cancellation spam!
« Reply #14 on: September 06, 2013, 07:29:04 am »

Re colors: IMHO the best practice is to read the color settings from /data/init, this way an alternate color scheme would show up the same in DF and the filter too.

Bugish behavior in Macnewbie pack:
  • The save and cancel buttons are broken, so only way to change settings is through the settings file. Rest of the ui works.
  • The filter does not create the settings file in the proper place, but one directory up (in the utilities folder) with the name "DFAnnouncementFilter\settings.txt".
Pages: [1] 2