The Librarian is a script for viewing the contents of your library (actually everything present in the Stocks screen).
The scripts provides 5 views of the works:
- Main view: Everything. It can be filtered on category and whether works have any references.
- Scientific view: Indicator of which scientific topics the works cover, as well as listing of works per category.
- Values view: As the scientific view, but for values, with all values/strength combinations accessible.
- Authors view: Lists all your authors who have works in the fortress, as well as those works.
- Interactions view: Show all works containing interactions (i.e. The Secret of Life and Death in vanilla).
- The scientific and Values views also lists all works outside of the fortress in the selected category, which might give you ideas for which works to try to "acquire"...
- All pages also provide some basic details on the currently selected work, and in the case of a local work, also a further list of all the actual books (there may be multiple copies) with a number of their flags (Original/Copy, Forbidden, Dump, Trader, and In Inventory), with the ability to toggle the Forbidden, Dump, and Trader flags.
- A 'zoom to book' command allows you to go to a particular book location in the fortress. Note that this sub view is not intended to be playable, as there are known issued with that, which implies there are probably unknown ones as well. Return to The Librarian with the 'O'ok! command when done looking around.
The script can be found on this web page:
https://github.com/PatrikLundell/scripts/blob/own_scripts/librarian.lua. The script section of the script is copied into a "text" file as <DF>\hack\scripts\librarian.lua. This can be done either by using the "raw" selection of the page and then "save as" of the page, or through copy & paste of the script section of the page. The script is invoked from the DFHack console by typing "librarian" (without the quotes) when a fortress is active. The script is dismissed with <ESC>.
Revision History:
0.21: 2023-04-30: 0.20 was based on an old version. 0.21 is based on 0.19, with (hopefully) the same changes. Same limited testing.
0.20: 2023-04-30: Changed to Premium release. The Help key doesn't work (no keyboard support). Limited testing.
0.19: 2020-08-03: Fixed bug causing the script to blow up when no interaction books are present.
0.18: 2020-07-17: Added a crude interactions view (Secrets of Life and Death), and handled added NONE value to the Values enum.
0.17 2020-05-24: Added some info to some additional referenced contents. Introduced wrapping for Detailed lines too long to fit on the screen so they continue on subsequent lines.
0.16 2020-05-23: Adapted to changed field names.
0.15 2019-01-22: Added slightly more info for Interactions (i.e. secrets of life and death), and worked around a reference to a non existent vector index.
0.14 2018-07-14: Fixed bug indexing values.
0.13 2018-07-12: Address bug caused by entity of unknown race.
0.12 2018-05-22: Fixed bug when no authors are available.
0.11 2018-05-05: Added category counts and fixed a bug.
0.10 2018-04-28: Added a 'zoom to book' functionality.
0.9 2018-04-27. First version in this thread.
Meph has created a Librarian's Office to allow role playing to open The Librarian as well as Legends Mode in game. The workshop is described here:
http://www.bay12forums.com/smf/index.php?topic=170462.msg7805879#msg7805879.
Note that opening Legends Mode should be done with care. Save the game before opening Legends Mode and kill DF (e.g. with the DFHack "die" command) when done, as there are still potential fatal save game corruption issues with opening Legends Mode from Fortress Mode.
This first post is intended to be updated when/if the functionality changes to reflect the current functionality without any particular change markers beyond the revision history.