v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Editing Utility:DFusion

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{uv|DF2012}}
 
WARNING: this page is very outdated and has not been maintained since early 2012.
 
 
== DFusion info page ==
 
== DFusion info page ==
 
Thread for discussions: [http://www.bay12forums.com/smf/index.php?topic=93317.0 Thread]
 
Thread for discussions: [http://www.bay12forums.com/smf/index.php?topic=93317.0 Thread]
Line 11: Line 9:
 
=== dfusion ===
 
=== dfusion ===
 
First this command runs all plugins' init.lua part then show a menu. Type number to run specified plugin.
 
First this command runs all plugins' init.lua part then show a menu. Type number to run specified plugin.
 
Note: You may see the following error when running dfusion in DFHack: "dfusion/common.lua:45: . Text region not found!"
 
 
You just have to do an easy text change to fix it.  Find this line in DF/dfusion/common.lua (it's near the top):
 
local pos=string.find(v.name,".text") or string.find(v.name,"libs/Dwarf_Fortress")
 
 
Then, replace ".text" with "Dwarf Fortress.exe" and save.
 
 
 
=== dfuse ===
 
=== dfuse ===
 
Similar to dfusion but not interactive. To be used with hotkeys (later will have command support).
 
Similar to dfusion but not interactive. To be used with hotkeys (later will have command support).
Line 41: Line 31:
 
Also all the flags can be accessed by name or by number:
 
Also all the flags can be accessed by name or by number:
 
<pre>
 
<pre>
first_unit.flags1.dead=true --is same as...
+
first_unit.flags.dead=true --is same as...
first_unit.flags1[1]=true --... this
+
first_unit.flags[1]=true --... this
 
</pre>
 
</pre>
 
For convienence there is function printall:
 
For convienence there is function printall:
Line 48: Line 38:
 
printall(df.global.world.units.all) --prints all the units, with locations in memory
 
printall(df.global.world.units.all) --prints all the units, with locations in memory
 
</pre>
 
</pre>
 
 
=== Other objects ===
 
=== Other objects ===
 
==== Console. ====
 
==== Console. ====
Line 128: Line 117:
 
| pokestr
 
| pokestr
 
| writes a string to memory
 
| writes a string to memory
| pokestr(0x15486,"Hello world")  
+
| peekstr(0x15486,"Hello world")  
 
|}
 
|}
  

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)