Merge branch 'develop' of https://github.com/DFHack/dfhack into develop
@ -1,15 +1,16 @@
|
|||||||
|
sudo: false
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- lua5.2
|
||||||
language: cpp
|
language: cpp
|
||||||
env:
|
|
||||||
matrix:
|
|
||||||
-LUA_VERSION=5.2
|
|
||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get install lua$LUA_VERSION
|
pip install --user sphinx
|
||||||
- sudo pip install docutils
|
|
||||||
script:
|
script:
|
||||||
- python travis/pr-check-base.py
|
- python travis/pr-check-base.py
|
||||||
- python travis/lint.py
|
- python travis/lint.py
|
||||||
- python travis/script-syntax.py --ext=lua --cmd="luac$LUA_VERSION -p"
|
- python travis/script-in-readme.py
|
||||||
|
- python travis/script-syntax.py --ext=lua --cmd="luac5.2 -p"
|
||||||
- python travis/script-syntax.py --ext=rb --cmd="ruby -c"
|
- python travis/script-syntax.py --ext=rb --cmd="ruby -c"
|
||||||
- ./fixTexts.sh --force
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
# build the documentation with Sphinx
|
||||||
|
find_program(SPHINX_EXECUTABLE NAMES sphinx-build
|
||||||
|
HINTS
|
||||||
|
$ENV{SPHINX_DIR}
|
||||||
|
PATH_SUFFIXES bin
|
||||||
|
DOC "Sphinx Documentation Generator"
|
||||||
|
)
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
|
find_package_handle_standard_args(Sphinx DEFAULT_MSG
|
||||||
|
SPHINX_EXECUTABLE
|
||||||
|
)
|
||||||
|
|
||||||
|
mark_as_advanced(SPHINX_EXECUTABLE)
|
||||||
|
|
@ -1,655 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
|
|
||||||
<title>Building DFHACK</title>
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
/*
|
|
||||||
:Author: David Goodger (goodger@python.org)
|
|
||||||
:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
|
|
||||||
:Copyright: This stylesheet has been placed in the public domain.
|
|
||||||
|
|
||||||
Default cascading style sheet for the HTML output of Docutils.
|
|
||||||
|
|
||||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
|
||||||
customize this style sheet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* used to remove borders from tables and images */
|
|
||||||
.borderless, table.borderless td, table.borderless th {
|
|
||||||
border: 0 }
|
|
||||||
|
|
||||||
table.borderless td, table.borderless th {
|
|
||||||
/* Override padding for "table.docutils td" with "! important".
|
|
||||||
The right padding separates the table cells. */
|
|
||||||
padding: 0 0.5em 0 0 ! important }
|
|
||||||
|
|
||||||
.first {
|
|
||||||
/* Override more specific margin styles with "! important". */
|
|
||||||
margin-top: 0 ! important }
|
|
||||||
|
|
||||||
.last, .with-subtitle {
|
|
||||||
margin-bottom: 0 ! important }
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
display: none }
|
|
||||||
|
|
||||||
a.toc-backref {
|
|
||||||
text-decoration: none ;
|
|
||||||
color: black }
|
|
||||||
|
|
||||||
blockquote.epigraph {
|
|
||||||
margin: 2em 5em ; }
|
|
||||||
|
|
||||||
dl.docutils dd {
|
|
||||||
margin-bottom: 0.5em }
|
|
||||||
|
|
||||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
|
||||||
dl.docutils dt {
|
|
||||||
font-weight: bold }
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.abstract {
|
|
||||||
margin: 2em 5em }
|
|
||||||
|
|
||||||
div.abstract p.topic-title {
|
|
||||||
font-weight: bold ;
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
|
||||||
div.hint, div.important, div.note, div.tip, div.warning {
|
|
||||||
margin: 2em ;
|
|
||||||
border: medium outset ;
|
|
||||||
padding: 1em }
|
|
||||||
|
|
||||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
|
||||||
div.important p.admonition-title, div.note p.admonition-title,
|
|
||||||
div.tip p.admonition-title {
|
|
||||||
font-weight: bold ;
|
|
||||||
font-family: sans-serif }
|
|
||||||
|
|
||||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
|
||||||
div.danger p.admonition-title, div.error p.admonition-title,
|
|
||||||
div.warning p.admonition-title, .code .error {
|
|
||||||
color: red ;
|
|
||||||
font-weight: bold ;
|
|
||||||
font-family: sans-serif }
|
|
||||||
|
|
||||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
|
||||||
compound paragraphs.
|
|
||||||
div.compound .compound-first, div.compound .compound-middle {
|
|
||||||
margin-bottom: 0.5em }
|
|
||||||
|
|
||||||
div.compound .compound-last, div.compound .compound-middle {
|
|
||||||
margin-top: 0.5em }
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.dedication {
|
|
||||||
margin: 2em 5em ;
|
|
||||||
text-align: center ;
|
|
||||||
font-style: italic }
|
|
||||||
|
|
||||||
div.dedication p.topic-title {
|
|
||||||
font-weight: bold ;
|
|
||||||
font-style: normal }
|
|
||||||
|
|
||||||
div.figure {
|
|
||||||
margin-left: 2em ;
|
|
||||||
margin-right: 2em }
|
|
||||||
|
|
||||||
div.footer, div.header {
|
|
||||||
clear: both;
|
|
||||||
font-size: smaller }
|
|
||||||
|
|
||||||
div.line-block {
|
|
||||||
display: block ;
|
|
||||||
margin-top: 1em ;
|
|
||||||
margin-bottom: 1em }
|
|
||||||
|
|
||||||
div.line-block div.line-block {
|
|
||||||
margin-top: 0 ;
|
|
||||||
margin-bottom: 0 ;
|
|
||||||
margin-left: 1.5em }
|
|
||||||
|
|
||||||
div.sidebar {
|
|
||||||
margin: 0 0 0.5em 1em ;
|
|
||||||
border: medium outset ;
|
|
||||||
padding: 1em ;
|
|
||||||
background-color: #ffffee ;
|
|
||||||
width: 40% ;
|
|
||||||
float: right ;
|
|
||||||
clear: right }
|
|
||||||
|
|
||||||
div.sidebar p.rubric {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-size: medium }
|
|
||||||
|
|
||||||
div.system-messages {
|
|
||||||
margin: 5em }
|
|
||||||
|
|
||||||
div.system-messages h1 {
|
|
||||||
color: red }
|
|
||||||
|
|
||||||
div.system-message {
|
|
||||||
border: medium outset ;
|
|
||||||
padding: 1em }
|
|
||||||
|
|
||||||
div.system-message p.system-message-title {
|
|
||||||
color: red ;
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
div.topic {
|
|
||||||
margin: 2em }
|
|
||||||
|
|
||||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
|
||||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
|
||||||
margin-top: 0.4em }
|
|
||||||
|
|
||||||
h1.title {
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
h2.subtitle {
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
hr.docutils {
|
|
||||||
width: 75% }
|
|
||||||
|
|
||||||
img.align-left, .figure.align-left, object.align-left {
|
|
||||||
clear: left ;
|
|
||||||
float: left ;
|
|
||||||
margin-right: 1em }
|
|
||||||
|
|
||||||
img.align-right, .figure.align-right, object.align-right {
|
|
||||||
clear: right ;
|
|
||||||
float: right ;
|
|
||||||
margin-left: 1em }
|
|
||||||
|
|
||||||
img.align-center, .figure.align-center, object.align-center {
|
|
||||||
display: block;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.align-left {
|
|
||||||
text-align: left }
|
|
||||||
|
|
||||||
.align-center {
|
|
||||||
clear: both ;
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
.align-right {
|
|
||||||
text-align: right }
|
|
||||||
|
|
||||||
/* reset inner alignment in figures */
|
|
||||||
div.align-right {
|
|
||||||
text-align: inherit }
|
|
||||||
|
|
||||||
/* div.align-center * { */
|
|
||||||
/* text-align: left } */
|
|
||||||
|
|
||||||
ol.simple, ul.simple {
|
|
||||||
margin-bottom: 1em }
|
|
||||||
|
|
||||||
ol.arabic {
|
|
||||||
list-style: decimal }
|
|
||||||
|
|
||||||
ol.loweralpha {
|
|
||||||
list-style: lower-alpha }
|
|
||||||
|
|
||||||
ol.upperalpha {
|
|
||||||
list-style: upper-alpha }
|
|
||||||
|
|
||||||
ol.lowerroman {
|
|
||||||
list-style: lower-roman }
|
|
||||||
|
|
||||||
ol.upperroman {
|
|
||||||
list-style: upper-roman }
|
|
||||||
|
|
||||||
p.attribution {
|
|
||||||
text-align: right ;
|
|
||||||
margin-left: 50% }
|
|
||||||
|
|
||||||
p.caption {
|
|
||||||
font-style: italic }
|
|
||||||
|
|
||||||
p.credits {
|
|
||||||
font-style: italic ;
|
|
||||||
font-size: smaller }
|
|
||||||
|
|
||||||
p.label {
|
|
||||||
white-space: nowrap }
|
|
||||||
|
|
||||||
p.rubric {
|
|
||||||
font-weight: bold ;
|
|
||||||
font-size: larger ;
|
|
||||||
color: maroon ;
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
p.sidebar-title {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-weight: bold ;
|
|
||||||
font-size: larger }
|
|
||||||
|
|
||||||
p.sidebar-subtitle {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
p.topic-title {
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
pre.address {
|
|
||||||
margin-bottom: 0 ;
|
|
||||||
margin-top: 0 ;
|
|
||||||
font: inherit }
|
|
||||||
|
|
||||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
||||||
margin-left: 2em ;
|
|
||||||
margin-right: 2em }
|
|
||||||
|
|
||||||
pre.code .ln { color: grey; } /* line numbers */
|
|
||||||
pre.code, code { background-color: #eeeeee }
|
|
||||||
pre.code .comment, code .comment { color: #5C6576 }
|
|
||||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
||||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
|
||||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
|
||||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
|
||||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
|
||||||
|
|
||||||
span.classifier {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-style: oblique }
|
|
||||||
|
|
||||||
span.classifier-delimiter {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
span.interpreted {
|
|
||||||
font-family: sans-serif }
|
|
||||||
|
|
||||||
span.option {
|
|
||||||
white-space: nowrap }
|
|
||||||
|
|
||||||
span.pre {
|
|
||||||
white-space: pre }
|
|
||||||
|
|
||||||
span.problematic {
|
|
||||||
color: red }
|
|
||||||
|
|
||||||
span.section-subtitle {
|
|
||||||
/* font-size relative to parent (h1..h6 element) */
|
|
||||||
font-size: 80% }
|
|
||||||
|
|
||||||
table.citation {
|
|
||||||
border-left: solid 1px gray;
|
|
||||||
margin-left: 1px }
|
|
||||||
|
|
||||||
table.docinfo {
|
|
||||||
margin: 2em 4em }
|
|
||||||
|
|
||||||
table.docutils {
|
|
||||||
margin-top: 0.5em ;
|
|
||||||
margin-bottom: 0.5em }
|
|
||||||
|
|
||||||
table.footnote {
|
|
||||||
border-left: solid 1px black;
|
|
||||||
margin-left: 1px }
|
|
||||||
|
|
||||||
table.docutils td, table.docutils th,
|
|
||||||
table.docinfo td, table.docinfo th {
|
|
||||||
padding-left: 0.5em ;
|
|
||||||
padding-right: 0.5em ;
|
|
||||||
vertical-align: top }
|
|
||||||
|
|
||||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
|
||||||
font-weight: bold ;
|
|
||||||
text-align: left ;
|
|
||||||
white-space: nowrap ;
|
|
||||||
padding-left: 0 }
|
|
||||||
|
|
||||||
/* "booktabs" style (no vertical lines) */
|
|
||||||
table.docutils.booktabs {
|
|
||||||
border: 0px;
|
|
||||||
border-top: 2px solid;
|
|
||||||
border-bottom: 2px solid;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
table.docutils.booktabs * {
|
|
||||||
border: 0px;
|
|
||||||
}
|
|
||||||
table.docutils.booktabs th {
|
|
||||||
border-bottom: thin solid;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
|
||||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
|
||||||
font-size: 100% }
|
|
||||||
|
|
||||||
ul.auto-toc {
|
|
||||||
list-style-type: none }
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="document" id="building-dfhack">
|
|
||||||
<h1 class="title">Building DFHACK</h1>
|
|
||||||
|
|
||||||
<div class="contents topic" id="contents">
|
|
||||||
<p class="topic-title first">Contents</p>
|
|
||||||
<ul class="simple">
|
|
||||||
<li><a class="reference internal" href="#linux" id="id4">Linux</a><ul>
|
|
||||||
<li><a class="reference internal" href="#how-to-get-the-code" id="id5">How to get the code</a></li>
|
|
||||||
<li><a class="reference internal" href="#dependencies" id="id6">Dependencies</a></li>
|
|
||||||
<li><a class="reference internal" href="#build" id="id7">Build</a></li>
|
|
||||||
<li><a class="reference internal" href="#fixing-the-libstdc-version-bug" id="id8">Fixing the libstdc++ version bug</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a class="reference internal" href="#mac-os-x" id="id9">Mac OS X</a><ul>
|
|
||||||
<li><a class="reference internal" href="#snow-leopard-changes" id="id10">Snow Leopard Changes</a></li>
|
|
||||||
<li><a class="reference internal" href="#yosemite-changes" id="id11">Yosemite Changes</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a class="reference internal" href="#windows" id="id12">Windows</a><ul>
|
|
||||||
<li><a class="reference internal" href="#id1" id="id13">How to get the code</a></li>
|
|
||||||
<li><a class="reference internal" href="#id2" id="id14">Dependencies</a></li>
|
|
||||||
<li><a class="reference internal" href="#id3" id="id15">Build</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li><a class="reference internal" href="#build-types" id="id16">Build types</a></li>
|
|
||||||
<li><a class="reference internal" href="#using-the-library-as-a-developer" id="id17">Using the library as a developer</a><ul>
|
|
||||||
<li><a class="reference internal" href="#df-data-structure-definitions" id="id18">DF data structure definitions</a></li>
|
|
||||||
<li><a class="reference internal" href="#remote-access-interface" id="id19">Remote access interface</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="linux">
|
|
||||||
<h1><a class="toc-backref" href="#id4">Linux</a></h1>
|
|
||||||
<p>On Linux, DFHack acts as a library that shadows parts of the SDL API using LD_PRELOAD.</p>
|
|
||||||
<div class="section" id="how-to-get-the-code">
|
|
||||||
<h2><a class="toc-backref" href="#id5">How to get the code</a></h2>
|
|
||||||
<p>DFHack doesn't have any kind of system of code snapshots in place, so you will have to get code from the github repository using git.
|
|
||||||
Having a 'git' package installed is the minimal requirement, but some sort of git gui or git integration for your favorite text editor/IDE will certainly help.</p>
|
|
||||||
<p>The code resides here: <a class="reference external" href="https://github.com/DFHack/dfhack">https://github.com/DFHack/dfhack</a></p>
|
|
||||||
<p>If you just want to compile DFHack or work on it by contributing patches, it's quite enough to clone from the read-only address:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
git clone git://github.com/DFHack/dfhack.git
|
|
||||||
cd dfhack
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
</pre>
|
|
||||||
<p>If you want to get really involved with the development, create an account on github, make a clone there and then use that as your remote repository instead. Detailed instructions are beyond the scope of this document. If you need help, join us on IRC (#dfhack channel on freenode).</p>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="dependencies">
|
|
||||||
<h2><a class="toc-backref" href="#id6">Dependencies</a></h2>
|
|
||||||
<p>DFHack is meant to be installed into an existing DF folder, so get one ready.</p>
|
|
||||||
<p>For building, you need a 32-bit version of GCC. For example, to build DFHack on
|
|
||||||
a 64-bit distribution like Arch, you'll need the multilib development tools and libraries.
|
|
||||||
Alternatively, you might be able to use <tt class="docutils literal">lxc</tt> to
|
|
||||||
<a class="reference external" href="http://www.bay12forums.com/smf/index.php?topic=139553.msg5435310#msg5435310">create a virtual 32-bit environment</a>.</p>
|
|
||||||
<p>Before you can build anything, you'll also need <tt class="docutils literal">cmake</tt>. It is advisable to also get
|
|
||||||
<tt class="docutils literal">ccmake</tt> on distributions that split the cmake package into multiple parts.</p>
|
|
||||||
<p>You also need perl and the XML::LibXML and XML::LibXSLT perl packages (for the code generation parts).
|
|
||||||
You should be able to find them in your distro repositories (on Arch linux 'perl-xml-libxml' and 'perl-xml-libxslt') or through <tt class="docutils literal">cpan</tt>.</p>
|
|
||||||
<p>To build Stonesense, you'll also need OpenGL headers.</p>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="build">
|
|
||||||
<h2><a class="toc-backref" href="#id7">Build</a></h2>
|
|
||||||
<p>Building is fairly straightforward. Enter the <tt class="docutils literal">build</tt> folder and start the build like this:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
cd build
|
|
||||||
cmake .. -DCMAKE_BUILD_TYPE:string=Release -DCMAKE_INSTALL_PREFIX=/home/user/DF
|
|
||||||
make install
|
|
||||||
</pre>
|
|
||||||
<p>Obviously, replace the install path with path to your DF. This will build the library
|
|
||||||
along with the normal set of plugins and install them into your DF folder.</p>
|
|
||||||
<p>Alternatively, you can use ccmake instead of cmake:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
cd build
|
|
||||||
ccmake ..
|
|
||||||
make install
|
|
||||||
</pre>
|
|
||||||
<p>This will show a curses-based interface that lets you set all of the
|
|
||||||
extra options.</p>
|
|
||||||
<p>You can also use a cmake-friendly IDE like KDevelop 4 or the cmake-gui
|
|
||||||
program.</p>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="fixing-the-libstdc-version-bug">
|
|
||||||
<h2><a class="toc-backref" href="#id8">Fixing the libstdc++ version bug</a></h2>
|
|
||||||
<p>When compiling dfhack yourself, it builds against your system libc.
|
|
||||||
When Dwarf Fortress runs, it uses a libstdc++ shipped with the binary, which
|
|
||||||
is usually way older, and incompatible with your dfhack. This manifests with
|
|
||||||
the error message:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
./libs/Dwarf_Fortress: /pathToDF/libs/libstdc++.so.6: version
|
|
||||||
`GLIBCXX_3.4.15' not found (required by ./hack/libdfhack.so)
|
|
||||||
</pre>
|
|
||||||
<p>To fix this, simply remove the libstdc++ shipped with DF, it will fall back
|
|
||||||
to your system lib and everything will work fine:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
cd /path/to/DF/
|
|
||||||
rm libs/libstdc++.so.6
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="mac-os-x">
|
|
||||||
<h1><a class="toc-backref" href="#id9">Mac OS X</a></h1>
|
|
||||||
<p>If you are building on 10.6, please read the subsection below titled "Snow Leopard Changes" FIRST.</p>
|
|
||||||
<ol class="arabic">
|
|
||||||
<li><p class="first">Download and unpack a copy of the latest DF</p>
|
|
||||||
</li>
|
|
||||||
<li><p class="first">Install Xcode from Mac App Store</p>
|
|
||||||
</li>
|
|
||||||
<li><p class="first">Open Xcode, go to Preferences > Downloads, and install the Command Line Tools.</p>
|
|
||||||
</li>
|
|
||||||
<li><p class="first">Install dependencies</p>
|
|
||||||
<blockquote>
|
|
||||||
<p>Option 1: Using MacPorts:</p>
|
|
||||||
<blockquote>
|
|
||||||
<ul class="simple">
|
|
||||||
<li><a class="reference external" href="http://www.macports.org/">Install MacPorts</a></li>
|
|
||||||
<li>Run <tt class="docutils literal">sudo port install gcc45 +universal cmake +universal <span class="pre">git-core</span> +universal</tt>
|
|
||||||
This will take some time—maybe hours, depending on your machine.</li>
|
|
||||||
</ul>
|
|
||||||
<p>At some point during this process, it may ask you to install a Java environment; let it do so.</p>
|
|
||||||
</blockquote>
|
|
||||||
<p>Option 2: Using Homebrew:</p>
|
|
||||||
<blockquote>
|
|
||||||
<ul class="simple">
|
|
||||||
<li><a class="reference external" href="http://brew.sh/">Install Homebrew</a> and run:</li>
|
|
||||||
<li><tt class="docutils literal">brew tap homebrew/versions</tt></li>
|
|
||||||
<li><tt class="docutils literal">brew install git</tt></li>
|
|
||||||
<li><tt class="docutils literal">brew install cmake</tt></li>
|
|
||||||
<li><tt class="docutils literal">brew install gcc45 <span class="pre">--enable-multilib</span></tt></li>
|
|
||||||
</ul>
|
|
||||||
</blockquote>
|
|
||||||
</blockquote>
|
|
||||||
</li>
|
|
||||||
<li><p class="first">Install perl dependencies</p>
|
|
||||||
<blockquote>
|
|
||||||
<ol class="arabic">
|
|
||||||
<li><p class="first"><tt class="docutils literal">sudo cpan</tt></p>
|
|
||||||
<p>If this is the first time you've run cpan, you will need to go through the setup
|
|
||||||
process. Just stick with the defaults for everything and you'll be fine.</p>
|
|
||||||
</li>
|
|
||||||
<li><p class="first"><tt class="docutils literal">install <span class="pre">XML::LibXML</span></tt></p>
|
|
||||||
</li>
|
|
||||||
<li><p class="first"><tt class="docutils literal">install <span class="pre">XML::LibXSLT</span></tt></p>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</blockquote>
|
|
||||||
</li>
|
|
||||||
<li><p class="first">Get the dfhack source:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
git clone git://github.com/DFHack/dfhack.git
|
|
||||||
cd dfhack
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
<li><p class="first">Set environment variables:</p>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
<blockquote>
|
|
||||||
<p>Macports:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
export CC=/opt/local/bin/gcc-mp-4.5
|
|
||||||
export CXX=/opt/local/bin/g++-mp-4.5
|
|
||||||
</pre>
|
|
||||||
<p>Homebrew:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
export CC=/usr/local/bin/gcc-4.5
|
|
||||||
export CXX=/usr/local/bin/g++-4.5
|
|
||||||
</pre>
|
|
||||||
</blockquote>
|
|
||||||
<ol class="arabic" start="8">
|
|
||||||
<li><p class="first">Build dfhack:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
mkdir build-osx
|
|
||||||
cd build-osx
|
|
||||||
cmake .. -DCMAKE_BUILD_TYPE:string=Release -DCMAKE_INSTALL_PREFIX=/path/to/DF/directory
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
</pre>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
<div class="section" id="snow-leopard-changes">
|
|
||||||
<h2><a class="toc-backref" href="#id10">Snow Leopard Changes</a></h2>
|
|
||||||
<ol class="arabic">
|
|
||||||
<li><dl class="first docutils">
|
|
||||||
<dt>Add a step 6.2a (before Install XML::LibXSLT)::</dt>
|
|
||||||
<dd><p class="first last">In a separate Terminal window or tab, run:
|
|
||||||
<tt class="docutils literal">sudo ln <span class="pre">-s</span> /usr/include/libxml2/libxml /usr/include/libxml</tt></p>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</li>
|
|
||||||
<li><dl class="first docutils">
|
|
||||||
<dt>Add a step 7a (before building)::</dt>
|
|
||||||
<dd><dl class="first last docutils">
|
|
||||||
<dt>In <dfhack directory>/library/LuaTypes.cpp, change line 467 to</dt>
|
|
||||||
<dd><p class="first last"><tt class="docutils literal">int len = <span class="pre">strlen((char*)ptr);</span></tt></p>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</li>
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="yosemite-changes">
|
|
||||||
<h2><a class="toc-backref" href="#id11">Yosemite Changes</a></h2>
|
|
||||||
<p>If you have issues building on OS X Yosemite (or above), try definining the following environment variable:</p>
|
|
||||||
<blockquote>
|
|
||||||
export MACOSX_DEPLOYMENT_TARGET=10.9</blockquote>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="windows">
|
|
||||||
<h1><a class="toc-backref" href="#id12">Windows</a></h1>
|
|
||||||
<p>On Windows, DFHack replaces the SDL library distributed with DF.</p>
|
|
||||||
<div class="section" id="id1">
|
|
||||||
<h2><a class="toc-backref" href="#id13">How to get the code</a></h2>
|
|
||||||
<p>DFHack doesn't have any kind of system of code snapshots in place, so you will have to get code from the github repository using git.
|
|
||||||
You will need some sort of Windows port of git, or a GUI. Some examples:</p>
|
|
||||||
<blockquote>
|
|
||||||
<ul class="simple">
|
|
||||||
<li><a class="reference external" href="http://msysgit.github.io/">http://msysgit.github.io/</a> - this is a command line version of git for windows. Most tutorials on git usage will apply.</li>
|
|
||||||
<li><a class="reference external" href="http://code.google.com/p/tortoisegit/">http://code.google.com/p/tortoisegit/</a> - this puts a pretty, graphical face on top of msysgit :)</li>
|
|
||||||
</ul>
|
|
||||||
</blockquote>
|
|
||||||
<p>The code resides here: <a class="reference external" href="https://github.com/DFHack/dfhack">https://github.com/DFHack/dfhack</a></p>
|
|
||||||
<p>If you just want to compile DFHack or work on it by contributing patches, it's quite enough to clone from the read-only address:</p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
git clone git://github.com/DFHack/dfhack.git
|
|
||||||
cd dfhack
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
</pre>
|
|
||||||
<p>The tortoisegit GUI should have the equivalent options included.</p>
|
|
||||||
<p>If you want to get really involved with the development, create an account on github, make a clone there and then use that as your remote repository instead. Detailed instructions are beyond the scope of this document. If you need help, join us on IRC (#dfhack channel on freenode).</p>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="id2">
|
|
||||||
<h2><a class="toc-backref" href="#id14">Dependencies</a></h2>
|
|
||||||
<p>First, you need <tt class="docutils literal">cmake</tt>. Get the win32 installer version from the official
|
|
||||||
site: <a class="reference external" href="http://www.cmake.org/cmake/resources/software.html">http://www.cmake.org/cmake/resources/software.html</a></p>
|
|
||||||
<p>It has the usual installer wizard. Make sure you let it add its binary folder
|
|
||||||
to your binary search PATH so the tool can be later run from anywhere.</p>
|
|
||||||
<p>You'll need a copy of Microsoft Visual C++ 2010. The Express version is sufficient.
|
|
||||||
Grab it from Microsoft's site.</p>
|
|
||||||
<p>You'll also need the Visual Studio 2010 SP1 update.</p>
|
|
||||||
<p>For the code generation parts, you'll need perl with XML::LibXML and XML::LibXSLT. Strawberry Perl works nicely for this: http://strawberryperl.com/</p>
|
|
||||||
<p>If you already have a different version of perl (for example the one from cygwin), you can run into some trouble. Either remove the other perl install from PATH, or install libxml and libxslt for it instead. Strawberry perl works though and has all the required packages.</p>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="id3">
|
|
||||||
<h2><a class="toc-backref" href="#id15">Build</a></h2>
|
|
||||||
<p>There are several different batch files in the <tt class="docutils literal">build</tt> folder along with a script that's used for picking the DF path.</p>
|
|
||||||
<p>First, run set_df_path.vbs and point the dialog that pops up at your DF folder that you want to use for development.
|
|
||||||
Next, run one of the scripts with <tt class="docutils literal">generate</tt> prefix. These create the MSVC solution file(s):</p>
|
|
||||||
<ul class="simple">
|
|
||||||
<li><tt class="docutils literal">all</tt> will create a solution with everything enabled (and the kitchen sink).</li>
|
|
||||||
<li><tt class="docutils literal">gui</tt> will pop up the cmake gui and let you pick and choose what to build. This is probably what you want most of the time. Set the options you are interested in, then hit configure, then generate. More options can appear after the configure step.</li>
|
|
||||||
<li><tt class="docutils literal">minimal</tt> will create a minimal solution with just the bare necessities - the main library and standard plugins.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Then you can either open the solution with MSVC or use one of the msbuild scripts:</p>
|
|
||||||
<ul class="simple">
|
|
||||||
<li>Scripts with <tt class="docutils literal">build</tt> prefix will only build.</li>
|
|
||||||
<li>Scripts with <tt class="docutils literal">install</tt> prefix will build DFHack and install it to the previously selected DF path.</li>
|
|
||||||
<li>Scripts with <tt class="docutils literal">package</tt> prefix will build and create a .zip package of DFHack.</li>
|
|
||||||
</ul>
|
|
||||||
<p>When you open the solution in MSVC, make sure you never use the Debug builds. Those aren't
|
|
||||||
binary-compatible with DF. If you try to use a debug build with DF, you'll only get crashes.
|
|
||||||
So pick either Release or RelWithDebInfo build and build the INSTALL target.</p>
|
|
||||||
<p>The <tt class="docutils literal">debug</tt> scripts actually do RelWithDebInfo builds.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="build-types">
|
|
||||||
<h1><a class="toc-backref" href="#id16">Build types</a></h1>
|
|
||||||
<p><tt class="docutils literal">cmake</tt> allows you to pick a build type by changing this
|
|
||||||
variable: <tt class="docutils literal">CMAKE_BUILD_TYPE</tt></p>
|
|
||||||
<pre class="literal-block">
|
|
||||||
cmake .. -DCMAKE_BUILD_TYPE:string=BUILD_TYPE
|
|
||||||
</pre>
|
|
||||||
<p>Without specifying a build type or 'None', cmake uses the
|
|
||||||
<tt class="docutils literal">CMAKE_CXX_FLAGS</tt> variable for building.</p>
|
|
||||||
<p>Valid and useful build types include 'Release', 'Debug' and
|
|
||||||
'RelWithDebInfo'. 'Debug' is not available on Windows.</p>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="using-the-library-as-a-developer">
|
|
||||||
<h1><a class="toc-backref" href="#id17">Using the library as a developer</a></h1>
|
|
||||||
<p>Currently, the most direct way to use the library is to write a plugin that can be loaded by it.
|
|
||||||
All the plugins can be found in the 'plugins' folder. There's no in-depth documentation
|
|
||||||
on how to write one yet, but it should be easy enough to copy one and just follow the pattern.</p>
|
|
||||||
<p>Other than through plugins, it is possible to use DFHack via remote access interface, or by writing Lua scripts.</p>
|
|
||||||
<p>The most important parts of DFHack are the Core, Console, Modules and Plugins.</p>
|
|
||||||
<ul class="simple">
|
|
||||||
<li>Core acts as the centerpiece of DFHack - it acts as a filter between DF and SDL and synchronizes the various plugins with DF.</li>
|
|
||||||
<li>Console is a thread-safe console that can be used to invoke commands exported by Plugins.</li>
|
|
||||||
<li>Modules actually describe the way to access information in DF's memory. You can get them from the Core. Most modules are split into two parts: high-level and low-level. Higl-level is mostly method calls, low-level publicly visible pointers to DF's data structures.</li>
|
|
||||||
<li>Plugins are the tools that use all the other stuff to make things happen. A plugin can have a list of commands that it exports and an onupdate function that will be called each DF game tick.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Rudimentary API documentation can be built using doxygen (see build options with <tt class="docutils literal">ccmake</tt> or <tt class="docutils literal"><span class="pre">cmake-gui</span></tt>).</p>
|
|
||||||
<p>DFHack consists of variously licensed code, but invariably weak copyleft.
|
|
||||||
The main license is zlib/libpng, some bits are MIT licensed, and some are BSD licensed.</p>
|
|
||||||
<p>Feel free to add your own extensions and plugins. Contributing back to
|
|
||||||
the dfhack repository is welcome and the right thing to do :)</p>
|
|
||||||
<div class="section" id="df-data-structure-definitions">
|
|
||||||
<h2><a class="toc-backref" href="#id18">DF data structure definitions</a></h2>
|
|
||||||
<p>DFHack uses information about the game data structures, represented via xml files in the library/xml/ submodule.</p>
|
|
||||||
<p>Data structure layouts are described in files following the df.*.xml name pattern. This information is transformed by a perl script into C++ headers describing the structures, and associated metadata for the Lua wrapper. These headers and data are then compiled into the DFHack libraries, thus necessitating a compatibility break every time layouts change; in return it significantly boosts the efficiency and capabilities of DFHack code.</p>
|
|
||||||
<p>Global object addresses are stored in symbols.xml, which is copied to the dfhack release package and loaded as data at runtime.</p>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="remote-access-interface">
|
|
||||||
<h2><a class="toc-backref" href="#id19">Remote access interface</a></h2>
|
|
||||||
<p>DFHack supports remote access by exchanging Google protobuf messages via a TCP socket. Both the core and plugins can define remotely accessible methods. The <tt class="docutils literal"><span class="pre">dfhack-run</span></tt> command uses this interface to invoke ordinary console commands.</p>
|
|
||||||
<p>Currently the supported set of requests is limited, because the developers don't know what exactly is most useful.</p>
|
|
||||||
<p>Protocol client implementations exist for Java and C#.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,410 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
|
|
||||||
<title>Contributing to DFHACK</title>
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
/*
|
|
||||||
:Author: David Goodger (goodger@python.org)
|
|
||||||
:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
|
|
||||||
:Copyright: This stylesheet has been placed in the public domain.
|
|
||||||
|
|
||||||
Default cascading style sheet for the HTML output of Docutils.
|
|
||||||
|
|
||||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
|
||||||
customize this style sheet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* used to remove borders from tables and images */
|
|
||||||
.borderless, table.borderless td, table.borderless th {
|
|
||||||
border: 0 }
|
|
||||||
|
|
||||||
table.borderless td, table.borderless th {
|
|
||||||
/* Override padding for "table.docutils td" with "! important".
|
|
||||||
The right padding separates the table cells. */
|
|
||||||
padding: 0 0.5em 0 0 ! important }
|
|
||||||
|
|
||||||
.first {
|
|
||||||
/* Override more specific margin styles with "! important". */
|
|
||||||
margin-top: 0 ! important }
|
|
||||||
|
|
||||||
.last, .with-subtitle {
|
|
||||||
margin-bottom: 0 ! important }
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
display: none }
|
|
||||||
|
|
||||||
a.toc-backref {
|
|
||||||
text-decoration: none ;
|
|
||||||
color: black }
|
|
||||||
|
|
||||||
blockquote.epigraph {
|
|
||||||
margin: 2em 5em ; }
|
|
||||||
|
|
||||||
dl.docutils dd {
|
|
||||||
margin-bottom: 0.5em }
|
|
||||||
|
|
||||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
|
||||||
dl.docutils dt {
|
|
||||||
font-weight: bold }
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.abstract {
|
|
||||||
margin: 2em 5em }
|
|
||||||
|
|
||||||
div.abstract p.topic-title {
|
|
||||||
font-weight: bold ;
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
|
||||||
div.hint, div.important, div.note, div.tip, div.warning {
|
|
||||||
margin: 2em ;
|
|
||||||
border: medium outset ;
|
|
||||||
padding: 1em }
|
|
||||||
|
|
||||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
|
||||||
div.important p.admonition-title, div.note p.admonition-title,
|
|
||||||
div.tip p.admonition-title {
|
|
||||||
font-weight: bold ;
|
|
||||||
font-family: sans-serif }
|
|
||||||
|
|
||||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
|
||||||
div.danger p.admonition-title, div.error p.admonition-title,
|
|
||||||
div.warning p.admonition-title, .code .error {
|
|
||||||
color: red ;
|
|
||||||
font-weight: bold ;
|
|
||||||
font-family: sans-serif }
|
|
||||||
|
|
||||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
|
||||||
compound paragraphs.
|
|
||||||
div.compound .compound-first, div.compound .compound-middle {
|
|
||||||
margin-bottom: 0.5em }
|
|
||||||
|
|
||||||
div.compound .compound-last, div.compound .compound-middle {
|
|
||||||
margin-top: 0.5em }
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.dedication {
|
|
||||||
margin: 2em 5em ;
|
|
||||||
text-align: center ;
|
|
||||||
font-style: italic }
|
|
||||||
|
|
||||||
div.dedication p.topic-title {
|
|
||||||
font-weight: bold ;
|
|
||||||
font-style: normal }
|
|
||||||
|
|
||||||
div.figure {
|
|
||||||
margin-left: 2em ;
|
|
||||||
margin-right: 2em }
|
|
||||||
|
|
||||||
div.footer, div.header {
|
|
||||||
clear: both;
|
|
||||||
font-size: smaller }
|
|
||||||
|
|
||||||
div.line-block {
|
|
||||||
display: block ;
|
|
||||||
margin-top: 1em ;
|
|
||||||
margin-bottom: 1em }
|
|
||||||
|
|
||||||
div.line-block div.line-block {
|
|
||||||
margin-top: 0 ;
|
|
||||||
margin-bottom: 0 ;
|
|
||||||
margin-left: 1.5em }
|
|
||||||
|
|
||||||
div.sidebar {
|
|
||||||
margin: 0 0 0.5em 1em ;
|
|
||||||
border: medium outset ;
|
|
||||||
padding: 1em ;
|
|
||||||
background-color: #ffffee ;
|
|
||||||
width: 40% ;
|
|
||||||
float: right ;
|
|
||||||
clear: right }
|
|
||||||
|
|
||||||
div.sidebar p.rubric {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-size: medium }
|
|
||||||
|
|
||||||
div.system-messages {
|
|
||||||
margin: 5em }
|
|
||||||
|
|
||||||
div.system-messages h1 {
|
|
||||||
color: red }
|
|
||||||
|
|
||||||
div.system-message {
|
|
||||||
border: medium outset ;
|
|
||||||
padding: 1em }
|
|
||||||
|
|
||||||
div.system-message p.system-message-title {
|
|
||||||
color: red ;
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
div.topic {
|
|
||||||
margin: 2em }
|
|
||||||
|
|
||||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
|
||||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
|
||||||
margin-top: 0.4em }
|
|
||||||
|
|
||||||
h1.title {
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
h2.subtitle {
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
hr.docutils {
|
|
||||||
width: 75% }
|
|
||||||
|
|
||||||
img.align-left, .figure.align-left, object.align-left {
|
|
||||||
clear: left ;
|
|
||||||
float: left ;
|
|
||||||
margin-right: 1em }
|
|
||||||
|
|
||||||
img.align-right, .figure.align-right, object.align-right {
|
|
||||||
clear: right ;
|
|
||||||
float: right ;
|
|
||||||
margin-left: 1em }
|
|
||||||
|
|
||||||
img.align-center, .figure.align-center, object.align-center {
|
|
||||||
display: block;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.align-left {
|
|
||||||
text-align: left }
|
|
||||||
|
|
||||||
.align-center {
|
|
||||||
clear: both ;
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
.align-right {
|
|
||||||
text-align: right }
|
|
||||||
|
|
||||||
/* reset inner alignment in figures */
|
|
||||||
div.align-right {
|
|
||||||
text-align: inherit }
|
|
||||||
|
|
||||||
/* div.align-center * { */
|
|
||||||
/* text-align: left } */
|
|
||||||
|
|
||||||
ol.simple, ul.simple {
|
|
||||||
margin-bottom: 1em }
|
|
||||||
|
|
||||||
ol.arabic {
|
|
||||||
list-style: decimal }
|
|
||||||
|
|
||||||
ol.loweralpha {
|
|
||||||
list-style: lower-alpha }
|
|
||||||
|
|
||||||
ol.upperalpha {
|
|
||||||
list-style: upper-alpha }
|
|
||||||
|
|
||||||
ol.lowerroman {
|
|
||||||
list-style: lower-roman }
|
|
||||||
|
|
||||||
ol.upperroman {
|
|
||||||
list-style: upper-roman }
|
|
||||||
|
|
||||||
p.attribution {
|
|
||||||
text-align: right ;
|
|
||||||
margin-left: 50% }
|
|
||||||
|
|
||||||
p.caption {
|
|
||||||
font-style: italic }
|
|
||||||
|
|
||||||
p.credits {
|
|
||||||
font-style: italic ;
|
|
||||||
font-size: smaller }
|
|
||||||
|
|
||||||
p.label {
|
|
||||||
white-space: nowrap }
|
|
||||||
|
|
||||||
p.rubric {
|
|
||||||
font-weight: bold ;
|
|
||||||
font-size: larger ;
|
|
||||||
color: maroon ;
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
p.sidebar-title {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-weight: bold ;
|
|
||||||
font-size: larger }
|
|
||||||
|
|
||||||
p.sidebar-subtitle {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
p.topic-title {
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
pre.address {
|
|
||||||
margin-bottom: 0 ;
|
|
||||||
margin-top: 0 ;
|
|
||||||
font: inherit }
|
|
||||||
|
|
||||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
||||||
margin-left: 2em ;
|
|
||||||
margin-right: 2em }
|
|
||||||
|
|
||||||
pre.code .ln { color: grey; } /* line numbers */
|
|
||||||
pre.code, code { background-color: #eeeeee }
|
|
||||||
pre.code .comment, code .comment { color: #5C6576 }
|
|
||||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
||||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
|
||||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
|
||||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
|
||||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
|
||||||
|
|
||||||
span.classifier {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-style: oblique }
|
|
||||||
|
|
||||||
span.classifier-delimiter {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
span.interpreted {
|
|
||||||
font-family: sans-serif }
|
|
||||||
|
|
||||||
span.option {
|
|
||||||
white-space: nowrap }
|
|
||||||
|
|
||||||
span.pre {
|
|
||||||
white-space: pre }
|
|
||||||
|
|
||||||
span.problematic {
|
|
||||||
color: red }
|
|
||||||
|
|
||||||
span.section-subtitle {
|
|
||||||
/* font-size relative to parent (h1..h6 element) */
|
|
||||||
font-size: 80% }
|
|
||||||
|
|
||||||
table.citation {
|
|
||||||
border-left: solid 1px gray;
|
|
||||||
margin-left: 1px }
|
|
||||||
|
|
||||||
table.docinfo {
|
|
||||||
margin: 2em 4em }
|
|
||||||
|
|
||||||
table.docutils {
|
|
||||||
margin-top: 0.5em ;
|
|
||||||
margin-bottom: 0.5em }
|
|
||||||
|
|
||||||
table.footnote {
|
|
||||||
border-left: solid 1px black;
|
|
||||||
margin-left: 1px }
|
|
||||||
|
|
||||||
table.docutils td, table.docutils th,
|
|
||||||
table.docinfo td, table.docinfo th {
|
|
||||||
padding-left: 0.5em ;
|
|
||||||
padding-right: 0.5em ;
|
|
||||||
vertical-align: top }
|
|
||||||
|
|
||||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
|
||||||
font-weight: bold ;
|
|
||||||
text-align: left ;
|
|
||||||
white-space: nowrap ;
|
|
||||||
padding-left: 0 }
|
|
||||||
|
|
||||||
/* "booktabs" style (no vertical lines) */
|
|
||||||
table.docutils.booktabs {
|
|
||||||
border: 0px;
|
|
||||||
border-top: 2px solid;
|
|
||||||
border-bottom: 2px solid;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
table.docutils.booktabs * {
|
|
||||||
border: 0px;
|
|
||||||
}
|
|
||||||
table.docutils.booktabs th {
|
|
||||||
border-bottom: thin solid;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
|
||||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
|
||||||
font-size: 100% }
|
|
||||||
|
|
||||||
ul.auto-toc {
|
|
||||||
list-style-type: none }
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="document" id="contributing-to-dfhack">
|
|
||||||
<h1 class="title">Contributing to DFHACK</h1>
|
|
||||||
|
|
||||||
<div class="contents topic" id="contents">
|
|
||||||
<p class="topic-title first">Contents</p>
|
|
||||||
<ul class="simple">
|
|
||||||
<li><a class="reference internal" href="#id1" id="id2">Contributing to DFHack</a><ul>
|
|
||||||
<li><a class="reference internal" href="#code-format" id="id3">Code Format</a></li>
|
|
||||||
<li><a class="reference internal" href="#how-to-get-new-code-into-dfhack" id="id4">How to get new code into DFHack</a></li>
|
|
||||||
<li><a class="reference internal" href="#memory-research" id="id5">Memory research</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="id1">
|
|
||||||
<h1><a class="toc-backref" href="#id2">Contributing to DFHack</a></h1>
|
|
||||||
<p>Several things should be kept in mind when contributing to DFHack.</p>
|
|
||||||
<div class="section" id="code-format">
|
|
||||||
<h2><a class="toc-backref" href="#id3">Code Format</a></h2>
|
|
||||||
<ul class="simple">
|
|
||||||
<li>Four space indents for C++. Never use tabs for indentation in any language.</li>
|
|
||||||
<li>LF (Unix style) line terminators</li>
|
|
||||||
<li>Avoid trailing whitespace</li>
|
|
||||||
<li>UTF-8 encoding</li>
|
|
||||||
<li>For C++:<ul>
|
|
||||||
<li>Opening and closing braces on their own lines or opening brace at the end of the previous line</li>
|
|
||||||
<li>Braces placed at original indent level if on their own lines</li>
|
|
||||||
<li>#includes should be sorted. C++ libraries first, then dfhack modules, then df structures, then local includes. Within each category they should be sorted alphabetically. This policy is currently broken by most C++ files but try to follow it if you can.</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="how-to-get-new-code-into-dfhack">
|
|
||||||
<h2><a class="toc-backref" href="#id4">How to get new code into DFHack</a></h2>
|
|
||||||
<ul class="simple">
|
|
||||||
<li>Submit pull requests to the develop branch, not the master branch. The master branch always points at the most recent release.</li>
|
|
||||||
<li>Use new branches for each feature/fix so that your changes can be merged independently.</li>
|
|
||||||
<li>If possible, compile on multiple platforms</li>
|
|
||||||
<li>Do update NEWS/Contributors.rst</li>
|
|
||||||
<li>Do <strong>NOT</strong> run fix-texts.sh or update .html files (except to locally test changes to .rst files)</li>
|
|
||||||
<li>Create a Github Pull Request once finished</li>
|
|
||||||
<li>Work done against <a class="reference external" href="http://github.com/DFHack/dfhack/issues">issues</a> that are tagged "bug report" gets priority<ul>
|
|
||||||
<li>Submit ideas and bug reports as issues on github. Posts in the forum thread are also acceptable but can get missed or forgotten more easily.</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="memory-research">
|
|
||||||
<h2><a class="toc-backref" href="#id5">Memory research</a></h2>
|
|
||||||
<p>If you want to do memory research, you'll need some tools and some knowledge.
|
|
||||||
In general, you'll need a good memory viewer and optionally something
|
|
||||||
to look at machine code without getting crazy :)</p>
|
|
||||||
<p>Good windows tools include:</p>
|
|
||||||
<ul class="simple">
|
|
||||||
<li>Cheat Engine</li>
|
|
||||||
<li>IDA Pro 5.0 (freely available for non-commercial use)</li>
|
|
||||||
</ul>
|
|
||||||
<p>Good linux tools:</p>
|
|
||||||
<ul class="simple">
|
|
||||||
<li>angavrilov's df-structures gui (visit us on IRC for details).</li>
|
|
||||||
<li>edb (Evan's Debugger)</li>
|
|
||||||
<li>IDA Pro 5.0 running under Wine</li>
|
|
||||||
<li>Some of the tools residing in the <tt class="docutils literal">legacy</tt> dfhack branch.</li>
|
|
||||||
</ul>
|
|
||||||
<p>Using publicly known information and analyzing the game's data is preferred.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,59 +0,0 @@
|
|||||||
######################
|
|
||||||
Contributing to DFHACK
|
|
||||||
######################
|
|
||||||
|
|
||||||
.. contents::
|
|
||||||
|
|
||||||
Contributing to DFHack
|
|
||||||
======================
|
|
||||||
|
|
||||||
Several things should be kept in mind when contributing to DFHack.
|
|
||||||
|
|
||||||
-----------
|
|
||||||
Code Format
|
|
||||||
-----------
|
|
||||||
|
|
||||||
* Four space indents for C++. Never use tabs for indentation in any language.
|
|
||||||
* LF (Unix style) line terminators
|
|
||||||
* Avoid trailing whitespace
|
|
||||||
* UTF-8 encoding
|
|
||||||
* For C++:
|
|
||||||
|
|
||||||
* Opening and closing braces on their own lines or opening brace at the end of the previous line
|
|
||||||
* Braces placed at original indent level if on their own lines
|
|
||||||
* #includes should be sorted. C++ libraries first, then dfhack modules, then df structures, then local includes. Within each category they should be sorted alphabetically. This policy is currently broken by most C++ files but try to follow it if you can.
|
|
||||||
|
|
||||||
-------------------------------
|
|
||||||
How to get new code into DFHack
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
* Submit pull requests to the ``develop`` branch, not the master branch. The master branch always points at the most recent release.
|
|
||||||
* Use new branches for each feature/fix so that your changes can be merged independently (i.e. not the master or develop branch of your fork).
|
|
||||||
* If possible, compile on multiple platforms
|
|
||||||
* Update NEWS and Contributors.rst when applicable
|
|
||||||
* Do **NOT** run fixTexts.sh or update .html files (except to locally test changes to .rst files)
|
|
||||||
* Create a Github Pull Request once finished
|
|
||||||
* Work done against `issues <http://github.com/DFHack/dfhack/issues>`_ that are tagged "bug report" gets priority
|
|
||||||
|
|
||||||
* Submit ideas and bug reports as issues on Github. Posts in the forum thread are also acceptable but can get missed or forgotten more easily.
|
|
||||||
|
|
||||||
---------------
|
|
||||||
Memory research
|
|
||||||
---------------
|
|
||||||
If you want to do memory research, you'll need some tools and some knowledge.
|
|
||||||
In general, you'll need a good memory viewer and optionally something
|
|
||||||
to look at machine code without getting crazy :)
|
|
||||||
|
|
||||||
Good windows tools include:
|
|
||||||
|
|
||||||
* Cheat Engine
|
|
||||||
* IDA Pro 5.0 (freely available for non-commercial use)
|
|
||||||
|
|
||||||
Good linux tools:
|
|
||||||
|
|
||||||
* angavrilov's df-structures gui (visit us on IRC for details).
|
|
||||||
* edb (Evan's Debugger)
|
|
||||||
* IDA Pro 5.0 running under Wine
|
|
||||||
* Some of the tools residing in the ``legacy`` dfhack branch.
|
|
||||||
|
|
||||||
Using publicly known information and analyzing the game's data is preferred.
|
|
@ -1,703 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
|
|
||||||
<title>Contributors</title>
|
|
||||||
<style type="text/css">
|
|
||||||
|
|
||||||
/*
|
|
||||||
:Author: David Goodger (goodger@python.org)
|
|
||||||
:Id: $Id: html4css1.css 7614 2013-02-21 15:55:51Z milde $
|
|
||||||
:Copyright: This stylesheet has been placed in the public domain.
|
|
||||||
|
|
||||||
Default cascading style sheet for the HTML output of Docutils.
|
|
||||||
|
|
||||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
|
||||||
customize this style sheet.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* used to remove borders from tables and images */
|
|
||||||
.borderless, table.borderless td, table.borderless th {
|
|
||||||
border: 0 }
|
|
||||||
|
|
||||||
table.borderless td, table.borderless th {
|
|
||||||
/* Override padding for "table.docutils td" with "! important".
|
|
||||||
The right padding separates the table cells. */
|
|
||||||
padding: 0 0.5em 0 0 ! important }
|
|
||||||
|
|
||||||
.first {
|
|
||||||
/* Override more specific margin styles with "! important". */
|
|
||||||
margin-top: 0 ! important }
|
|
||||||
|
|
||||||
.last, .with-subtitle {
|
|
||||||
margin-bottom: 0 ! important }
|
|
||||||
|
|
||||||
.hidden {
|
|
||||||
display: none }
|
|
||||||
|
|
||||||
a.toc-backref {
|
|
||||||
text-decoration: none ;
|
|
||||||
color: black }
|
|
||||||
|
|
||||||
blockquote.epigraph {
|
|
||||||
margin: 2em 5em ; }
|
|
||||||
|
|
||||||
dl.docutils dd {
|
|
||||||
margin-bottom: 0.5em }
|
|
||||||
|
|
||||||
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
|
||||||
dl.docutils dt {
|
|
||||||
font-weight: bold }
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.abstract {
|
|
||||||
margin: 2em 5em }
|
|
||||||
|
|
||||||
div.abstract p.topic-title {
|
|
||||||
font-weight: bold ;
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
|
||||||
div.hint, div.important, div.note, div.tip, div.warning {
|
|
||||||
margin: 2em ;
|
|
||||||
border: medium outset ;
|
|
||||||
padding: 1em }
|
|
||||||
|
|
||||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
|
||||||
div.important p.admonition-title, div.note p.admonition-title,
|
|
||||||
div.tip p.admonition-title {
|
|
||||||
font-weight: bold ;
|
|
||||||
font-family: sans-serif }
|
|
||||||
|
|
||||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
|
||||||
div.danger p.admonition-title, div.error p.admonition-title,
|
|
||||||
div.warning p.admonition-title, .code .error {
|
|
||||||
color: red ;
|
|
||||||
font-weight: bold ;
|
|
||||||
font-family: sans-serif }
|
|
||||||
|
|
||||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
|
||||||
compound paragraphs.
|
|
||||||
div.compound .compound-first, div.compound .compound-middle {
|
|
||||||
margin-bottom: 0.5em }
|
|
||||||
|
|
||||||
div.compound .compound-last, div.compound .compound-middle {
|
|
||||||
margin-top: 0.5em }
|
|
||||||
*/
|
|
||||||
|
|
||||||
div.dedication {
|
|
||||||
margin: 2em 5em ;
|
|
||||||
text-align: center ;
|
|
||||||
font-style: italic }
|
|
||||||
|
|
||||||
div.dedication p.topic-title {
|
|
||||||
font-weight: bold ;
|
|
||||||
font-style: normal }
|
|
||||||
|
|
||||||
div.figure {
|
|
||||||
margin-left: 2em ;
|
|
||||||
margin-right: 2em }
|
|
||||||
|
|
||||||
div.footer, div.header {
|
|
||||||
clear: both;
|
|
||||||
font-size: smaller }
|
|
||||||
|
|
||||||
div.line-block {
|
|
||||||
display: block ;
|
|
||||||
margin-top: 1em ;
|
|
||||||
margin-bottom: 1em }
|
|
||||||
|
|
||||||
div.line-block div.line-block {
|
|
||||||
margin-top: 0 ;
|
|
||||||
margin-bottom: 0 ;
|
|
||||||
margin-left: 1.5em }
|
|
||||||
|
|
||||||
div.sidebar {
|
|
||||||
margin: 0 0 0.5em 1em ;
|
|
||||||
border: medium outset ;
|
|
||||||
padding: 1em ;
|
|
||||||
background-color: #ffffee ;
|
|
||||||
width: 40% ;
|
|
||||||
float: right ;
|
|
||||||
clear: right }
|
|
||||||
|
|
||||||
div.sidebar p.rubric {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-size: medium }
|
|
||||||
|
|
||||||
div.system-messages {
|
|
||||||
margin: 5em }
|
|
||||||
|
|
||||||
div.system-messages h1 {
|
|
||||||
color: red }
|
|
||||||
|
|
||||||
div.system-message {
|
|
||||||
border: medium outset ;
|
|
||||||
padding: 1em }
|
|
||||||
|
|
||||||
div.system-message p.system-message-title {
|
|
||||||
color: red ;
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
div.topic {
|
|
||||||
margin: 2em }
|
|
||||||
|
|
||||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
|
||||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
|
||||||
margin-top: 0.4em }
|
|
||||||
|
|
||||||
h1.title {
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
h2.subtitle {
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
hr.docutils {
|
|
||||||
width: 75% }
|
|
||||||
|
|
||||||
img.align-left, .figure.align-left, object.align-left {
|
|
||||||
clear: left ;
|
|
||||||
float: left ;
|
|
||||||
margin-right: 1em }
|
|
||||||
|
|
||||||
img.align-right, .figure.align-right, object.align-right {
|
|
||||||
clear: right ;
|
|
||||||
float: right ;
|
|
||||||
margin-left: 1em }
|
|
||||||
|
|
||||||
img.align-center, .figure.align-center, object.align-center {
|
|
||||||
display: block;
|
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.align-left {
|
|
||||||
text-align: left }
|
|
||||||
|
|
||||||
.align-center {
|
|
||||||
clear: both ;
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
.align-right {
|
|
||||||
text-align: right }
|
|
||||||
|
|
||||||
/* reset inner alignment in figures */
|
|
||||||
div.align-right {
|
|
||||||
text-align: inherit }
|
|
||||||
|
|
||||||
/* div.align-center * { */
|
|
||||||
/* text-align: left } */
|
|
||||||
|
|
||||||
ol.simple, ul.simple {
|
|
||||||
margin-bottom: 1em }
|
|
||||||
|
|
||||||
ol.arabic {
|
|
||||||
list-style: decimal }
|
|
||||||
|
|
||||||
ol.loweralpha {
|
|
||||||
list-style: lower-alpha }
|
|
||||||
|
|
||||||
ol.upperalpha {
|
|
||||||
list-style: upper-alpha }
|
|
||||||
|
|
||||||
ol.lowerroman {
|
|
||||||
list-style: lower-roman }
|
|
||||||
|
|
||||||
ol.upperroman {
|
|
||||||
list-style: upper-roman }
|
|
||||||
|
|
||||||
p.attribution {
|
|
||||||
text-align: right ;
|
|
||||||
margin-left: 50% }
|
|
||||||
|
|
||||||
p.caption {
|
|
||||||
font-style: italic }
|
|
||||||
|
|
||||||
p.credits {
|
|
||||||
font-style: italic ;
|
|
||||||
font-size: smaller }
|
|
||||||
|
|
||||||
p.label {
|
|
||||||
white-space: nowrap }
|
|
||||||
|
|
||||||
p.rubric {
|
|
||||||
font-weight: bold ;
|
|
||||||
font-size: larger ;
|
|
||||||
color: maroon ;
|
|
||||||
text-align: center }
|
|
||||||
|
|
||||||
p.sidebar-title {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-weight: bold ;
|
|
||||||
font-size: larger }
|
|
||||||
|
|
||||||
p.sidebar-subtitle {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
p.topic-title {
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
pre.address {
|
|
||||||
margin-bottom: 0 ;
|
|
||||||
margin-top: 0 ;
|
|
||||||
font: inherit }
|
|
||||||
|
|
||||||
pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
|
||||||
margin-left: 2em ;
|
|
||||||
margin-right: 2em }
|
|
||||||
|
|
||||||
pre.code .ln { color: grey; } /* line numbers */
|
|
||||||
pre.code, code { background-color: #eeeeee }
|
|
||||||
pre.code .comment, code .comment { color: #5C6576 }
|
|
||||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
|
||||||
pre.code .literal.string, code .literal.string { color: #0C5404 }
|
|
||||||
pre.code .name.builtin, code .name.builtin { color: #352B84 }
|
|
||||||
pre.code .deleted, code .deleted { background-color: #DEB0A1}
|
|
||||||
pre.code .inserted, code .inserted { background-color: #A3D289}
|
|
||||||
|
|
||||||
span.classifier {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-style: oblique }
|
|
||||||
|
|
||||||
span.classifier-delimiter {
|
|
||||||
font-family: sans-serif ;
|
|
||||||
font-weight: bold }
|
|
||||||
|
|
||||||
span.interpreted {
|
|
||||||
font-family: sans-serif }
|
|
||||||
|
|
||||||
span.option {
|
|
||||||
white-space: nowrap }
|
|
||||||
|
|
||||||
span.pre {
|
|
||||||
white-space: pre }
|
|
||||||
|
|
||||||
span.problematic {
|
|
||||||
color: red }
|
|
||||||
|
|
||||||
span.section-subtitle {
|
|
||||||
/* font-size relative to parent (h1..h6 element) */
|
|
||||||
font-size: 80% }
|
|
||||||
|
|
||||||
table.citation {
|
|
||||||
border-left: solid 1px gray;
|
|
||||||
margin-left: 1px }
|
|
||||||
|
|
||||||
table.docinfo {
|
|
||||||
margin: 2em 4em }
|
|
||||||
|
|
||||||
table.docutils {
|
|
||||||
margin-top: 0.5em ;
|
|
||||||
margin-bottom: 0.5em }
|
|
||||||
|
|
||||||
table.footnote {
|
|
||||||
border-left: solid 1px black;
|
|
||||||
margin-left: 1px }
|
|
||||||
|
|
||||||
table.docutils td, table.docutils th,
|
|
||||||
table.docinfo td, table.docinfo th {
|
|
||||||
padding-left: 0.5em ;
|
|
||||||
padding-right: 0.5em ;
|
|
||||||
vertical-align: top }
|
|
||||||
|
|
||||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
|
||||||
font-weight: bold ;
|
|
||||||
text-align: left ;
|
|
||||||
white-space: nowrap ;
|
|
||||||
padding-left: 0 }
|
|
||||||
|
|
||||||
/* "booktabs" style (no vertical lines) */
|
|
||||||
table.docutils.booktabs {
|
|
||||||
border: 0px;
|
|
||||||
border-top: 2px solid;
|
|
||||||
border-bottom: 2px solid;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
table.docutils.booktabs * {
|
|
||||||
border: 0px;
|
|
||||||
}
|
|
||||||
table.docutils.booktabs th {
|
|
||||||
border-bottom: thin solid;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
|
||||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
|
||||||
font-size: 100% }
|
|
||||||
|
|
||||||
ul.auto-toc {
|
|
||||||
list-style-type: none }
|
|
||||||
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="document" id="contributors">
|
|
||||||
<h1 class="title">Contributors</h1>
|
|
||||||
|
|
||||||
<p>If you belong here and are missing, please add yourself and send me (peterix) a pull request :-)</p>
|
|
||||||
<p>The following is a list of people who have contributed to <strong>DFHack</strong>.</p>
|
|
||||||
<table border="1" class="docutils">
|
|
||||||
<colgroup>
|
|
||||||
<col width="31%" />
|
|
||||||
<col width="27%" />
|
|
||||||
<col width="43%" />
|
|
||||||
</colgroup>
|
|
||||||
<thead valign="bottom">
|
|
||||||
<tr><th class="head">Name</th>
|
|
||||||
<th class="head">Github</th>
|
|
||||||
<th class="head">Email</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody valign="top">
|
|
||||||
<tr><td>Petr Mrázek</td>
|
|
||||||
<td>peterix</td>
|
|
||||||
<td><a class="reference external" href="mailto:peterix@gmail.com">peterix@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Alexander Gavrilov</td>
|
|
||||||
<td>angavrilov</td>
|
|
||||||
<td><a class="reference external" href="mailto:angavrilov@gmail.com">angavrilov@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>doomchild</td>
|
|
||||||
<td>doomchild</td>
|
|
||||||
<td><a class="reference external" href="mailto:lee.crabtree@gmail.com">lee.crabtree@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Quietust</td>
|
|
||||||
<td>quietust</td>
|
|
||||||
<td><a class="reference external" href="mailto:quietust@gmail.com">quietust@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>jj</td>
|
|
||||||
<td>jjyg</td>
|
|
||||||
<td><a class="reference external" href="mailto:john-git@ofjj.net">john-git@ofjj.net</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Warmist</td>
|
|
||||||
<td>warmist</td>
|
|
||||||
<td><a class="reference external" href="mailto:warmist@gmail.com">warmist@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Robert Heinrich</td>
|
|
||||||
<td>rh73</td>
|
|
||||||
<td><a class="reference external" href="mailto:robertheinrich73@googlemail.com">robertheinrich73@googlemail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>simon</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:simon@banquise.net">simon@banquise.net</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Kelly Martin</td>
|
|
||||||
<td>ab9rf</td>
|
|
||||||
<td><a class="reference external" href="mailto:kelly.lynn.martin@gmail.com">kelly.lynn.martin@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>mizipzor</td>
|
|
||||||
<td>mizipzor</td>
|
|
||||||
<td><a class="reference external" href="mailto:mizipzor@gmail.com">mizipzor@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Simon Jackson</td>
|
|
||||||
<td>sizeak</td>
|
|
||||||
<td><a class="reference external" href="mailto:sizeak@hotmail.com">sizeak@hotmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>belal</td>
|
|
||||||
<td>jimhester</td>
|
|
||||||
<td><a class="reference external" href="mailto:jimbelal@gmail.com">jimbelal@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>RusAnon</td>
|
|
||||||
<td>RusAnon</td>
|
|
||||||
<td><a class="reference external" href="mailto:rusanon@dollchan.ru">rusanon@dollchan.ru</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Raoul XQ</td>
|
|
||||||
<td>raoulxq</td>
|
|
||||||
<td><a class="reference external" href="mailto:raoulxq@gmail.com">raoulxq@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Matthew Cline</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:zelgadis@sourceforge.net">zelgadis@sourceforge.net</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Mike Stewart</td>
|
|
||||||
<td>thewonderidiot</td>
|
|
||||||
<td><a class="reference external" href="mailto:thewonderidiot@gmail.com">thewonderidiot@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Timothy Collett</td>
|
|
||||||
<td>danaris</td>
|
|
||||||
<td><a class="reference external" href="mailto:tcollett+github@topazgryphon.org">tcollett+github@topazgryphon.org</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>RossM</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:Ross@Gnome">Ross@Gnome</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Tom Prince</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:tom.prince@ualberta.net">tom.prince@ualberta.net</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Jared Adams</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:jaxad0127@gmail.com">jaxad0127@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>expwnent</td>
|
|
||||||
<td>expwnent</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Erik Youngren</td>
|
|
||||||
<td>Artanis</td>
|
|
||||||
<td><a class="reference external" href="mailto:artanis.00@gmail.com">artanis.00@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Espen Wiborg</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:espen.wiborg@telio.no">espen.wiborg@telio.no</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Tim Walberg</td>
|
|
||||||
<td>twalberg</td>
|
|
||||||
<td><a class="reference external" href="mailto:twalberg@comcast.net">twalberg@comcast.net</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Mikko Juola</td>
|
|
||||||
<td>Noeda</td>
|
|
||||||
<td><a class="reference external" href="mailto:mikko.juola@kolumbus.fi">mikko.juola@kolumbus.fi</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>rampaging-poet</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:yrudoingthis@hotmail.com">yrudoingthis@hotmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>U-glouglou\simon</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:simon@glouglou">simon@glouglou</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Clayton Hughes</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:clayton.hughes@gmail.com">clayton.hughes@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>zilpin</td>
|
|
||||||
<td>zilpin</td>
|
|
||||||
<td><a class="reference external" href="mailto:ziLpin@gmail.com">ziLpin@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Will Rogers</td>
|
|
||||||
<td>wjrogers</td>
|
|
||||||
<td><a class="reference external" href="mailto:wjrogers@gmail.com">wjrogers@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>NMLittle</td>
|
|
||||||
<td>nmlittle</td>
|
|
||||||
<td><a class="reference external" href="mailto:nmlittle@gmail.com">nmlittle@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>root</td>
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>reverb</td>
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Zhentar</td>
|
|
||||||
<td>Zhentar</td>
|
|
||||||
<td><a class="reference external" href="mailto:Zhentar@gmail.com">Zhentar@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Valentin Ochs</td>
|
|
||||||
<td>Cat-Ion</td>
|
|
||||||
<td><a class="reference external" href="mailto:a@0au.de">a@0au.de</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Priit Laes</td>
|
|
||||||
<td>plaes</td>
|
|
||||||
<td><a class="reference external" href="mailto:plaes@plaes.org">plaes@plaes.org</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>kmartin</td>
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Neil Little</td>
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>rout</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:rout.mail+github@gmail.com">rout.mail+github@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>rofl0r</td>
|
|
||||||
<td>rofl0r</td>
|
|
||||||
<td><a class="reference external" href="mailto:retnyg@gmx.net">retnyg@gmx.net</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>harlanplayford</td>
|
|
||||||
<td>playfordh</td>
|
|
||||||
<td><a class="reference external" href="mailto:harlanplayford@gmail.com">harlanplayford@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>John Shade</td>
|
|
||||||
<td>gsvslto</td>
|
|
||||||
<td><a class="reference external" href="mailto:gsvslto@gmail.com">gsvslto@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>sami</td>
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>potato</td>
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>feng1st</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:nf_xp@hotmail.com">nf_xp@hotmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>comestible</td>
|
|
||||||
<td>nickrart</td>
|
|
||||||
<td><a class="reference external" href="mailto:nickolas.g.russell@gmail.com">nickolas.g.russell@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Rumrusher</td>
|
|
||||||
<td>rumrusher</td>
|
|
||||||
<td><a class="reference external" href="mailto:Anuleakage@yahoo.com">Anuleakage@yahoo.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Rinin</td>
|
|
||||||
<td>Rinin</td>
|
|
||||||
<td><a class="reference external" href="mailto:RininS@Gmail.com">RininS@Gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Raoul van Putten</td>
|
|
||||||
<td> </td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>John Beisley</td>
|
|
||||||
<td>huin</td>
|
|
||||||
<td><a class="reference external" href="mailto:greatred@gmail.com">greatred@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Feng</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:nf_xp@hotmail.com">nf_xp@hotmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Donald Ruegsegger</td>
|
|
||||||
<td>hashaash</td>
|
|
||||||
<td><a class="reference external" href="mailto:druegsegger@gmail.com">druegsegger@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Caldfir</td>
|
|
||||||
<td>caldfir</td>
|
|
||||||
<td><a class="reference external" href="mailto:caldfir@hotmail.com">caldfir@hotmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Antalia</td>
|
|
||||||
<td>tamarakorr</td>
|
|
||||||
<td><a class="reference external" href="mailto:tamarakorr@gmail.com">tamarakorr@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Angus Mezick</td>
|
|
||||||
<td>amezick</td>
|
|
||||||
<td><a class="reference external" href="mailto:amezick@gmail.com">amezick@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Japa</td>
|
|
||||||
<td>JapaMala</td>
|
|
||||||
<td><a class="reference external" href="mailto:japa.mala.illo@gmail.com">japa.mala.illo@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Putnam</td>
|
|
||||||
<td>Putnam3145</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Lethosor</td>
|
|
||||||
<td>lethosor</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>PeridexisErrant</td>
|
|
||||||
<td>PeridexisErrant</td>
|
|
||||||
<td><a class="reference external" href="mailto:PeridexisErrant@gmail.com">PeridexisErrant@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Eswald</td>
|
|
||||||
<td>eswald</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Ramblurr</td>
|
|
||||||
<td>Ramblurr</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>MithrilTuxedo</td>
|
|
||||||
<td>MithrilTuxedo</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>AndreasPK</td>
|
|
||||||
<td>AndreasPK</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Chris Dombroski</td>
|
|
||||||
<td>cdombroski</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Ben Lubar</td>
|
|
||||||
<td>BenLubar</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>miffedmap</td>
|
|
||||||
<td>miffedmap</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>scamtank</td>
|
|
||||||
<td>scamtank</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Mason11987</td>
|
|
||||||
<td>Mason11987</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>James Logsdon</td>
|
|
||||||
<td>jlogsdon</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>melkor217</td>
|
|
||||||
<td>melkor217</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<p>And these are the cool people who made <strong>Stonesense</strong>.</p>
|
|
||||||
<table border="1" class="docutils">
|
|
||||||
<colgroup>
|
|
||||||
<col width="31%" />
|
|
||||||
<col width="27%" />
|
|
||||||
<col width="43%" />
|
|
||||||
</colgroup>
|
|
||||||
<thead valign="bottom">
|
|
||||||
<tr><th class="head">Name</th>
|
|
||||||
<th class="head">Github</th>
|
|
||||||
<th class="head">Email</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody valign="top">
|
|
||||||
<tr><td>Kris Parker</td>
|
|
||||||
<td>kaypy</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Japa</td>
|
|
||||||
<td>JapaMala</td>
|
|
||||||
<td><a class="reference external" href="mailto:japa.mala.illo@gmail.com">japa.mala.illo@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Jonas Ask</td>
|
|
||||||
<td> </td>
|
|
||||||
<td><a class="reference external" href="mailto:jonask84@gmail.com">jonask84@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Petr Mrázek</td>
|
|
||||||
<td>peterix</td>
|
|
||||||
<td><a class="reference external" href="mailto:peterix@gmail.com">peterix@gmail.com</a>></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Caldfir</td>
|
|
||||||
<td>caldfir</td>
|
|
||||||
<td><a class="reference external" href="mailto:aitken.tim@gmail.com">aitken.tim@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>8Z</td>
|
|
||||||
<td>8Z</td>
|
|
||||||
<td><a class="reference external" href="mailto:git8z@ya.ru">git8z@ya.ru</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Alexander Gavrilov</td>
|
|
||||||
<td>angavrilov</td>
|
|
||||||
<td><a class="reference external" href="mailto:angavrilov@gmail.com">angavrilov@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Timothy Collett</td>
|
|
||||||
<td>danaris</td>
|
|
||||||
<td><a class="reference external" href="mailto:tcollett+github@topazgryphon.org">tcollett+github@topazgryphon.org</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Lethosor</td>
|
|
||||||
<td>lethosor</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>Eswald</td>
|
|
||||||
<td>eswald</td>
|
|
||||||
<td> </td>
|
|
||||||
</tr>
|
|
||||||
<tr><td>PeridexisErrant</td>
|
|
||||||
<td>PeridexisErrant</td>
|
|
||||||
<td><a class="reference external" href="mailto:PeridexisErrant@gmail.com">PeridexisErrant@gmail.com</a></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<!-- DO NOT CHANGE THIS FILE - it redirects to the actual documentation. -->
|
||||||
|
<!-- If the page is not found, you can read the raw docs in the docs folder. -->
|
||||||
|
<html lang="en-US">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta http-equiv="refresh" content="0;url=./docs/html/README.html">
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.location.href = "./docs/html/README.html"
|
||||||
|
</script>
|
||||||
|
<title>Page Redirection</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
If you are not redirected automatically, follow the <a href='./docs/html/README.html'>link to the documentation.</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,59 @@
|
|||||||
|
Welcome to DFHack's documentation!
|
||||||
|
==================================
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
============
|
||||||
|
DFHack is a Dwarf Fortress memory access library, distributed with scripts
|
||||||
|
and plugins implementing a wide variety of useful functions and tools.
|
||||||
|
|
||||||
|
For users, it provides a significant suite of bugfixes and interface
|
||||||
|
enhancements by default, and more can be enabled. There are also many tools
|
||||||
|
(such as `plugins/workflow` or `plugins/autodump`) which can make life easier.
|
||||||
|
You can even add third-party scripts and plugins to do almost anything!
|
||||||
|
|
||||||
|
For modders, DFHack makes many things possible. Custom reactions, new
|
||||||
|
interactions, magic creature abilities, and more can be set through `scripts <scripts/modtools>`
|
||||||
|
and custom raws. Non-standard DFHack scripts and inits can be stored in the
|
||||||
|
raw directory, making raws or saves fully self-contained for distribution -
|
||||||
|
or for coexistence in a single DF install, even with incompatible components.
|
||||||
|
|
||||||
|
For developers, DFHack unites the various ways tools access DF memory and
|
||||||
|
allows easier development of new tools. As an open-source project under
|
||||||
|
`various copyleft licences <license>`, contributions are welcome.
|
||||||
|
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
=============
|
||||||
|
DFHack documentation is generated by Sphinx. Check out the table of contents
|
||||||
|
below, or the sources in the `docs folder`_!
|
||||||
|
|
||||||
|
.. _`docs folder`: ./docs
|
||||||
|
|
||||||
|
User Manual:
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
docs/Core
|
||||||
|
docs/Plugins
|
||||||
|
docs/Scripts
|
||||||
|
|
||||||
|
Other Contents:
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
docs/Authors
|
||||||
|
docs/Licenses
|
||||||
|
docs/Changelog
|
||||||
|
|
||||||
|
For Developers:
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
docs/Contributing
|
||||||
|
docs/Compile
|
||||||
|
docs/Lua API
|
||||||
|
library/xml/SYNTAX
|
||||||
|
docs/Binpatches
|
@ -0,0 +1,180 @@
|
|||||||
|
.. _binpatches:
|
||||||
|
|
||||||
|
######################
|
||||||
|
Patching the DF binary
|
||||||
|
######################
|
||||||
|
|
||||||
|
Writing scripts and plugins for DFHack is not the only way to modify Dwarf
|
||||||
|
Fortress. Before DFHack, it was common for tools to manually patch the
|
||||||
|
binary to change behaviour, and DFHack still contains tools to do this via
|
||||||
|
the `scripts/binpatch` command.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
We recommend using a script or plugin instead of a raw patch if
|
||||||
|
at all possible - that way your work will work for many versions
|
||||||
|
across multiple operating systems. There's a reason nobody has
|
||||||
|
written patches since ``0.34.11``!
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
|
||||||
|
Getting a patch
|
||||||
|
===============
|
||||||
|
There are no binary patches available for Dwarf Fortress versions after 0.34.11
|
||||||
|
|
||||||
|
This system is kept for the chance that someone will find it useful, so some
|
||||||
|
hints on how to write your own follow. This will require disassembly and
|
||||||
|
decent skill in `memory research <contributing-memory-research>`.
|
||||||
|
|
||||||
|
* The patches are expected to be encoded in text format used by IDA.
|
||||||
|
|
||||||
|
* See `this commit <https://github.com/DFHack/dfhack/commit/8a9e3d1a728>`_,
|
||||||
|
when the 0.34.11 patches were discarded, for example patches.
|
||||||
|
|
||||||
|
* `Issue #546 <https://github.com/DFHack/dfhack/issues/546>`_ is about the
|
||||||
|
future of the binpatches, and may be useful reading.
|
||||||
|
|
||||||
|
If you want to write a patch, the armory patches discussed here and documented
|
||||||
|
below would probably be the best place to start.
|
||||||
|
|
||||||
|
|
||||||
|
Using a patch
|
||||||
|
=============
|
||||||
|
There are two methods to apply a patch.
|
||||||
|
|
||||||
|
Patching at runtime
|
||||||
|
-------------------
|
||||||
|
The `scripts/binpatch` script checks, applies or removes binary patches
|
||||||
|
directly in memory at runtime::
|
||||||
|
|
||||||
|
binpatch [check|apply|remove] <patchname>
|
||||||
|
|
||||||
|
If the name of the patch has no extension or directory separators, the
|
||||||
|
script uses ``hack/patches/<df-version>/<name>.dif``, thus auto-selecting
|
||||||
|
the version appropriate for the currently loaded executable.
|
||||||
|
|
||||||
|
This is the preferred method; it's easier to debug, does not cause persistent
|
||||||
|
problems, and leaves file checksums alone. As with many other commands, users
|
||||||
|
can simply add it to ``dfhack.init`` to reapply the patch every time DF is run.
|
||||||
|
|
||||||
|
|
||||||
|
Patching on disk
|
||||||
|
----------------
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
This method of patching is deprecated, and may be removed without notice.
|
||||||
|
You should use the runtime patching option above.
|
||||||
|
|
||||||
|
DFHack includes a small stand-alone utility for applying and removing
|
||||||
|
binary patches from the game executable. Use it from the regular operating
|
||||||
|
system console:
|
||||||
|
|
||||||
|
``binpatch check "Dwarf Fortress.exe" patch.dif``
|
||||||
|
Checks and prints if the patch is currently applied.
|
||||||
|
|
||||||
|
``binpatch apply "Dwarf Fortress.exe" patch.dif``
|
||||||
|
Applies the patch, unless it is already applied or in conflict.
|
||||||
|
|
||||||
|
``binpatch remove "Dwarf Fortress.exe" patch.dif``
|
||||||
|
Removes the patch, unless it is already removed.
|
||||||
|
|
||||||
|
If you use a permanent patch under OSX or Linux, you must update
|
||||||
|
``symbols.xml`` with the new checksum of the executable. Find the relevant
|
||||||
|
section, and add a new line::
|
||||||
|
|
||||||
|
<md5-hash value='????????????????????????????????'/>
|
||||||
|
|
||||||
|
In order to find the correct value of the hash, look into stderr.log;
|
||||||
|
DFHack prints an error there if it does not recognize the hash.
|
||||||
|
|
||||||
|
.. _binpatches/needs-patch:
|
||||||
|
|
||||||
|
Tools reliant on binpatches
|
||||||
|
===========================
|
||||||
|
Some DFHack tools require the game to be patched to work. As no patches
|
||||||
|
are currently available, the full description of each is included here.
|
||||||
|
|
||||||
|
fix-armory
|
||||||
|
----------
|
||||||
|
Enables a fix for storage of squad equipment in barracks.
|
||||||
|
|
||||||
|
Specifically, it prevents your haulers from moving squad equipment
|
||||||
|
to stockpiles, and instead queues jobs to store it on weapon racks,
|
||||||
|
armor stands, and in containers.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
In order to actually be used, weapon racks have to be patched and
|
||||||
|
manually assigned to a squad. See `scripts/gui/assign-rack`.
|
||||||
|
|
||||||
|
Note that the buildings in the armory are used as follows:
|
||||||
|
|
||||||
|
* Weapon racks (when patched) are used to store any assigned weapons.
|
||||||
|
Each rack belongs to a specific squad, and can store up to 5 weapons.
|
||||||
|
|
||||||
|
* Armor stands belong to specific squad members and are used for
|
||||||
|
armor and shields.
|
||||||
|
|
||||||
|
* Cabinets are used to store assigned clothing for a specific squad member.
|
||||||
|
They are **never** used to store owned clothing.
|
||||||
|
|
||||||
|
* Chests (boxes, etc) are used for a flask, backpack or quiver assigned
|
||||||
|
to the squad member. Due to a probable bug, food is dropped out of the
|
||||||
|
backpack when it is stored.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
Although armor stands, cabinets and chests properly belong only to one
|
||||||
|
squad member, the owner of the building used to create the barracks will
|
||||||
|
randomly use any containers inside the room. Thus, it is recommended to
|
||||||
|
always create the armory from a weapon rack.
|
||||||
|
|
||||||
|
Contrary to the common misconception, all these uses are controlled by the
|
||||||
|
*Individual Equipment* usage flag. The *Squad Equipment* flag is actually
|
||||||
|
intended for ammo, but the game does even less in that area than for armor
|
||||||
|
and weapons. This plugin implements the following rules almost from scratch:
|
||||||
|
|
||||||
|
* Combat ammo is stored in chests inside rooms with Squad Equipment enabled.
|
||||||
|
|
||||||
|
* If a chest is assigned to a squad member due to Individual Equipment also
|
||||||
|
being set, it is only used for that squad's ammo; otherwise, any squads
|
||||||
|
with Squad Equipment on the room will use all of the chests at random.
|
||||||
|
|
||||||
|
* Training ammo is stored in chests inside archery ranges designated from
|
||||||
|
archery targets, and controlled by the same Train flag as archery training
|
||||||
|
itself. This is inspired by some defunct code for weapon racks.
|
||||||
|
|
||||||
|
There are some minor traces in the game code to suggest that the first of
|
||||||
|
these rules is intended by Toady; the rest are invented by this plugin.
|
||||||
|
|
||||||
|
|
||||||
|
gui/assign-rack
|
||||||
|
---------------
|
||||||
|
Bind to a key (the example config uses P), and activate when viewing a weapon
|
||||||
|
rack in the ``q`` mode.
|
||||||
|
|
||||||
|
.. image:: images/assign-rack.png
|
||||||
|
|
||||||
|
This script is part of a group of related fixes to make the armory storage
|
||||||
|
work again. The existing issues are:
|
||||||
|
|
||||||
|
* Weapon racks have to each be assigned to a specific squad, like with
|
||||||
|
beds/boxes/armor stands and individual squad members, but nothing in
|
||||||
|
the game does this. This issue is what this script addresses.
|
||||||
|
|
||||||
|
* Even if assigned by the script, **the game will unassign the racks again
|
||||||
|
without a binary patch**. This patch is called ``weaponrack-unassign``,
|
||||||
|
and has not been updated since 0.34.11. See `the bug report`_ for more info.
|
||||||
|
|
||||||
|
.. _`the bug report`: http://www.bay12games.com/dwarves/mantisbt/view.php?id=1445
|
||||||
|
|
||||||
|
* Haulers still take equipment stored in the armory away to the stockpiles,
|
||||||
|
unless `plugins/fix-armory` is used.
|
||||||
|
|
||||||
|
The script interface simply lets you designate one of the squads that
|
||||||
|
are assigned to the barracks/armory containing the selected stand as
|
||||||
|
the intended user. In order to aid in the choice, it shows the number
|
||||||
|
of currently assigned racks for every valid squad.
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
#########
|
||||||
|
Changelog
|
||||||
|
#########
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
.. include:: ../NEWS
|
@ -0,0 +1,184 @@
|
|||||||
|
###########################
|
||||||
|
How to contribute to DFHack
|
||||||
|
###########################
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
You can help without coding
|
||||||
|
===========================
|
||||||
|
DFHack is a software project, but there's a lot more to it than programming.
|
||||||
|
If you're not comfortable pregramming, you can help by:
|
||||||
|
|
||||||
|
* reporting bugs and incomplete documentation,
|
||||||
|
* improving the documentation,
|
||||||
|
* finding third-party scripts to add,
|
||||||
|
* writing tutorials for newbies
|
||||||
|
|
||||||
|
All those things are crucial, and all under-represented. So if that's
|
||||||
|
your thing, the rest of this document is about contributing code - go get started!
|
||||||
|
|
||||||
|
Documentation Standards
|
||||||
|
=======================
|
||||||
|
Whether you're adding new code or just fixing old documentation (and there's plenty),
|
||||||
|
there are a few important standards for completeness and consistent style. Treat
|
||||||
|
this section as a guide rather than iron law, match the surrounding text, and you'll
|
||||||
|
be fine.
|
||||||
|
|
||||||
|
Every script, plugin, or command should be documented. This is an active project,
|
||||||
|
and the best place to put this documentation might change. For now, it's usually
|
||||||
|
either ``docs/Scripts.rst`` or ``docs/Plugins.rst``.
|
||||||
|
|
||||||
|
Where the heading for a section is also the name of a command, the spelling
|
||||||
|
and case should exactly match the command to enter in the DFHack command line.
|
||||||
|
|
||||||
|
Try to keep lines within 80-100 characters, so it's readable in plain text -
|
||||||
|
Sphinx (our documentation system) will make sure paragraphs flow.
|
||||||
|
|
||||||
|
If there aren't many options or examples to show, they can go in a paragraph of
|
||||||
|
text. Use double-backticks to put commands in monospaced font, like this::
|
||||||
|
|
||||||
|
You can use ``cleanall scattered x`` to dump tattered or abandoned items.
|
||||||
|
|
||||||
|
If the command takes more than three arguments, format the list as a table
|
||||||
|
called Options. The table *only* lists arguments, not full commands.
|
||||||
|
Input values are specified in angle brackets. Example::
|
||||||
|
|
||||||
|
Options:
|
||||||
|
|
||||||
|
:arg1: A simple argument.
|
||||||
|
:arg2 <input>: Does something based on the input value.
|
||||||
|
:Very long argument:
|
||||||
|
Is very specific.
|
||||||
|
|
||||||
|
To demonstrate usage - useful mainly when the syntax is complicated, list the
|
||||||
|
full command with arguments in monospaced font, then indent the next line and
|
||||||
|
describe the effect::
|
||||||
|
|
||||||
|
``resume all``
|
||||||
|
Resumes all suspended constructions.
|
||||||
|
|
||||||
|
If it would be helpful to mention another DFHack command, don't just type the
|
||||||
|
name - add a hyperlink! Specify the link target in backticks, and it will be
|
||||||
|
replaced with the corresponding title and linked: eg ```plugins/autolabor```
|
||||||
|
=> `plugins/autolabor`. Link targets should be the path to the file
|
||||||
|
described (without file extension), and placed above the heading of that
|
||||||
|
section like this::
|
||||||
|
|
||||||
|
.. _plugins/autolabor:
|
||||||
|
|
||||||
|
autolabor
|
||||||
|
=========
|
||||||
|
|
||||||
|
Add link targets if you need them, but otherwise plain headings are preferred.
|
||||||
|
|
||||||
|
|
||||||
|
Contributing Code
|
||||||
|
=================
|
||||||
|
Several things should be kept in mind when contributing code to DFHack.
|
||||||
|
|
||||||
|
Code Format
|
||||||
|
-----------
|
||||||
|
|
||||||
|
* Four space indents for C++. Never use tabs for indentation in any language.
|
||||||
|
* LF (Unix style) line terminators
|
||||||
|
* Avoid trailing whitespace
|
||||||
|
* UTF-8 encoding
|
||||||
|
* For C++:
|
||||||
|
|
||||||
|
* Opening and closing braces on their own lines or opening brace at the end of the previous line
|
||||||
|
* Braces placed at original indent level if on their own lines
|
||||||
|
* #includes should be sorted. C++ libraries first, then dfhack modules, then df structures,
|
||||||
|
then local includes. Within each category they should be sorted alphabetically.
|
||||||
|
|
||||||
|
How to get new code into DFHack
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
* Submit pull requests to the ``develop`` branch, not the master branch. The master branch always points at the most recent release.
|
||||||
|
* Use new branches for each feature/fix so that your changes can be merged independently (i.e. not the master or develop branch of your fork).
|
||||||
|
* If possible, compile on multiple platforms when changing anything that compiles
|
||||||
|
* Update NEWS and doc/Authors.rst when applicable
|
||||||
|
* Create a Github Pull Request once finished
|
||||||
|
* Work done against Github issues tagged "bug report" get priority
|
||||||
|
* Submit ideas and bug reports as issues on Github. Posts in the forum thread can easily get missed or forgotten.
|
||||||
|
|
||||||
|
.. _contributing-memory-research:
|
||||||
|
|
||||||
|
Memory research
|
||||||
|
---------------
|
||||||
|
If you want to do memory research, you'll need some tools and some knowledge.
|
||||||
|
In general, you'll need a good memory viewer and optionally something
|
||||||
|
to look at machine code without getting crazy :)
|
||||||
|
Using publicly known information and analyzing the game's data is preferred.
|
||||||
|
|
||||||
|
Good windows tools include:
|
||||||
|
|
||||||
|
* Cheat Engine
|
||||||
|
* IDA Pro 5.0 (freely available for non-commercial use)
|
||||||
|
|
||||||
|
Good linux tools:
|
||||||
|
|
||||||
|
* angavrilov's df-structures gui (visit us on IRC for details).
|
||||||
|
* edb (Evan's Debugger)
|
||||||
|
* IDA Pro 5.0 running under Wine
|
||||||
|
* Some of the tools residing in the ``legacy`` dfhack branch.
|
||||||
|
|
||||||
|
Using the library as a developer
|
||||||
|
================================
|
||||||
|
Currently, the most direct way to use the library is to write a script or plugin that can be loaded by it.
|
||||||
|
All the plugins can be found in the 'plugins' folder. There's no in-depth documentation
|
||||||
|
on how to write one yet, but it should be easy enough to copy one and just follow the pattern.
|
||||||
|
``plugins/skeleton/skeleton.cpp`` is provided for this purpose.
|
||||||
|
|
||||||
|
Other than through plugins, it is possible to use DFHack via remote access interface, or by writing Lua scripts.
|
||||||
|
|
||||||
|
The most important parts of DFHack are the Core, Console, Modules and Plugins.
|
||||||
|
|
||||||
|
* Core acts as the centerpiece of DFHack - it acts as a filter between DF and
|
||||||
|
SDL and synchronizes the various plugins with DF.
|
||||||
|
* Console is a thread-safe console that can be used to invoke commands exported by Plugins.
|
||||||
|
* Modules actually describe the way to access information in DF's memory. You
|
||||||
|
can get them from the Core. Most modules are split into two parts: high-level
|
||||||
|
and low-level. High-level is mostly method calls, low-level publicly visible
|
||||||
|
pointers to DF's data structures.
|
||||||
|
* Plugins are the tools that use all the other stuff to make things happen.
|
||||||
|
A plugin can have a list of commands that it exports and an onupdate function
|
||||||
|
that will be called each DF game tick.
|
||||||
|
|
||||||
|
Rudimentary API documentation can be built using doxygen (see build options
|
||||||
|
with ``ccmake`` or ``cmake-gui``). The full DFHack documentation is built
|
||||||
|
with Sphinx, which runs automatically at compile time.
|
||||||
|
|
||||||
|
DFHack consists of variously licensed code, but invariably weak copyleft.
|
||||||
|
The main license is zlib/libpng, some bits are MIT licensed, and some are
|
||||||
|
BSD licensed. See the `license` document for more information.
|
||||||
|
|
||||||
|
Feel free to add your own extensions and plugins. Contributing back to
|
||||||
|
the dfhack repository is welcome and the right thing to do :)
|
||||||
|
|
||||||
|
DF data structure definitions
|
||||||
|
-----------------------------
|
||||||
|
DFHack uses information about the game data structures, represented via xml files
|
||||||
|
in the ``library/xml/`` submodule.
|
||||||
|
|
||||||
|
See https://github.com/DFHack/df-structures, and the documentation linked in the index.
|
||||||
|
|
||||||
|
Data structure layouts are described in files following the ``df.\*.xml`` name pattern.
|
||||||
|
This information is transformed by a perl script into C++ headers describing the
|
||||||
|
structures, and associated metadata for the Lua wrapper. These headers and data
|
||||||
|
are then compiled into the DFHack libraries, thus necessitating a compatibility
|
||||||
|
break every time layouts change; in return it significantly boosts the efficiency
|
||||||
|
and capabilities of DFHack code.
|
||||||
|
|
||||||
|
Global object addresses are stored in ``symbols.xml``, which is copied to the dfhack
|
||||||
|
release package and loaded as data at runtime.
|
||||||
|
|
||||||
|
Remote access interface
|
||||||
|
-----------------------
|
||||||
|
DFHack supports remote access by exchanging Google protobuf messages via a TCP
|
||||||
|
socket. Both the core and plugins can define remotely accessible methods. The
|
||||||
|
``dfhack-run`` command uses this interface to invoke ordinary console commands.
|
||||||
|
|
||||||
|
Currently the supported set of requests is limited, because the developers don't
|
||||||
|
know what exactly is most useful. ``remotefortressreader`` provides a fairly
|
||||||
|
comprehensive interface for visualisers such as Armok Vision.
|
||||||
|
|
@ -0,0 +1,306 @@
|
|||||||
|
###########
|
||||||
|
DFHack Core
|
||||||
|
###########
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
|
||||||
|
==============
|
||||||
|
Getting DFHack
|
||||||
|
==============
|
||||||
|
The project is currently hosted at http://www.github.com/
|
||||||
|
|
||||||
|
Recent releases are available in source and binary formats `on the releases
|
||||||
|
page`_, while the binaries for releases 0.40.15-r1 to 0.34.11-r4 are on DFFD_.
|
||||||
|
Even older versions are available here_.
|
||||||
|
|
||||||
|
.. _`on the releases page`: http://github.com/DFHack/dfhack/releases
|
||||||
|
.. _DFFD: http://dffd.bay12games.com/search.php?string=DFHack&id=15
|
||||||
|
.. _here: http://dethware.org/dfhack/download
|
||||||
|
|
||||||
|
All new releases are announced in `the bay12 forums thread`_, which is also a
|
||||||
|
good place for discussion and questions.
|
||||||
|
|
||||||
|
.. _`the Bay12 DFHack thread`:
|
||||||
|
.. _`the bay12 forums thread`: http://www.bay12forums.com/smf/index.php?topic=139553
|
||||||
|
|
||||||
|
If this sounds too complicated, you might prefer to `get a Starter Pack`_.
|
||||||
|
These are packages for new players or those who don't want to set up everything
|
||||||
|
themselves, and are available - with DFHack configured - for all OSes.
|
||||||
|
|
||||||
|
.. _`get a Starter Pack`: http://dwarffortresswiki.org/index.php/Utility:Lazy_Newb_Pack
|
||||||
|
|
||||||
|
Compatibility
|
||||||
|
=============
|
||||||
|
DFHack is available for Windows (XP or later), Linux (any modern distribution),
|
||||||
|
or OS X (10.6.8 to 10.9).
|
||||||
|
|
||||||
|
Most releases only support the version of DF mentioned in their title - for
|
||||||
|
example, DFHack 0.40.24-r2 only supports DF 0.40.24 - but some releases
|
||||||
|
support earlier DF versions as well. Wherever possible, use the latest version
|
||||||
|
built for the target version of DF.
|
||||||
|
|
||||||
|
On Windows, DFHack is compatible with the SDL version of DF, but not the legacy version.
|
||||||
|
|
||||||
|
It is also possible to use the Windows DFHack with Wine under Linux and OS X.
|
||||||
|
|
||||||
|
Installation/Removal
|
||||||
|
====================
|
||||||
|
Installing DFhack involves copying files into your DF folder.
|
||||||
|
Copy the files from a release archive so that:
|
||||||
|
|
||||||
|
* On Windows, ``SDL.dll`` is replaced
|
||||||
|
* On Linux or OSX, the ``dfhack`` script is placed in the same folder as the ``df`` script
|
||||||
|
|
||||||
|
Uninstalling is basically the same, in reverse:
|
||||||
|
|
||||||
|
* On Windows, first delete ``SDL.dll`` and rename ``SDLreal.dll`` to ``SDL.dll``,
|
||||||
|
then remove the other DFHack files
|
||||||
|
* On Linux, remove the DFHack files.
|
||||||
|
|
||||||
|
The stonesense plugin might require some additional libraries on Linux.
|
||||||
|
|
||||||
|
If any of the plugins or dfhack itself refuses to load, check the ``stderr.log``
|
||||||
|
file created in your DF folder.
|
||||||
|
|
||||||
|
|
||||||
|
===============
|
||||||
|
Getting started
|
||||||
|
===============
|
||||||
|
If DFHack is installed correctly, it will automatically pop up a console
|
||||||
|
window once DF is started as usual on windows. Linux and Mac OS X require
|
||||||
|
running the dfhack script from the terminal, and will use that terminal for
|
||||||
|
the console.
|
||||||
|
|
||||||
|
**NOTE**: The ``dfhack-run`` executable is there for calling DFHack commands in
|
||||||
|
an already running DF+DFHack instance from external OS scripts and programs,
|
||||||
|
and is *not* the way how you use DFHack normally.
|
||||||
|
|
||||||
|
DFHack has a lot of features, which can be accessed by typing commands in the
|
||||||
|
console, or by mapping them to keyboard shortcuts. Most of the newer and more
|
||||||
|
user-friendly tools are designed to be at least partially used via the latter
|
||||||
|
way.
|
||||||
|
|
||||||
|
In order to set keybindings, you have to create a text configuration file
|
||||||
|
called ``dfhack.init``; the installation comes with an example version called
|
||||||
|
``dfhack.init-example``, which is fully functional, covers all of the recent
|
||||||
|
features and can be simply renamed to ``dfhack.init``. You are encouraged to look
|
||||||
|
through it to learn which features it makes available under which key combinations.
|
||||||
|
|
||||||
|
Using DFHack
|
||||||
|
============
|
||||||
|
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
|
||||||
|
(so, make sure you start from a terminal). Basic interaction with dfhack
|
||||||
|
involves entering commands into the console. For some basic instructions,
|
||||||
|
use the ``help`` command. To list all possible commands, use the ``ls`` command.
|
||||||
|
Many commands have their own help or detailed description. You can use
|
||||||
|
``command help`` or ``command ?`` to show that.
|
||||||
|
|
||||||
|
The command line has some nice line editing capabilities, including history
|
||||||
|
that's preserved between different runs of DF (use up/down keys to go through
|
||||||
|
the history).
|
||||||
|
|
||||||
|
The second way to interact with DFHack is to bind the available commands
|
||||||
|
to in-game hotkeys. The old way to do this is via the hotkey/zoom menu (normally
|
||||||
|
opened with the ``h`` key). Binding the commands is done by assigning a command as
|
||||||
|
a hotkey name (with ``n``).
|
||||||
|
|
||||||
|
A new and more flexible way is the keybinding command in the dfhack console.
|
||||||
|
However, bindings created this way are not automatically remembered between runs
|
||||||
|
of the game, so it becomes necessary to use the dfhack.init file to ensure that
|
||||||
|
they are re-created every time it is loaded.
|
||||||
|
|
||||||
|
Interactive commands like `plugins/liquids` cannot be used as hotkeys.
|
||||||
|
|
||||||
|
Many commands come from plugins, which are stored in ``hack/plugins/``
|
||||||
|
and must be compiled with the same version of DFHack. Others come
|
||||||
|
from scripts, which are stored in ``hack/scripts``. Scripts are much
|
||||||
|
more flexible about versions, and easier to distribute - so most third-party
|
||||||
|
DFHack addons are scripts.
|
||||||
|
|
||||||
|
Something doesn't work, help!
|
||||||
|
=============================
|
||||||
|
First, don't panic :)
|
||||||
|
|
||||||
|
Second, dfhack keeps a few log files in DF's folder (``stderr.log`` and
|
||||||
|
``stdout.log``). Looking at these might help you solve the problem.
|
||||||
|
If it doesn't, you can ask for help in the forum thread or on IRC.
|
||||||
|
|
||||||
|
If you found a bug, you can report it in `the Bay12 DFHack thread`_,
|
||||||
|
`the issues tracker on github <https://github.com/DFHack/dfhack/issues>`_,
|
||||||
|
or visit `the #dfhack IRC channel on freenode
|
||||||
|
<https://webchat.freenode.net/?channels=dfhack>`_.
|
||||||
|
|
||||||
|
=============
|
||||||
|
Core Commands
|
||||||
|
=============
|
||||||
|
DFHack command syntax consists of a command name, followed by arguments separated
|
||||||
|
by whitespace. To include whitespace in an argument, quote it in double quotes.
|
||||||
|
To include a double quote character, use ``\"`` inside double quotes.
|
||||||
|
|
||||||
|
If the first non-whitespace character of a line is ``#``, the line is treated
|
||||||
|
as a comment, i.e. a silent no-op command.
|
||||||
|
|
||||||
|
When reading commands from dfhack.init or with the ``script`` command, if the final
|
||||||
|
character on a line is a backslash then the next uncommented line is considered a
|
||||||
|
continuation of that line, with the backslash deleted. Commented lines are skipped,
|
||||||
|
so it is possible to comment out parts of a command with the ``#`` character.
|
||||||
|
|
||||||
|
If the first non-whitespace character is ``:``, the command is parsed in a special
|
||||||
|
alternative mode: first, non-whitespace characters immediately following the ``:``
|
||||||
|
are used as the command name; the remaining part of the line, starting with the first
|
||||||
|
non-whitespace character *after* the command name, is used verbatim as the first argument.
|
||||||
|
The following two command lines are exactly equivalent::
|
||||||
|
|
||||||
|
:foo a b "c d" e f
|
||||||
|
foo "a b \"c d\" e f"
|
||||||
|
|
||||||
|
This is intended for commands like ``rb_eval`` that evaluate script language statements.
|
||||||
|
|
||||||
|
Almost all the commands support using the ``help <command-name>`` built-in command
|
||||||
|
to retrieve further help without having to look at this document. Alternatively,
|
||||||
|
some accept a ``help`` or ``?`` as an option on their command line.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Some tools work by displaying dialogs or overlays in the game window.
|
||||||
|
|
||||||
|
In order to avoid confusion, these tools display the word "DFHack" while active. If they
|
||||||
|
merely add keybinding hints to existing screens, they use red instead of green for the key.
|
||||||
|
|
||||||
|
|
||||||
|
Init files
|
||||||
|
==========
|
||||||
|
DFHack allows users to automatically run commonly-used DFHack commands when DF is first
|
||||||
|
loaded, when a game is loaded, and when a game is unloaded.
|
||||||
|
|
||||||
|
Init scripts function the same way they would if the user manually typed in their contents,
|
||||||
|
but are much more convenient. If your DF folder contains at least one file with a name
|
||||||
|
following the format ``dfhack*.init`` where ``*`` is a placeholder for any string (including
|
||||||
|
the empty string), then all such files are executed in alphabetical order as init scripts when
|
||||||
|
DF is first loaded.
|
||||||
|
|
||||||
|
If your DF folder does not contain any such files, then DFHack will execute ``dfhack.init-example``
|
||||||
|
as an example of useful commands to be run automatically. If you want DFHack to do nothing on
|
||||||
|
its own, then create an empty ``dfhack.init`` file in the main DF directory, or delete ``dfhack.init-example``.
|
||||||
|
|
||||||
|
The file ``dfhack.init-example`` is included as an example for users to follow if they need DFHack
|
||||||
|
command executed automatically. We recommend modifying or deleting ``dfhack.init-example`` as
|
||||||
|
its settings will not be optimal for all players.
|
||||||
|
|
||||||
|
In order to facilitate savegave portability, mod merging, and general organization of init files,
|
||||||
|
DFHack supports multiple init files both in the main DF directory and save-specific init files in
|
||||||
|
the save folders.
|
||||||
|
|
||||||
|
DFHack looks for init files in three places.
|
||||||
|
|
||||||
|
It will look for them in the main DF directory, and in ``data/save/_____/raw`` and
|
||||||
|
``data/save/_____/raw/objects`` where ``_____`` is the name of the current savegame.
|
||||||
|
|
||||||
|
When a game is loaded, DFHack looks for files of the form ``onLoad*.init``, where
|
||||||
|
``*`` can be any string, including the empty string.
|
||||||
|
|
||||||
|
When a game is unloaded, DFHack looks for files of the form ``onUnload*.init``. Again,
|
||||||
|
these files may be in any of the above three places. All matching init files will be
|
||||||
|
executed in alphebetical order.
|
||||||
|
|
||||||
|
Setting keybindings
|
||||||
|
===================
|
||||||
|
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 most useful
|
||||||
|
in the DFHack init file.
|
||||||
|
|
||||||
|
Currently, any combinations of Ctrl/Alt/Shift with A-Z, 0-9, or F1-F12 are supported.
|
||||||
|
|
||||||
|
Possible ways to call the command:
|
||||||
|
|
||||||
|
``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.
|
||||||
|
|
||||||
|
The ``<key>`` parameter above has the following *case-sensitive* syntax::
|
||||||
|
|
||||||
|
[Ctrl-][Alt-][Shift-]KEY[@context[|context...]]
|
||||||
|
|
||||||
|
where the *KEY* part can be any recognized key 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. Multiple contexts can be specified by separating them with a
|
||||||
|
pipe (``|``) - for example, ``@foo|bar|baz/foo``.
|
||||||
|
|
||||||
|
Hotkeys
|
||||||
|
=======
|
||||||
|
Opens an in-game screen showing DFHack keybindings that are active in the current context.
|
||||||
|
|
||||||
|
.. image:: images/hotkeys.png
|
||||||
|
|
||||||
|
Type ``hotkeys`` into the DFHack console to open the screen, or bind the command to a
|
||||||
|
globally active hotkey. The default keybinding is ``Ctrl-F1``.
|
||||||
|
|
||||||
|
In-game Console
|
||||||
|
===============
|
||||||
|
The ``command-prompt`` plugin adds an in-game DFHack terminal, where you
|
||||||
|
can enter other commands. It's default keybinding is Ctrl-Shift-P.
|
||||||
|
|
||||||
|
Enabling plugins
|
||||||
|
================
|
||||||
|
Many plugins can be in a distinct enabled or disabled state. Some of
|
||||||
|
them activate and deactivate automatically depending on the contents
|
||||||
|
of the world raws. Others store their state in world data. However a
|
||||||
|
number of them have to be enabled globally, and the init file is the
|
||||||
|
right place to do it.
|
||||||
|
|
||||||
|
Most such plugins or scripts support the built-in ``enable`` and ``disable``
|
||||||
|
commands. Calling them at any time without arguments prints a list
|
||||||
|
of enabled and disabled plugins, and shows whether that can be changed
|
||||||
|
through the same commands.
|
||||||
|
|
||||||
|
To enable or disable plugins that support this, use their names as
|
||||||
|
arguments for the command::
|
||||||
|
|
||||||
|
enable manipulator search
|
||||||
|
|
||||||
|
|
||||||
|
Game progress
|
||||||
|
=============
|
||||||
|
|
||||||
|
die
|
||||||
|
---
|
||||||
|
Instantly kills DF without saving.
|
||||||
|
|
||||||
|
quicksave
|
||||||
|
---------
|
||||||
|
Save immediately, without exiting. Only available in fortress mode.
|
||||||
|
|
||||||
|
forcepause
|
||||||
|
----------
|
||||||
|
Forces DF to pause. This is useful when your FPS drops below 1 and you lose
|
||||||
|
control of the game. Activate with ``forcepause 1``; deactivate with ``forcepause 0``.
|
||||||
|
|
||||||
|
hide / show
|
||||||
|
-----------
|
||||||
|
Hides or shows the DFHack terminal window, respectively. To use ``show``, use
|
||||||
|
the in-game console (default keybinding ``Ctrl-Shift-P``). Only available on Windows.
|
||||||
|
|
||||||
|
nopause
|
||||||
|
-------
|
||||||
|
Disables pausing (both manual and automatic) with the exception of pause forced
|
||||||
|
by 'reveal hell'. This is nice for digging under rivers.
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
.. _license:
|
||||||
|
|
||||||
|
########
|
||||||
|
Licenses
|
||||||
|
########
|
||||||
|
|
||||||
|
DFHack is distributed under a range of permissive and weakly copyleft licenses.
|
||||||
|
|
||||||
|
The core uses the ZLib license; the others are described below.
|
||||||
|
|
||||||
|
.. include:: ../LICENSE
|
@ -0,0 +1,326 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# DFHack documentation build configuration file, created by
|
||||||
|
# sphinx-quickstart on Tue Sep 22 17:34:54 2015.
|
||||||
|
#
|
||||||
|
# This file is execfile()d with the current directory set to its
|
||||||
|
# containing dir.
|
||||||
|
#
|
||||||
|
# Note that not all possible configuration values are present in this
|
||||||
|
# autogenerated file.
|
||||||
|
#
|
||||||
|
# All configuration values have a default; values that are commented out
|
||||||
|
# serve to show the default.
|
||||||
|
|
||||||
|
import fnmatch
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import shlex
|
||||||
|
|
||||||
|
from os import listdir
|
||||||
|
from os.path import isfile, join, isdir
|
||||||
|
#import sys
|
||||||
|
|
||||||
|
currentDir = '@CMAKE_CURRENT_SOURCE_DIR@'
|
||||||
|
|
||||||
|
def makeIncludeAll(directory, extension):
|
||||||
|
outputFile = join(directory,'include-all.rst')
|
||||||
|
#print(outputFile)
|
||||||
|
files = [ f for f in listdir(directory) if isfile(join(directory,f)) and f.endswith(extension) ]
|
||||||
|
files.sort()
|
||||||
|
out = open(outputFile, 'w')
|
||||||
|
for f in files:
|
||||||
|
#TODO: check if the file contains the BEGIN_DOCS string
|
||||||
|
#print(join(directory,f))
|
||||||
|
fstream = open(join(directory,f), 'r', encoding='utf8')
|
||||||
|
data = fstream.read().replace('\n','')
|
||||||
|
fstream.close()
|
||||||
|
if 'BEGIN_DOCS' in data:
|
||||||
|
out.write('.. include:: ' + join(directory,f) + '\n :start-after: BEGIN_DOCS\n :end-before: END_DOCS\n\n')
|
||||||
|
out.close()
|
||||||
|
|
||||||
|
def makeAllIncludeAll(directory, extension):
|
||||||
|
for root, subdirs, files in os.walk(directory):
|
||||||
|
if isdir(root):
|
||||||
|
makeIncludeAll(root, extension)
|
||||||
|
|
||||||
|
makeAllIncludeAll(currentDir + '/scripts', '.lua')
|
||||||
|
|
||||||
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
|
#sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
|
# If your documentation needs a minimal Sphinx version, state it here.
|
||||||
|
#needs_sphinx = '1.0'
|
||||||
|
|
||||||
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
|
# ones.
|
||||||
|
extensions = []
|
||||||
|
|
||||||
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
templates_path = []
|
||||||
|
|
||||||
|
# The suffix(es) of source filenames.
|
||||||
|
# You can specify multiple suffix as a list of string:
|
||||||
|
# source_suffix = ['.rst', '.md']
|
||||||
|
source_suffix = '.rst'
|
||||||
|
|
||||||
|
# The encoding of source files.
|
||||||
|
#source_encoding = 'utf-8-sig'
|
||||||
|
|
||||||
|
# The master toctree document.
|
||||||
|
master_doc = 'README'
|
||||||
|
|
||||||
|
# General information about the project.
|
||||||
|
project = 'DFHack'
|
||||||
|
copyright = '2015, The DFHack Team'
|
||||||
|
author = 'The DFHack Team'
|
||||||
|
|
||||||
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
|
# |version| and |release|, also used in various other places throughout the
|
||||||
|
# built documents.
|
||||||
|
|
||||||
|
#def get_version():
|
||||||
|
# """Return the DFHack version string, from CMakeLists.txt"""
|
||||||
|
# version, release = '', ''
|
||||||
|
# with open('CMakeLists.txt') as f:
|
||||||
|
# for s in f.readlines():
|
||||||
|
# if fnmatch.fnmatch(s.upper(), 'SET(DF_VERSION "?.??.??")\n'):
|
||||||
|
# version = s.upper().replace('SET(DF_VERSION "', '')
|
||||||
|
# elif fnmatch.fnmatch(s.upper(), 'SET(DFHACK_RELEASE "r*")\n'):
|
||||||
|
# release = s.upper().replace('SET(DFHACK_RELEASE "', '').lower()
|
||||||
|
# return (version + '-' + release).replace('")\n', '')
|
||||||
|
|
||||||
|
# The short X.Y version.
|
||||||
|
version = '@DFHACK_VERSION@'
|
||||||
|
# The full version, including alpha/beta/rc tags.
|
||||||
|
release = '@DFHACK_VERSION@'
|
||||||
|
|
||||||
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
|
# for a list of supported languages.
|
||||||
|
#
|
||||||
|
# This is also used if you do content translation via gettext catalogs.
|
||||||
|
# Usually you set "language" from the command line for these cases.
|
||||||
|
language = None
|
||||||
|
|
||||||
|
# There are two options for replacing |today|: either, you set today to some
|
||||||
|
# non-false value, then it is used:
|
||||||
|
#today = ''
|
||||||
|
# Else, today_fmt is used as the format for a strftime call.
|
||||||
|
#today_fmt = '%B %d, %Y'
|
||||||
|
|
||||||
|
# List of patterns, relative to source directory, that match files and
|
||||||
|
# directories to ignore when looking for source files.
|
||||||
|
exclude_patterns = ['docs/_build/*', 'depends/*']
|
||||||
|
|
||||||
|
# The reST default role (used for this markup: `text`) to use for all
|
||||||
|
# documents.
|
||||||
|
default_role = 'any'
|
||||||
|
|
||||||
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||||
|
#add_function_parentheses = True
|
||||||
|
|
||||||
|
# If true, the current module name will be prepended to all description
|
||||||
|
# unit titles (such as .. function::).
|
||||||
|
#add_module_names = True
|
||||||
|
|
||||||
|
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||||
|
# output. They are ignored by default.
|
||||||
|
#show_authors = False
|
||||||
|
|
||||||
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
|
pygments_style = 'sphinx'
|
||||||
|
|
||||||
|
# A list of ignored prefixes for module index sorting.
|
||||||
|
#modindex_common_prefix = []
|
||||||
|
|
||||||
|
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||||
|
#keep_warnings = False
|
||||||
|
|
||||||
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
|
todo_include_todos = False
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
|
||||||
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
|
# a list of builtin themes.
|
||||||
|
html_theme = '@SPHINX_THEME@'
|
||||||
|
|
||||||
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
|
# further. For a list of options available for each theme, see the
|
||||||
|
# documentation.
|
||||||
|
#html_theme_options = {}
|
||||||
|
|
||||||
|
# Add any paths that contain custom themes here, relative to this directory.
|
||||||
|
#html_theme_path = []
|
||||||
|
|
||||||
|
# The name for this set of Sphinx documents. If None, it defaults to
|
||||||
|
# "<project> v<release> documentation".
|
||||||
|
#html_title = None
|
||||||
|
|
||||||
|
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||||
|
#html_short_title = None
|
||||||
|
|
||||||
|
# The name of an image file (relative to this directory) to place at the top
|
||||||
|
# of the sidebar.
|
||||||
|
#html_logo = None
|
||||||
|
|
||||||
|
# The name of an image file (within the static path) to use as favicon of the
|
||||||
|
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||||
|
# pixels large.
|
||||||
|
html_favicon = 'dfhack-icon.ico'
|
||||||
|
|
||||||
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
|
html_static_path = ['../images']
|
||||||
|
|
||||||
|
# Add any extra paths that contain custom files (such as robots.txt or
|
||||||
|
# .htaccess) here, relative to this directory. These files are copied
|
||||||
|
# directly to the root of the documentation.
|
||||||
|
#html_extra_path = []
|
||||||
|
|
||||||
|
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||||
|
# using the given strftime format.
|
||||||
|
#html_last_updated_fmt = '%b %d, %Y'
|
||||||
|
|
||||||
|
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||||
|
# typographically correct entities.
|
||||||
|
#html_use_smartypants = True
|
||||||
|
|
||||||
|
# Custom sidebar templates, maps document names to template names.
|
||||||
|
#html_sidebars = {}
|
||||||
|
|
||||||
|
# Additional templates that should be rendered to pages, maps page names to
|
||||||
|
# template names.
|
||||||
|
#html_additional_pages = {}
|
||||||
|
|
||||||
|
# If false, no module index is generated.
|
||||||
|
#html_domain_indices = True
|
||||||
|
|
||||||
|
# If false, no index is generated.
|
||||||
|
#html_use_index = True
|
||||||
|
|
||||||
|
# If true, the index is split into individual pages for each letter.
|
||||||
|
#html_split_index = False
|
||||||
|
|
||||||
|
# If true, links to the reST sources are added to the pages.
|
||||||
|
#html_show_sourcelink = True
|
||||||
|
|
||||||
|
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||||
|
#html_show_sphinx = True
|
||||||
|
|
||||||
|
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||||
|
#html_show_copyright = True
|
||||||
|
|
||||||
|
# If true, an OpenSearch description file will be output, and all pages will
|
||||||
|
# contain a <link> tag referring to it. The value of this option must be the
|
||||||
|
# base URL from which the finished HTML is served.
|
||||||
|
#html_use_opensearch = ''
|
||||||
|
|
||||||
|
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||||
|
#html_file_suffix = None
|
||||||
|
|
||||||
|
# Language to be used for generating the HTML full-text search index.
|
||||||
|
# Sphinx supports the following languages:
|
||||||
|
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
|
||||||
|
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr'
|
||||||
|
#html_search_language = 'en'
|
||||||
|
|
||||||
|
# A dictionary with options for the search language support, empty by default.
|
||||||
|
# Now only 'ja' uses this config value
|
||||||
|
#html_search_options = {'type': 'default'}
|
||||||
|
|
||||||
|
# The name of a javascript file (relative to the configuration directory) that
|
||||||
|
# implements a search results scorer. If empty, the default will be used.
|
||||||
|
#html_search_scorer = 'scorer.js'
|
||||||
|
|
||||||
|
# Output file base name for HTML help builder.
|
||||||
|
htmlhelp_basename = 'DFHackdoc'
|
||||||
|
|
||||||
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
|
||||||
|
latex_elements = {
|
||||||
|
# The paper size ('letterpaper' or 'a4paper').
|
||||||
|
#'papersize': 'letterpaper',
|
||||||
|
|
||||||
|
# The font size ('10pt', '11pt' or '12pt').
|
||||||
|
#'pointsize': '10pt',
|
||||||
|
|
||||||
|
# Additional stuff for the LaTeX preamble.
|
||||||
|
#'preamble': '',
|
||||||
|
|
||||||
|
# Latex figure (float) alignment
|
||||||
|
#'figure_align': 'htbp',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
|
# (source start file, target name, title,
|
||||||
|
# author, documentclass [howto, manual, or own class]).
|
||||||
|
latex_documents = [
|
||||||
|
(master_doc, 'DFHack.tex', 'DFHack Documentation',
|
||||||
|
'The DFHack Team', 'manual'),
|
||||||
|
]
|
||||||
|
|
||||||
|
# The name of an image file (relative to this directory) to place at the top of
|
||||||
|
# the title page.
|
||||||
|
#latex_logo = None
|
||||||
|
|
||||||
|
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||||
|
# not chapters.
|
||||||
|
#latex_use_parts = False
|
||||||
|
|
||||||
|
# If true, show page references after internal links.
|
||||||
|
#latex_show_pagerefs = False
|
||||||
|
|
||||||
|
# If true, show URL addresses after external links.
|
||||||
|
#latex_show_urls = False
|
||||||
|
|
||||||
|
# Documents to append as an appendix to all manuals.
|
||||||
|
#latex_appendices = []
|
||||||
|
|
||||||
|
# If false, no module index is generated.
|
||||||
|
#latex_domain_indices = True
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for manual page output ---------------------------------------
|
||||||
|
|
||||||
|
# One entry per manual page. List of tuples
|
||||||
|
# (source start file, name, description, authors, manual section).
|
||||||
|
man_pages = [
|
||||||
|
(master_doc, 'dfhack', 'DFHack Documentation',
|
||||||
|
[author], 1)
|
||||||
|
]
|
||||||
|
|
||||||
|
# If true, show URL addresses after external links.
|
||||||
|
#man_show_urls = False
|
||||||
|
|
||||||
|
|
||||||
|
# -- Options for Texinfo output -------------------------------------------
|
||||||
|
|
||||||
|
# Grouping the document tree into Texinfo files. List of tuples
|
||||||
|
# (source start file, target name, title, author,
|
||||||
|
# dir menu entry, description, category)
|
||||||
|
texinfo_documents = [
|
||||||
|
(master_doc, 'DFHack', 'DFHack Documentation',
|
||||||
|
author, 'DFHack', 'One line description of project.',
|
||||||
|
'Miscellaneous'),
|
||||||
|
]
|
||||||
|
|
||||||
|
# Documents to append as an appendix to all manuals.
|
||||||
|
#texinfo_appendices = []
|
||||||
|
|
||||||
|
# If false, no module index is generated.
|
||||||
|
#texinfo_domain_indices = True
|
||||||
|
|
||||||
|
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||||
|
#texinfo_show_urls = 'footnote'
|
||||||
|
|
||||||
|
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||||
|
#texinfo_no_detailmenu = False
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
@ -1,57 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# regenerate documentation after editing the .rst files. Requires python and docutils.
|
|
||||||
|
|
||||||
force=
|
|
||||||
reset=
|
|
||||||
while [ $# -gt 0 ]
|
|
||||||
do
|
|
||||||
case "$1" in
|
|
||||||
--force) force=1
|
|
||||||
;;
|
|
||||||
--reset) reset=1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
rst2html=$(which rst2html || which rst2html.py)
|
|
||||||
if [[ -z "$rst2html" ]]; then
|
|
||||||
echo "Docutils not found: See http://docutils.sourceforge.net/"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
rst2html_version=$("$rst2html" --version | cut -d' ' -f3)
|
|
||||||
|
|
||||||
if [[ $(echo $rst2html_version | cut -d. -f2) -lt 12 ]]; then
|
|
||||||
echo "You are using docutils $rst2html_version. Docutils 0.12+ is recommended
|
|
||||||
to build these documents."
|
|
||||||
read -r -n1 -p "Continue? [y/N] " reply
|
|
||||||
echo
|
|
||||||
if [[ ! $reply =~ ^[Yy]$ ]]; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd `dirname $0`
|
|
||||||
status=0
|
|
||||||
|
|
||||||
function process() {
|
|
||||||
if [ -n "$reset" ]; then
|
|
||||||
git checkout -- "$2"
|
|
||||||
elif [ "$1" -nt "$2" ] || [ -n "$force" ]; then
|
|
||||||
echo -n "Updating $2... "
|
|
||||||
if "$rst2html" --no-generator --no-datestamp "$1" "$2"; then
|
|
||||||
echo "Done"
|
|
||||||
else
|
|
||||||
status=1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$2 - up to date."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
process Readme.rst Readme.html
|
|
||||||
process Compile.rst Compile.html
|
|
||||||
process Lua\ API.rst Lua\ API.html
|
|
||||||
process Contributors.rst Contributors.html
|
|
||||||
process Contributing.rst Contributing.html
|
|
||||||
exit $status
|
|
Before Width: | Height: | Size: 57 KiB |
@ -1 +1 @@
|
|||||||
Subproject commit 32960d38410e7caedf2b38cff7ef3f21c1785bbd
|
Subproject commit 8fcb57a3223eca7826658d0c0c310171b8a3319e
|
@ -1 +1 @@
|
|||||||
Subproject commit 600d171bb6eaf44f1a66a379b2f43000d84fab04
|
Subproject commit 4ba65d9db72fd48f99df23b92e7e356d7313f6c4
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 4353c10401ced7aec89f002947d1252f30237789
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 8cf05cc89782206235f4bef1b5ef98e1bc74e266
|
@ -1 +1 @@
|
|||||||
Subproject commit ceed207e38220e21067a91b8d6f7b9680a476f69
|
Subproject commit 4fbced45c1ac18dba3a53804ee625cb8a666d460
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit ac6dae2ff06d1576873b8e508017e8043e7aa701
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 0c32075d2205fe3aa80794fc45b2c49e3dace8dc
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 4b6e772654df6805b66f77900a4618bbf9b54dab
|
@ -1,2 +1,14 @@
|
|||||||
include(Scripts.cmake)
|
include(Scripts.cmake)
|
||||||
|
DFHACK_3RDPARTY_SCRIPT_REPO(dscorbett)
|
||||||
|
DFHACK_3RDPARTY_SCRIPT_REPO(kane-t)
|
||||||
DFHACK_3RDPARTY_SCRIPT_REPO(lethosor)
|
DFHACK_3RDPARTY_SCRIPT_REPO(lethosor)
|
||||||
|
DFHACK_3RDPARTY_SCRIPT_REPO(maienm)
|
||||||
|
DFHACK_3RDPARTY_SCRIPT_REPO(maxthyme)
|
||||||
|
DFHACK_3RDPARTY_SCRIPT_REPO(roses)
|
||||||
|
|
||||||
|
install(DIRECTORY ${dfhack_SOURCE_DIR}/scripts
|
||||||
|
DESTINATION ${DFHACK_DATA_DESTINATION}
|
||||||
|
FILES_MATCHING PATTERN "*.lua"
|
||||||
|
PATTERN "*.rb"
|
||||||
|
PATTERN "3rdparty" EXCLUDE
|
||||||
|
)
|
||||||
|
@ -0,0 +1,193 @@
|
|||||||
|
-- Adjust all attributes, personality, age and skills of all dwarves in play
|
||||||
|
-- without arguments, all attributes, age & personalities are adjusted
|
||||||
|
-- arguments allow for skills to be adjusted as well
|
||||||
|
-- WARNING: USING THIS SCRIPT WILL ADJUST ALL DWARVES IN PLAY!
|
||||||
|
-- by vjek
|
||||||
|
|
||||||
|
function rejuvenate(unit)
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit available! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local current_year=df.global.cur_year
|
||||||
|
local newbirthyear=current_year - 20
|
||||||
|
if unit.relations.birth_year < newbirthyear then
|
||||||
|
unit.relations.birth_year=newbirthyear
|
||||||
|
end
|
||||||
|
if unit.relations.old_year < current_year+100 then
|
||||||
|
unit.relations.old_year=current_year+100
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function brainwash_unit(unit)
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit available! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local profile ={75,25,25,75,25,25,25,99,25,25,25,50,75,50,25,75,75,50,75,75,25,75,75,50,75,25,50,25,75,75,75,25,75,75,25,75,25,25,75,75,25,75,75,75,25,75,75,25,25,50}
|
||||||
|
local i
|
||||||
|
|
||||||
|
for i=1, #profile do
|
||||||
|
unit.status.current_soul.personality.traits[i-1]=profile[i]
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function elevate_attributes(unit)
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit available! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local ok,f,t,k = pcall(pairs,unit.status.current_soul.mental_attrs)
|
||||||
|
if ok then
|
||||||
|
for k,v in f,t,k do
|
||||||
|
v.value=v.max_value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local ok,f,t,k = pcall(pairs,unit.body.physical_attrs)
|
||||||
|
if ok then
|
||||||
|
for k,v in f,t,k do
|
||||||
|
v.value=v.max_value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
-- this function will return the number of elements, starting at zero.
|
||||||
|
-- useful for counting things where #foo doesn't work
|
||||||
|
function count_this(to_be_counted)
|
||||||
|
local count = -1
|
||||||
|
local var1 = ""
|
||||||
|
while var1 ~= nil do
|
||||||
|
count = count + 1
|
||||||
|
var1 = (to_be_counted[count])
|
||||||
|
end
|
||||||
|
count=count-1
|
||||||
|
return count
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function make_legendary(skillname,unit)
|
||||||
|
local skillnamenoun,skillnum
|
||||||
|
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit available! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if (df.job_skill[skillname]) then
|
||||||
|
skillnamenoun = df.job_skill.attrs[df.job_skill[skillname]].caption_noun
|
||||||
|
else
|
||||||
|
print ("The skill name provided is not in the list.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if skillnamenoun ~= nil then
|
||||||
|
utils = require 'utils'
|
||||||
|
skillnum = df.job_skill[skillname]
|
||||||
|
utils.insert_or_update(unit.status.current_soul.skills, { new = true, id = skillnum, rating = 20 }, 'id')
|
||||||
|
print (unit.name.first_name.." is now a Legendary "..skillnamenoun)
|
||||||
|
else
|
||||||
|
print ("Empty skill name noun, bailing out!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function BreathOfArmok(unit)
|
||||||
|
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit available! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local i
|
||||||
|
|
||||||
|
local count_max = count_this(df.job_skill)
|
||||||
|
utils = require 'utils'
|
||||||
|
for i=0, count_max do
|
||||||
|
utils.insert_or_update(unit.status.current_soul.skills, { new = true, id = i, rating = 20 }, 'id')
|
||||||
|
end
|
||||||
|
print ("The breath of Armok has engulfed "..unit.name.first_name)
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function LegendaryByClass(skilltype,v)
|
||||||
|
unit=v
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit available! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
utils = require 'utils'
|
||||||
|
local i
|
||||||
|
local skillclass
|
||||||
|
local count_max = count_this(df.job_skill)
|
||||||
|
for i=0, count_max do
|
||||||
|
skillclass = df.job_skill_class[df.job_skill.attrs[i].type]
|
||||||
|
if skilltype == skillclass then
|
||||||
|
print ("Skill "..df.job_skill.attrs[i].caption.." is type: "..skillclass.." and is now Legendary for "..unit.name.first_name)
|
||||||
|
utils.insert_or_update(unit.status.current_soul.skills, { new = true, id = i, rating = 20 }, 'id')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function PrintSkillList()
|
||||||
|
local count_max = count_this(df.job_skill)
|
||||||
|
local i
|
||||||
|
for i=0, count_max do
|
||||||
|
print("'"..df.job_skill.attrs[i].caption.."' "..df.job_skill[i].." Type: "..df.job_skill_class[df.job_skill.attrs[i].type])
|
||||||
|
end
|
||||||
|
print ("Provide the UPPER CASE argument, for example: PROCESSPLANTS rather than Threshing")
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function PrintSkillClassList()
|
||||||
|
local i
|
||||||
|
local count_max = count_this(df.job_skill_class)
|
||||||
|
for i=0, count_max do
|
||||||
|
print(df.job_skill_class[i])
|
||||||
|
end
|
||||||
|
print ("Provide one of these arguments, and all skills of that type will be made Legendary")
|
||||||
|
print ("For example: Medical will make all medical skills legendary")
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function adjust_all_dwarves(skillname)
|
||||||
|
for _,v in ipairs(df.global.world.units.all) do
|
||||||
|
if v.race == df.global.ui.race_id then
|
||||||
|
print("Adjusting "..dfhack.TranslateName(dfhack.units.getVisibleName(v)))
|
||||||
|
brainwash_unit(v)
|
||||||
|
elevate_attributes(v)
|
||||||
|
rejuvenate(v)
|
||||||
|
if skillname then
|
||||||
|
if skillname=="Normal" or skillname=="Medical" or skillname=="Personal" or skillname=="Social" or skillname=="Cultural" or skillname=="MilitaryWeapon" or skillname=="MilitaryAttack" or skillname=="MilitaryDefense" or skillname=="MilitaryMisc" then
|
||||||
|
LegendaryByClass(skillname,v)
|
||||||
|
elseif skillname=="all" then
|
||||||
|
BreathOfArmok(v)
|
||||||
|
else
|
||||||
|
make_legendary(skillname,v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
-- main script operation starts here
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
local opt = ...
|
||||||
|
local skillname
|
||||||
|
|
||||||
|
if opt then
|
||||||
|
if opt=="list" then
|
||||||
|
PrintSkillList()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if opt=="classes" then
|
||||||
|
PrintSkillClassList()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
skillname = opt
|
||||||
|
else
|
||||||
|
print ("No skillname supplied, no skills will be adjusted. Pass argument 'list' to see a skill list, 'classes' to show skill classes, or use 'all' if you want all skills legendary.")
|
||||||
|
end
|
||||||
|
|
||||||
|
adjust_all_dwarves(skillname)
|
@ -0,0 +1,61 @@
|
|||||||
|
-- This script will brainwash a dwarf, modifying their personality
|
||||||
|
-- usage is: target a unit in DF, and execute this script in dfhack
|
||||||
|
-- by vjek
|
||||||
|
|
||||||
|
function brainwash_unit(profile)
|
||||||
|
local i,unit_name
|
||||||
|
|
||||||
|
unit=dfhack.gui.getSelectedUnit()
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit under cursor! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
unit_name=dfhack.TranslateName(dfhack.units.getVisibleName(unit))
|
||||||
|
|
||||||
|
print("Previous personality values for "..unit_name)
|
||||||
|
printall(unit.status.current_soul.personality.traits)
|
||||||
|
|
||||||
|
--now set new personality
|
||||||
|
for i=1, #profile do
|
||||||
|
unit.status.current_soul.personality.traits[i-1]=profile[i]
|
||||||
|
end
|
||||||
|
|
||||||
|
print("New personality values for "..unit_name)
|
||||||
|
printall(unit.status.current_soul.personality.traits)
|
||||||
|
print(unit_name.." has been brainwashed, praise Armok!")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- main script starts here
|
||||||
|
-- profiles are listed here and passed to the brainwash function
|
||||||
|
--
|
||||||
|
local baseline={50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50}
|
||||||
|
local ideal={75,25,25,75,25,25,25,99,25,25,25,50,75,50,25,75,75,50,75,75,25,75,75,50,75,25,50,25,75,75,75,25,75,75,25,75,25,25,75,75,25,75,75,75,25,75,75,25,25,50}
|
||||||
|
local stepford={99,1,1,99,1,1,1,99,1,1,1,1,50,50,1,99,99,50,50,50,1,1,99,50,50,50,50,50,50,99,50,1,1,99,1,99,1,1,99,99,1,99,99,99,1,50,50,1,1,1}
|
||||||
|
local wrecked={1,99,99,1,99,99,99,1,99,99,99,1,1,99,99,1,1,1,1,1,99,1,1,99,1,99,99,99,1,1,1,99,1,1,99,1,99,99,1,1,99,1,1,1,99,1,1,99,99,99}
|
||||||
|
local opt = ...
|
||||||
|
|
||||||
|
if opt then
|
||||||
|
if opt=="ideal" then
|
||||||
|
brainwash_unit(ideal)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if opt=="baseline" then
|
||||||
|
brainwash_unit(baseline)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if opt=="stepford" then
|
||||||
|
brainwash_unit(stepford)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if opt=="wrecked" then
|
||||||
|
brainwash_unit(wrecked)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
else
|
||||||
|
print ("Invalid or missing personality argument.\nValid choices are ideal , baseline , stepford, and wrecked.")
|
||||||
|
print ("ideal will create a reliable dwarf with generally positive personality traits.")
|
||||||
|
print ("baseline will reset all personality traits to a default / the average.")
|
||||||
|
print ("stepford amplifies all good qualities to an excessive degree.")
|
||||||
|
print ("wrecked amplifies all bad qualities to an excessive degree.")
|
||||||
|
end
|
@ -0,0 +1,45 @@
|
|||||||
|
-- This script will elevate all the mental attributes of a unit
|
||||||
|
-- usage is: target a unit in DF, and execute this script in dfhack
|
||||||
|
-- all physical attributes will be set to whatever the max value is
|
||||||
|
-- by vjek
|
||||||
|
|
||||||
|
function ElevateMentalAttributes(value)
|
||||||
|
unit=dfhack.gui.getSelectedUnit()
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit under cursor! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--print name of dwarf
|
||||||
|
print("Adjusting "..dfhack.TranslateName(dfhack.units.getVisibleName(unit)))
|
||||||
|
--walk through available attributes, adjust current to max
|
||||||
|
local ok,f,t,k = pcall(pairs,unit.status.current_soul.mental_attrs)
|
||||||
|
if ok then
|
||||||
|
for k,v in f,t,k do
|
||||||
|
if value ~= nil then
|
||||||
|
print("Adjusting current value for "..tostring(k).." of "..v.value.." to the value of "..value)
|
||||||
|
v.value=value
|
||||||
|
else
|
||||||
|
print("Adjusting current value for "..tostring(k).." of "..v.value.." to max value of "..v.max_value)
|
||||||
|
v.value=v.max_value
|
||||||
|
--below will reset values back to "normal"
|
||||||
|
--v.value=v.max_value/2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--script execution starts here
|
||||||
|
local opt = ...
|
||||||
|
opt = tonumber(opt)
|
||||||
|
|
||||||
|
if opt ~= nil then
|
||||||
|
if opt >=0 and opt <=5000 then
|
||||||
|
ElevateMentalAttributes(opt)
|
||||||
|
end
|
||||||
|
if opt <0 or opt >5000 then
|
||||||
|
print("Invalid Range or argument. This script accepts either no argument, in which case it will increase the attribute to the max_value for the unit, or an argument between 0 and 5000, which will set all attributes to that value.")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if opt == nil then
|
||||||
|
ElevateMentalAttributes()
|
||||||
|
end
|
@ -0,0 +1,45 @@
|
|||||||
|
-- This script will elevate all the physical attributes of a unit
|
||||||
|
-- usage is: target a unit in DF, and execute this script in dfhack
|
||||||
|
-- all physical attributes will be set to whatever the max value is
|
||||||
|
-- by vjek
|
||||||
|
|
||||||
|
function ElevatePhysicalAttributes(value)
|
||||||
|
unit=dfhack.gui.getSelectedUnit()
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit under cursor! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--print name of dwarf
|
||||||
|
print("Adjusting "..dfhack.TranslateName(dfhack.units.getVisibleName(unit)))
|
||||||
|
--walk through available attributes, adjust current to max
|
||||||
|
local ok,f,t,k = pcall(pairs,unit.body.physical_attrs)
|
||||||
|
if ok then
|
||||||
|
for k,v in f,t,k do
|
||||||
|
if value ~= nil then
|
||||||
|
print("Adjusting current value for "..tostring(k).." of "..v.value.." to the value of "..value)
|
||||||
|
v.value=value
|
||||||
|
else
|
||||||
|
print("Adjusting current value for "..tostring(k).." of "..v.value.." to max value of "..v.max_value)
|
||||||
|
v.value=v.max_value
|
||||||
|
--below will reset values back to "normal"
|
||||||
|
--v.value=v.max_value/2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--script execution starts here
|
||||||
|
local opt = ...
|
||||||
|
opt = tonumber(opt)
|
||||||
|
|
||||||
|
if opt ~= nil then
|
||||||
|
if opt >=0 and opt <=5000 then
|
||||||
|
ElevatePhysicalAttributes(opt)
|
||||||
|
end
|
||||||
|
if opt <0 or opt >5000 then
|
||||||
|
print("Invalid Range or argument. This script accepts either no argument, in which case it will increase the attribute to the max_value for the unit, or an argument between 0 and 5000, which will set all attributes to that value.")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if opt == nil then
|
||||||
|
ElevatePhysicalAttributes()
|
||||||
|
end
|
@ -0,0 +1,130 @@
|
|||||||
|
-- This script will modify a skill or the skills of a single unit
|
||||||
|
-- usage is: target a unit in DF, and execute this script in dfhack
|
||||||
|
-- the skill will be increased to 20 (Legendary +5)
|
||||||
|
-- arguments 'list', 'classes' and 'all' added
|
||||||
|
-- by vjek
|
||||||
|
|
||||||
|
-- this function will return the number of elements, starting at zero.
|
||||||
|
-- useful for counting things where #foo doesn't work
|
||||||
|
function count_this(to_be_counted)
|
||||||
|
local count = -1
|
||||||
|
local var1 = ""
|
||||||
|
while var1 ~= nil do
|
||||||
|
count = count + 1
|
||||||
|
var1 = (to_be_counted[count])
|
||||||
|
end
|
||||||
|
count=count-1
|
||||||
|
return count
|
||||||
|
end
|
||||||
|
|
||||||
|
function make_legendary(skillname)
|
||||||
|
local skillnamenoun,skillnum
|
||||||
|
unit=dfhack.gui.getSelectedUnit()
|
||||||
|
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit under cursor! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if (df.job_skill[skillname]) then
|
||||||
|
skillnamenoun = df.job_skill.attrs[df.job_skill[skillname]].caption_noun
|
||||||
|
else
|
||||||
|
print ("The skill name provided is not in the list.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if skillnamenoun ~= nil then
|
||||||
|
utils = require 'utils'
|
||||||
|
skillnum = df.job_skill[skillname]
|
||||||
|
utils.insert_or_update(unit.status.current_soul.skills, { new = true, id = skillnum, rating = 20 }, 'id')
|
||||||
|
print (dfhack.TranslateName(dfhack.units.getVisibleName(unit)).." is now a Legendary "..skillnamenoun)
|
||||||
|
else
|
||||||
|
print ("Empty skill name noun, bailing out!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function PrintSkillList()
|
||||||
|
local count_max = count_this(df.job_skill)
|
||||||
|
local i
|
||||||
|
for i=0, count_max do
|
||||||
|
print("'"..df.job_skill.attrs[i].caption.."' "..df.job_skill[i].." Type: "..df.job_skill_class[df.job_skill.attrs[i].type])
|
||||||
|
end
|
||||||
|
print ("Provide the UPPER CASE argument, for example: PROCESSPLANTS rather than Threshing")
|
||||||
|
end
|
||||||
|
|
||||||
|
function BreathOfArmok()
|
||||||
|
unit=dfhack.gui.getSelectedUnit()
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit under cursor! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local i
|
||||||
|
local count_max = count_this(df.job_skill)
|
||||||
|
utils = require 'utils'
|
||||||
|
for i=0, count_max do
|
||||||
|
utils.insert_or_update(unit.status.current_soul.skills, { new = true, id = i, rating = 20 }, 'id')
|
||||||
|
end
|
||||||
|
print ("The breath of Armok has engulfed "..dfhack.TranslateName(dfhack.units.getVisibleName(unit)))
|
||||||
|
end
|
||||||
|
|
||||||
|
function LegendaryByClass(skilltype)
|
||||||
|
unit=dfhack.gui.getSelectedUnit()
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit under cursor! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
utils = require 'utils'
|
||||||
|
local i
|
||||||
|
local skillclass
|
||||||
|
local count_max = count_this(df.job_skill)
|
||||||
|
for i=0, count_max do
|
||||||
|
skillclass = df.job_skill_class[df.job_skill.attrs[i].type]
|
||||||
|
if skilltype == skillclass then
|
||||||
|
print ("Skill "..df.job_skill.attrs[i].caption.." is type: "..skillclass.." and is now Legendary for "..dfhack.TranslateName(dfhack.units.getVisibleName(unit)))
|
||||||
|
utils.insert_or_update(unit.status.current_soul.skills, { new = true, id = i, rating = 20 }, 'id')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function PrintSkillClassList()
|
||||||
|
local i
|
||||||
|
local count_max = count_this(df.job_skill_class)
|
||||||
|
for i=0, count_max do
|
||||||
|
print(df.job_skill_class[i])
|
||||||
|
end
|
||||||
|
print ("Provide one of these arguments, and all skills of that type will be made Legendary")
|
||||||
|
print ("For example: Medical will make all medical skills legendary")
|
||||||
|
end
|
||||||
|
|
||||||
|
--main script operation starts here
|
||||||
|
----
|
||||||
|
local opt = ...
|
||||||
|
local skillname
|
||||||
|
|
||||||
|
if opt then
|
||||||
|
if opt=="list" then
|
||||||
|
PrintSkillList()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if opt=="classes" then
|
||||||
|
PrintSkillClassList()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if opt=="all" then
|
||||||
|
BreathOfArmok()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if opt=="Normal" or opt=="Medical" or opt=="Personal" or opt=="Social" or opt=="Cultural" or opt=="MilitaryWeapon" or opt=="MilitaryAttack" or opt=="MilitaryDefense" or opt=="MilitaryMisc" then
|
||||||
|
LegendaryByClass(opt)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
skillname = opt
|
||||||
|
else
|
||||||
|
print ("No skillname supplied.\nUse argument 'list' to see a list, 'classes' to show skill classes, or use 'all' if you want it all!")
|
||||||
|
print ("Example: To make a legendary miner, use make_legendary MINING")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
make_legendary(skillname)
|
@ -0,0 +1,92 @@
|
|||||||
|
-- Adjust all preferences of all dwarves in play
|
||||||
|
-- all preferences are cleared, then set
|
||||||
|
-- WARNING: USING THIS SCRIPT WILL ADJUST ALL DWARVES IN PLAY!
|
||||||
|
-- by vjek
|
||||||
|
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function brainwash_unit(unit)
|
||||||
|
|
||||||
|
if unit==nil then
|
||||||
|
print ("No unit available! Aborting with extreme prejudice.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local pss_counter=31415926
|
||||||
|
|
||||||
|
local prefcount = #(unit.status.current_soul.preferences)
|
||||||
|
print ("Before, unit "..dfhack.TranslateName(dfhack.units.getVisibleName(unit)).." has "..prefcount.." preferences")
|
||||||
|
|
||||||
|
utils = require 'utils'
|
||||||
|
-- below populates an array with all creature names and id's, used for 'detests...'
|
||||||
|
rtbl={}
|
||||||
|
vec=df.global.world.raws.creatures.all
|
||||||
|
for k=0,#vec-1 do
|
||||||
|
local name=vec[k].creature_id
|
||||||
|
rtbl[name]=k
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Now iterate through for the type 3 detests...
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 3 , item_type = rtbl.TROLL , creature_id = rtbl.TROLL , color_id = rtbl.TROLL , shape_id = rtbl.TROLL , plant_id = rtbl.TROLL , item_subtype = -1 , mattype = -1 , matindex = -1 , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 3 , item_type = rtbl.BIRD_BUZZARD , creature_id = rtbl.BIRD_BUZZARD , color_id = rtbl.BIRD_BUZZARD , shape_id = rtbl.BIRD_BUZZARD , plant_id = rtbl.BIRD_BUZZARD , item_subtype = -1 , mattype = -1 , matindex = -1 , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 3 , item_type = rtbl.BIRD_VULTURE , creature_id = rtbl.BIRD_VULTURE , color_id = rtbl.BIRD_VULTURE , shape_id = rtbl.BIRD_VULTURE , plant_id = rtbl.BIRD_VULTURE , item_subtype = -1 , mattype = -1 , matindex = -1 , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 3 , item_type = rtbl.CRUNDLE , creature_id = rtbl.CRUNDLE , color_id = rtbl.CRUNDLE , shape_id = rtbl.CRUNDLE , plant_id = rtbl.CRUNDLE , item_subtype = -1 , mattype = -1 , matindex = -1 , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
-- and the type 4 likes
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 4 , item_type = df.item_type.WEAPON , creature_id = df.item_type.WEAPON , color_id = df.item_type.WEAPON , shape_id = df.item_type.WEAPON , plant_id = df.item_type.WEAPON , item_subtype = -1 , mattype = -1 , matindex = -1 , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 4 , item_type = df.item_type.ARMOR , creature_id = df.item_type.ARMOR , color_id = df.item_type.ARMOR , shape_id = df.item_type.ARMOR , plant_id = df.item_type.ARMOR , item_subtype = -1 , mattype = -1 , matindex = -1 , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 4 , item_type = df.item_type.SHIELD , creature_id = df.item_type.SHIELD , color_id = df.item_type.SHIELD , shape_id = df.item_type.SHIELD , plant_id = df.item_type.SHIELD , item_subtype = -1 , mattype = -1 , matindex = -1 , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
-- prefers plump helmets for their ...
|
||||||
|
local ph_mat_type=dfhack.matinfo.find("MUSHROOM_HELMET_PLUMP:STRUCTURAL").index
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 5 , item_type = ph_mat_type , creature_id = ph_mat_type , color_id = ph_mat_type , shape_id = ph_mat_type , plant_id = ph_mat_type , item_subtype = -1 , mattype = -1 , matindex = -1 , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
-- prefers to consume dwarven wine:
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 2 , item_type = 68 , creature_id = 68 , color_id = 68 , shape_id = 68 , plant_id = 68 , item_subtype = -1 , mattype = dfhack.matinfo.find("MUSHROOM_HELMET_PLUMP:DRINK").type , matindex = dfhack.matinfo.find("MUSHROOM_HELMET_PLUMP:DRINK").index , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
-- likes iron, steel (0,8) adam is 25
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 0 , item_type = -1 , creature_id = -1 , color_id = -1 , shape_id = -1 , plant_id = -1 , item_subtype = -1 , mattype = 0 , matindex = dfhack.matinfo.find("IRON").index , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
pss_counter = pss_counter + 1
|
||||||
|
utils.insert_or_update(unit.status.current_soul.preferences, { new = true, type = 0 , item_type = -1 , creature_id = -1 , color_id = -1 , shape_id = -1 , plant_id = -1 , item_subtype = -1 , mattype = 0 , matindex = dfhack.matinfo.find("STEEL").index , active = true, prefstring_seed = pss_counter }, 'prefstring_seed')
|
||||||
|
|
||||||
|
prefcount = #(unit.status.current_soul.preferences)
|
||||||
|
print ("After, unit "..dfhack.TranslateName(dfhack.units.getVisibleName(unit)).." has "..prefcount.." preferences")
|
||||||
|
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function clear_preferences(v)
|
||||||
|
unit=v
|
||||||
|
|
||||||
|
local prefs=unit.status.current_soul.preferences
|
||||||
|
for index,pref in ipairs(prefs) do
|
||||||
|
pref:delete()
|
||||||
|
end
|
||||||
|
prefs:resize(0)
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function clearpref_all_dwarves()
|
||||||
|
for _,v in ipairs(df.global.world.units.active) do
|
||||||
|
if v.race == df.global.ui.race_id then
|
||||||
|
print("Clearing Preferences for "..dfhack.TranslateName(dfhack.units.getVisibleName(v)))
|
||||||
|
clear_preferences(v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
function adjust_all_dwarves()
|
||||||
|
for _,v in ipairs(df.global.world.units.active) do
|
||||||
|
if v.race == df.global.ui.race_id then
|
||||||
|
print("Adjusting "..dfhack.TranslateName(dfhack.units.getVisibleName(v)))
|
||||||
|
brainwash_unit(v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
-- main script operation starts here
|
||||||
|
-- ---------------------------------------------------------------------------
|
||||||
|
clearpref_all_dwarves()
|
||||||
|
adjust_all_dwarves()
|
@ -0,0 +1,24 @@
|
|||||||
|
-- This script will make any "old" dwarf 20 years old
|
||||||
|
-- usage is: target a unit in DF, and execute this script in dfhack
|
||||||
|
-- the target will be changed to 20 years old
|
||||||
|
-- by vjek
|
||||||
|
|
||||||
|
function rejuvenate()
|
||||||
|
local current_year,newbirthyear
|
||||||
|
unit=dfhack.gui.getSelectedUnit()
|
||||||
|
|
||||||
|
if unit==nil then print ("No unit under cursor! Aborting.") return end
|
||||||
|
|
||||||
|
current_year=df.global.cur_year
|
||||||
|
newbirthyear=current_year - 20
|
||||||
|
if unit.relations.birth_year < newbirthyear then
|
||||||
|
unit.relations.birth_year=newbirthyear
|
||||||
|
end
|
||||||
|
if unit.relations.old_year < current_year+100 then
|
||||||
|
unit.relations.old_year=current_year+100
|
||||||
|
end
|
||||||
|
print (dfhack.TranslateName(dfhack.units.getVisibleName(unit)).." is now 20 years old and will live at least 100 years")
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
rejuvenate()
|
@ -0,0 +1,30 @@
|
|||||||
|
import os, sys
|
||||||
|
|
||||||
|
scriptdir = 'scripts'
|
||||||
|
|
||||||
|
def is_script(fname):
|
||||||
|
if not os.path.isfile(fname):
|
||||||
|
return False
|
||||||
|
return fname.endswith('.lua') or fname.endswith('.rb')
|
||||||
|
|
||||||
|
def main():
|
||||||
|
files = []
|
||||||
|
for item in os.listdir(scriptdir):
|
||||||
|
path = os.path.join(scriptdir, item)
|
||||||
|
if is_script(path):
|
||||||
|
files.append(item)
|
||||||
|
elif os.path.isdir(path) and item not in ('devel', '3rdparty'):
|
||||||
|
files.extend([item + '/' + f for f in os.listdir(path)
|
||||||
|
if is_script(os.path.join(path, f))])
|
||||||
|
with open('docs/Scripts.rst') as f:
|
||||||
|
text = f.read()
|
||||||
|
error = 0
|
||||||
|
for f, _ in [os.path.splitext(p) for p in files]:
|
||||||
|
heading = '\n' + f + '\n' + '=' * len(f) + '\n'
|
||||||
|
if heading not in text:
|
||||||
|
print('WARNING: {:28} not documented in docs/Scripts'.format(f))
|
||||||
|
error = 1
|
||||||
|
sys.exit(error)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|