Sorry, folks, I simply should have waited some hours more. Shortly after releasing patch 1.5.1, I stumbled upon a critical error regarding the killing of "big", "strong" and "mighty" variants of monsters. If you have activiated "Growing Monsters" in the options, the game will crash with a range-check error as soon as you kill a "big" variant of a standard monsters. Here is a hotfix for this problem. (.zip-archive, 470 KB) The archive contains an updated lambdarogue.exe. Use it to replace your current one. If you don't have downloaded the 1.5.1 patch already and still use 1.5, it is sufficient to get the hotfix to update to the latest version. The 1.5.1 patch archive only contains some updated text files (changelog and credits), not necessary for actual playing.
Background of this bug: Usually, "big" variants occur after killing about 20 "standard" variants of a monster type (i.e. kill 20 monsters of type "antbee", then a "big antbee" might be generated, and when you kill this, the game will crash). So variants are based on the templates of standard monsters in file monsters.txt and then generated dynamically.
Now, when a monster is killed, I increase a counter that contains the total number of kills of this monster type. This uses a function "ReturnMonTeByName". The parameter of this function is a string, containing the name of the monster type, leading to calls like
id := ReturnMonTeByName('antbee')
ReturnMonTeByName returns the id of the template of the monster in aforementioned file monsters.txt .
So I naively called
id := ReturnMonTeByName('big antbee')
As there is no "big antbee" in the templates, the returned id was invalid, which leaded to a crash when used to increase the counter of the killed monster type.
Ironically, I was aware of this problem in the past, because only some lines later in the source file, I took care of it, by using a variable "strBaseMonsterName". This variable was generated on the fly and is simply a stripped version of the actual monster name of the currently processed kill. I simply had to define and set this variable earlier and use it in all calls to ReturnMonTeByName.
So simply. But still nasty. Sorry.
Earlier / Later / Permanent Link
powered by d.elog blogging software v0.6 / 17.04.2009
© Mario Donick 2005–2009.
d.elog contains Xinha, a free WYSIWYG textarea editor.