Page 1 of 1
[Fixed for V0.38] Game freezes when monsters are conjured.
Posted: Thu Apr 06, 2006 5:22 am
by TheMormegil
At least that seems to be whats happening...
Situation is a monster who has an attack method of conjuring monsters.
The game freezes when it conjures more than a couple it seems.
No error log, game has to be closed with ctrl-alt-del.
Posted: Thu Apr 06, 2006 7:00 am
by Sophia
How is it "conjuring" the monsters, exactly?
It sounds like an infinite loop.
Posted: Thu Apr 06, 2006 7:41 am
by TheMormegil
Like this...
ADD ATTACK_METHOD_CONJURE NAME=(CONJURE) TYPE=(WIZARD) ACTION=(ACTION_CREATE_NEW_SPELL,DUNGEON_SPELL_CONJURE,NULL) STRENGTH=(25) LEVEL=(3) ENERGY=(1) TIME=(30) CHARGES_USED=(1) MANA_USED=(1) SOUND=(NULL)
ADD SPELL_DES NAME=(CONJURE) RUNES=(DES) TYPE=(WIZARD) ACTION=(ACTION_CREATE_NEW_SPELL,DUNGEON_SPELL_CONJURE,NULL) CAST_SOUNDS=(NULL,NULL,NULL,NULL,NULL,NULL) FAIL_SOUNDS=(NULL,NULL,NULL,NULL,NULL,NULL) TIME=(30,35,40,45,50,55)
ADD DUNGEON_SPELL_CONJURE CLONES=(DUNGEON_SPELL_ZO) NAME=(DUNGEON_SPELL_CONJURE) CONVERT_EXPLODE=(SOUND:SOUND_ATTACK_SCORPION,ACTION:ACTION_CREATE_NEW_ON_FLOOR,ACTION_OBJECT1:MONSTER_DRAGON_RED,ACTION_OBJECT2:NULL,ACTION_STRENGTH:0)
ADD MONSTER_CONJURER CLONES=(MONSTER_GIGGLER) NAME=(CONJURER) METHODS=(ATTACK_METHOD_CONJURE,ATTACK_METHOD_CONJURE,ATTACK_METHOD_MONSTER_3) CONVERT_DEATH=(SOUND:SOUND_OTHER_SWOOSH)
Posted: Thu Apr 06, 2006 7:46 am
by Sophia
As a workaround, try making the spell convert directly to the monster, as opposed to triggering a CREATE_NEW_ON_FLOOR that instead spawns the monster. This is what I do and I don't have a crash.
Posted: Thu Apr 06, 2006 8:48 am
by beowuuf
Cheeky!
Gigglers attack quite fast - I wonder if the problem is that they are trying to conjure two or more large monsters on the same tile and the engine doens't like the stack up, or is freezing waiting for the party, gigglers or other dragon to move before placing the next
Posted: Thu Apr 06, 2006 10:33 am
by George Gilbert
Can you send me an example dungeon (or your entire txt file) with instructions on how to reproduce the problem in that dungeon and I'll take a look at this for you.
Posted: Thu Apr 06, 2006 10:49 am
by TheMormegil
http://www.shop4glasses.co.uk/potion.RTC
Sophia's suggestion didn't solve the problem.
To reproduce : Start the dungeon and go through the door into the room with
the giggler. Let him conjure a couple of dragons at you.
When there is not a free space N,E,S,W the next conjure spell will freeze the game. For me anyway

Posted: Thu Apr 06, 2006 10:54 am
by TheMormegil
Also when I tried to set the additional action back to NULL, it wasn't an option in the editor, I had to do it in the text file.
Posted: Thu Apr 06, 2006 11:04 am
by George Gilbert
BTW - NULL action is identical to ACTION_NONE so you can select that in the editor (although I agree that it won't look like it)
Posted: Thu Apr 06, 2006 11:08 am
by George Gilbert
That's great thanks - I can now see exactly what is happening.
FYI, RTC is going into an infinite loop trying to find a free slot for the monster to go into; there is no workaround (other than not using that spell so frequently)
Thinking about the fix, what would the prefered fix be:
1) That if there isn't room for the monster to be generated, it isn't.
2) That if there isn't room for the monster to be generated, it is and it doubles (trebbles, quadruples and on and on) up with those on existing tiles.
?
Posted: Thu Apr 06, 2006 11:48 am
by beowuuf
How does it work for teleporters? Or is this a potential problem for multiple teleporting too? (Say having a strike force of monsters teleporting to the area aroudn the party)
Posted: Thu Apr 06, 2006 11:57 am
by Lunever
Can't the conjured Monster be queued until the space it is supposed to appear upon is free again?
Posted: Thu Apr 06, 2006 6:21 pm
by TheMormegil
Hmm. I'd probably say option 1 is better, but I'm not sure, especially
if it might affect other things too (such as what beo mentioned).
Option 2 could really stitch the player up with no chance to survive

an amusing death sequence if you do something wrong for example.
Posted: Thu Apr 06, 2006 7:08 pm
by George Gilbert
Teleporters use a completely different code path than the spell generation. What they do is something very similar to option 2 (i.e. the monster does get teleported rather than get destroyed or not teleported).
As you say, for spells / attack methods etc, option 2 has alot of problems with it; in particular with monsters with a high attack rate, so I'm leaning heavily towards 1...just in general creating multiple items of any type (monsters as well as standard ones) out of direct control of the designer is a bad idea!
Posted: Thu Apr 06, 2006 8:25 pm
by Sophia
Isn't Option 1 how monster generators work?
That would be my suggestion.
I guess my fix worked for me because I wasn't trying to generate quite so many monsters on one tile.

Posted: Fri Apr 07, 2006 7:20 am
by TheMormegil
Yeah option 1 is probably best.
Conjuring tons of dragons is a bit of a silly idea anyway

Posted: Fri Apr 07, 2006 7:23 am
by TheMormegil
One more thing to mention, if it is a monster type which can go more than one to a square, can you have the squares fill up to thier max amount before
new ones are discarded?
Posted: Sun Apr 09, 2006 8:04 pm
by George Gilbert
Fixed for V0.38