1
DF Modding / Game Message / Log helper (Linux - not a mod)
« on: August 16, 2013, 05:56:31 pm »
So I keep missing important messages from my dwarfes - like the king demanding a new item to produce.
The first step was to keep the game log open in a terminal (tail -f gamelog.txt). This worked a charm by displaying everything that is going on in a separate window.
That is - until the squads start to spar, and the gamelog fills with combat messages so fast that all the important stuff goes by unnoticed again. It took me a while to remember the shell gives me all the tools to filter the output according to key words.
Now I have two terminals open - I call them "gamelog" and "combatlog". All messages get filtered to either one or the other, and I only look at the combatlog rarely, while the filtered gamelog makes me aware of important stuff.
Gamelog also filters out "created a masterpiece", "item inaccessible" and "2x/3x/4x". But once you see it, adding/removing keywords to adjust to what you want to see should be easy.
Oh, and those run fine on the laptop next to me, so it doesn't use any screen estate on the main PC. (you know how to ssh a remote shell, right?
Without further ado, here are the terminal commands I currently use:
Gamelog (do not display any lines incl. the keywords):
tail -f gamelog.txt | grep -v "x[0-9]\|masterpiece\|inaccessible\|tapping\|strikes\|blocked\|misses\|attack\|stands\|collides\|tumble\|charge\|stunned\|ferocity\|knocked\|bounces\|wound\|tangle\|rushes\|stabs\|hacks\|punches\|tendon\|breathing\|pain\|twists\|hacks\|scratch\|loses\|slaps\|consciousness\|enraged\|kicks\|bites\|latches\|falls\|jumps\|blocks\|grip\|shakes\|vomits\|injected\|bats\|sick\|retches\|slams\|grabs\|gores\|propelled\|skids\|lashes\|severed\|bashes"
Combatlog (only display lines incl. the keywords):
tail -f gamelog.txt | grep -i "tapping\|strikes\|blocked\|misses\|attack\|stands\|collides\|tumble\|charge\|stunned\|ferocity\|knocked\|bounces\|wound\|tangle\|rushes\|stabs\|hacks\|punches\|tendon\|breathing\|pain\|twists\|hacks\|scratch\|loses\|slaps\|consciousness\|enraged\|kicks\|bites\|latches\|falls\|jumps\|blocks\|grip\|shakes\|vomits\|injected\|bats\|sick\|retches\|slams\|grabs\|gores\|propelled\|skids\|lashes\|severed\|bashes"
Yes, it's only a quick hack, but it helps me a lot. Suggestions on the keyword lists are welcome (I got this far by trial and error, not by planning what to include).
The first step was to keep the game log open in a terminal (tail -f gamelog.txt). This worked a charm by displaying everything that is going on in a separate window.
That is - until the squads start to spar, and the gamelog fills with combat messages so fast that all the important stuff goes by unnoticed again. It took me a while to remember the shell gives me all the tools to filter the output according to key words.
Now I have two terminals open - I call them "gamelog" and "combatlog". All messages get filtered to either one or the other, and I only look at the combatlog rarely, while the filtered gamelog makes me aware of important stuff.
Gamelog also filters out "created a masterpiece", "item inaccessible" and "2x/3x/4x". But once you see it, adding/removing keywords to adjust to what you want to see should be easy.
Oh, and those run fine on the laptop next to me, so it doesn't use any screen estate on the main PC. (you know how to ssh a remote shell, right?

Without further ado, here are the terminal commands I currently use:
Gamelog (do not display any lines incl. the keywords):
tail -f gamelog.txt | grep -v "x[0-9]\|masterpiece\|inaccessible\|tapping\|strikes\|blocked\|misses\|attack\|stands\|collides\|tumble\|charge\|stunned\|ferocity\|knocked\|bounces\|wound\|tangle\|rushes\|stabs\|hacks\|punches\|tendon\|breathing\|pain\|twists\|hacks\|scratch\|loses\|slaps\|consciousness\|enraged\|kicks\|bites\|latches\|falls\|jumps\|blocks\|grip\|shakes\|vomits\|injected\|bats\|sick\|retches\|slams\|grabs\|gores\|propelled\|skids\|lashes\|severed\|bashes"
Combatlog (only display lines incl. the keywords):
tail -f gamelog.txt | grep -i "tapping\|strikes\|blocked\|misses\|attack\|stands\|collides\|tumble\|charge\|stunned\|ferocity\|knocked\|bounces\|wound\|tangle\|rushes\|stabs\|hacks\|punches\|tendon\|breathing\|pain\|twists\|hacks\|scratch\|loses\|slaps\|consciousness\|enraged\|kicks\|bites\|latches\|falls\|jumps\|blocks\|grip\|shakes\|vomits\|injected\|bats\|sick\|retches\|slams\|grabs\|gores\|propelled\|skids\|lashes\|severed\|bashes"
Yes, it's only a quick hack, but it helps me a lot. Suggestions on the keyword lists are welcome (I got this far by trial and error, not by planning what to include).