diff --git a/CMakeLists.txt b/CMakeLists.txt index 398d8dfb8..173ea571d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ SET(DFHACK_CONSISTENCY 1) set(CPACK_PACKAGE_VERSION_MAJOR "0") set(CPACK_PACKAGE_VERSION_MINOR "5") set(CPACK_PACKAGE_VERSION_PATCH "15") -set(DFHACK_REVISION "dev1") +set(DFHACK_REVISION "1") set(DFHACK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") set(CPACK_PACKAGE_VERSION ${DFHACK_VERSION}) diff --git a/README.rst b/README.rst index 05d841353..b6dfdcd90 100644 --- a/README.rst +++ b/README.rst @@ -23,10 +23,11 @@ binaries at http://github.com/peterix/dfhack Compatibility ============= 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 supported Dwarf Fortress versions are Windows and Linux. +In general, the older DF release you use, the less features will work. +DFHack development is always focused on the latest DF version. Go too +far into the past, and only the most basic tools will work. Windows ======= @@ -125,6 +126,26 @@ dfincremental ============= A simple memory search tool for DF. Requires arcane knowledge ;) +dfgrow +====== +Makes all saplings present on the map grow into trees (almost) instantly. + +dfimmolate +========== +A tool for getting rid of trees and shrubs. By default, it only kills a tree/shrub under the cursor. + +Options: +-------- +-s affect all shrubs on the map +-t affect all trees on the map +-i instead of just instaburning plants to ashes, produce fire. WILL KILL FPS! + +The windows binary releases contain many .bat files that can run the tool with different parameters. + +dfstatus (by enjia2000) +======================= +Runs next to DF and shows some vital statistics of the fort, including food and booze. + dflair ====== Marks all of the map as a lair, preventing item scatter on abandon/reclaim. @@ -172,7 +193,8 @@ Options: -------- -a processes all tiles, even hidden ones. -On windows, it's possible to run dfprsopector-all.bat to process all the tiles without messing with terminal windows. +On windows, it's possible to run dfprospector-all.bat to process all the tiles without messing with terminal windows. +Also on Windos, dfprospector-text.bat will print the output into a file and then show it in a notepad program (whatever opens .txt by default). dfreveal ======== @@ -204,7 +226,7 @@ Running 'dfXvdig' on Windows or using the '-x' parameter will dig stairs between dfveinlook ========== -Simplistic map viewer for linux. Mostly a debug/development thing. +Simplistic map viewer. Mostly a debug/development thing. Now supported on Windows too! dfweather =========== diff --git a/Readme.html b/Readme.html index 8ac641fa2..f218df35f 100644 --- a/Readme.html +++ b/Readme.html @@ -314,7 +314,7 @@ ul.auto-toc {
-

Introduction

+

Introduction

DFHack is a Dwarf Fortress memory access library and a set of basic tools using this library. The library is a work in progress, so things might change as more tools are written for it.

@@ -323,70 +323,78 @@ allow for easier development of new tools.

Contents

-

Getting DFHack

+

Getting DFHack

The project is currently hosted on github, for both source and binaries at http://github.com/peterix/dfhack

-

Compatibility

-

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 supported Dwarf Fortress versions are Windows and Linux.

+

Compatibility

+

DFHack works on Windows XP, Vista, 7 or any modern Linux distribution. +OSX is not supported due to lack of developers with a Mac.

+

In general, the older DF release you use, the less features will work. +DFHack development is always focused on the latest DF version. Go too +far into the past, and only the most basic tools will work.

-

Windows

+

Windows

Note

Windows 2000 is currently not supported due to missing OS @@ -397,36 +405,36 @@ fix it :)

0.31.04 - 0.31.25 SDL

-

Linux

+

Linux

-

Native linux DF

+

Native linux DF

0.31.05 - 0.31.24: spotty support (some things might not work)

0.31.25: full support

-

Windows DF under wine

+

Windows DF under wine

0.31.01 - 0.31.03 legacy

0.31.04 - 0.31.25 SDL

-

Tools

+

Tools

All the DFHack tools are terminal programs. This might seem strange to Windows users, but these are meant mostly as examples for developers. Still, they can be useful and are cross-platform just like the library itself.

-

dfattachtest

+

dfattachtest

Test of the process attach/detach mechanism.

-

dfautodump

+

dfautodump

Automated item dumping tool. All loose items on the floor marked for dumping are insta-dumped to the position of the in-game cursor.

Cursor must be placed on a floor tile. Instadumped items may not show up in the cursor description list until you save/reload.

-

Options:

+

Options:

@@ -439,16 +447,16 @@ show up in the cursor description list until you save/reload.

-

dfcleanmap

+

dfcleanmap

Cleans all the splatter that get scattered all over the map. Only exception is mud. It leaves mud alone.

-

dfcleanowned

+

dfcleanowned

Removes the ownership flag from items. By default, owned food on the floor and rotten items are confistacted and dumped.

@@ -481,37 +489,68 @@ By default, owned food on the floor and rotten items are confistacted and dumped
-

dfcleartask

+

dfcleartask

Items marked for a job can get stuck during a abandon/reclaim. This tool aims to fix that. Best used immediately after a reclaim. Not thoroughly tested, use at your own risk.

-

dfderamp (by zilpin)

+

dfderamp (by zilpin)

Removes all ramps designated for removal from the map. This is useful for replicating the old channel digging designation. It also removes any and all 'down ramps' that can remain after a cave-in (you don't have to designate anything for that to happen).

-

dfdoffsets

+

dfdoffsets

Dumps the offsets for the currently running DF version into the terminal.

-

dfexpbench

+

dfexpbench

Just a simple benchmark of the data export speed.

-

dfflows

+

dfflows

A tool for checking how many liquid tiles are actively checked for flows.

-

dfincremental

+

dfincremental

A simple memory search tool for DF. Requires arcane knowledge ;)

+
+

dfgrow

+

Makes all saplings present on the map grow into trees (almost) instantly.

+
+
+

dfimmolate

+

A tool for getting rid of trees and shrubs. By default, it only kills a tree/shrub under the cursor.

+
+++ + + + + + + + +
+-saffect all shrubs on the map
+-taffect all trees on the map
+-iinstead of just instaburning plants to ashes, produce fire. WILL KILL FPS!
+

The windows binary releases contain many .bat files that can run the tool with different parameters.

+
+
+
+

dfstatus (by enjia2000)

+

Runs next to DF and shows some vital statistics of the fort, including food and booze.

+
-

dflair

+

dflair

Marks all of the map as a lair, preventing item scatter on abandon/reclaim.

-

dfliquids

+

dfliquids

A command prompt for liquid creation and manipulation (the Moses effect included!) Also allows painting obsidian walls directly.

@@ -521,7 +560,7 @@ temperatures (creating heat traps). You've been warned.

-

dfmode

+

dfmode

This tool lets you 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.

@@ -533,22 +572,22 @@ You just lost a fortress and gained an adventurer.

I take no responsibility of anything that happens as a result of using this tool :P

-

dfpause

+

dfpause

Forces DF to pause. This is useful when your FPS drops below 1 and you lose control of the game.

-

dfposition

+

dfposition

Prints the game mode, current DF window properties and cursor position in both local and world coordinates.

-

dfprobe

+

dfprobe

Can be used to determine tile properties like temperature.

-

dfprospector

+

dfprospector

Lists all available minerals on the map and how much of them there is.

-
-

Options:

+
+

Options:

@@ -558,48 +597,49 @@ You just lost a fortress and gained an adventurer.

processes all tiles, even hidden ones.
-

On windows, it's possible to run dfprsopector-all.bat to process all the tiles without messing with terminal windows.

+

On windows, it's possible to run dfprospector-all.bat to process all the tiles without messing with terminal windows. +Also on Windos, dfprospector-text.bat will print the output into a file and then show it in a notepad program (whatever opens .txt by default).

-

dfreveal

+

dfreveal

Reveals the whole map, waits for input and hides it again. If you close the tool while it waits, the map remains revealed.

-

dfunreveal

+

dfunreveal

Hides everything and then only reveals the part of the map accessible from the position of DF's cursor. Place the cursor in open space that you want to keep revealed - this should include the surface world. Can be used to fix maps stuck revealed or hide parts of the fortress blocked off by walls.

-

dfsuspend

+

dfsuspend

Test of the process suspend/resume mechanism. If this doesn't work as expected, it's not safe to use DFHack.

-

dftubefill

+

dftubefill

Fills all the 'candy stores' with 'delicious candy'. No need to fear the clowns. Don't use if you haven't seen the hidden fun stuff yet ;)

-

dfunstuck

+

dfunstuck

Use if you prematurely close any of the tools and DF appears to be stuck. Mostly only needed on Windows.

-

dfvdig

+

dfvdig

Designates a whole vein for digging. Point the cursor at a vein and run this thing :) Running 'dfXvdig' on Windows or using the '-x' parameter will dig stairs between z-levels to follow the veins.

-

dfveinlook

-

Simplistic map viewer for linux. Mostly a debug/development thing.

+

dfveinlook

+

Simplistic map viewer. Mostly a debug/development thing. Now supported on Windows too!

-

dfweather

+

dfweather

Lets you change the current weather to 'clear sky', 'rainy' or 'snowing'. Fill those ponds without mucking around with dfliquids :D Rain can also stop brush fires.

diff --git a/library/include/dfhack/modules/Maps.h b/library/include/dfhack/modules/Maps.h index 9001f6334..0e6f3c2e7 100644 --- a/library/include/dfhack/modules/Maps.h +++ b/library/include/dfhack/modules/Maps.h @@ -176,8 +176,11 @@ namespace DFHack uint16_t unk1; /// material vector index uint32_t mat2; - /// matter state - liquid/solid/etc. - e_matter_state matter_state : 16; + /** + * matter state - liquid/solid/etc. + * @ref e_matter_state + */ + uint16_t matter_state; /// 16x16 array of covering 'intensity' uint8_t intensity[16][16]; /// this is NOT part of the DF vein, but an address of the vein as seen by DFhack. diff --git a/tools/supported/CMakeLists.txt b/tools/supported/CMakeLists.txt index 27397aeb9..26e239b68 100644 --- a/tools/supported/CMakeLists.txt +++ b/tools/supported/CMakeLists.txt @@ -1,5 +1,5 @@ if(NOT DEFINED DFHACK_CONSISTENCY) - MESSAGE(FATAL_ERROR "Please build the whole thing, not parts. You can turn parts on/off using options.") + MESSAGE(FATAL_ERROR "Please build the whole thing, not parts. You can turn parts on/off using options/ccmake during build.") ENDIF() # this is required to ensure we use the right configuration for the system. @@ -9,6 +9,12 @@ ENDIF() # burn trees and shrubs to ashes DFHACK_TOOL(dfimmolate immolate.cpp) +IF(WIN32) + INSTALL( + PROGRAMS dfimmolate-all.bat dfimmolate-fire.bat dfimmolate-shrubs.bat dfimmolate-shrubs-fire.bat dfimmolate-trees.bat dfimmolate-trees-fire.bat + DESTINATION ${DFHACK_BINARY_DESTINATION} + ) +ENDIF() # grow saplings into trees instantly DFHACK_TOOL(dfgrow grow.cpp) @@ -28,7 +34,7 @@ DFHACK_TOOL(dfpause forcepause.cpp) # prospector - produces a list of available materials and their quantities DFHACK_TOOL(dfprospector prospector.cpp) IF(WIN32) - INSTALL(PROGRAMS dfprospector-all.bat DESTINATION ${DFHACK_BINARY_DESTINATION}) + INSTALL(PROGRAMS dfprospector-text.bat dfprospector-all.bat DESTINATION ${DFHACK_BINARY_DESTINATION}) ENDIF() # vdig - dig the vein under the cursor @@ -43,8 +49,7 @@ DFHACK_TOOL(dfcleanmap cleanmap.cpp) # cleanowned - confiscate items owned by dwarves so they can be atomsmashed/reused/etc. DFHACK_TOOL(dfcleanowned cleanowned.cpp) IF(WIN32) - INSTALL(PROGRAMS dfremovelitter.bat DESTINATION ${DFHACK_BINARY_DESTINATION}) - INSTALL(PROGRAMS dfconfiscate.bat DESTINATION ${DFHACK_BINARY_DESTINATION}) + INSTALL(PROGRAMS dfconfiscate.bat dfremovelitter.bat DESTINATION ${DFHACK_BINARY_DESTINATION}) ENDIF() # unstuck - make DF run if something goes wrong with the 'normal' memory access method diff --git a/tools/supported/dfimmolate-all.bat b/tools/supported/dfimmolate-all.bat new file mode 100644 index 000000000..83f66a953 --- /dev/null +++ b/tools/supported/dfimmolate-all.bat @@ -0,0 +1 @@ + dfimmolate.exe -st diff --git a/tools/supported/dfimmolate-fire.bat b/tools/supported/dfimmolate-fire.bat new file mode 100644 index 000000000..41e22feb8 --- /dev/null +++ b/tools/supported/dfimmolate-fire.bat @@ -0,0 +1 @@ +dfimmolate.exe -i diff --git a/tools/supported/dfimmolate-shrubs-fire.bat b/tools/supported/dfimmolate-shrubs-fire.bat new file mode 100644 index 000000000..40fd035c8 --- /dev/null +++ b/tools/supported/dfimmolate-shrubs-fire.bat @@ -0,0 +1 @@ +dfimmolate.exe -si diff --git a/tools/supported/dfimmolate-shrubs.bat b/tools/supported/dfimmolate-shrubs.bat new file mode 100644 index 000000000..5acaa6a5d --- /dev/null +++ b/tools/supported/dfimmolate-shrubs.bat @@ -0,0 +1 @@ +dfimmolate.exe -s diff --git a/tools/supported/dfimmolate-trees-fire.bat b/tools/supported/dfimmolate-trees-fire.bat new file mode 100644 index 000000000..cf046e43c --- /dev/null +++ b/tools/supported/dfimmolate-trees-fire.bat @@ -0,0 +1 @@ +dfimmolate.exe -ti diff --git a/tools/supported/dfimmolate-trees.bat b/tools/supported/dfimmolate-trees.bat new file mode 100644 index 000000000..aa19a6950 --- /dev/null +++ b/tools/supported/dfimmolate-trees.bat @@ -0,0 +1 @@ +dfimmolate.exe -t diff --git a/tools/supported/dfprospector-text.bat b/tools/supported/dfprospector-text.bat new file mode 100644 index 000000000..a11edb59c --- /dev/null +++ b/tools/supported/dfprospector-text.bat @@ -0,0 +1,2 @@ +echo | dfprospector.exe -a > dfprospector_report.txt +@dfprospector_report.txt \ No newline at end of file