Bay 12 Games Forum

Dwarf Fortress => DF Modding => Utilities and 3rd Party Applications => Topic started by: strainer on January 27, 2018, 04:57:29 pm

Title: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on January 27, 2018, 04:57:29 pm
The Kloker is from a forgotten family of subterranean gnome-like creatures (https://en.wikipedia.org/wiki/Knocker_(folklore)).

This Kloker is a much extended DFHack in-game labor manager with compact and colorful, extra information and features, including automatic labor suggestion and assignment. The full personalities of dwarves, pets, visitors and enemies can be quickly browsed, sorted and subsorted. Their best labors and abilities are highlighted in the labor grid, an extra tab can display physical stats, and another extra tab lists their problems such as injuries, curses and missing clothes. The tabs are navigated easily with tab and shift-tab keys, and tooltips explain changes in theme and other options when those keys are pressed (experimentally or accidentally ;)

Kloker has almost everything needed to review and manage a fort in-game, alongside Therapist's extensive abilities. It can be opened from the games unitlisting screens, or also directly from the game map to examine visible and nearby units. It easily returns to the map and can visit other game screens such as relations or full unit description without forgetting its focus and selections.

Main screen displaying professions tab :
(https://i.imgur.com/ychYST8.png)

(The 'Braw" column there is the "happiness" or "unstressed" score. The player can change this title to one of 20 different lyrical options.)

Extended and revised "Batch Actions" :
(https://i.imgur.com/w2DWiDG.png)

( After a batch change to labors, this screen also includes an option to undo the previous change. "multiformed" was lately changed to "non-uniformed" for clarity :| )

The latest version of Kloker for Linux is available currently in the Linux Dwarf Pack 47.05.r2 (http://www.bay12forums.com/smf/index.php?topic=157712)

And a Windows version is brandished here > Windows 45.05-r2 Kloker at bay12 filedepot (https://dffd.bay12games.com/file.php?id=15639)

( kloker.plug.dll can just be placed in directory [DFgameRoot]/hack/plugins/ and in the file [DFgameRoot]/dfhack.init add the line "Enable Kloker" to have it run in the game )

Some development versions for older DFHack versions are archived in the git repo (https://github.com/strainer/cavekeeperdf). The latest source for 47.05 is also there for anyone able to compile, play themselves or distribute - very welcome. Kloker is the product of manipulator and dfhack and dwarf fortress, and should go back to DFhack if it can only be merged. Thankyou to everyone who has helped support, play and compile it here!

...

Previous write-ups...

Here is an expedition leader automatically selected by embark profile, her description reveals she is "extremely fierce" with other good qualities, and respects combat, hates sacrifice but nobody's perfect. Seems a good choice for a captain ;
(https://i.imgur.com/5g0Z34C.png)
The summary lines are carefully formatted to not jump around while browsing through the list. The characters age and focus level are shown, their most useful liked items, dreams, priorities and gods. Also the characters traits are summarized in greater detail than in their long game description, using refined adjectives that indicate the in game effect of each trait.

Here is Nil Wheeledsyrups long description for comparison :
(https://i.imgur.com/v72wSck.png)

Mind and Body Attributes View:
    A characters mind and body attributes have a big effect on how well it performs at different jobs, and different jobs exercise and improve relevant attributes. (Military training is also good at improving some attributes)

In this view the attributes relevant to each job are highlighted white, but the next screenshot is focused on a cat and its climbing ability. The screenshots following this pompous cat show white highlighted attributes...

A characters mind and body attributes have a strong effect on the jobs/activities it can do best, so cavern keeper calculates "aptitude scores" and colors the activation grid to indicate the best and worst performing jobs. For the character and job in focus, the aptitude score is also printed along with experience and skill rating. See later screenshots, this cat is a bad example. Sorry, Shoo !
(https://i.imgur.com/JFsOikp.png)

Next a screenshot of the post embark cheat-mode indicated by the "Knapped points:" counter. Since dwarves are much easier to assess here than in the embark preparation screens, this feature allows skill points to be redistributed, but keeps track to make sure extra are not added.
In this screenshot units are also sorted by "medic" which ranks most highly generous and non-sadistic personalities. The top dwarf looks like a decent leader/manager type so...
(https://i.imgur.com/p2VMrh1.png)

Here it is on attributes tab again and redistributing the 'knapped points' to make Glovedikes a better leader.
(https://i.imgur.com/Oe3tOrl.png)

This is the help screen showing the meaning of the attribute grids header.
(https://i.imgur.com/ChXUkAi.png)

There are some more tips in the help screen but it currently needs to zoom out to show everything.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: jecowa on January 27, 2018, 07:06:20 pm
Is this a plugin for DFHack? Can this plugin only be used when starting a new game? "Lagacy mode" means fortress mode I hope?
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on January 27, 2018, 08:41:11 pm
Yes its a dfhack plugin for dwarf mode - its actually the current dfhack labor manager plugin improved and can be installed on top of it (manipulator). Im giving it a new name because its really improved a lot and i prefer a fantastic name. I also have to get it tested and in demand before dfhack can take it back, which is fair enough.

By "legacy" mode i just meant it starts with character summaries and with labor highlighting turned off - it looks very similar to "manipulator" then.

Its not just for starting a new game, although that cheatmode is designed just to be able to revise embark skills without feeling too cheaty. There is a "deeper" cheatmode that lets attributes be changed as well as skills, freely - but thats proper cheating.

There is also a 'notices' listing which lists dwarfs health issues, curses, and things which becomes useful later in the game. And the summaries include when dwarves become cave adapted, hardened, and other things. And the "fcs+0" in the summary readout shows how focused units are on a scale -9 to +9, should be useful later. I havent had time to play a proper game with the latest summaries yet... :)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Novaris on January 30, 2018, 12:31:08 pm
Looks very interesting :)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on January 30, 2018, 08:04:09 pm
Being able to scroll quickly through so much info is fascinating, potentially overwhelming. The detail level can be turned down, but I prefer to see it all.

I was suprised this evening to notice that while dogs are running in and out of the temple they have been worshiping deities - different deities from their owners, but dwarf deities. ( The other, noticably distressed dogs in this screenshot are burrowed in the hospital btw...)

(https://imgur.com/Sg6yRzK.png)

Here is a big screen showing off the sort features 'group highlighting' Here the arrival groups are shown, and name, focus, skill, personality and score sub-sorts can be applied within the groups. This make it easy to review arrival groups or squads or a custom selection.

(https://i.imgur.com/Gq3MicB.png)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Stiqy on February 02, 2018, 07:28:35 pm
I am not a programmer, so what is a .so file? Is there a place to just download the plugin already compiled to install?
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on February 02, 2018, 08:33:08 pm
If you are on linux the .so file is the compiled plugin. Just save it on top of the manipulator.plug.so in that same newbie pack, then in will be accessible in the game.

Or if you want to try it on an earlier df linux version, I can make a compile for it if you let me know which (these plugins need made for the precise version)

fraid I cant make any windows compiles at the moment.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Stiqy on February 05, 2018, 11:36:15 am
If you are on linux the .so file is the compiled plugin. Just save it on top of the manipulator.plug.so in that same newbie pack, then in will be accessible in the game.

Or if you want to try it on an earlier df linux version, I can make a compile for it if you let me know which (these plugins need made for the precise version)

fraid I cant make any windows compiles at the moment.

Ah, my bad... I was missing the detail that this was Linux only and was looking for a windows version. May have to fire up MINT again, this looks very helpful. Nice work.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on February 07, 2018, 06:11:05 am
Thanks - I should have windows compiles in a week or so.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: bwbill on February 08, 2018, 08:51:02 pm
I registered just to say I love this, and I'm eagerly awaiting the version for Linux 44.05-r01. Thank you!

Edit: looks like it's updated on github! Thanks again!
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on February 09, 2018, 08:18:02 am
That's great to hear thanks :) 
Let me know if you find any issues or things to tweak.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: bwbill on February 10, 2018, 10:00:32 am
I couldn't find the cheat mode in the new version, but that's probably for the better. :)

Would you be willing to provide an overview of recent changes? I've never done a version diff with github but I could grok a diff if it's too much to type a changelog during active development...
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on February 10, 2018, 07:16:31 pm
I polished the cheat modes a bit in last commit, making them count skills the same way embark does (costs 3 points to boost skill from 2 to 3). To get to the lesser cheat mode press Shift-T a few times. Cheat turns off when keepers viewscreen exits, but it remembers 'banked' skill points for when it is next activated. For unlimited points and the ability to change mind and body attributes, sacrifice a dozen shift-t presses. After this mode is activated it stains part of the theme blood red for the rest of the game... thats all.

Source code wise:

My development commits have been 'overstuffed', they number about 45 with most of them on whitespace, formatting and debugging but they are logged here:

github.com/strainer/dfhack/commits/manipu_remix (https://github.com/strainer/dfhack/commits/manipu_remix)

The original 'manipulator.cpp' has 7800 commits since 2009. It was about 1000 lines of code and quite neat in October. Ive added about 2500 lines of code, overall not neat but some good efficient number crunching and stuff - lots of features. I should sometime refactor and neaten it up so it can go back on dfhacks historic repo. But now it seems to be working and stable, I like to imagine its fully debugged and (almost) feature complete.

edit:doh! That was the entire history of dfhack.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on February 26, 2018, 12:07:14 am
I made a windows compile finally for DF44.05.r02

It can be found here (https://github.com/strainer/cavekeeperdf).
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Boltgun on March 05, 2018, 04:06:08 am
Nice, I use the labor manager all the time and I'll definitely try it out.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on March 05, 2018, 10:15:59 am
I've added new compiles for the freshly released Win and Linux starter packs here (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: jecowa on March 06, 2018, 12:10:26 am
Yes its a dfhack plugin for dwarf mode - its actually the current dfhack labor manager plugin improved and can be installed on top of it (manipulator).

When you say "labor manager", you don't mean the "labormanager" plugin, do you? Or does this combine features from both the labormanger and the manipulator plugins?
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on March 06, 2018, 09:00:36 am
I just wrote in the general sense. Its much extended "manipulator" (which appears in the UI as "manage labors"). Its not connected to the automatic labor manager plugins "labormanager" and "autolabor" although I have ideas about getting one of them to work nicely with it.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: bwbill on March 06, 2018, 09:52:29 am
I was so grateful to see this updated a day after the Linux LNP -- thank you!

A brief spin through the code diff was enough to see what you were talking about. If Cavern Keeper lives on the side for a while, I'll be okay with that...I'm simply not qualified to help here.

It's definitely getting harder to play with the old u-l now that I'm used to the power of u-k. Keep up the good work!
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on March 06, 2018, 12:42:47 pm
Thanks bwbill  : ) )
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: ThoMeuhGal on April 01, 2018, 01:44:30 pm
Hey, thank you for the tool, very nice! I played a bit with it using the 44.05 starter pack and enjoyed it a lot, ran a four years fort without launching Therapist. Can I use this with newer 44.XX releases of DF and DFHack without issues?
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 01, 2018, 05:30:42 pm
Thanks for the report comrade. Armok shall favor us for breaking Therapists dark siege on Dwarf Fortress !

While the Nobles remain under the shrink's influence, imports of Cavern Keeper are prohibited, so custom mechanisms must be fit to every new starter pack.
 
The upgraded mechanisms will be distributed here soon as the 44.08 packs arrive...

,,,shouldnt be long now I guess.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 02, 2018, 06:44:38 pm
This looks really cool! Unfortunately I'm on a mac.  Is there any way you could make it so it works on a mac?  If it's no trouble.  Thanks!
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 02, 2018, 11:10:10 pm
Sorry for leaving out mac users so far- its a tricky one for me.

Jecowa, who makes "the lazy mac pack" was a just few posts back asking some questions but doesnt seem like they have tried it yet. Jecowa could run you up a compile in a couple of minutes, or when enough people have asked, so worth a punt at their mighty thread (http://www.bay12forums.com/smf/index.php?topic=158322.0) in case they dont spot you asking here.

Welcome to this crazy forum :)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: jecowa on April 03, 2018, 12:51:38 am
I think compiling this probably requires compiling the full DFHack. I've never compiled 64-bit DFHack before, but I remember 32-bit DFHack being a little complicated. Even Cavern Keeper has like 12 branches. I remember it being confusing downloading DFHack with it having so many branches, and I think it was even spread across multiple repos and required a special command to download. I should have a list of commands to run to compile DFHack somewhere.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 03, 2018, 09:24:47 am
I see Jecowa, I just imagined you did compile for some reason, granted theres no reason to when dfhack makes OSX releases. dfhack has a great compile walkthrough here (https://github.com/DFHack/dfhack/blob/master/docs/Compile.rst) - thats how to do it if you ever need to.

Just one of those 12 branches is cavern keepers btw - the rest are mirrored by github automatically when you try to contribute to a project. Keepers single sourcefile is linked in the install readme and takes just a minute to compile in an existing dfhack compiling setup.

Maybe I have enough interest to try pushing it back to dfhack soon, some parts are written in goblinscript but there are tools which could translate them to kobold++.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 03, 2018, 11:46:33 am
Thank you for the replies! 
I want to try compiling it myself but I can't find the sourcefile for Keeper that you mentioned?
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 03, 2018, 12:19:42 pm
Sorry, I must make that readme clearer...
The latest source file is here manipulator.cpp (https://github.com/strainer/cavekeeperdf/blob/master/plugins/manipulator.cpp)
It copies over the existing manipulator.cpp in the plugins directory of dfhack
and will compile to DF versions greater than 44.0.3

Let me know if theres anything I can do.

edit: I should add - clone the main dfhack repo not mine, and put that manipulator.cpp file into it. (ive not figured out how to keep my 'fork' updated, just been working on that file and copying it in when needed)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 03, 2018, 04:23:24 pm
Well, I've been trying all day but I can't get it to compile.  The error is at the last step, too, which is frustrating. 
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 03, 2018, 04:35:03 pm
Can you post the error message?
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 03, 2018, 04:46:49 pm
Oh! Yeah I suppose being able to look at the error message would help haha.

Code: [Select]
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/unistd.h:183:0,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/unistd.h:72,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zconf.h:462,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h:34,
                 from /Applications/Lazy Mac Pack v0.44.09/df_osx v0.44.09/dfhack/depends/protobuf/google/protobuf/io/gzip_stream.h:46,
                 from /Applications/Lazy Mac Pack v0.44.09/df_osx v0.44.09/dfhack/depends/protobuf/google/protobuf/io/gzip_stream.cc:39:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h:663:46: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
                                              __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
                                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h:1295:37: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
                                     __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
                                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h:1434:38: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
                                      __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
                                      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h:1469:39: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
                                       __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
                                       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h:1729:37: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
                                     __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
                                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h:1765:35: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
                                   __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
                                   ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h:1918:53: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
                                                     __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
                                                     ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/zlib.h:1920:53: error: expected initializer before '__AVAILABILITY_INTERNAL__MAC_10_13'
                                                     __OSX_AVAILABLE_STARTING(__MAC_10_13,__IPHONE_11_0);
                                                     ^
make[2]: *** [depends/protobuf/CMakeFiles/protobuf.dir/google/protobuf/io/gzip_stream.cc.o] Error 1
make[1]: *** [depends/protobuf/CMakeFiles/protobuf.dir/all] Error 2
make: *** [all] Error 2

Edit:  It occurs to me now that maybe I should try it with version 44.05 of dfhack instead
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 03, 2018, 04:55:14 pm
Im checking out the message now...

You do need to compile to the version of the dwarf fortress file which you path to in the build command. And so you need to do a "git checkout [that version]" followed by a "git submodule update" (commands). Maybe youve done that already, ill read the error message...  ...ah no the path&version could be fine ...
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 03, 2018, 05:05:53 pm
Keep the version at mac pack 44.09 you have, its not the problem.

Its you're OS is too up to date :P

There is a small section for it in the compile guide here Notes for GCC 4.9+ or OS X 10.10+ users (https://github.com/DFHack/dfhack/blob/master/docs/Compile.rst#id20)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 03, 2018, 05:47:42 pm
I tried that. Oddly I got the exact same error message?
But seriously, thank you so much for trying to help
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: lethosor on April 03, 2018, 05:53:33 pm
Did you install the command-line utilities from XCode? Are you absolutely sure you're using GCC (i.e. you've installed it from homebrew and set CC and CXX), not clang (which "gcc" is aliased to)?
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 03, 2018, 06:38:47 pm
Alright I got it past that part! I went through and made absolutely sure I was doing everything and that worked!
And now we're at another error.  This one is in the replaced manipulator file!
Code: [Select]
/Users/chamomile/Lazy Mac Pack v0.44.09/df_osx v0.44.09/dfhack/plugins/manipulator.cpp: In function 'void unit_info_ops::allotHintColors(UnitInfo*, int*, int, int, int, int)':
/Users/chamomile/Lazy Mac Pack v0.44.09/df_osx v0.44.09/dfhack/plugins/manipulator.cpp:1106:45: error: 'log2' was not declared in this scope
         double rank = static_cast<int>(1000*log2(static_cast<double>(unit_apt+avg_apt)/static_cast<double>(avg_apt+2)));
                                             ^~~~
/Users/chamomile/Lazy Mac Pack v0.44.09/df_osx v0.44.09/dfhack/plugins/manipulator.cpp:1106:45: note: suggested alternative: 'long'
         double rank = static_cast<int>(1000*log2(static_cast<double>(unit_apt+avg_apt)/static_cast<double>(avg_apt+2)));
                                             ^~~~
                                             long

And then theres a couple more along those lines but with sqrt instead of log2.
So I went ahead and added #include <math.h> to the top of the file and that fixed it, but I thought you might want to know about this because it's in your file
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 03, 2018, 07:04:28 pm
Phew! Thanks for the help Lethosor and also - maintaining the whole lot so it does compile as promised!

I fixed that math include before but must have merged it out sometime.

Paperchamomiles im relieved you made it through - didnt mean to send you on an all day compile quest. But soon you should be cookin' on the frontier of the developments - rest of us are waiting on 44.09 packs with fingers crossed its stable ;)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 04, 2018, 02:42:00 pm
Alright I've been using it for a bit and I love it!  It gives a fantastic amount of detail and is super handy
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 04, 2018, 03:43:55 pm
Thanks paperchamomiles! : D

No two are the same - dorfs have a fantastic amount of detail to tell .' )
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 04, 2018, 07:06:37 pm
So, there's a problem:
If I use cavern keeper after the first wave of migrants, it makes the game crash after a few minutes.  it doesn't happen in my other install of df 44.09-with-dfhack that doesnt have cavern keeper installed, and it doesnt happen if i disable cavern keeper

Edit:
Specifically, with a segmentation fault.
heres the error message
Code: [Select]
[DFHack]# ./dfhack: line 15: 98260 Segmentation fault: 11  DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib ./dwarfort.exe "$@"
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 04, 2018, 08:18:06 pm
I cant be sure but suspect this is not CK crashing - its only really runs when its screen is opened. Disabling it may free up resources for the real cause to take longer to manifest.
Unfortunately we are on the cutting edge revision with an adhoc OSX compile, I see some segmentation faults reported in dfhacks repo for issues relating to compile libraries - like this one (https://github.com/DFHack/dfhack/issues/649)
We may ask lethosor what he can make of the error message.
There may be more information in stderr.log files in the dwarf fortess or hack folders.
You could also try compiling the old manipulator and making do with that if it works, but I guess it wont for long because at the API level there is little difference, just some extra dfhack headers imported into CK.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: lethosor on April 04, 2018, 08:46:02 pm
The error message means nothing besides "DF crashed", which you already said, so that doesn't help much. stderr.log very rarely contains information about crashes. Are you playing with the exact same save in your other installation? Does the issue happen with other saves? I'm inclined to side with strainer here, although it's possible that memory management issues in CK can cause crashes later on.

The report you linked to is about Stonesense only, and was fixed almost 3 years ago.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 04, 2018, 09:17:38 pm
I just caused plenty of crashes with CK in development but never a segmentation fault error message, and Ive had a couple of other players report no problems, so a guess is compiler lib incompatibility which could easily happen with experimental compile.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: lethosor on April 05, 2018, 12:11:43 am
A segmentation fault is a crash. If you're following the build instructions, and managed to get DFHack running, a compiler/library compatibility issue being at fault is very unlikely.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 05, 2018, 06:20:00 am
Its a broad  kind crash which i dont recall CK generating before.

You dont have to be harried here lethosor.
I would have collected more information before maybe asking about it relevant threads.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 05, 2018, 07:51:29 am
I'm really sorry to have caused anyone any bother, I absolutely didn't mean to.

Also, when the crashes happen I still have Cavern Keeper open, and really I should have said 'a few moments later' not a few minutes, sorry. 

And after further testing, it seems that when a migrant wave has just arrived, such that they still have 'new arrival' as their action, it crashes immediately upon opening Cavern Keeper, but when they don't have that as their action anymore it takes a few moments after opening Cavern Keeper
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 05, 2018, 08:46:04 am
heh oh right, sounds like ive introduced a bug with the latest tweaks.

If you like papercamomiles you could try this version (https://github.com/strainer/dfhack/blob/dd05fc540e745f0e24ca720fdaa09227b51a6d8e/plugins/manipulator.cpp) which is more tested. Very little obvious difference just less optimised 'sort rating' and a couple of description words changed. It will need that math.h #include though. I think it should work but maybe there is something new in 44.09 that chokes the description maker...

Note to self dont recommend untested revisions! Im actually too distracted to be playing at the moment, im saving up for a session when the next packs come out.

cheers : )
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: lethosor on April 05, 2018, 09:22:54 am
I just caused plenty of crashes with CK in development

Its a broad  kind crash which i dont recall CK generating before.

These two statements disagree with each other. A segfault is a fairly common type of crash. It's possible that it didn't literally say "segmentation fault" on whatever system you're developing on, but undefined behavior can cause different types of crashes unpredictably, and the end result is the same. "bus error" and "abort trap" are two other messages you might have seen, but they can often be due to the same issues that cause segfaults.

Anyway, I'm glad the issue has been clarified. I don't recall many significant changes between 0.44.05 and 0.44.09, especially not related to units.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 05, 2018, 09:35:17 am
If I said Id causes plenty of kinds of crashes, they'd disagree  :P
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: paperchamomiles on April 05, 2018, 09:39:13 am
Thanks!  It was kinda weird playing without it, I had gotten used to it so quickly
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 05, 2018, 10:07:08 am
Try compiling the previous version (https://github.com/strainer/dfhack/blob/dd05fc540e745f0e24ca720fdaa09227b51a6d8e/plugins/manipulator.cpp) then, I tested it for a few years months and the other players didnt report a problem with it.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 05, 2018, 10:14:29 am
Oh. I have to warn you though. Lethosor doesnt believe this can happen, but when its crashes it can actually bork the saved game (even though it doesnt write anything differently than manipulator)
So the game may not play even without CK. srrrry.
Backup saves if you have them will be ok.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: lethosor on April 05, 2018, 10:27:45 am
Yeah, that's impossible, unless it crashes when writing something important to disk. Are you saying it doesn't write anything different to disk from manipulator, or to memory? I guess you could try disabling/removing cavern keeper and then loading a game to see if it still happens.

If I said Id causes plenty of kinds of crashes, they'd disagree  :P
The crashes are probably due to undefined behavior, which causes undefined types of crashes. Just because you never saw the "segmentation fault" message doesn't mean that someone who does see that is experiencing a crash caused by a different thing. I'm not sure how to explain it better, but you should never treat someone reporting a segfault differently from someone reporting a crash, unless there is very specific information tied to only one of the reports (e.g. a thrown exception).
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 05, 2018, 10:51:49 am
Division by zero and null pointer exceptions are the crashes Im familiar with.

Ill get to the bottom of the save borking behaviour for the next release. Maybe World::savePersistentData causes a partial update of the saved game, I can delay saving the plugins mode settings until screen exit to see if that stops it occurring. 
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: lethosor on April 05, 2018, 10:58:59 am
"Null pointer exceptions" sound like a Java thing to me. If you're seeing something like "access violation" or "null pointer dereferenced", that's the same thing as a segfault.

Anyway, World::savePersistentData only stores stuff in memory. More specifically, it adds/edits fake historical figures, which are then saved when the game is saved, meaning the only way they can end up in the region folder (and possibly cause future crashes) is if the game is saved successfully. If DF crashes, anything saved with savePersistentData after the last time that world was saved is gone, just like any game progress.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 05, 2018, 11:06:37 am
I understand thats what it does but its my only lead on that issue, which is real (but doesnt to my knowledge occur in the released versions).
Beside that all I can do to figure it out is try disabling chunks of keeper and force game borking exceptions until a disabled chunk stops its happening.. and look at a filemonitor i guess.. make sure it doesnt crash..
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 10, 2018, 04:53:12 pm
Did some more testing for 44.09 - opened Cavern Keeper on a game with 2473 goblins in it (nervously).It analyzed and displayed them with almost no delay. Scrolling, tabs and all the sorts worked instantly. I tried a few other saved games, played a fresh embark for 3 years and breached hell to examine its horde.

Seems to be stable as can be.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Llamageddon on April 11, 2018, 06:38:33 am
Any chance of making Cavern Keeper able to look at your dwarves on embark? Would be cool if you could quickly see which of your random dwarves were best suited to different roles before embarking. I hate having to look up their descriptions repeatedly if I want to fine tune their skills at embark. Great plugin by the way.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 11, 2018, 08:57:33 am
I couldnt find a way to do it in the embark screen, however:
If you open Keeper in the game and press shift-T a few times (which cycles backward through the highlighting modes) a message should appear saying "qw: Knapped points > 0pts"  Then you can take skill points away by pressing q, and they can be added elsewhere by pressing w. The points are counted in the same way they are in embark so its not really cheating when done at the beginning of a game.

If you were to keep pressing shift-T a dozen times there is a deeper cheatmode called "Armoks Thirst" which allows unlimited skills and mind and body stats to be added, but it stains part of theme red for the rest of the game so its not to be entered lightly.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on April 11, 2018, 03:03:01 pm
New Cavern Keeper compiles are up for the 44.09-r1 starter packs.

The download and install instructions are here (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405).

Some minor changes to Keeper:
A few of trait words were  !tweaked!

Emotional Obsessive was: clingy / independent is now doting / independent
Orderliness was: orderly / messy now tidy / messy
Discord trait was: unruly / compliant now boisterous / cordial
Dutifulness was: dutiful / rebellious now dutiful / unruly

Thinking behind those  !tweaks! is:
The "Discord" trait seems most related to rebelliousness.
The "Orderly" trait seems just concerned with tidiness.


O=[:::::::>    this way for the Caverns (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405)    <:::::::]=O                               
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on May 21, 2018, 09:35:51 am
Linux version for 44.10 in the messy github stockpile here (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/linux_dfhack_44_10)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Jazz Cat on June 03, 2018, 02:04:14 pm
This looks like a fantastic utility--I'm coming from Dwarf Therapist, and this looks like an excellent alternative. I'm curious: How are the aptitude scores calculated? And is there any way to customize that? With the new stress balance, I'm considering giving dwarves more jobs they'd prefer to do rather than only taking into account what jobs they'd be good at.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on June 03, 2018, 04:27:47 pm
Hi Jazz Cat, well I didnt mean to compete with Therapist but I had a severe eyesight problem last year and couldn't theme Therapist well enough to see it, so I started adding features to this dfhack plugin "manipulator" to use in its place. Wonderfuly, I got my eyesight fixed a few months ago and therapist does looks like it has helpful features, but a long learning/exporation curve.

I think CKeepers strength is you can just read what each unit likes and dreams about as you scroll through the list (without having to jump and scroll around other screens) - so its relatively easy to give out suitable jobs in on arrival, and then later if they are stressed, to see how to treat them further, and its not such a chore to read their extended in-game descriptions when its only for special/interesting cases.

The "aptitude" scores which color hint the labor grid only concern how well&quickly the unit will do that job, its calculated accurately according to previous sourcecode with the mind and body stats... it basically just averages the dwarves stats that are exercised by each job/activity, and then some cross adjustment is done to make the color hinting pattern. It would be very complicating to involve more information to it and there is no way to customize it at the moment without developing the sourcecode.

Other scores are calculated which do involve happiness somewhat. They enable the dwarves to be sorted by suitability for military, medic, scholar, academic and laborer. These rankings are only good for review and curiosity not for solving specific problem cases. Its a bit complicated to configure one, they could be made customisable through a text file, like with the raws...

Yeh, if you end up with ideas or tweaks that are not too complicating I can integrate them. Although, Dwarf Therapist is always going to excel for customization.

Im a bit behind on compiles for latest DFjack versions, if I dont have your OS/version made let me know.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Jazz Cat on June 03, 2018, 05:51:57 pm
Oh, I didn't mean to imply you were competing to Therapist. I was just saying it's comparable to Therapist in terms of usability! Therapist is a little more versatile but CK is more compact and portable, I'd say. I quite like it.

The aptitude customization is certainly quite the task, though, I'll agree with you. DF is in-depth enough that there's no easy way to judge how much a certain dwarf would enjoy a certain labor.

If I think of any quick suggestions I'll let you know. Right now I'm still getting a feel for it, so I haven't got a sense of what else I might want out of it yet. I am having a bit of trouble with the CdnNtT options, though--I've got most of them but I can't figure out what the t and T cycle through. What do those two adjust?

Oh, and I'm on Linux right now but I usually play on Windows, so a Windows build for 44.10 would be excellent if you have time.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on June 04, 2018, 03:55:58 pm
I doff my cap to Therapist since there was some perceived rivalry from comments, which Ive played up to :D - no slight from therapists developers though.

Good that you have tried 44.10

All the detail options are on by default now for the 44.10 version. 't' and 'T' cycle through the labor grids color modes:  there are 4 hues of monochrome theme with no aptitude hints (probably superfluous), and 4 levels of aptitude hinting ranging between just a handfull of labors colored as strong/weak, to about 75% of them colored. Also there is a cheat mode to let skill points to be moved around after embark, enabled by pressing 'T' about 10 times - saves on figuring the skills out in the pre-embark screens.

The scores for 'focus' are a bit fuzzy at the moment because Tarn has made that more complex than it was, possibly multi-dimensional, but they are still meaningful.

And the 'keep' column is actually stress/-1000. Im thinking about renaming it now that stress is more like... stress, again. Maybe "Wits" or "Tale" - I dont handle stress well myself, in a UI or AFK :)

Thanks for the input. I will get around to that win compile in a bit, have to swap a hard drive for it and things...
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Jazz Cat on June 04, 2018, 04:33:01 pm
Ah, I think it was the four monochrome themes that was throwing me off. I kept trying to figure out if they all did something different. As a side note, I seem to have broken the default color theme somehow by cycling through those--every time I open CKeeper it displays strong (adamantine) aptitudes in red and everything else in grey. It goes back to normal after pressing C once, though. Not sure how I managed that.

You could call the "keep" column something like "happiness" or "relaxation" or "contentment."

Oh, and I don't know how hard this would be to implement, but an equipment overview would be a great screen to have, maybe as one of the options you can get to with the tab key. I'd love to be able to see at a glance if any of my dwarves were running around naked or missing battle-axes.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on June 04, 2018, 06:11:24 pm
Quote
You could call the "keep" column something like "happiness" or "relaxation" or "contentment."

See they would create a quite empty column 10 ascii characters wide. 4- 6 characters is ideal, preferably lyrical word, dorf themed like 'grit'. But not grit... Im waiting for a lyrical genius to crack it... but now their mentality is affect by memories, 'Tale' seems like a contender.

You can see if units have "no pants anger", no shirt, or no shoes, in the 'notices' listing actually. I think its pretty useful for finding issues, also can see there who is hurt or just a bit ruffed up after a fight and things, or thirsty, drunk etc.

Get the notices listing up by pressing tab a couple of times. (Tab just changes what its listed in the column before the labor grid) It doesn't get interesting until stuff happens. If its clear, theres not much going on, yet. 'n' changes wether it includes notices of werebeast, vampires and curses.

I will keep an eye out for how to include military uniform/weapon status.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: lethosor on June 04, 2018, 06:12:49 pm
If it's based on stress, why not just "stress"? I think being understandable is more important than saving a letter or two. I'd have no idea what "keep", "grit", or "tale" mean if I hadn't seen this thread.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Jazz Cat on June 04, 2018, 07:01:09 pm
If it's based on stress, why not just "stress"? I think being understandable is more important than saving a letter or two. I'd have no idea what "keep", "grit", or "tale" mean if I hadn't seen this thread.

The column in question is negatively related to stress (keep = stress/-1000). Higher numbers mean happier dwarves, which is why I thought "happiness" would be a good title to it.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on June 04, 2018, 07:50:40 pm
Happiness is good and simple for Therapist with it is proportional font and flexible screenspace, but there is pressure squeezing in the name column, details and labor grid to the minimum 80 character wide space.

I hear the opinion, that its called "stress" and that should be that, but in Tarns long descriptions he doesnt just refer to stress or to being "unstressed" ever, the long descriptions use varied language - as lyrical as possible. Its just the sourcecode symbol for that counter that was engraved in stone, then it evolved through being nerfed to near meaninglessness (distracted and undistracted focus worked totally independently) and now its a kind of integration of reflexions on past experience.

Maybe just a whim but I dont think 'Tale' would be very obscure, and feels ok for the interface to be a bit engimatic within reason. "Hmm what do the numbers underneath 'Tale' mean? - that dwarf is -7 red now, that doesnt look positive... what does his description say... having a bad time there... maybe the green +5 means good tales ?...it does, i think there's a pattern here... "

In the end changing it back to stress is dead easy, even with the code in its current state of disarray, which I intend to deal with sometime :)

I havent figured out how to fully calculate the knew kind of 'focus' yet. The old counters for distracted and undistracted focus have seemingly been abandoned. Im calculating a score that's roughly in line with the game descriptions with this code:
Code: [Select]
    auto needs = uin->unit->status.current_soul->personality.needs;
    int fo = 0;   
    for (size_t c=0; c<needs.size(); c++){
        fo+= needs[c]->focus_level * needs[c]->need_level;
    }

But there seems to be more to discover.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Jazz Cat on June 04, 2018, 07:57:42 pm
If space is a big issue you could call it "joy." I agree that "tale" is more enigmatic, but that's not what I'm usually looking for in a utility like this. I have a hard enough time muddling through all the poorly documented DFHack plugins I find around here without the titles of things being obscure and confusing.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on June 04, 2018, 08:23:43 pm
Joy would actually be deceptive because the score doesnt mean that either. Thats why I didnt go with "mirth". Anyway you'll know what it means now whatever, and theres a help screen too. At the end of the day everyones entitled to a full refund :P
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Jazz Cat on June 04, 2018, 08:31:40 pm
Yeah, that's fair enough! And it's your plugin, after all.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on June 04, 2018, 08:47:51 pm
Thanks, Ive been developing it independently since manipulators maintainers werent interested, its a bit of a quirky pet project now. I did change about 20 of the dwarfs description words according to suggestions on reddit, they were really tricky to figure out and refine. Im not sure what to do with the label, but sure anything will be clearer than 'keep' now :)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Fleeting Frames on July 05, 2018, 12:59:46 pm
Peeked at github page, seems  file dfkeeper_pallete.txt link is linking to 404 (though the file exists elsewhere).

Though you can also adjust colors dynamically by bossing around season change script (since you mentioned differences).

Nice work on the trait names!
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on July 07, 2018, 06:53:26 pm
Oh hey. Thanks Fleeting Frames - Im pleased with the trait descriptions, doing the translation was more taxing than programming the reading and formatting.

In the DFhack thread we did have to figure out some relationship anon-structures and found the info from one of your scripts ... relations-indicator actually, I meant to warn you that the strucs had changed oops. (i see you had a report recently and fixed it yourself)

Id thought about changing some theme colors for seasons and weather - it would be a nice touch for immersion.

When the 4411 packs come out, Im wanting to clear out the git repo and straighten up the source code.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Fleeting Frames on July 07, 2018, 08:43:23 pm
Ah, yeah, that was bit of a surprise; since another user of relations-indicator didn't report that change breaking things either. Though I looked at legends exports, not unit_relationship_type to confirm, along with in-game editing.

The minor mishap aside, it's nice other options also got names.

Mm; 44.12 might come out right after the packs though.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: lethosor on July 07, 2018, 08:55:34 pm
0.44.12 has been out for over an hour now.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on July 08, 2018, 11:06:56 am
looks like a good one
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: bwbill on July 21, 2018, 01:10:17 pm
Strainer, I've become addicted to this utility...will you be updating for 44.12 (Linux)? I'd tip you if I could...
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on July 22, 2018, 11:48:42 am
Nice to hear you are getting use of it bwbill :)
I tried a quick compile last week but had some errors to get through.

Fair chance this should work -
linux64 keeper 4412r1 (https://github.com/strainer/dfhack/blob/develop/build/feb_df4405/linux_dfhack_44.12-r1/manipulator.plug.so)

edit, also thanks for the tip offer, I might set up a virtual buskers hat if I ever get organised and do more features..
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: bwbill on July 30, 2018, 05:00:45 pm
It's working great so far! Thanks again, strainer.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on July 31, 2018, 09:50:17 am
'most welcome bwbill - Good to hear its working.

Todos...
  Win compile
  Tidy repo and source
  Include undead in others lists
  Meddle with that column label
  Integrate autolabors
 
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Stiqy on August 15, 2018, 04:32:19 pm
Since you are modding labormanager I'll request this as a feature here. Just have one small request, that the labor management be able to be disabled on a per-dwarf basis (by something simple like ignoring dwarfs that have the unused "Alchemist" labor set.)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: lethosor on August 15, 2018, 05:01:05 pm
This is based on manipulator, not labormanager.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on August 15, 2018, 07:22:02 pm
It is related however, this is a feature I would like to add to Cavern Keeper - the ability to apply labormanager or autolabors arrangements, but only on command and to selected units.
Seems like it should be a simple ticket, but I will struggle over how best to add it to the existing menu items.

I feel I shouldn't add anything until the repo and things are tidied, and I am behind on other work at the moment ...
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Stakud on December 26, 2018, 07:28:20 am
I realise this is likely a dead topic, but seeing as 44.12 has been out for some time I was hoping/wondering if the plugin would ever come out for Windows...
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on December 31, 2018, 09:21:43 am
Here's a compile for win 64 PeridexisErrant 44.12-04 starter pack. manipulator.plug.dll (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/win_peridex_44.12-r1)

And one for the new dfhack 4412r2 fwiw - dfhack r2 (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/win_dfhack_44.12-R2)

Better late than never \:]/
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: Stakud on December 31, 2018, 06:01:21 pm
Oh my goodness thankyou so much. I was worried I'd just get told off for resurrecting a dead topic  :)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on January 01, 2019, 08:04:29 am
As long as theres intrest, its not dead. Thanks for the bump :)
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: FantasticDorf on January 01, 2019, 08:38:57 am
Ah excellent ill look iinto this since i've been messing around with labour manager anyway. Thanks.
Title: Re: Cavern Keeper - In game labor manager with detailed character information.
Post by: strainer on January 03, 2019, 05:04:29 pm
The color theme seemed a bit broken on the default windows setup. It depends on font and rendering mode maybe. There was two themes which could be toggled by pressing 'C' and Ive just added a third which is a tweaked version of the default brass/iron/adamantine theme that should be much clearer for the default pack setup on windows. The recent links have this tweaked version now.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on January 06, 2019, 08:47:32 pm
I've added tooltips visible when changing the 'mode' options, to help with that since they would have been confusing without - hope you didnt get burned by that FantasticDorf !

Also updated and tested the dfhack 4412r2 compile to work with PeridexisErrant's new pack, looks like a good one. That's here (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/win_dfhack_44.12-R2)

Anyone playing on linux let me know, and Ill put a compile for linux up, its no bother.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Starver on January 06, 2019, 09:49:04 pm
As I spotted this again (I'd seen it a while ago, but not kept a specific eye on it), might I suggest (to necro a subthread point) that the anti-'stress' might be called 'chill'? I think that describes relaxedness without either being as long as ' relaxedness' nor being easily contextually confused with its homonymic cousin used for pure temperature terms. If you're still not happy with your current term, anyway. Just an idle thought as I was passing.

(And, by saying this, I now don't need to PTW!)
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on January 07, 2019, 02:56:59 pm
I changed it back to 'keep' again; sounds medieval to me. Possibly the most vague adjective used in keeper is 'cool'. Its not uncommon to see dwarves that are "really cool" or "quite cool" etc, this denotes not very obviously that they have a low "hate propensity". Anyway, puzzled players could easily jump to the games description screen to work out whats so 'cool' about the unit.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Jazz Cat on January 07, 2019, 04:18:37 pm
When was it last updated? The version I'm running it's still called "Fable."
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on January 07, 2019, 04:56:44 pm
Oh ay that was a brain burp. Ive done compiles for windows recently, with just minor UI work since 'fable'. There doesnt seem to be an LNP out yet for dfhack 4412R2, I was going to do a compile earlier but got confused by the version numbers and gave up.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Jazz Cat on January 07, 2019, 05:52:44 pm
I'm on Linux, actually, although it's good to hear that there's a Windows version up too.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on January 07, 2019, 06:53:43 pm
Ill get an updated compile up for linux as soon as the new LNP come out. Glad to hear youre still playing with it Jazz Cat :)
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Jazz Cat on January 07, 2019, 07:47:24 pm
Yeah, I like it a lot! I originally picked it up because I couldn't get Dwarf Therapist working on linux, but I actually prefer CK now.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Symmetry on January 10, 2019, 06:28:53 pm
This is really good.  Thanks!

Is there a way to jump to a dwarf in keeper from the (v)iew mode?  It's a lot easier to see whats going on in keeper than going thorugh lots of menus, and it's tricky to find someone again when you have a lot of dwarfs.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on January 11, 2019, 01:47:27 pm
Thanks for the feedback, Symmetry.

Quote
Is there a way to jump to a dwarf in keeper from the (v)iew mode?

Ive noticed that would be most handy and keep a lookout for how to implement it, but its not straightforward because CK opens on a kind of standardised list of units, that it usually gets from the unitlist screen. This is why it can just as easily open the animals, visitors and dead lists because they are all a standard kind of list which seems to be created by the (u)nitlist screen.

If I found it was possible to create keepers window from that view state where the map is visible, it would need to build a list itself... possibly including all the nearby units including visitors etc... Its a UI obstruction because even DF doesnt have a  way to bring up its own unitlist screen on a map centered unit.

CK does normally remember focused and selected units between leaving and returning, but it could really benefit from getting its own search feature and ability to open from the map.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: lethosor on January 11, 2019, 03:36:33 pm
You could probably have it track which unit is selected in the map, then open a unit list screen by triggering the appropriate key (which might require backing out of menus with Gui::resetDwarfmodeView() first) and proceed from there. That wouldn't necessarily leave the unit selected in the map, but that's probably okay.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on January 11, 2019, 04:42:29 pm
Thanks Lethosor, I was hoping you'd have a tip for me. I can look into that in a bit then, it would be very handy. Maybe just a script of its own which focuses into (u)nitlist from that (v)iew screen, CK or whatever can it from there.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Jazz Cat on January 29, 2019, 01:33:03 am
Is there a Linux build for 44.12-r2? I'm having some trouble with the r1 version--I can't seem to view or zoom to units from the Cavern Keeper screen.

Edit: Belay that, it seems to be working fine after a complete re-install of both DFHack and CK.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on February 02, 2019, 12:31:00 pm
Hi Jazz Cat, Ive put a new compile up for 44.12-r2 (same as last one) but ive not had time to play with it besides just seeing that it runs, its here (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/linux_dfhack_44.12-r2).

It just has a new sort of 'tooltip' that saves confusion when pressing the 'mode' keys and happiness score is back to being labelled 'keep' with min=-100, max = 100.

There is one issue involving the "likes working outdoors" trait, this is tagged in the short descriptions as "Rgh" or Rgh+ or Rgh++, which is short for "can rough it" and seemed to work alright, usually all of the embark dwarves have it and by some accounts it makes them hardy to not having a bed and stuff. The dfhack pointer to it in the games code has changed, but CK is still using the old one as it seemed to be working properly but ill see about that.

So for the curious id recommend renaming the old manipulator.plug.so in case this one doesnt work for an odd reason and saving this (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/linux_dfhack_44.12-r2) version there, it doesnt need anything else changed, theyre both compiled for dfhack 44.12-r2, the LNP was confusingly named 44.12.r1
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Jazz Cat on February 02, 2019, 11:13:39 pm
Awesome, glad to see the update! I'll keep you posted if I find any bugs. Speaking of which, actually, for a few versions now the sorting options have been switched---the options that are supposed to be controlled with +- are actually controlled with /* and vice verse. Did that ever get fixed?

Oh, and the happiness score slot has just enough room for it to be called "morale" if you're still looking for a word. I only mention this because I remember having that word on the tip of my tongue during the entire discussion about that and I only just now realized that was the word I was looking for.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on February 03, 2019, 09:16:48 am
Wow thats so dissonant having the keys switched all this time! I never noticed because on the set I use they are the same two keys +- with shift making the difference.
And morale is very sensible, definitely the best 6 letter label. I might catch my senses and change it to that... someday :)
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Jazz Cat on February 03, 2019, 12:45:07 pm
Yeah, it took me long enough to figure out what word I was looking for :P

What language is your keyboard in?
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on February 03, 2019, 01:31:36 pm
I confusingly have a US and UK qwerty but the -= /_+ are in the same place next to the backspace key. One of the starter packs keyboard options chooses them, maybe its the 'no numpad' option.

Thats fixed now in the latest (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/linux_dfhack_44.12-r2) linux compile. Ill have to redo the windows one soon too, its like waking around with my fly open - thanks for the tip off !
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Jazz Cat on February 03, 2019, 09:49:03 pm
No problem!
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: bwbill on March 18, 2019, 09:06:22 am
Hi again, Strainer! I'm so grateful for this utility that I've hesitated to ask if it will be updated for LinuxLNP 44.12-r03. Alas, here I am. :)
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on March 18, 2019, 10:38:01 pm
Don't wait to say mate - I was thinking the last linux compile would work for lnp r03. But here is a fresh one (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/linux_lnp_44.12-r03/)

I love to hear that the plugin is getting played; dwarves colorful characters displayed, following their talents and dreams :)
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: bwbill on March 19, 2019, 03:31:04 pm
Thanks so much, Strainer! I was hoping some crashes I didn't mention would be fixed, but that's not how this works, haha.  :P I'm getting similar crashes with this most recent version. When I arrow through my dwarf list after u-k, there are at least a couple of dwarves who'll crash the game immediately. For example, the first one gives me the following error -- I hope it is of use to you:
Spoiler (click to show/hide)
I can provide a save if needed.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on March 19, 2019, 05:31:09 pm
Ah crashes  :o I am most interested in any crashes, Ill take the save please
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: lethosor on March 19, 2019, 08:22:45 pm
Thanks so much, Strainer! I was hoping some crashes I didn't mention would be fixed, but that's not how this works, haha.  :P I'm getting similar crashes with this most recent version. When I arrow through my dwarf list after u-k, there are at least a couple of dwarves who'll crash the game immediately. For example, the first one gives me the following error -- I hope it is of use to you:
Spoiler (click to show/hide)
I can provide a save if needed.
That message is harmless, actually (it's just related to the fact that a non-df screen was open).
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on March 19, 2019, 09:37:56 pm
That message is harmless, actually (it's just related to the fact that a non-df screen was open).
Oh right, I thought I'd seen that message before. But I might need to update or put in (more) null pointer checks to the code which calculates descriptions and info 'tags' which runs when each unit is first highlighted. Not seen any problems recently but maybe bwbill has units with a rare curse or something.

Ive just made a compile with debug info included for the first time ever, so hopefully I can get a line number with an actual crash.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: bwbill on March 21, 2019, 04:35:39 pm
Hi again, and sorry for the delay. I presumed that DFFD would be the way to pass my crashing save, and uploaded it here (http://dffd.bay12games.com/file.php?id=14305).

Edit: I might have some rare curse? Awesome!
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on March 21, 2019, 09:22:33 pm
Turns out you have 4 dorfs with no record of ever having a mother  :-\
The family details tag maker only runs on units with historical records and relationships so it didnt expect this, so I put in a check and if units are motherless it shows this cryptickly now by putting a negative number of siblings eg. "family0:-1" so we can see the issue. The units seem normal apart from this.

The latest linux (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/linux_lnp_44.12-r03/) and windows (https://github.com/strainer/dfhack/tree/develop/build/feb_df4405/win_dfhack_44.12-R2) compiles are updated.

... that looks like a substantial clown incineration complex you're working on down there  :D
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: bwbill on March 22, 2019, 09:31:38 am
Well, I guess that's some kind of curse, being motherless.  :o

Thank you for the update! I actually built that incinerator for sieges, since I am deathly afraid of clowns. I really didn't think my design would even be effective for that class of fun -- having read over the checkerboard method, I'd assumed obsidian was needed to throw a proper party for those bozos. Do you think it would work as designed, as long as I can route them through there?
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on March 22, 2019, 10:14:11 pm
Thanks for hauling the save to me!

Oh that thing is for sieges - Im still a novice with magma. Cracked a spire only once by accident and didnt hang around long to watch my boys demise.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: LordBalkan on April 08, 2019, 07:10:36 pm
WOW! What a mod! I do love those kind of "life quality" improvments for DF hahaha.

Spoiler (click to show/hide)
Oh! Hey!! Just really searched on first post and guess what, it was all there! hahahah... well except for the "fcs+0 but... nvm"

Thank you again and again!
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: dizzyelk on April 10, 2019, 02:13:26 am
I've downloaded the file from dfhack/build/feb_df4405/win_dfhack_44.12-R2/manipulator.plug.dll

However, when I run DF I get this error:

Plugin manipulator was not built for this version of DFHack.
Plugin: 0.44.12-r1, DFHack: 0.44.12-r2

What am I doing wrong?
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: LordBalkan on April 10, 2019, 12:53:26 pm
I've downloaded the file from dfhack/build/feb_df4405/win_dfhack_44.12-R2/manipulator.plug.dll

However, when I run DF I get this error:

Plugin manipulator was not built for this version of DFHack.
Plugin: 0.44.12-r1, DFHack: 0.44.12-r2

What am I doing wrong?

Exactly as you said, you downloaded the wrong version.

According to the error message you DFHack is at version r1 and you pickedup the r2.
To fix this is simple, just download the R1 version wich is "win_peridex_44.12-r1" this one, even if youre not using the LNP(Peridexis Starter pack). Replace the .dll and its done.

:D
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on April 10, 2019, 01:03:30 pm
Thanks LordBalkan - glad to hear you have discovered 'keeper :D

The latest compile was meant to work with the latest peridexis pack, r2 or r3? ... actually but I must have misconfigured. I have an old laptop crunching out a fresh compile now and will put it up after a quick test...
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: dizzyelk on April 10, 2019, 01:47:17 pm
Thanks LordBalkan - glad to hear you have discovered 'keeper :D

The latest compile was meant to work with the latest peridexis pack, r2 or r3? ... actually but I must have misconfigured. I have an old laptop crunching out a fresh compile now and will put it up after a quick test...

Awesome, I look forward to checking it out tonight after I get off work.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on April 10, 2019, 03:14:47 pm
I just uploaded to the same location (https://github.com/strainer/cavekeeperdf/tree/master/build/compile_archive_df44) since that's where the dfhack44.12.r2 version should be. Thanks for letting me know that it was borked %}

Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: venicedreamway on July 13, 2019, 04:15:33 pm
Hi! I compiled this plugin for MacOS using the latest Dwarf Fortress/DFHack versions (DFHack version 0.44.12-r2). In my case, in order for this to compile successfully, I had to change line 2415 in manipulator.cpp to refer to 'likes_outdoors' rather than 'unk_v4019_1'. I can share the manipulator.dylib binary if that would be of any use? I really love this plugin, looking forward to using it in my next fort!
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on July 14, 2019, 08:25:12 am
Yes I'd love the binary to put up for Mac miners ! I'll pm my email to send the compile to, that should be handiest.

Thankyou for breaching the MacOS labyrinth !!  venicedreamway  ~), *
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: LordBalkan on July 16, 2019, 07:59:45 am
So, Strainer
Yesterday I had a miner who was ignoring his duties and, instead of digging out my plans was hauling thing to the new food stockpile.
I went to CK and checked that he was indeed assigned as "everything hauler".
Then I  realized that in CK i cant actually hold Shift and press Enter to assign/unassign a group of works, such as Fisherman (Fish Cleaner, Fish catcher, fish dissector).
It is fisible to add this function?
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on July 16, 2019, 08:19:37 am
Ahh, many humble apologies LordBalkan - I changed that shift/enter keypress to 'j'... not sure why maybe cause it takes less space to write in the menubar! I could restore the old shift & enter keypress in the next update if it is missed.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: LordBalkan on July 25, 2019, 11:25:26 am
Yes, it was right there in the menu options. My fault though.
I dont think it is necessary to change it to shift+enter, my concern was that this function was "missing".
Actually I do prefer "j". Thx anyways
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on July 28, 2019, 01:56:19 pm
Grand, for next update I kept 'j' but put the shift-enter keystroke back too in case someone else misses it. Also attached the group labor toggle function to shift&click too, since that could be handy.

Hoping to push back to dfhack sometime, so I've tidied the repo and code a bit, and have put in an option to select different names for the "keep" (unstressed) column. This is surely too quirky, but at the moment if the player doesn't set it with one of the 'mode' keys, it changes itself randomly about once a year to one of these:

Braw, Keen, Flux, Myth, Boon, Grit, Okay, Fine, Mojo, Rune, Perk, Tale, Hppy, Glad, Keep, Soda, Smug, Ease, Zeal, Well, Epic, Odes

My favourite is "braw"

Also thinking of other names than 'cavern keeper' to try and swing a name change by the dfhack veterans when I push it. It may just have to go back to being called manipulator but I feel like its an evolved entity now, and it would avoid potential confusion between it and the legacy 'manipulator' and its lua port.

Unit ??.. actuator/counsel/custodian/commander/keeper/gatekeep/confidante/homeopath/mycologist/momentum/runelord...

'unit (k)eeper' is handiest for the keypress.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Fleeting Frames on July 28, 2019, 02:15:02 pm
Hey, strainer, saw that someone in reddit comments wished for ability to schedule labours like military months. What do you think of that? Greatest difficulty might be UI portrayal, might require a separate dummy graphic sheet.

(Also, went the easier way and checked the dwarf-killing horse in 44.12. No indication of being particularly murderous.)
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on July 28, 2019, 06:22:15 pm
I don't think dfhack yet has all the required methods to access and set the military details, that could be the reason why no other plugins to manage military have been made. If it had then a lua plugin could be nicer to work on than trying to fit into keeper's source.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Fleeting Frames on July 28, 2019, 08:32:14 pm
Oh no, they meant ability to turn off labours depending on month (link (https://www.reddit.com/r/dwarffortress/comments/ci2v3k/your_dream_features_in_dwarf_fortress/ev91jiw/)), not affecting military schedules (which you can, incidentally, find under df.global.world.squad[#].schedule[#][#] (.orders) , though there's some unknowns in 44.09). This would probably require saving data in world files to keep past restart with save, but not restart without save.

And, hah, I suspect why there's just assigning in therapist and uniform copying is more about how grand the military rework ideas are. I myself have more than a full page of thoughts on settings, indicators, ui additions that I've yet to touch, to say nothing of pages and pages of mostly doable suggestions in suggestions forums by other people.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on July 28, 2019, 09:33:00 pm
Oh right, that adds a whole extra dimension to work assignment - a crazy idea :) I dunno like right clicking on a labour brings up a little calender pop-up modal that lets months be clicked and the information saved somewhere, and then another plugin could apply that info every month. Then it would need convenient reset and summary features or invisible labor toggling chaos ensues !

This 'unitkeeper' doesnt help with any automation at the moment. Ive thought about quick hacks like adding a feature to save the labor state, so it can then briefly run an autolabor plugin and then quickly restore labors to units which were not selected - so its a kind of group autolabor ability, or it could overlay autolabors results instead of overwriting. Then autolabor or labormanager might themselves beg to be modified to take a list of units to exclude from auto assignments.

A small but fiddly wish is for an ability to open keeper focused on a unit selected on the map, Im sure dfhack functions exist to do that pretty easily but until I find another pluggin that does similar Im stuck. Apparently keeper only runs at them moment when it is called from unitlist, how to add something that listens for a keypress from the map screen escapes me.

...that killer horse didn't get wind of you using its kind for a bit of military training did it ? ;) 
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Fleeting Frames on July 28, 2019, 09:52:42 pm
Hah, little popups would open up freedom way beyond that; allowing stuff like "keep enabled for N jobs" or other timeunits. Regimented monthly allows one to swap labor grids per month or have it as background detail to the aptitude/skill level fg, leaving it easier to keep all information the keeper does in one screen. Well, ultimately, these kinds of features strike me as bit of handling needs though.

Saving labour state, though...I must admit, I've done this sorta thing with therapist - commit set of labours, then immediatelly undo those changes but not commit so I can remove them when something I want done by them/avoided by them is done. It might be useful.

Labormanager already excludes any units in burrows, so adapting that to other lists shouldn't be hard, I guess. Autolabor's documentation doesn't mention that, but does mention excluding CMD.

Opening keeper on an unit selected in the map...I'd guess you'd need to remember the unit, relay key for opening the unit screen (like manipulator (lua) does, using gui.simulateInput), set cursor position in list to unit's position in the underlying native unitlist viewscreen (with correct tab if unit isn't a citizen/resident), then launch keeper. A separate lua script could probably do it; maybe even just :lua inline keybind.

PS: It did, and it told it to next generation; I nearly lost another dwarf to a supposedly calm foal strangling them in rage. This may be too fun a way to train armor user; at least with horses (wild boars and horseshoe crabs have been more receptive in the past, though I've had fatalities with the former. ).
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on July 29, 2019, 07:08:14 pm
I've got keeper opening on map units now, trickiest thing was working out how to use dfhacks "VMETHOD_INTERPOSE" system to put the hotkey in the unitview menu - that's weird c++ hacker voodoo. I pieced together the necessary incantations from other plugins, and instead of opening the focused unit in a standard list, I make a list of the units surrounding it or underneath if there arent many about, and that list of mix-ups opens in keeper okay :D
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on August 23, 2019, 05:28:35 pm
I've finished a number of updates, if anyone likes to try/help-test then new compiles for dfhack 44.12.r2  are here for windows (https://github.com/strainer/cavekeeperdf/tree/master/build/compile_archive_df44/win_dfhack_44.12-R2) and linux (https://github.com/strainer/cavekeeperdf/tree/master/build/compile_archive_df44/linux_dfhack_44.12-r2), or let me know what plat/version you need.

The cavern keeper has revealed its archaic name to be: "Kloker" (its a kind of cave sprite so it goes), so it may be known forthwith...

Kloker can be opened from the map (look menu) now, and then it displays a list of the focused unit and all the units in vicinity... dwarves, visitors, animals, even zombies and other dead things.

The profession system is altered a bit. Profession masks can now be saved with hotkey and professions can be unsaved with a hotkey. Previously, making masks and unsaving  professions required players to manually edit files in dfhack. The Professions/masks are applied in a new combined "batch actions" screen that includes other features, making the UI a bit nicer.

The batch actions screen, combines the options for group renaming, for applying professions, and has options for reducing/maxing labors or hauling, and also has 2 special options which really frazzled my puzzer putting them in... to automatically assign outstanding tasks to the selected units. The automatic assignment can be done as a full reassignment or as a mask (which seems more useful - it doesn't forbid any labors). It uses the labormanager plugin transplantedly in the background which was the most fiddly to arrange under C++ hyperlexical attacks, but it seems to work nicely as an option to quickly avail a few dwarves to all pending tasks, or just to observe what labormanager would make of things. The batch actions screen also has an undo feature to make it quite safe to try.

Renaming single units can be done quickly from the main screen with hotkeys n and p for name and profession, or from within the batch action screen.

Unit happiness column is player settable to one of a dozen or so options, and it changes itself occasionally if player doesnt set it.

Units with absent souls (zombies/husks etc) at last are visible in kloker.

Finally, The current Dwarven Date is written in the screens border.

--
Before these features I had the code tidied up a bit to try and send back to dfhack, but its got an extra 1.5 thousand lines of freshly scrawled code now.  :o Quite a relief to have it done though. \o/
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on August 24, 2019, 12:26:34 pm
Saving labour state, though...I must admit, I've done this sorta thing with therapist - commit set of labours, then immediatelly undo those changes but not commit so I can remove them when something I want done by them/avoided by them is done. It might be useful.

This shouldnt be a great ordeal to add to the batch action screen now. A "save group's labors" menu option could save a groups labors to the existing 'professions' folder using similar profession saving methods, under a name given by the player using the same method which 'change nickname' uses to input a name. Then  'apply labors of group: x' could be listed as options in the batch action menu, same as the apply profession options do. It would just need a warning that the option applys to the saved group not the currently selected one, and an option to delete group arrangement saves to stop them accumulating.

Quote
Labormanager already excludes any units in burrows, so adapting that to other lists shouldn't be hard, I guess.

I got it working by temporarily clearing everyones labors, and getting everyone not in the group thats to be assigned, to pretend that their hands are broken before calling in the auto-labormanager. I ran into difficulties getting the labormanager to reliably attend and efficiently storing boolean labor arrays in a 'map' datatype. Without deep knowledge of how c++ parses things it can be mind boggling to figure out how to put straightforward operations to it. And the std::maps .size() method wasnt returning 0 after it was in fact .clear()ed for some wicked reason  :o  Writing lua and even javascript is a breeze in comparison, C++ doesn't just have gotchas - it seems constantly intent on getting me !

Quote
Opening keeper on an unit selected in the map...I'd guess you'd need to remember the unit, relay key for opening the unit screen ...
Turns out it was straightforward to just call keeper/kloker directly from the code which is interposed into the dwarfmode lookat menu to add the text and event to that menu (all just copied and tweaked from the way someone did it before). The dfhack "interpose" ability allows code to just be sort of wedged into modules of df's viewscreens and all keeper needed to open was a list of units to refer to.
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Noobboyo on August 26, 2019, 06:50:24 pm
So how do you install it in am very very new and need some help with installing it
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: strainer on August 27, 2019, 08:29:45 am
Hi, you should find the plugin file to download for your OS and DF pack version linked in the readme  here (https://github.com/strainer/cavekeeperdf). Then all there really is to do is paste it into the hack/plugins directory. It only runs in fortress mode btw - I notice you have been adventuring so far :)
Title: Re: Cavern Keeper is Manipulator + detailed character information.
Post by: Noobboyo on August 27, 2019, 07:09:34 pm
Thank you for clarifying things and yeah I know it is for fortress mode
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on August 27, 2019, 08:14:00 pm
Hope you like it. If you dont find a link for your version let me know, Ill check and see about putting up a compile for it if its not there.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on August 30, 2019, 04:42:36 pm
Oh I just noticed last weeks compiles were missing lots of character info display. I didnt notice cause I just tested it on zombies. Ive uploaded fixed versions.

Here is a screenshot of the new "Batch Actions" screen :
(https://i.imgur.com/w2DWiDG.png)

Here is how the tweaked main screen looks :
(https://i.imgur.com/ychYST8.png)
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: LordBalkan on March 11, 2020, 06:43:05 pm
Oh, Please please, Strainer tell me that you plan on updating the best in-game labor manager.
I dont like Dwarf Therapist at all...
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 14, 2020, 04:52:41 am
Definitely - I feel its feature complete now so updating should not be a big problem. Im away from my linux machine so can only do windows compiles at the moment. Which version are you needing the 44.12. r3 ? or the latest 47 beta? If we could get dfhack to pull kloker then it will just be available with dfhack. That would be ideal.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Nilsolm on March 14, 2020, 09:00:26 am
I tried compiling it for Linux for v47. Some minor tweaks to the code were necessary due to changes in DFHack's structures in order to get it to compile.

However, opening the screen in the game leads to a crash. I am not sure how to go about debugging it. Neither the error log nor GDB reveal anything useful.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 14, 2020, 02:52:03 pm
Thanks for trying. Did you run it under gdb? Did it give a line number when it crashed?
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Nilsolm on March 14, 2020, 03:08:13 pm
I managed to find out a bit more in the meantime, actually. Something to do with writing the config. Here is the backtrace:

Code: [Select]
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff673c859 in __GI_abort () at abort.c:79
#2  0x00007ffff6d0e951 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff6d1a47c in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff6d1a4e7 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff6d1a799 in  () at /lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff797bd1e in DFHack::PersistentDataItem::ival(int)
    (this=this@entry=0x7ffff09ccad0 <config_kloker>, i=i@entry=7) at ../library/modules/Persistence.cpp:107
#7  0x00007ffff098f529 in save_kloker_config() () at ../plugins/manipulator.cpp:853
#8  0x00007ffff098f9d5 in read_kloker_config() () at ../plugins/manipulator.cpp:861
#9  0x00007ffff09a04b8 in viewscreen_unitklokerst::viewscreen_unitklokerst(std::vector<df::unit*, std::allocator<df::unit*> >&, int) (this=0x7fffa7d99280, src=..., cursor_pos=<optimized out>) at ../plugins/manipulator.cpp:4121
#10 0x00007ffff09a076f in dts::make_unique<viewscreen_unitklokerst, std::vector<df::unit*, std::allocator<df::unit*> >&, int&>(std::vector<df::unit*, std::allocator<df::unit*> >&, int&) () at ../library/include/MiscUtils.h:76
#11 0x00007ffff09b5027 in unitlist_hook::interpose_fn_feed(std::set<df::enums::interface_key::interface_key, std::less<df::enums::interface_key::interface_key>, std::allocator<df::enums::interface_key::interface_key> >*)
    (this=<optimized out>, input=<optimized out>) at ../plugins/manipulator.cpp:6469
#12 0x00007ffff6eb6234 in interfacest::loop() () at /home/xxx/Games/dev/df_linux/libs/libgraphics.so
#13 0x0000000000a486ee in mainloop() ()
#14 0x00007ffff6e9a1c5 in enablerst::async_loop() () at /home/xxx/Games/dev/df_linux/libs/libgraphics.so
#15 0x00007ffff6e9a4e0 in call_loop(void*) () at /home/xxx/Games/dev/df_linux/libs/libgraphics.so
#16 0x00007ffff74aaf3c in  () at /lib/x86_64-linux-gnu/libSDL-1.2.so.0
#17 0x00007ffff74eabaf in  () at /lib/x86_64-linux-gnu/libSDL-1.2.so.0
#18 0x00007ffff667d609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#19 0x00007ffff6839153 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 14, 2020, 03:54:12 pm
Thanks Nilsolm, that's not a terribly complicated bit of kloker so it looks like dfhacks World::PersistentDataItem is just bugged on the 47 beta. Kloker uses it in two functions
Code: [Select]
save_kloker_config :837 and
Code: [Select]
read_kloker_config :856 just to stash values which set the color theme and detail levels and things. Other plugins were using it too so maybe it should be fixed or maybe it has been depreciated for a better method.
You might like to just disable config reading and saving in the meanwhile by commenting out parts of those functions but it will be a bit of a puzzle, as the values are "magic cookies"...

This could work:
Code: [Select]
line 837...
void save_kloker_config()
{
    /*
    config_kloker = World::GetPersistentData("kloker/config");
    if (!config_kloker.isValid()) {
        config_kloker = World::AddPersistentData("kloker/config");
        if (!config_kloker.isValid())
            return;
    }

    config_kloker.ival(0) = color_mode + 1;
    config_kloker.ival(1) = hint_power;
    config_kloker.ival(2) = spare_skill;
    config_kloker.ival(3) = show_details + 1;
    config_kloker.ival(4) = tran_names;
    config_kloker.ival(5) = theme_color;
    config_kloker.ival(6) = show_curse;
    config_kloker.ival(7) = happy_label_seed;
    */
}

void read_kloker_config()
{
    /*config_kloker = World::GetPersistentData("kloker/config");

    if (!config_kloker.isValid()) {
        save_kloker_config();
        return;
    }*/
    color_mode = -1; // config_kloker.ival(0) - 1;
   
    if (color_mode == -1) { color_mode = 1; hint_power = 1; }
   
    //hint_power = config_kloker.ival(1);
    spare_skill = 0;// config_kloker.ival(2);
   
    show_details = 1; //config_kloker.ival(3) - 1;
   
    if (show_details == -1){ show_details = 1; }
   
    tran_names  = 0;//config_kloker.ival(4);
    theme_color = 0;//config_kloker.ival(5);
    show_curse  = 1;//config_kloker.ival(6);
    happy_label_seed = 0;//config_kloker.ival(7);
   
    if (theme_color == 0){ cltheme = cltheme_a; }
    if (theme_color == 1){ cltheme = cltheme_b; }
    if (theme_color == 2){ cltheme = cltheme_c; }
}
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: lethosor on March 14, 2020, 04:23:40 pm
Quote
Code: [Select]
    config_kloker.ival(7) = happy_label_seed;
This appears to be the problem - ival() only supports 7 integers, i.e. from 0 to 6. This is mentioned here (https://docs.dfhack.org/en/stable/docs/Lua%20API.html) - admittedly that's not relevant for C++ developers, but it was the first mention I found. The persistent storage system was rewritten over the summer, so that's probably why it's crashing now, but I think it would have crashed in 0.44.12-r3 too, which had the new system. Even if it didn't crash with the old system (pre-0.44.12-r3), it wouldn't have worked, because the old system stored ival()s in language_name words (https://github.com/DFHack/df-structures/blob/24ed650356467b48ee12db9b22deb0528430d375/df.language.xml#L216-L218), which is only a 7-element array anyway.

Some possibilities I've thought of (could be more):
- shove multiple pieces of data into one integer (I'm guessing show_curse might just be 1 bit from its name, which could make it a candidate)
- store something into one of the string values instead
- store your config in a JSON file instead (admittedly a harder change)
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 14, 2020, 04:56:08 pm
Thanks Lethosor ! That pesky "happy label seed" is kind of an easter egg which just allows the happy/stress label to mysteriously change occasionally in the history of the fort, if its never set by the player. So it could just be zeroed, or maybe this ...

Code: [Select]
line 852 ~
       config_kloker.ival(6) = happy_label_seed*2 + (show_curse & 1);

Code: [Select]
line 878 ~
      happy_label_seed = config_kloker.ival(6) / 2 ;
     show_curse = config_kloker.ival(6) & 1 ;
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Nilsolm on March 14, 2020, 05:37:05 pm
Thanks Lethosor ! That pesky "happy label seed" is kind of an easter egg which just allows the happy/stress label to mysteriously change occasionally in the history of the fort, if its never set by the player. So it could just be zeroed, or maybe this ...

Code: [Select]
line 852 ~
       config_kloker.ival(6) = happy_label_seed*2 + (show_curse & 1);

Code: [Select]
line 878 ~
      happy_label_seed = config_kloker.ival(6) / 2 ;
     show_curse = config_kloker.ival(6) & 1 ;

That appears to solve the problem. No more crashes and everything seems to work. I can create a PR with the changes I've made later if you want.

In the meantime, here (https://my.pcloud.com/publink/show?code=XZHVR9kZ7BvB4Fv6wR7EsoWo72Mmk8Wg1fyy) is a build for Linux, compiled for the latest DFHack. I could try making one for Windows as well later, but last time I tried, I couldn't get DFHack to compile.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 15, 2020, 04:28:20 pm
 Alright  8) Thanks Nilsolm

A git PR would ideal for the updates you figured out. I have a win compiling setup on my laptop but it takes some focus to spin up and I'm a bit distracted at the moment working outdoors for my grudges...
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Nilsolm on March 16, 2020, 07:31:44 am
Unfortunately, I've encountered more issues that need fixing. I did a bit of testing with a pre-existing save instead of a newly created one, and I'm seeing a lot of crashes while cycling through the unit list. At a first glance, they seem to be related to the relationship type changes in 47.XX.

I'll look into it later today and report back once I've found out more.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 16, 2020, 06:52:30 pm
Ah, that code in 'setDescriptions' is not bestest structured :-[ .  If you like post the crash log I may be able to spot what to change or disable to make it safe. I spotted what I expect must be a typo at line:2411 - a wrong "current_soul" pointer check is just disabling something that may not be working either. There are lots of redundant checks in the method currently as it just returns near the beginning if there is no "current_soul" (zombies and things).
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Nilsolm on March 17, 2020, 05:12:14 am
The culprit turned out to have been line 2272. Probably something related to changed made in this commit (https://github.com/DFHack/df-structures/commit/b9f9a6995ac3b03daf96d236d6cdcdc35497db94). The renaming of links to hf_visual was already accounted for, so it must be some other reason. Removing that line stops the crashes. It doesn't appear to serve any purpose in the code from what I can tell, so it shouldn't lead to loss of functionality. Indeed, I haven't noticed any.

And I am not sure about the other possible issues you mentioned, but I'll do some more testing in the coming days to see if I find some more bugs.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 17, 2020, 11:40:17 am
this line :
Code: [Select]
line 2272/3:    rels = (figure->info->relationships->list).size();
was just storing the size of the list as 'rels' to loop through in the next loop, but I forgot to use 'rels' and just used '(figure->info->relationships->list).size()' again.

That loop tallies the number of characters which the unit feels are friends, aquaintances, and theoretically "bullies" and "heroes" but I never seen those. The relations are indicated in the brown description text, eg.  Frd0:4  ,means 0 friends, 4 aquaintances. I think its a useful detail, once the player notices it and figures out what it means.

So its curious that just removing line 2272 stops crashes, since the loop with the offending pointer should still run sometime. The loop should run when " if (figure->info->relationships) " is true, but should crash now when it does run, so relationships doesn't seem to be at 'figure->info->' anymore. hmmm
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Nilsolm on March 17, 2020, 12:16:34 pm
I noticed as well that size() is called again in the loop, but for some reason, it doesn't cause a segfault. I don't really know why, but then again, my C++ is rusty, to put it nicely.

Relationships are still where they used to be I believe, but relationship types seem to have changed. Some new ones were introduced in 47.01. The relationship counter in the game is working, more or less; it doesn't appear to properly count the number of friends. I have a dwarf with 44 acquaintances, 2 friends and 2 close friends, but the Kloker screen displays Frd0:48.  So that part of the code needs to be fiddled with a bit more.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 17, 2020, 03:07:25 pm
hmmm, I think you might still be on the old xml where 'hf_visual' is still 'list'. Then the 'rels =...' could crash on units which have a historical figure id but dont have 'info->relationships'. The relationship-attitude tally loop only runs after a check that 'info->relationships' exist. Its a minor feature anyway.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: lethosor on March 17, 2020, 03:42:57 pm
hmmm, I think you might still be on the old xml where 'hf_visual' is still 'list'. Then the 'rels =...' could crash on units which have a historical figure id but dont have 'info->relationships'. The relationship-attitude tally loop only runs after a check that 'info->relationships' exist. Its a minor feature anyway.

If an XML field got renamed, then the plugin simply wouldn't compile at all - the only way I could think of that a crash could occur is if two fields' names got swapped, and a field that the plugin thinks is never null is now null sometimes. (Of course, I may be misunderstanding; if you think an XML change broke things, I could try to give better advice if you have a link to that change.)
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 17, 2020, 06:01:37 pm
Sorry, my confusion - Nilsolm mentioned he'd already changed `list` to `hf_visual`
The line `rels = (figure->info->relationships->hf_visual).size();` was likely crashing because it was before the check that `figure->info->relationships` exists. The loop that reads `figure->info->relationships->hf_visual` is after a check.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: LordBalkan on March 18, 2020, 07:39:06 am
Definitely - I feel its feature complete now so updating should not be a big problem. Im away from my linux machine so can only do windows compiles at the moment. Which version are you needing the 44.12. r3 ? or the latest 47 beta? If we could get dfhack to pull kloker then it will just be available with dfhack. That would be ideal.

Nice! Was also away from internet for a couple days, but I'm kindly asking for a Kloker update to 47.XX version.
Since ToadOne said that 47.04 was the last and definitive release before Premium Steam Version, I guess that there will be no major changes until the great release.
I'm not much of a developer myself so I don't know if those last posts were about it.

But thankyou again in advance for this amazing mod :D
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on March 18, 2020, 05:56:26 pm
I appreciate your interest LordBalkan. In the last posts Nilsolm has almost updated Kloker for linux df/hack 47.03.. so I shouldn't take more than a week, to find a couple of hours to do a windows compile...
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Nilsolm on March 20, 2020, 06:02:07 am
Right, sorry, I've been a bit busy the last few days. I have a working Linux build. Here (https://my.pcloud.com/publink/show?code=XZHVR9kZ7BvB4Fv6wR7EsoWo72Mmk8Wg1fyy) is the link again. The only caveat is, as I mentioned, that the friendship counter doesn't work as expected, but there shouldn't be any crashes anymore.


As for Windows, that might be a bit more complicated as I don't have access to a Windows computer at the moment. I see if I can cross-compile DFHack on Linux for Windows somehow.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on April 23, 2020, 11:19:39 am
Sorry about this, Ive been stuck on a mountainside with no wifi but Ill get compiles out asap ...
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Stakud on May 28, 2020, 03:10:45 am
I love kloker, and I too would love to see it compiled for 47.04. I'm wishing I could compile it myself...
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on May 31, 2020, 06:11:19 am
Hiya Stakud, here goes :D
> Latest Kloker for windows 64bit DF+DFhack 47 04 (https://github.com/strainer/cavekeeperdf/tree/master/build/compile_archive_df47/win64_dfhack_47.04r1)

This compile was powered by a small solar panel as I've been "locked down" in a tent on a somewhat remote mountainside, it would make a good fortress embark - in a nearby stream I found Limonite !

Thanks for the help Nilsolm, I added the new skill "Intrigue / Schemer" that you commited to legacy manipulator too . The relations counts seem to be working as roughly as they ever did.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Maxinova on June 02, 2020, 02:06:47 pm
Hi everyone !

This plugin seems awesome. I just tried to use it on windows 10 64bits with your compile but I keep getting an error:

(https://i.postimg.cc/7PFcbz7w/Manipulator-problem.png)

It can be translated into : ".dll is either not designed to run on Windows or it contains an error."

Is there a problem with the compile or is it my game that is broken ?
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on June 02, 2020, 05:42:19 pm
It's probably my Visual Studio setup is not configured properly for Win 10 sorry. This article (http://www.errorlive.com/error-code-0xc000012f) on the error code 0xc000012f says that installing the VS redistributables can fix the problem.  I'm currently asking DFhack to take the plugin in so that it can get compiled and distributed properly ...
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Quietust on June 03, 2020, 11:20:43 am
It's probably my Visual Studio setup is not configured properly for Win 10 sorry. This article (http://www.errorlive.com/error-code-0xc000012f) on the error code 0xc000012f says that installing the VS redistributables can fix the problem.  I'm currently asking DFhack to take the plugin in so that it can get compiled and distributed properly ...

Personally, I don't trust sites like that, because they often don't know what they're talking about (and often exist solely to trick you into installing their special "system cleaner" crapware).

According to MSDN, error 0xC000012F is STATUS_INVALID_IMAGE_NOT_MZ (The specified image file did not have the correct format: it did not have an initial MZ), and it usually means that the DLL is corrupted. Are you sure you downloaded the correct version and installed it correctly?

On a side note, the download link you posted above is malformed - this (https://github.com/strainer/cavekeeperdf/tree/master/build/compile_archive_df47/win64_dfhack_47.04r1) should work better.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on June 03, 2020, 11:45:35 am
Thanks for fixing the link Quietus. The VC redistributable fix/hack seemed plausible as I remember when I installed Visual Studio, my non-commercial installation config on old win 7 laptop did not seem to have complete support for compiling to win10. Oh well.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: bwbill on August 01, 2020, 12:09:45 am
Many thanks to those posting compiles!

Any love for 0.47.04 on Linux? (I'm trying to use McArcady's unofficial pack (https://dffd.bay12games.com/file.php?id=15054). It has DFHack 0.47.04-beta1.)

I can't really play without Kloker anymore...

Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: rmblr on August 01, 2020, 02:24:25 pm
I've gotten kloker compiled on linux using  McArcady's lnp-forge: https://github.com/McArcady/lnp-forge

It is pretty straightforward:

1. Get lnp-forge working and producing a build
2. Download kloker.cpp from github  (https://github.com/strainer/cavekeeperdf/tree/master/plugins) and place it in .build/src/dfhack/plugins (starting from your lnp-forge folder).
3. Edit .build/src/dfhack-0.47.04-r1/plugins/CMakeLists.custom.txt, and add the line
Code: [Select]
dfhack_plugin(kloker kloker.cpp)4. Run ./bin/lnp-forge build again
5. Download dfkeeper_pallete.txt from the kloker github into .build/src/lnp-0.14a/df_47_04_linux
6. Delete the file
Code: [Select]
.build/src/lnp-0.14a/df_47_04_linux/hack/plugins/manipulator.plug.so7. Run the pack from .build/src/lnp-0.14a/startlnp.sh .. open a game
8. Open units menu 'u' -> 'k' for kloker
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: bwbill on August 01, 2020, 11:43:51 pm
I've gotten kloker compiled on linux <snip>
It is pretty straightforward: <snip>

Thank you, rmblr! This is way better than a binary and I'm excited to learn to roll my own with lnp-forge.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: rmblr on August 02, 2020, 05:41:15 am
Yea, considering that Linux Pack's aren't released regularly (no fault of anyones!) it's great that McArcady has created lnp-forge which lets us build our own.

If you need any help with lnp-forge, check out the post: http://www.bay12forums.com/smf/index.php?topic=157712

If you're on Ubuntu/debian/linux mint or Fedora it should be possible to get going just following the docs.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Jazz Cat on October 07, 2020, 08:09:46 pm
Any updates on a 47.04 on Linux? I'm using a build I made through the LNP-forge and it's been giving me crashes.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: lethosor on October 07, 2020, 09:50:25 pm
Any updates on a 47.04 on Linux? I'm using a build I made through the LNP-forge and it's been giving me crashes.
If the plugin loads, then you built it correctly - the source code hasn't changed recently, so any crashes likely aren't 0.47.04-specific.

Is there anything specific that you're doing when it crashes? If you have GDB installed and know how to use it, you could start DFHack with "./dfhack -g" to run it under GDB, which would give you a more detailed error report when a crash happens.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Jazz Cat on October 08, 2020, 01:51:07 pm
I'm unfamiliar with GBD, but it crashes when I move the cursor over specific dwarves (I have them nicknamed `CRASH ALERT'). Both problem dwarves right now were children when they came to my fort, although one is now 13 and has grown into a peasant.

I'm using DFHack 0.47.04-r1, if that helps.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: lethosor on October 08, 2020, 07:32:09 pm
Interesting. By "cursor" are you referring to the selected dwarf in the Kloker screen, the 'v' cursor in the main fortress mode screen, or something else? If it's outside of the Kloker screen, does the issue persist if you unload the plugin with "unload kloker"?
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Jazz Cat on October 09, 2020, 01:14:31 am
Within the Kloker screen, I mean. The 'highlighted' dwarf.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Blazeguard on December 14, 2020, 08:41:44 pm
I just stumbled across this mod.  Any chance that it will be updated for the latest release 47.04 r10?
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: otrapersona on December 18, 2020, 11:25:32 pm
it'd be nice if more updates were provided for people who can't computer (and compile it) like me, this seems excellent, I don't enjoy alt-tabbing to the therapist
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Jazz Cat on December 30, 2020, 11:40:36 pm
Strainer's usually pretty good about updating this, they're probably locked down somewhere they can't compile it.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: bwbill on April 02, 2021, 04:57:24 pm
I've gotten kloker compiled on linux using  McArcady's lnp-forge: https://github.com/McArcady/lnp-forge

It is pretty straightforward:

1. Get lnp-forge working and producing a build
2. Download kloker.cpp from github  (https://github.com/strainer/cavekeeperdf/tree/master/plugins) and place it in .build/src/dfhack/plugins (starting from your lnp-forge folder).
3. Edit .build/src/dfhack-0.47.04-r1/plugins/CMakeLists.custom.txt, and add the line
Code: [Select]
dfhack_plugin(kloker kloker.cpp)4. Run ./bin/lnp-forge build again
5. Download dfkeeper_pallete.txt from the kloker github into .build/src/lnp-0.14a/df_47_04_linux
6. Delete the file
Code: [Select]
.build/src/lnp-0.14a/df_47_04_linux/hack/plugins/manipulator.plug.so7. Run the pack from .build/src/lnp-0.14a/startlnp.sh .. open a game
8. Open units menu 'u' -> 'k' for kloker

I'm back! What a long road it's been, but I achieved my goal finally today, and Kloker is working on 0.47.05-r1.

Addenda to the steps above, from my lessons learned:Thanks again, rmblr and project contributors! Happy here.
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: McArcady on April 05, 2021, 01:28:00 pm
I'm unfamiliar with GBD, but it crashes when I move the cursor over specific dwarves (I have them nicknamed `CRASH ALERT'). Both problem dwarves right now were children when they came to my fort, although one is now 13 and has grown into a peasant.
I'm using DFHack 0.47.04-r1, if that helps.

Bug reproduced with DFHack 0.47.05-r1 debug symbols:
Code: [Select]
[DFHack]#
          Thread 3 "Dwarf_Fortress" received signal SIGABRT, Aborted.
                                                                     [Switching to Thread 0x7ffff158a700 (LWP 704)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff67487bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff6733535 in __GI_abort () at abort.c:79
#2  0x00007ffff6cf9983 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff6cff8c6 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff6cff901 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff6cffb34 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff6cfb845 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x00007ffff6d3f028 in  () at /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#8  0x00007ffff08594e0 in std::string::resize(unsigned long) (__n=18446744073709551569, this=0x7ffff15874b8)
    at /usr/include/c++/8/bits/basic_string.h:3873
#9  0x00007ffff08594e0 in viewscreen_unitklokerst::printScripts(UnitInfo*) (this=<optimized out>, cur=<optimized out>)
    at ../plugins/kloker.cpp:6172
#10 0x00007ffff085f438 in viewscreen_unitklokerst::render() (this=0x7fffed628760) at ../plugins/kloker.cpp:5856
#11 0x00007ffff6e4b2f6 in render_things() () at /tmp/lnp-iDtrcA/df_47_05_linux/libs/libgraphics.so
#12 0x00007ffff6e3a407 in enablerst::async_loop() () at /tmp/lnp-iDtrcA/df_47_05_linux/libs/libgraphics.so
#13 0x00007ffff6e3a4e0 in call_loop(void*) () at /tmp/lnp-iDtrcA/df_47_05_linux/libs/libgraphics.so
#14 0x00007ffff744af28 in  () at /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
#15 0x00007ffff748a0d9 in  () at /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0
#16 0x00007ffff6661fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#17 0x00007ffff680a4cf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)

[EDIT] bugfix available in my DFHack fork, branch kloker-for-0-47-05-r1 (https://github.com/McArcady/dfhack/tree/kloker-for-0-47-05-r1/plugins)
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on July 31, 2021, 09:08:02 pm
Hey Thanks McArcady for the bugfix and including kloker in the Linux pack ! I was really pleased to see this. And sorry Jazz Cat for leaving you with that bug. And thankyou lethosor and bwbill for the help posts!

I went volunteering on a farm before lockdown, then ended up isolated in the scottish mountains with a herd of hungry goats :o I had no time to play DF but came across some limonite out there - it would have made a great embark! Not to mention the goat materials, but alas they were all assigned as pets.

I am trying to get back into a bit of programming soon and will try to arrange an up-to-date windows compile before so long. Cheers !
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Jazz Cat on August 05, 2021, 03:49:57 pm
Man, that sounds like a wild ride! Was there any flux to go with your limonite?
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on August 05, 2021, 06:26:46 pm
Maybe :) there is a mysterious white powdery rock. Lots of variety that are mysterious to me, and a bright orange ferric sludge oozes out of the ground in places and tans the rocks in mountain streams.
I have had some epic adventures considering - I started enhancing manipulator a couple of years ago while stuck in a little boxroom because I couldn't see well enough to use therapist, even with massive DPI. it seemed my goat chasing days were up, but a wonderful eye surgeon fixed me up and I went 'woofing' abroad (working-on-organic-farms). Its been chaotic with some dwarfish FUN! This one farm has a little indestructable pickaxe which is awesomely helpful for certain tasks. In many years before playing dwarf fortress I had never come across or had want for a little pickaxe, now I find myself thinking "this situation calls for the pickaxe!" XD

At the moment I am living cheap in a little tent with a light solar panel, on a secluded hebridean coast. Compiling DFHack might empty my 100wh battery, and I have another project on the go too so I've updated kloker source a bit, but have to work out how to compile it efficiently. Shouldn't take too long ...
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on August 14, 2021, 05:08:45 pm
Thanks to player Tigew here is a Windows compile for the latest DF 47.05-r2  :D :D

Windows 45.05-r2 Kloker at bay12 filedepot (https://dffd.bay12games.com/file.php?id=15639)

( kloker.plug.dll can just be placed in directory [DFgameRoot]/hack/plugins/ and in the file [DFgameRoot]/dfhack.init add the line "enable kloker" to have it run in the game )
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: Symmetry on December 15, 2022, 09:05:50 am
Hi, just wanted to say how much I'm missing this tool in the steam version and I hope you'll be able to work on updating it to the new dfhack whenever that becomes available.
It's better than therapist for me, it's nice to have this management inside the game.

And if you don't have time to update it, thanks for making it in the first place.  it's been great
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on December 17, 2022, 06:47:39 pm
Thanks for the bump Symmetry and the kind words  : D I have been extending my code editor, which gets a bit 'meta' - programing just to program better.

I will catch up on dwarf fortress and kloker soon.
The last features I got working were I think, opening characters from the map, and autolabor integration in the professions screen. I was surprised and pleased to get that far, after lots of smaller tweaks. Hopefuly they work smoothly, I didnt get to play them much. I will have a play in the holidays and see about updating kloker and having a fresh go at sending back to the DFHackership : )
Title: Re: Kloker was Cavern Keeper was Manipulator. Detailed and automatic labor control.
Post by: strainer on December 21, 2022, 03:37:59 pm
I'm missing this tool in the steam version

Surprisingly - DFHack doesn't look a million miles away from getting onto the steam version. I should see if theres anything I can do ...