From 1403bb126c65053e9d430a5876dd6d2ac50a2361 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Thu, 20 Sep 2012 15:38:58 +0400 Subject: README: move keybinding to the start and add a section for scripts. --- Readme.html | 565 ++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 317 insertions(+), 248 deletions(-) (limited to 'Readme.html') diff --git a/Readme.html b/Readme.html index fcf7dab6..977c4177 100644 --- a/Readme.html +++ b/Readme.html @@ -4,7 +4,7 @@
-DFHack is a Dwarf Fortress memory access library and a set of basic tools that use it. Tools come in the form of plugins or (not yet) external tools. It is an attempt to unite the various ways tools @@ -326,13 +326,16 @@ access DF memory and allow for easier development of new tools.
Contents
The project is currently hosted on github, for both source and binaries at http://github.com/peterix/dfhack
Releases can be downloaded from here: https://github.com/peterix/dfhack/downloads
All new releases are announced in the bay12 thread: http://tinyurl.com/dfhack-ng
DFHack works on Windows XP, Vista, 7 or any modern Linux distribution. OSX is not supported due to lack of developers with a Mac.
Currently, versions 0.34.08 - 0.34.11 are supported. If you need DFHack @@ -572,7 +578,7 @@ for older versions, look for older releases.
It is possible to use the Windows DFHack under wine/OSX.
Installing DFhack involves copying files into your DF folder. Copy the files from a release archive so that:
@@ -594,7 +600,7 @@ remove the other DFHack files file created in your DF folder.
DFHack basically extends what DF can do with something similar to the drop-down console found in Quake engine games. On Windows, this is a separate command line window. On linux, the terminal used to launch the dfhack script is taken over @@ -618,7 +624,7 @@ they are re-created every time it is loaded.
Most of the commands come from plugins. Those reside in 'hack/plugins/'.
First, don't panic :) Second, dfhack keeps a few log files in DF's folder
- stderr.log and stdout.log. You can look at those and possibly find out what's
happening.
@@ -627,11 +633,55 @@ the issues tracker on github, contact me (
- If your DF folder contains a file named dfhack.init, its contents will be run
+ If your DF folder contains a file named dfhack.init, its contents will be run
every time you start DF. This allows setting up keybindings. An example file
-is provided as dfhack.init-example - you can tweak it and rename to dfhack.init
+is provided as dfhack.init-example - you can tweak it and rename to dfhack.init
if you want to use this functionality. To set keybindings, use the built-in keybinding command. Like any other
+command it can be used at any time from the console, but it is also meaningful
+in the DFHack init file. Currently it supports any combination of Ctrl/Alt/Shift with F1-F9, or A-Z. Possible ways to call the command: The <key> parameter above has the following case-sensitive syntax: where the KEY part can be F1-F9 or A-Z, and [] denote optional parts. When multiple commands are bound to the same key combination, DFHack selects
+the first applicable one. Later 'add' commands, and earlier entries within one
+'add' command have priority. Commands that are not specifically intended for use
+as a hotkey are always considered applicable. The context part in the key specifier above can be used to explicitly restrict
+the UI state where the binding would be applicable. If called without parameters,
+the keybinding command among other things prints the current context string.
+Only bindings with a context tag that either matches the current context fully,
+or is a prefix ending at a '/' boundary would be considered for execution, i.e.
+for context foo/bar/baz, possible matches are any of @foo/bar/baz, @foo/bar,
+@foo or none.The init file
-The init file
+Setting keybindings
+
+
+
+keybinding list <key>:
+ List bindings active for the key combination.
+
+keybinding clear <key> <key>...:
+ Remove bindings for the specified keys.
+
+keybinding add <key> "cmdline" "cmdline"...:
+ Add bindings for the specified
+key.
+
+keybinding set <key> "cmdline" "cmdline"...:
+
+ Clear, and then add bindings for
+the specified key.
+
+[Ctrl-][Alt-][Shift-]KEY[@context]
+
+
Manages DFHack keybindings.
-Currently it supports any combination of Ctrl/Alt/Shift with F1-F9, or A-Z.
-| keybinding list <key>: | |
|---|---|
| List bindings active for the key combination. | -|
| keybinding clear <key> <key>...: | |
| Remove bindings for the specified keys. | -|
| keybinding add <key> "cmdline" "cmdline"...: | |
| Add bindings for the specified -key. | -|
| keybinding set <key> "cmdline" "cmdline"...: | |
| Clear, and then add bindings for -the specified key. | -|
When multiple commands are bound to the same key combination, DFHack selects -the first applicable one. Later 'add' commands, and earlier entries within one -'add' command have priority. Commands that are not specifically intended for use -as a hotkey are always considered applicable.
-Allows adding magma, water and obsidian to the game. It replaces the normal dfhack command line and can't be used from a hotkey. Settings will be remembered as long as dfhack runs. Intended for use in combination with the command @@ -1355,13 +1373,13 @@ temperatures (creating heat traps). You've been warned.
Run the liquid spawner with the current/last settings made in liquids (if no settings in liquids were made it paints a point of 7/7 magma by default).
Intended to be used as keybinding. Requires an active in-game cursor.
This command lets you see and change the game mode directly. Not all combinations are good for every situation and most of them will produce undesirable results. There are a few good ones though.
@@ -1380,11 +1398,11 @@ You just created a returnable mountain home and gained an adventurer.I take no responsibility of anything that happens as a result of using this tool
A tool for getting rid of trees and shrubs. By default, it only kills a tree/shrub under the cursor. The plants are turned into ashes instantly.
-If called during the embark selection screen, displays an estimate of layer stone availability. If the 'all' option is specified, also estimates veins. The estimate is computed either for 1 embark tile of the blinking biome, or for all tiles of the embark rectangle.
After you have a pattern set, you can use 'expdig' to apply it again.
A command for easy designation of filled and hollow circles. It has several types of options.
One convenient way to use the zone tool is to bind the command 'zone assign' to a hotkey, maybe also the command 'zone set'. Place the in-game cursor over a pen/pasture or pit, use 'zone set' to mark it. Then you can select units @@ -2077,7 +2095,7 @@ and use 'zone assign' to assign them to their new home. Allows pitting your own dwarves, by the way.
All filters can be used together with the 'assign' command.
Restrictions: It's not possible to assign units who are inside built cages or chained because in most cases that won't be desirable anyways. @@ -2095,14 +2113,14 @@ are not properly added to your own stocks; slaughtering them should work).
Most filters can be negated (e.g. 'not grazer' -> race is not a grazer).
Using the 'nick' command you can set the same nickname for multiple units. If used without 'assign', 'all' or 'count' it will rename all units in the current default target zone. Combined with 'assign', 'all' or 'count' (and further optional filters) it will rename units matching the filter conditions.
Using the 'tocages' command you can assign units to a set of cages, for example a room next to your butcher shop(s). They will be spread evenly among available cages to optimize hauling to and butchering from them. For this to work you need @@ -2112,8 +2130,8 @@ all cages you want to use. Then use 'zone set' (like with 'assign') and use would make no sense, but can be used together with 'nick' or 'remnick' and all the usual filters.
Assigns unpastured female egg-layers to nestbox zones. Requires that you create pen/pasture zones above nestboxes. If the pen is bigger than 1x1 the nestbox must be in the top left corner. Only 1 unit will be assigned per pen, regardless @@ -2149,8 +2167,8 @@ to a 1x1 pasture is not a good idea. Only tame and domesticated own units are processed since pasturing half-trained wild egglayers could destroy your neat nestbox zones when they revert to wild. When called without options autonestbox will instantly run once.
-You want to keep max 7 kids (4 female, 3 male) and max 3 adults (2 female, 1 male) of the race alpaca. Once the kids grow up the oldest adults will get slaughtered. Excess kids will get slaughtered starting with the youngest @@ -2266,7 +2284,7 @@ autobutcher unwatch ALPACA CAT
Automatically manage dwarf labors.
When enabled, autolabor periodically checks your dwarves and enables or disables labors. It tries to keep as many dwarves as possible busy but @@ -2292,8 +2310,59 @@ while it is enabled.
For detailed usage information, see 'help autolabor'.
Lua or ruby scripts placed in the hack/scripts/ directory are considered for +execution as if they were native DFHack commands. They are listed at the end +of the 'ls' command output.
+Note: scripts in subdirectories of hack/scripts/ can still be called, but will +only be listed by ls if called as 'ls -a'. This is intended as a way to hide +scripts that are obscure, developer-oriented, or should be used as keybindings.
+Some notable scripts:
+If called in dwarf mode, makes DF immediately auto-save the game by setting a flag +normally used in seasonal auto-save.
+Run setfps <number> to set the FPS cap at runtime, in case you want to watch +combat in slow motion or something :)
+Scripts in this subdirectory fix various bugs and issues, some of them obscure.
+fix/dead-units
+Removes uninteresting dead units from the unit list. Doesn't seem to give any +noticeable performance gain, but migrants normally stop if the unit list grows +to around 3000 units, and this script reduces it back.
+fix/population-cap
+Run this after every migrant wave to ensure your population cap is not exceeded. +The issue with the cap is that it is compared to the population number reported +by the last caravan, so once it drops below the cap, migrants continue to come +until that number is updated again.
+fix/stable-temp
+Instantly sets the temperature of all free-lying items to be in equilibrium with +the environment and stops temperature updates. In order to maintain this efficient +state however, use tweak stable-temp and tweak fast-heat.
+fix/item-occupancy
+Diagnoses and fixes issues with nonexistant 'items occupying site', usually +caused by autodump bugs or other hacking mishaps.
+Scripts that implement dialogs inserted into the main game window are put in this +directory.
+Instantly grow seeds inside farming plots.
With no argument, this command list the various seed types currently in use in your farming plots. @@ -2305,7 +2374,7 @@ growcrops plump 40
This script remove negative thoughts from your dwarves. Very useful against tantrum spirals.
With a selected unit in 'v' mode, will clear this unit's mind, otherwise @@ -2318,7 +2387,7 @@ you unpause.
it removed.Kills any unit of a given race.
With no argument, lists the available races.
With the special argument 'him', targets only the selected creature.
@@ -2344,7 +2413,7 @@ slayrace elve magmaCreate an infinite magma source on a tile.
This script registers a map tile as a magma source, and every 12 game ticks that tile receives 1 new unit of flowing magma.
@@ -2360,11 +2429,11 @@ To remove all placed sources, call magmasource stopThese tools work by displaying dialogs or overlays in the game window, and are mostly implemented by lua scripts.
Implemented by the manipulator plugin. To activate, open the unit screen and press 'l'.
This tool implements a Dwarf Therapist-like interface within the game UI. The @@ -2398,14 +2467,14 @@ cursor onto that cell instead of toggling it.
Pressing ESC normally returns to the unit screen, but Shift-ESC would exit directly to the main dwarf mode screen.
Implemented by the gui/liquids script. To use, bind to a key and activate in the 'k' mode.
While active, use the suggested keys to switch the usual liquids parameters, and Enter to select the target area and apply changes.
Implemented by the gui/mechanims script. To use, bind to a key and activate in the 'q' mode.
Lists mechanisms connected to the building, and their links. Navigating the list centers the view on the relevant linked buildings.
@@ -2414,14 +2483,14 @@ focus on the current one. Shift-Enter has an effect equivalent to pressing Enter re-entering the mechanisms ui.Front-end to the power-meter plugin implemented by the gui/power-meter script. Bind to a key and activate after selecting Pressure Plate in the build menu.
The script follows the general look and feel of the regular pressure plate build configuration page, but configures parameters relevant to the modded power meter building.
Backed by the rename plugin, the gui/rename script allows entering the desired name via a simple dialog in the game ui.
The building or unit are automatically assumed when in relevant ui state.
Implemented by the gui/room-list script. To use, bind to a key and activate in the 'q' mode, either immediately or after opening the assign owner page.
The script lists other rooms owned by the same owner, or by the unit selected in the assign list, and allows unassigning them.
Front-end to the siege-engine plugin implemented by the gui/siege-engine script. Bind to a key and activate after selecting a siege engine in 'q' mode.
The main mode displays the current target, selected ammo item type, linked stockpiles and @@ -2468,14 +2537,14 @@ e.g. like making siegers bring their own, are something only Toady can do.
These plugins detect certain structures in RAWs, and enhance them in various ways.
The steam-engine plugin detects custom workshops with STEAM_ENGINE in their token, and turns them into real steam engines.
The vanilla game contains only water wheels and windmills as sources of power, but windmills give relatively little power, and water wheels require flowing water, which must either be a real river and thus immovable and @@ -2486,7 +2555,7 @@ it can be done just by combining existing features of the game engine in a new way with some glue code and a bit of custom logic.
The workshop needs water as its input, which it takes via a passable floor tile below it, like usual magma workshops do. The magma version also needs magma.
@@ -2504,7 +2573,7 @@ This also means that engines cannot be chained without intermediate short axles that can be built later than both of the engines.In order to operate the engine, queue the Stoke Boiler job (optionally on repeat). A furnace operator will come, possibly bringing a bar of fuel, and perform it. As a result, a "boiling water" item will appear @@ -2529,7 +2598,7 @@ decrease it by further 4%, and also decrease the whole steam use rate by 10%.
The engine must be constructed using barrel, pipe and piston from fire-safe, or in the magma version magma-safe metals.
During operation weak parts get gradually worn out, and @@ -2538,7 +2607,7 @@ toppled during operation by a building destroyer, or a tantruming dwarf.
It should be safe to load and view engine-using fortresses from a DF version without DFHack installed, except that in such case the engines won't work. However actually making modifications @@ -2549,7 +2618,7 @@ being generated.
This plugin makes reactions with names starting with SPATTER_ADD_ produce contaminants on the items instead of improvements.
Intended to give some use to all those poisons that can be bought from caravans.
-- cgit v1.2.1