Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Reviving Dead Dwarfs  (Read 13121 times)

Swonnrr

  • Bay Watcher
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #15 on: June 13, 2013, 12:20:49 am »

Can't we mod dwarf so they transform in something else at near-death?
Putting a transformation on fatal would condition.
The idea is to make the dead dwarf loot/transform to a "soul", wich is invulnerable but still considered like a living dwarf.
Then mod a reaction to get the "soul" syndrome off the dwarf.
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #16 on: June 13, 2013, 12:25:12 am »

Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
if unit.caste == 0 then
unit.caste = 1
else
unit.caste = 0
end
end
heal2()

This is a script for DFHack, just highlight the dorf you want rez'd in the dead units screen and type heal2 into DFHack.

Word of warning, it occasionally buggers up, either not resurrecting the target or flat-out freezing the game, so save before attempting to use it.

Edit: forgot to credit Kurik Amudnil, in the DFHack thread for this script.
« Last Edit: June 13, 2013, 12:28:16 am by BlackFlyme »
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #17 on: June 13, 2013, 01:05:48 am »

Note that when the dwarf died, a historical entry was made recording his death. This would not go away if a dwarf was ressurected with DFHack. Also, the dwarf might be an automatic owner of a coffin, and might be on the list of engravable slabs.

Funny: If you ressurect the dwarf after engraving a slab for him, the slab will probably show the original cause of death. If/when he dies a second time, the slab's description would auto-update to show the second death only.

chevil

  • Bay Watcher
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #18 on: June 13, 2013, 10:22:06 am »

A clever solution that would require a worldgen:

Raise the dead as a mummy, which keeps the soul.
Use a syndrome to make it a were creature mummy.
On werecreature transformation, it will regenerate lost parts.
Another sydrome clears the werecreature status, and the mummy status.

This would revive dead units "correctly", but would be a kludge, and may cause cloning.
Can someone give me some quick lessons in modding?
Logged

Brilliand

  • Bay Watcher
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #19 on: June 13, 2013, 12:59:19 pm »

A while back I had a guild representative killed and then raised by a necromancer.  I killed the necromancer, then resurrected his corpse (Masterwork Mod has a way to get a resurrect interaction).  A few years later, he showed up as a ghost.  Now I've got a ghost haunting people while his friendly body stands around dumbly.

Is there a way to put his soul back in his body?  With DFHack lua commands, say?
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #20 on: June 13, 2013, 01:07:34 pm »

A while back I had a guild representative killed and then raised by a necromancer.  I killed the necromancer, then resurrected his corpse (Masterwork Mod has a way to get a resurrect interaction).  A few years later, he showed up as a ghost.  Now I've got a ghost haunting people while his friendly body stands around dumbly.

You tell that story as if there is a problem somewhere :D

Brilliand

  • Bay Watcher
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #21 on: June 13, 2013, 01:37:38 pm »

A while back I had a guild representative killed and then raised by a necromancer.  I killed the necromancer, then resurrected his corpse (Masterwork Mod has a way to get a resurrect interaction).  A few years later, he showed up as a ghost.  Now I've got a ghost haunting people while his friendly body stands around dumbly.

You tell that story as if there is a problem somewhere :D

I want my guild representative back!  :P
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

Hommit

  • Bay Watcher
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #22 on: June 13, 2013, 01:40:14 pm »

Hmm... dors seems to be rezzed, but there is troubles with counting them etc. DF too. well, have to bear with it i guess
Logged

Loud Whispers

  • Bay Watcher
  • They said we have to aim higher, so we dug deeper.
    • View Profile
    • I APPLAUD YOU SIRRAH
Re: Reviving Dead Dwarfs
« Reply #23 on: June 15, 2013, 04:31:32 pm »

Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
if unit.caste == 0 then
unit.caste = 1
else
unit.caste = 0
end
end
heal2()

This is a script for DFHack, just highlight the dorf you want rez'd in the dead units screen and type heal2 into DFHack.

Word of warning, it occasionally buggers up, either not resurrecting the target or flat-out freezing the game, so save before attempting to use it.

Edit: forgot to credit Kurik Amudnil, in the DFHack thread for this script.
Does this bring them back with all wounds?

Brilliand

  • Bay Watcher
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #24 on: June 15, 2013, 05:50:57 pm »

Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
if unit.caste == 0 then
unit.caste = 1
else
unit.caste = 0
end
end
heal2()

This is a script for DFHack, just highlight the dorf you want rez'd in the dead units screen and type heal2 into DFHack.

Word of warning, it occasionally buggers up, either not resurrecting the target or flat-out freezing the game, so save before attempting to use it.

Edit: forgot to credit Kurik Amudnil, in the DFHack thread for this script.
Does this bring them back with all wounds?

No, it fully heals them.

If you delete the if..end block, it will bring them back exactly as wounded as when they died, in which case they'll just die again right away.  If you set their blood count to something positive (i.e. 1000), then they might go on living with all wounds.

Try this:
Code: [Select]
function heal2()
unit = dfhack.gui.getSelectedUnit()
unit.flags1.dead = false
if unit.body.blood_count < 1000 then
unit.body.blood_count = 1000
end
end
heal2()
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.

Hommit

  • Bay Watcher
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #25 on: June 16, 2013, 01:45:59 am »

Quote
If you delete the if..end block, it will bring them back exactly as wounded as when they died, in which case they'll just die again right away.  If you set their blood count to something positive (i.e. 1000), then they might go on living with all wounds.
when paused, immediatly after script they have all grey body parts, that mean i should let game run for few ticks, or they not healed?
Logged

Brilliand

  • Bay Watcher
    • View Profile
Re: Reviving Dead Dwarfs
« Reply #26 on: June 16, 2013, 01:52:26 am »

Quote
If you delete the if..end block, it will bring them back exactly as wounded as when they died, in which case they'll just die again right away.  If you set their blood count to something positive (i.e. 1000), then they might go on living with all wounds.
when paused, immediatly after script they have all grey body parts, that mean i should let game run for few ticks, or they not healed?

Yep.  I'm pretty sure they will be fully healed on the very next tick, so you can just press period to step forward one.
Logged
The blood of our enemies is but a symbol.  The true domain of Armok is magma - mountain's blood.
Pages: 1 [2]