Search This Blog

Tuesday, March 28, 2006

Big Bad Permanent Spell Bug Fixed!

As some of you may have encountered, there has been a problem with Permanent spells in RealmSpeak. On occasion (seemingly at random), a Permanent spell will get stuck in one state or another. The most common appearance of the bug, is the inability to energize an inert spell. Worse yet, is having a Permanent spell (ie., Transform) get stuck in the ON state!!

At long last, I found the source of the problem in the code. Want to see the bug? It's easy to reproduce in version 0.27 or earlier: play the Sorceror and choose these spells: Transform, Fiery Blast, and Phantasm. Make sure you have at least three purple color chits, and move yourself to a safe Valley clearing. Save the game, and then try one of the following scenarios:

Scenario 1:
Day 1 - Cast Transform on yourself.
Day 2 - Cast Phantasm
Day 3 - Do nothing (ie., waste the Phantasm)
Day 4 - Fatigue a color chit: no spells to energize!!

Scenario 2:
Day 1 - Cast Transform on yourself.
Day 2 - Cast Phantasm
Day 3 - Fatigue a color chit during the day: energize your transform spell
Day 4 - You are stuck in a transformed state!!

You see, in both scenarios, the Phantasm spell expires at the end of the 3rd day. When it expires, the permanent spell list is wiped out (this is the bug), and RealmSpeak "forgets" which permanent spells were alive. If you are transformed when this happens, you never come out of it, because RealmSpeak doesn't know to make it inert. If it was inert, RealmSpeak doesn't list it when you fatigue a color chit.

The bug was so glaring in the code, I'm surprised it took me this long to see it. Fixing it was trivial, and should permanently (pun intended) resolve the situation. This fix will be in version 0.28, coming soon.

3 comments:

DewKid said...

Turns out, this same bug also causes the spell on the Flying Carpet to die, making it inoperable. All you have to do to kill the Flying Carpet is cast a Day or Combat spell, and that's it.

Can you tell I'm happy that this one is resolved? :-)

Anonymous said...

That's great. This is the only bug that I've really noticed in the game, and the only one that really prevents RealmSpeak from being complete in my opinion. (Without 'Melt into Mist' it is tough to play the Witch King).

So, congrats, and good work!

DewKid said...

Thanks. I can't tell you how happy I am to get this one nailed. Its tremendously frustrating to have no confidence your spells are going to be there when you need them!!