- 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.
User:Doktoro Reichard
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.
Files
Here are some files that I've made mention or that are base blocks to other files. Feel free to use them in any dwarfy way.
Glass Workflow Chart. A Dia file. Not the most user-friendly software, but gets the job done.
Gems spreadsheet. Just an import of the data got by Shandra.
Gems spreadsheet (treated). This has very very ugly graphs regarding distribution of gems on an embark. Based on the above.
The Legend of Uristurist, "Daggerdaggers"
There exists a legend among all dwarvish civilizations, about a group of seven that set up camp at a very particular and unremarkable place, near a human settlement. That place was none other than Uristurist.
Now, Uristurist is just a plot of wood-ridden land, nothing fancy. Except for the fact that even Armok himself turns a blind eye: the laws of physics, civilization, time and space all crumble before the mightiest of powers those seven dwarves went to discover and manipulate, far from prying eyes. That power is none other that !!SCIENCE!!
Imbued with the knowledge to alter the very fabric of the universe through communion with Lua, they changed their surroundings in order to better understand their own kind: they produced mountains of Obsidian mugs, spawned obsidian out of thin air, at a speed never imagined built stairways and death wells for which to throw horses. And, when bored or troubled, regressed time itself.
For fun, they involved themselves in quantum physics, replacing their body parts with others cloned from their partners. They dipped themselves in magma and burnt themselves to oblivion. They gained and lost skill in instant. They even had the power to summon sieges from their own kin, and trap them in cages as puny goblins.
There is no limit to what happens at Uristurist, or so the legends tell, as no migrant or errant dwarf has yet reached the mythical fortress.
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.
healing_by_proxy.lua | |
---|---|
function assign(tgt,src) if df.isvalid(tgt) == 'ref' then df.assign(tgt, src) elseif type(tgt) == 'table' then for k,v in pairs(src) do if type(v) == 'table' then local cv = tgt[k] if cv == nil then cv = {} tgt[k] = cv end assign(cv, v) else tgt[k] = v end end else error('Invalid assign target type: '..tostring(tgt)) end return tgt end dfhack.lineedit("Select affected dwarf") local unit=dfhack.gui.getSelectedUnit() print(unit) dfhack.lineedit("Select base dwarf") local base_unit=dfhack.gui.getSelectedUnit() print(base_unit) if unit then while #unit.body.wounds > 0 do unit.body.wounds:erase(#unit.body.wounds-1) end unit.body.wound_next_id=1 unit.body.blood_count=unit.body.blood_max unit.status2.limbs_stand_count=unit.status2.limbs_stand_max unit.status2.limbs_grasp_count=unit.status2.limbs_grasp_max unit.flags1.dead=false unit.flags2.has_breaks=false unit.flags2.gutted=false unit.flags2.circulatory_spray=false unit.flags2.vision_good=true unit.flags2.vision_damaged=false unit.flags2.vision_missing=false unit.flags2.breathing_good=true unit.flags2.breathing_problem=false unit.flags2.calculated_nerves=false unit.flags2.calculated_bodyparts=false unit.counters.winded=0 unit.counters.stunned=0 unit.counters.unconscious=0 unit.counters.webbed=0 unit.counters.pain=0 unit.counters.nausea=0 unit.counters.dizziness=0 unit.counters2.paralysis=0 unit.counters2.fever=0 unit.counters2.exhaustion=0 unit.counters2.hunger_timer=0 unit.counters2.thirst_timer=0 unit.counters2.sleepiness_timer=0 unit.counters2.vomit_timeout=0 for k,v in pairs(unit.body.components) do for kk,vv in pairs(v) do if k == 'body_part_status' then v[kk].whole = 0 else v[kk] = 0 end end end assign(unit.body, base_unit.body) end |
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.
There also seems to yet exist some other place where molten body parts data is stored besides unit.body. After some verification, I think DF stores some values (not in the dwarf himself, but somewhere) that are later called back. After applying, running, applying, running,..., one of the scripts from the above link, I got my molten dwarf at perfect condition.
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.
cloning.lua | |
---|---|
function assign(tgt,src) if df.isvalid(tgt) == 'ref' then df.assign(tgt, src) elseif type(tgt) == 'table' then for k,v in pairs(src) do if type(v) == 'table' then local cv = tgt[k] if cv == nil then cv = {} tgt[k] = cv end assign(cv, v) else tgt[k] = v end end else error('Invalid assign target type: '..tostring(tgt)) end return tgt end dfhack.lineedit("Select affected dwarf") local unit=dfhack.gui.getSelectedUnit() print(unit) dfhack.lineedit("Select base dwarf") local base_unit=dfhack.gui.getSelectedUnit() print(base_unit) if unit then assign(unit, base_unit) end |