bc32d15bea
Major Revision update v2.0 =-=-=-=-= Native functions(exported to lua): -GenerateEngine: returns engine id (args: seed) -DestroyEngine: destroys corresponding engine (args: rngID) -NewSeed re-seeds engine (args: rngID, seed) -rollInt generates random integer (args: rngID, min, max) -rollDouble generates random double (args: rngID, min, max) -rollNormal generates random normal[gaus.] (args: rngID, avg, stddev) -rollBool generates random boolean (args: rngID, chance) -MakeNumSequence returns sequence id (args: start, end) -AddToSequence adds a number to the sequence (args: seqID, num) -ShuffleSequence shuffles the number sequence (args: rngID, seqID) -NextInSequence returns the next number in seq.(args: seqID) Lua plugin functions: -MakeNewEngine returns engine id (args: seed) Lua plugin classes: -crng methods: -init(id, df, dist) :: constructor id - Reference ID of engine to use in RNGenerations df (optional) - bool indicating whether to destroy the Engine when the crng object is garbage collected dist (optional) - lua number distribution to use -__gc() :: destructor -changeSeed(seed) :: alters engine's seed value -setNumDistrib(distrib) :: set's the number distribution crng object should use distrib - number distribution object to use in RNGenerations -next() :: returns the next number in the distribution -shuffle() :: effectively shuffles the number distribution -normal_distribution methods: -init(avg, stddev) :: constructor -next(id) :: returns next number in the distribution id - engine ID to pass to native function -real_distribution methods: -init(min, max) :: constructor -next(id) :: returns next number in the distribution id - engine ID to pass to native function -int_distribution methods: -init(min, max) :: constructor -next(id) :: returns next number in the distribution id - engine ID to pass to native function -bool_distribution methods: -init(min, max) :: constructor -next(id) :: returns next boolean in the distribution id - engine ID to pass to native function -num_sequence methods: -init(a, b) :: constructor -add(num) :: adds num to the end of the number sequence -shuffle() :: shuffles the sequence of numbers -next() :: returns next number in the sequence Adds missing function exports. Fixes numerous problems I won't go into |
||
---|---|---|
CMake | ||
build | ||
depends | ||
dfhack-config | ||
docs | ||
library | ||
package | ||
plugins | ||
reversing | ||
scripts@7d7dd8a749 | ||
test | ||
travis | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
.ycm_extra_conf.py | ||
CMakeLists.txt | ||
Contributing.rst | ||
LICENSE.rst | ||
README.html | ||
README.md | ||
conf.py | ||
dfhack.init-example | ||
index.rst | ||
onLoad.init-example |
README.md
DFHack Readme
DFHack is a Dwarf Fortress memory access library, distributed with scripts and plugins implementing a wide variety of useful functions and tools.
The full documentation is available online here,
from the README.html page in the DFHack distribution, or as raw text in the ./docs
folder.
If you're an end-user, modder, or interested in contributing to DFHack -
go read those docs.
If that's unclear or you need more help, try the Bay12 forums thread or the #dfhack IRC channel on freenode.