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.
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).
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
/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
[DFHack]# ./dfhack: line 15: 98260 Segmentation fault: 11 DYLD_INSERT_LIBRARIES=./hack/libdfhack.dylib ./dwarfort.exe "$@"
I just caused plenty of crashes with CK in development
Its a broad kind crash which i dont recall CK generating before.
If I said Id causes plenty of kinds of crashes, they'd disagree :PThe 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).
You could call the "keep" column something like "happiness" or "relaxation" or "contentment."
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.
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;
}
Is there a way to jump to a dwarf in keeper from the (v)iew mode?
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:That message is harmless, actually (it's just related to the fact that a non-df screen was open).I can provide a save if needed.Spoiler (click to show/hide)
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.
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?
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...
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.
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.
#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
save_kloker_config :837
and 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. 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; }
}
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.Code: [Select]config_kloker.ival(7) = happy_label_seed;
line 852 ~
config_kloker.ival(6) = happy_label_seed*2 + (show_curse & 1);
line 878 ~
happy_label_seed = config_kloker.ival(6) / 2 ;
show_curse = config_kloker.ival(6) & 1 ;
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 ;
line 2272/3: rels = (figure->info->relationships->list).size();
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.
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.
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 ...
dfhack_plugin(kloker kloker.cpp)
4. Run ./bin/lnp-forge build again.build/src/lnp-0.14a/df_47_04_linux/hack/plugins/manipulator.plug.so
7. Run the pack from .build/src/lnp-0.14a/startlnp.sh .. open a gameI've gotten kloker compiled on linux <snip>
It is pretty straightforward: <snip>
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.
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 lineCode: [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 fileCode: [Select].build/src/lnp-0.14a/df_47_04_linux/hack/plugins/manipulator.plug.so
7. Run the pack from .build/src/lnp-0.14a/startlnp.sh .. open a game
8. Open units menu 'u' -> 'k' for kloker
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.
[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)
I'm missing this tool in the steam version