Moved dfmode tool to supported, updated readme to include it.

develop
Petr Mrázek 2011-03-07 10:12:27 +01:00
parent 5c32991c40
commit c4964f679d
5 changed files with 55 additions and 30 deletions

@ -134,6 +134,19 @@ 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.
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.
.. admonition:: Example
You are in fort game mode (0 game mode), managing your fortress (0 control mode) and paused.
You switch to the arena game mode, *assume control of a creature* and the switch to adventure game mode(1).
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
Your tool here
==============
Write one ;)

@ -349,26 +349,27 @@ allow for easier development of new tools.</p>
<li><a class="reference internal" href="#dfdoffsets" id="id20">dfdoffsets</a></li>
<li><a class="reference internal" href="#dfcleartask" id="id21">dfcleartask</a></li>
<li><a class="reference internal" href="#dfweather" id="id22">dfweather</a></li>
<li><a class="reference internal" href="#your-tool-here" id="id23">Your tool here</a></li>
<li><a class="reference internal" href="#dfmode" id="id23">dfmode</a></li>
<li><a class="reference internal" href="#your-tool-here" id="id24">Your tool here</a></li>
</ul>
</li>
<li><a class="reference internal" href="#using-the-library-as-a-developer" id="id24">Using the library as a developer</a><ul>
<li><a class="reference internal" href="#contributing-to-dfhack" id="id25">Contributing to DFHack</a><ul>
<li><a class="reference internal" href="#coding-style" id="id26">Coding style</a></li>
<li><a class="reference internal" href="#how-to-get-new-code-into-dfhack" id="id27">How to get new code into DFHack</a></li>
<li><a class="reference internal" href="#layout-for-tools" id="id28">Layout for tools</a></li>
<li><a class="reference internal" href="#modules-what-are-they" id="id29">Modules - what are they?</a></li>
<li><a class="reference internal" href="#dependencies" id="id30">Dependencies</a><ul>
<li><a class="reference internal" href="#current-internal-dependencies" id="id31">Current internal dependencies</a></li>
<li><a class="reference internal" href="#current-external-dependencies" id="id32">Current external dependencies</a></li>
<li><a class="reference internal" href="#build-time-dependencies" id="id33">Build-time dependencies</a></li>
<li><a class="reference internal" href="#using-the-library-as-a-developer" id="id25">Using the library as a developer</a><ul>
<li><a class="reference internal" href="#contributing-to-dfhack" id="id26">Contributing to DFHack</a><ul>
<li><a class="reference internal" href="#coding-style" id="id27">Coding style</a></li>
<li><a class="reference internal" href="#how-to-get-new-code-into-dfhack" id="id28">How to get new code into DFHack</a></li>
<li><a class="reference internal" href="#layout-for-tools" id="id29">Layout for tools</a></li>
<li><a class="reference internal" href="#modules-what-are-they" id="id30">Modules - what are they?</a></li>
<li><a class="reference internal" href="#dependencies" id="id31">Dependencies</a><ul>
<li><a class="reference internal" href="#current-internal-dependencies" id="id32">Current internal dependencies</a></li>
<li><a class="reference internal" href="#current-external-dependencies" id="id33">Current external dependencies</a></li>
<li><a class="reference internal" href="#build-time-dependencies" id="id34">Build-time dependencies</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#memory-offset-definitions" id="id34">Memory offset definitions</a></li>
<li><a class="reference internal" href="#memory-offset-definitions" id="id35">Memory offset definitions</a></li>
</ul>
</div>
</div>
@ -485,13 +486,25 @@ flows.</p>
<p>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.</p>
</div>
<div class="section" id="dfmode">
<h2><a class="toc-backref" href="#id23">dfmode</a></h2>
<p>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.</p>
<div class="admonition-example admonition">
<p class="first admonition-title">Example</p>
<p class="last">You are in fort game mode (0 game mode), managing your fortress (0 control mode) and paused.
You switch to the arena game mode, <em>assume control of a creature</em> and the switch to adventure game mode(1).
You just lost a fortress and gained an adventurer.</p>
</div>
<p>I take no responsibility of anything that happens as a result of using this tool :P</p>
</div>
<div class="section" id="your-tool-here">
<h2><a class="toc-backref" href="#id23">Your tool here</a></h2>
<h2><a class="toc-backref" href="#id24">Your tool here</a></h2>
<p>Write one ;)</p>
</div>
</div>
<div class="section" id="using-the-library-as-a-developer">
<h1><a class="toc-backref" href="#id24">Using the library as a developer</a></h1>
<h1><a class="toc-backref" href="#id25">Using the library as a developer</a></h1>
<p>The library is compilable under Linux with GCC and under Windows with
MinGW32 and MSVC compilers. It is using the cmake build system. See
COMPILE for details.</p>
@ -502,17 +515,17 @@ the dfhack repository is welcome and the right thing to do :)</p>
code does have a lot of comments though (and getting better all the
time).</p>
<div class="section" id="contributing-to-dfhack">
<h2><a class="toc-backref" href="#id25">Contributing to DFHack</a></h2>
<h2><a class="toc-backref" href="#id26">Contributing to DFHack</a></h2>
<p>Several things should be kept in mind when contributing to DFHack.</p>
<div class="section" id="coding-style">
<h3><a class="toc-backref" href="#id26">Coding style</a></h3>
<h3><a class="toc-backref" href="#id27">Coding style</a></h3>
<p>DFhack uses ANSI formatting and four spaces as indentation. Line
endings are UNIX. The files use UTF-8 encoding. Code not following this
won't make me happy, because I'll have to fix it. There's a good chance
I'll make <em>you</em> fix it ;)</p>
</div>
<div class="section" id="how-to-get-new-code-into-dfhack">
<h3><a class="toc-backref" href="#id27">How to get new code into DFHack</a></h3>
<h3><a class="toc-backref" href="#id28">How to get new code into DFHack</a></h3>
<p>You can send patches or make a clone of the github repo and ask me on
the IRC channel to pull your code in. I'll review it and see if there
are any problems. I'll fix them if they are minor.</p>
@ -522,7 +535,7 @@ this is also a good place to dump new ideas and/or bugs that need
fixing.</p>
</div>
<div class="section" id="layout-for-tools">
<h3><a class="toc-backref" href="#id28">Layout for tools</a></h3>
<h3><a class="toc-backref" href="#id29">Layout for tools</a></h3>
<p>Tools live in the tools/ folder. There, they are split into three
categories.</p>
<dl class="docutils">
@ -543,7 +556,7 @@ nasty business.</dd>
</dl>
</div>
<div class="section" id="modules-what-are-they">
<h3><a class="toc-backref" href="#id29">Modules - what are they?</a></h3>
<h3><a class="toc-backref" href="#id30">Modules - what are they?</a></h3>
<p>DFHack uses modules to partition sets of features into manageable
chunks. A module can have both client and server side.</p>
<p>Client side is the part that goes into the main library and is
@ -560,7 +573,7 @@ server, it allows accelerating the reading of map blocks.</p>
pretty fast, but needs quite a bit of care to not break.</p>
</div>
<div class="section" id="dependencies">
<h3><a class="toc-backref" href="#id30">Dependencies</a></h3>
<h3><a class="toc-backref" href="#id31">Dependencies</a></h3>
<dl class="docutils">
<dt>Internal</dt>
<dd>either part of the codebase or statically linked.</dd>
@ -572,7 +585,7 @@ dependencies for core dfhack should be either public domain or require
attribution at most. External dependencies for tools can be either
that, or any Free Software licenses.</p>
<div class="section" id="current-internal-dependencies">
<h4><a class="toc-backref" href="#id31">Current internal dependencies</a></h4>
<h4><a class="toc-backref" href="#id32">Current internal dependencies</a></h4>
<dl class="docutils">
<dt>tinyxml</dt>
<dd>used by core dfhack to read offset definitions from Memory.xml</dd>
@ -584,7 +597,7 @@ DF binaries on Linux.</dd>
</dl>
</div>
<div class="section" id="current-external-dependencies">
<h4><a class="toc-backref" href="#id32">Current external dependencies</a></h4>
<h4><a class="toc-backref" href="#id33">Current external dependencies</a></h4>
<dl class="docutils">
<dt>wide-character ncurses</dt>
<dd>used for the veinlook tool on Linux.</dd>
@ -593,7 +606,7 @@ DF binaries on Linux.</dd>
</dl>
</div>
<div class="section" id="build-time-dependencies">
<h4><a class="toc-backref" href="#id33">Build-time dependencies</a></h4>
<h4><a class="toc-backref" href="#id34">Build-time dependencies</a></h4>
<dl class="docutils">
<dt>cmake</dt>
<dd>you need cmake to generate the build system and some configuration
@ -604,7 +617,7 @@ headers</dd>
</div>
</div>
<div class="section" id="memory-offset-definitions">
<h1><a class="toc-backref" href="#id34">Memory offset definitions</a></h1>
<h1><a class="toc-backref" href="#id35">Memory offset definitions</a></h1>
<p>The files with memory offset definitions used by dfhack can be found in the
data folder.</p>
</div>

@ -5,10 +5,6 @@ IF(UNIX)
add_definitions(-DLINUX_BUILD)
ENDIF(UNIX)
# mode - a utility to change the current game and control modes
ADD_EXECUTABLE(dfmode mode.cpp)
TARGET_LINK_LIBRARIES(dfmode dfhack)
# a creature mood dump hack. has hardcoded offsets
ADD_EXECUTABLE(dfmoodump moodump.cpp)
TARGET_LINK_LIBRARIES(dfmoodump dfhack)
@ -90,7 +86,6 @@ ADD_EXECUTABLE(dfhellhole hellhole.cpp)
TARGET_LINK_LIBRARIES(dfhellhole dfhack)
# this needs the C bindings
IF(BUILD_DFHACK_C_BINDINGS)
# for trying out some 'stuff'
@ -103,7 +98,6 @@ IF(BUILD_DFHACK_C_BINDINGS)
ENDIF(BUILD_DFHACK_C_BINDINGS)
install(TARGETS
dfmode
dfmoodump
dfdigger
dfdigger2

@ -64,6 +64,10 @@ TARGET_LINK_LIBRARIES(dfcleartask dfhack)
ADD_EXECUTABLE(dfposition position.cpp)
TARGET_LINK_LIBRARIES(dfposition dfhack)
# mode - a utility to change the current game and control modes
ADD_EXECUTABLE(dfmode mode.cpp)
TARGET_LINK_LIBRARIES(dfmode dfhack)
# just dump offsets of the current version
ADD_EXECUTABLE(dfdoffsets dumpoffsets.cpp)
TARGET_LINK_LIBRARIES(dfdoffsets dfhack)
@ -116,6 +120,7 @@ ENDIF(UNIX)
install(TARGETS
dfmode
dfreveal
dfprospector
dfposition