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.

User:Doktoro Reichard

From Dwarf Fortress Wiki
Revision as of 03:00, 7 January 2014 by Doktoro Reichard (talk | contribs) (Description, healing by proxy script, cloning script)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description

I'm just a guy that happened to pass by here, complaining about the Glass industry page not being quite right. Now, I'm here fixing tidbits, adding some research and overall trying to be a DF player.

My bio (if you could call it that) can be found at the Arqade SE, which you could say was the main reason for me being here. I also used to play a lot of World of Warcraft, but those days are bygone.

I also use the same name at the bay12games forums so... well, that's pretty much it.

DFHack scripts

Healing by proxy

Trying to save Urist McMiner from a magma-induced full body melting, I poked around with the gui/gm-editor tool of the latest DFHack (0.34.11 r3) in order to see if I could try and delete the melt.

Unfortunately, the current stable release of gui/gm-editor isn't informative, and to top it off melts are somewhat complex (e.g. there isn't a single "is_urist_molten" value).

So, the 2nd best way to treat a molten dwarf was to do a little bit of !!Quantum Cellular Mimicry™!! (patent pending), by this I mean to copy the body of a base dwarf to the affected dwarf.

The script works (although if it crashes your game don't blame me). It seemed to crash when assigning a male body to a female one.


I got most of the code from what was already posted at the forums. Due to some problem with Lua, I was unable to use the 'utils' package so I've pasted the utils.assign function in the script.

The first part is the dwarves selection. You select the affected dwarf first in DF, then press Enter in DFHack. Repeat for the base dwarf. The second part clears wounds (probably unnecessary) and resets flags. The third part actually copies the bodies from dwarf 2 to dwarf 1, hence recovering him. This implies however that the base dwarf is healthy.

This could also be used to melt every single dwarf in the fortress.

Cloning

It follows the same reasoning as the "healing by proxy" script.