Stonesense Documentation
repository·master·Indexed 18 days ago
https://github.com/dfhack/stonesenseStonesense is an isometric visualizer for Dwarf Fortress implemented as a plugin for the DFHack toolset. It provides a read-only isometric perspective of the game world, featuring mouse-based navigation, Z-depth adjustment, and screenshot capabilities. The plugin is launched via the 'stonesense' or 'ssense' commands in the DFHack console and can be configured through init.txt.
What's inside Stonesense
- Stonesense is a third-party visualizer for Dwarf Fortress that provides a classic isometric perspective of your world. It is implemented as a plugin for DFHack.
Use Stonesense mouse and view controls
masterStonesense uses hard-coded mouse controls for navigation and depth adjustment:
Control Action Left click Move debug cursor (if available) Right click Recenter screen Scrollwheel Move up and down Ctrl + Scroll Increase/decrease Z depth shown Follow Mode: When follow mode is enabled, the Stonesense view follows the Dwarf Fortress window. You can adjust the offset by holding
Ctrlwhile using the keyboard window movement keys. If cursor follow mode is active, the Stonesense debug cursor will follow the DF keyboard cursor.Take screenshots in Stonesense
masterScreenshots are saved directly to your Dwarf Fortress directory. Use the following key combinations:
Key Combination Action F5Standard screenshot Ctrl + F5Larger screenshot Ctrl + Shift + F5Mega screenshot (full map at full resolution) Note: When taking very large screenshots, you may need to zoom out first. Feedback regarding the screenshot process is printed to the DFHack console.
Launch Stonesense
masterTo open the Stonesense isometric visualizer in a new window, run the following command from the DFHack console:
stonesenseAlternatively, you can use the shorthand command:
ssenseThe viewer window provides read-only access to the game state and can either follow the game view or be moved independently.
stonesenseConfigure Stonesense via init.txt
masterConfiguration options for Stonesense can be pre-set by adding them to yourinit.txtfile. This allows you to define your preferred settings before launching the plugin.Troubleshoot Stonesense errors and performance
masterHigh-detail sprite error
If you receive an error stating that Stonesense cannot load
creatures/large_256/*.png, your video card may not support high-detail sprites. Solutions:- Open
creatures/init.txtand remove the line containing that folder. - Use smaller sprites instead.
Mega screenshot unresponsiveness
Taking a mega screenshot (
Ctrl + Shift + F5) puts the buffer into an invalid state. After a mega screenshot is written to disk, the Stonesense window will become unresponsive. You must close the window and re-runstonesenseto continue.Hardware requirements
- Graphics: Requires working graphics acceleration.
- CPU: A dual-core CPU is recommended to prevent Stonesense from slowing down the main Dwarf Fortress game process.
- Open
Plugin lifecycle and entrypoints
masterStonesense is implemented as a DFHack plugin. It provides the following standard DFHack entrypoints:
plugin_init: Registers thestonesenseandssensecommands.plugin_onupdate: Called every frame by DFHack; currently returnsCR_OKwithout performing actions.plugin_shutdown: Cleans up the plugin by joining the Stonesense event thread and uninstalling the Allegro system.
Use the stonesense DFHack command
masterThe
stonesense(orssense) command launches the Stonesense isometric viewer. It initializes the Allegro graphics library and starts a dedicated event thread for the visualizer.If the command is called while Stonesense is already running, it will notify you and return without starting a new instance.
Arguments:
overlay: (Currently unsupported/commented out in implementation) Intended to enable an overlay mode.[other params]: If parameters other thanoverlayare provided, the plugin attempts to callDumpInfowith those parameters instead of launching the visualizer.
stonesense ssense