I've seen a couple of bug reports about death being broken in B18, particularly in the sandworm lair, and I don't think it's been correctly diagnosed yet.
This has happened to me twice, and here's what I think is going on:
1) Die.
2) Have a monster be standing on your respawn spot.
3) HP and Mana are not reset, probably because of a bug related to (2)
4) If it is not your turn, you're going to immediately die again if the monster hits you. This is probably the looping death that's been reported.
5) HOWEVER, sometimes it is your turn. In this case, you can phase door/teleport away, and on the next cycle, your HP will be reset to 1 and you'll survive.
I think this bug can happen anywhere, but because of confined rooms in the SWL, it seems more likely to happen there. It should also be easy to replicate, if you know the wizard commands to generate monsters...
Hope this helps.
Looping deaths (B18)
Moderator: Moderator
Re: Looping deaths (B18)
Sorry, that theory was wrong. I tested it with worms in the trollmires, and it seems like the "findfreegrid" utility function is working fine...
The problem seems to be this, though, from the log file immediately after death (frame stuff snipped):
[LOG] Black jelly hits Todd for #GREEN#26.00 acid damage#LAST#.
[LOG] Black jelly killed Todd!
[LOG] #LIGHT_RED#You resurrect!
findFreeGrid using 34 38
[MOVE] actor moved without a starting position Todd 34 38
[Identify] rough leather cap true
[LOG] You pickup 0.65 gold pieces.
[LOG] There is an item here: #FFFFFF#rough leather cap (0 def, 1 armor)#LAST#
Lua Error: /mod/dialogs/DeathDialog.lua:83: attempt to call method 'resetToFull' (a nil value)
At [C]:-1 resetToFull
At /mod/dialogs/DeathDialog.lua:83 restoreRessources
At /mod/dialogs/DeathDialog.lua:145 use
At /mod/dialogs/DeathDialog.lua:42 fct
At /engine/ui/List.lua:159 onUse
At /engine/ui/List.lua:126 ?
At /engine/KeyBind.lua:198 receiveKey
At /engine/ui/Dialog.lua:320 keyEvent
At /engine/ui/Dialog.lua:170
The problem seems to be this, though, from the log file immediately after death (frame stuff snipped):
[LOG] Black jelly hits Todd for #GREEN#26.00 acid damage#LAST#.
[LOG] Black jelly killed Todd!
[LOG] #LIGHT_RED#You resurrect!
findFreeGrid using 34 38
[MOVE] actor moved without a starting position Todd 34 38
[Identify] rough leather cap true
[LOG] You pickup 0.65 gold pieces.
[LOG] There is an item here: #FFFFFF#rough leather cap (0 def, 1 armor)#LAST#
Lua Error: /mod/dialogs/DeathDialog.lua:83: attempt to call method 'resetToFull' (a nil value)
At [C]:-1 resetToFull
At /mod/dialogs/DeathDialog.lua:83 restoreRessources
At /mod/dialogs/DeathDialog.lua:145 use
At /mod/dialogs/DeathDialog.lua:42 fct
At /engine/ui/List.lua:159 onUse
At /engine/ui/List.lua:126 ?
At /engine/KeyBind.lua:198 receiveKey
At /engine/ui/Dialog.lua:320 keyEvent
At /engine/ui/Dialog.lua:170
Re: Looping deaths (B18)
It looks like the problem is that some of the game.level.entities are not actually Actor objects, and therefore don't have the resetToFull function. If you want to help debug this you can open game/modules/tome/dialogs/DeathDialog.lua, find the "easy_mode" section and change the for loop at the end to read like this:
This of course assumes that the entity has a name property, which isn't required but is likely.
Code: Select all
for uid, e in pairs(game.level.entities) do
print(e.name)
self:restoreResources(e)
end
<DarkGod> lets say it's intended
Re: Looping deaths (B18)
Ahh this is probably it yes
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: Looping deaths (B18)
Yeah, it's the "unstable sand tunnel" that it's trying to restore resources to before it crashes.
This (very hackish) change in DeathDialog.lua (line 144) fixes the death loop:
for uid, e in pairs(game.level.entities) do
print(e.name)
if e.name == "unstable sand tunnel" then
print("skipping sand tunnel restoration")
else
self:restoreRessources(e)
end
end
This (very hackish) change in DeathDialog.lua (line 144) fixes the death loop:
for uid, e in pairs(game.level.entities) do
print(e.name)
if e.name == "unstable sand tunnel" then
print("skipping sand tunnel restoration")
else
self:restoreRessources(e)
end
end
Re: Looping deaths (B18)
And a little less hackish version would be:whimbrel wrote:Yeah, it's the "unstable sand tunnel" that it's trying to restore resources to before it crashes.
This (very hackish) change in DeathDialog.lua (line 144) fixes the death loop:
for uid, e in pairs(game.level.entities) do
print(e.name)
if e.name == "unstable sand tunnel" then
print("skipping sand tunnel restoration")
else
self:restoreRessources(e)
end
end
Code: Select all
for uid, e in pairs(game.level.entities) do
print(e.name)
if not e.restoreRessources then
print("skipping sand tunnel restoration")
else
self:restoreRessources(e)
end
end
Re: Looping deaths (B18)
Thanks. I don't speak lua, so I didn't know if there was a try/catch construct or anything like that. I was just looking for a quick fix that would let me keep playing my archmage. 
