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 User:Andux/Scripts
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 58: | Line 58: | ||
"umma", "undi", "unga", "unni", | "umma", "undi", "unga", "unni", | ||
"vala", "vali", "vara", "vari", "vina", | "vala", "vali", "vara", "vari", "vina", | ||
− | |||
"ya", | "ya", | ||
"zadi", "zani", "zara", "zi" | "zadi", "zani", "zara", "zi" | ||
Line 153: | Line 152: | ||
===Urbanizer=== | ===Urbanizer=== | ||
− | + | Converts all forest retreats to visitable towns. | |
<pre style="overflow: auto;"> | <pre style="overflow: auto;"> | ||
for k,v in pairs(df.global.world.world_data.sites) do | for k,v in pairs(df.global.world.world_data.sites) do | ||
Line 164: | Line 163: | ||
==General== | ==General== | ||
+ | ===HealUnit=== | ||
+ | Repairs all health issues except for syndromes and severed limbs. | ||
+ | <pre style="overflow: auto;"> | ||
+ | local unit=dfhack.gui.getSelectedUnit() | ||
+ | if unit then | ||
+ | print("Erasing wounds...") | ||
+ | while #unit.body.wounds > 0 do | ||
+ | unit.body.wounds:erase(#unit.body.wounds-1) | ||
+ | end | ||
+ | unit.body.wound_next_id=1 | ||
+ | |||
+ | print("Refilling blood...") | ||
+ | unit.body.blood_count=unit.body.blood_max | ||
+ | |||
+ | print("Resetting status flags...") | ||
+ | |||
+ | -- for DFHack >= 0.34.11 r3 | ||
+ | unit.status2.limbs_stand_count=unit.status2.limbs_stand_max | ||
+ | unit.status2.limbs_grasp_count=unit.status2.limbs_grasp_max | ||
+ | -- for older versions, use these instead: | ||
+ | --unit.status2.able_stand_impair=unit.status2.able_stand | ||
+ | --unit.status2.able_grasp_impair=unit.status2.able_grasp | ||
+ | |||
+ | 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 | ||
+ | |||
+ | print("Resetting counters...") | ||
+ | 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 | ||
+ | |||
+ | end | ||
+ | </pre> | ||
===GoodAsNew=== | ===GoodAsNew=== | ||
Line 185: | Line 238: | ||
r.wear_timer=0 | r.wear_timer=0 | ||
printall(r) | printall(r) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
end | end | ||
</pre> | </pre> |