Witchaven and Witchaven II - Bugs and idiosyncracies
The Witchaven games are notoriously buggy. Here you can find some troubleshooting tips and a catalog of observed bugs, with their causes if known. I have tried my best to document the game's behavior accurately, but be aware that in some cases I may have misinterpreted the game's source code, or strange bugs in the behavior may manifest that I haven't caught.
Troubleshooting
The biggest problems you are likely to run into are clock speed issues. EGwhaven attempts to patch these out, although the fix is not quite perfect yet and I do not guarantee exact correctness for time-sensitive functions. Playing on a native machine rather than emulation will usually net you better results for the vanilla EXEs; the closer to the system the game was developed for, the better.
Adjusting for speed issues in DOSBox:
Adjust cycles lower with a "cycles = ###" command on the DOSBox prompt or in your configuration file. You will have to experiment with values to get it right. Although I previously recommended using the Witchaven II intro cinematic as a gauge, a good cycles value for it may make the rest of the game too choppy.
You may experience other issues under DOSBox that are not fixable with the cycles parameter. I had more quirks under 64-bit GNU/Linux DOSBox than under 32-bit Windows DOSBox (however, this is based on old tests and may be due to a faulty DOSBox build of some sort).
Adjusting for speed issues in real DOS:
Slowdown utilities could help if actions like jumping are still too fast; I find that on a 333mhz machine, they're mostly ok. Bear in mind that you do not want to slow the computer down anywhere near as much as you would for the 1980s DOS games that such utilities are usually used for. As with DOSBox cycles, you may have to experiment a bit to find the right balance of smoothness and good behavior.
Either way you run the game, you might also get some beneficial slowdown from switching the game to 640x480 resolution, though it may become a bit choppy as well.
If you cannot remap keys:
Bear in mind that the setup program isn't clever enough to unbind a key from one action when you assign it to another, so if it appears that remapping the keys isn't working, make sure the key is assigned to only one function.
If you get an erroneous "center stick press button" message on screen:
This message normally appears if you have set up the game to use a joystick and you are being asked to calibrate it. If this is not the case, it may be that you have patched the game incorrectly, either with a poorly-made "no CD" patch or with two official patches that are not meant to be applied simultaneously. A clean reinstall may help.
Full install to hard drive:
Witchaven II can be run completely from hard drive by copying the SMK files from the CD to the game folder and running the game with the LOCAL parameter.
Bug catalogue
This is a project to seek out the bugs in Witchaven and Witchaven II, and find out whether they are bugs that manifested at the time of release or if they are latent bugs resulting from machine or emulator incompatibility.
There is currently a significant bias towards information based on the Witchaven II code base, as I have not (yet) dug too deeply into the internal differences between the first game and the sequel. It is possible that more functions than are currently documented were broken during the transition of the code to Witchaven II's form.
Clock speed sensitivity
These are bugs that occur because the game is not correctly adjusting to varying system speeds. The faster the system that the game is run on is, the worse these errors become. For workarounds, see the troubleshooting section above.
Bug | Which game? | Description | EGwhaven fix? |
---|---|---|---|
Jumping/falling speed is dependent on machine speed | Both | Known cause: dophysics in WHINP.C handles player's vertical movement, but fails to adjust it to the game speed. | Yes |
Slippery movement | Both | Player's deceleration after moving was clock speed dependant. | Yes |
Projectile autoaim is misguided | Both | Known cause: animateobjs in WHANI.C handles missile's vertical movement, but fails to adjust it to the game speed. Crashes when throwing pike axes in Witchaven I might be related? | Yes |
Sprite doors rotate too far | 1 | Witchaven I used some sprite-based rotating doors which could over-rotate into a wall due to clock speed issues. The same problem may exist in Witchaven II but the maps there did not use any sprite doors. | Yes |
Cinematics don't play correctly | 2 | SMK playback stutters and goes in slow motion under DOSBox. Possibly related to audio as turning sound off makes the video play smoothly. | Improved |
Code omission
Bugs that occur simply because there's no code in place to make something happen or prevent it from happening.
Bug | Which game? | Description | EGwhaven fix? |
---|---|---|---|
Ice Razor can freeze Cirae-Argoth and break the game | 2 | Cirae-Argoth is immune to freeze scrolls, but if you use the enchanted two-handed sword on her, she may still be frozen and shattered, which renders the game unwinnable due to her critical drop item not appearing. | Yes |
Ciraean Sentinel doesn't thaw out properly | 2 | If you freeze a Ciraean Sentinel with the freeze spell and then leave him enough time to thaw out, he doesn't become active again, and cannot die. Known cause: no case was coded for this enemy in the FROZEN state of WHANI.C. | Yes |
Breaking frozen enemies fails to increase kill count | 2 | When enemies are frozen and shattered, they are not counted as kills for the end of level kill score. | Yes |
"SHOCKED" does nothing | 2 | Instead of level draining, the Willow Wisp in Witchaven II produces a message which says "SHOCKED". There is, however, no code in place to make this do anything. In Witchaven I, the shocktime variable appears to have served as a means to prevent rapid-fire level draining, so this may be a case of WH2 being rushed out with debug code in place rather than something finalized. | Yes |
Off hand is not shaded on HUD weapon | 2 | When dual wielding (and probably when punching) the player's left hand is not shaded like the right hand, most noticeable when using a scare spell. Known cause: not all of the calls to sprite drawing functions in WHPLR.C were passing the "dashade" variable. | Yes |
Lose enchanted weapon by picking up regular one | 2 | Known cause: Exceptions simply weren't coded in. | Yes |
Dagger can't be collected | 1 | In WH1, the ordinary dagger sprite could not be collected, making treasure chests the only way to replace broken daggers in the standard maps. The enchanted dagger sprite was recognized in the code instead, rather than the standard sprite. WH2 recognizes both and treats them differently, but still does not include the enchanted dagger sprite in maps. | Yes |
Onyx Ring has no effect (besides small XP gain) | Both | Known cause: processobjs in WHOBJ.C sets the player's treasure[7] variable, but there is no code to check this variable and make it do something. | Option |
Enchanted weapon humming sound doesn't go away when weapon is put away | 2 | Code was not shutting off enchanted droning for weapons that weren't meant to have it, also the enchantment code originally marked fists and broad sword as enchanted even though it probably shouldn't. | Yes |
Enemy sticks in attack animation | Both | Occurs if the player is using a scare spell and closes to melee range, then backs off. | Yes |
Clansman with sword is unusually hard to hit | 2 | During a particular frame of his sword animation, the Argothonian Clansman is unhittable by any attack. Known cause: Sprite picnum was sometimes set to KURTREADY+1 but checks against that animation in attack code were only made against the first KURTREADY frame. | Yes |
Non-fireball trap projectiles do not hit Grondoval | Both? | For example, see the many traps in Level 5, which never seem to hit even though they fire at the correct vertical level. The traps are able to hit monsters. This appears to happen because the projectile was expecting a return value from damageactor() (WHOBJ.C) that it did not get. | Yes |
Sound effect gets stuck on loop | Both? | The stuck sound stops if the menu is opened, but on resuming play, another sound will start looping instead. Adding code to clean up the loop count setting on sound effects fixes this. | Yes |
Faulty logic
Bugs that occur because variables are being set or evaluated incorrectly.
A particular subset of issues occurs due to the (mis)use of krand()&x calls. The krand()&x construction typically works correctly on its own, but the & operator (bitwise AND) was sometimes used in an if() statement in a way that was invalid due to the programmers overlooking a particular quirk of C's order of operations.
BUILD Engine
Bugs that are present in the BUILD engine itself, rather than Witchaven in particular. EGwhaven does not fix any of these bugs currently, and is unlikely to ever. Sorry!
Bug | Description |
---|---|
Bumping certain walls kills Grondoval instantly | Seems to happen more frequently with some walls than others. This can at the very least also happen in Duke 3D, cf. Duke Dead Quick (video) and this information on Duke Nukem 3D glitches. Try not to jam yourself into strange spaces like decorative wall recesses, as these are prime death zones. |
Collision with unusual slopes causes memory corruption | Witchaven II, level 13 contains some stalactites created by giving triangular sectors an extreme ceiling slope to create the pointed geometry. Bumping against these stalactites, when they are low enough to the floor, can cause Grondoval to clip into them and this may subsequently corrupt the game's memory, resulting in erroneous slopes all over the place and other errors. While these structures are unusual, by building a test map for Duke Nukem 3D and messing around in it I was also able to induce that game to crash under similar circumstances, so I am categorizing this issue as a BUILD bug. Once the problem has occurred, consider your Witchaven II session destroyed even if play continues. The game's memory has been corrupted and it is likely to crash afterwards; even reloading from a previous save does not appear to clean things up if you haven't exited the game first. Exit the game completely, then restart and load a save from before the error occured. As with the wall death issue, the best way to mitigate this currently is to avoid walking up against the stalactite structures, where possible. |
Level design error
Bugs that occur due to map data, rather than the executable code.
Bug | Description | Patch? |
---|---|---|
Pull chain on WH1 Level 5 doesn't work | The pull chain that opens the brass key area was not given any tags to link it to the sector it's meant to operate on. | Yes |
Cannot collect bow in WH1 Level 13 | The bow near the start of WH1 Level 13 is tagged with the "blocking" sprite property which prevents the player from being able to collect it. | Yes |
Can stand on wall decorations in WH2 Level 1 | Known to exist in this level, but possibly others as well. Some sprites such as blood splatters set to be wall decorations are flagged as blocking and therefore treated as solid objects. | No |
Nonsensical sprite graphic in WH2 Level 5 | A sprite erroneously set to use a sky graphic exists on this level, near the glass skull. | Yes |
No exit indicator sprite on WH2 Level 13 | Cosmetic map issue; the map is still completable, but the exit pentagram isn't displayed on the exit pad. | Yes |
Black key door does not work on WH2 Level 13 | The tag for the door to open was erroneously given to an overlapped sector instead of the correct one. | Yes |
Bizarre and elusive
Bugs that have been baffling and which I have as yet been unable to track down conclusively. Some may be emulator or system specific bugs, or only triggerable under exceptional circumstances. If you think you have further information on any of these, please let me know.
Bug | Which game? | Native machine? | Description |
---|---|---|---|
Reloaded saved game exhibits bizarre behavior | 2? | Yes | I've seen the game run too fast in one save and had Grondoval simply die upon reload in another; these happened on native machine but I haven't seen it in DOSBox. Perhaps some form of overflow or other corruption taking place in DOS. I suspect at this point that it may have been a result of vanilla Witchaven 2 / EGwhaven savegame incompatibility that has since been repaired. |
Monster can climb to ledges it should not | 2? | ? | Observed several times on WH2 level 1, where a Lava Fiend can end up stuck in the eye socket of the big skull entrance. Something about the WH2L1 architecture must be conducive to this happening. MAY be a glitch related to sloped floors, but there is no conclusive evidence yet. |
Enemy walking on air | 2? | Yes | Observed twice, on Witchaven 2 running in DOS mode, level 5, with a clansman over the big stairs at the beginning. Perhaps related to this level's architecture in some way? |
Frozen imp animates incorrectly | 2 | No | Elusive bug; occurred in 64-bit GNU/Linux DOSBox. I'm inclined to write this off as a DOSBox/system glitch as I've never seen it happen on any other system setup, DOSBox or otherwise. It may be possible that it's related to the enemy sticking in its attack animation due to a scare spell bug though, I have to investigate this. |
Grondoval's head gets stuck in the ceiling | 1? | No? | See this video. Recently reproduced a similar issue on WH1 level 6, climbing the stairs from the lava cracks room, in an EGwhaven dev build. Still need more research, but seems potentially recoverable by crouching around for a while to force the character back to the floor. |
Pull chain disappeared from save game | 1? | No? | Bug reported by Gennaro; a pull chain on WH1 Level 12 disappeared in the data for a saved game. Cause is currently unknown but does not appear to be related to faulty map data. If you can reproduce similar errors, please provide info if possible. |
"It's a feature"
Odd behaviors that probably should not be considered bugs.
Behavior | Description |
---|---|
Fire resistance protects against projectiles that are not fire | Fire resistance potions resist all projectiles except for the Grey Witch's flesh attack and the Skeletal Witch's or Ciraean Sentinel's magic spell. A few Witchaven II maps have deathtraps that are designed around this being the case, so it can't be "fixed" without ruining those maps. Optionally configurable in EGwhaven. |
Monsters killing each other grants XP to player | Probably intentional. XP grant is done upon death of the monster, regardless of cause. |
Miscellany
Other bugs and oddities.
Bug | Which game? | Description | EGwhaven fix? |
---|---|---|---|
Player not hit by thrown halberds | 2? | Halberds thrown by the Midian warriors were collected or ignored rather than hitting for damage, seemingly because being a collectible item interfered with their operating as a damaging projectile. | Yes |
Monsters can enter the wall | Both | Possibly related to the death wall bug above. Skeletons are particularly susceptible but other creatures occasionally do this as well: it has been observed once on Witchaven 2, with Lava Fiend, level 13, on a spiral staircase; again on Witchaven 1, with Goblin, level 23, ledge near beginning. If the monster fully penetrates the wall it is removed from play. | No |
Ornate horn erroneously given in saved game | Both | Seems to happen more frequently later in a playthrough rather than in early saves. My latest research suggests that this is may be due to the fact that the vampiretime variable is probably treated in game as a 32-bit variable, but gets saved and loaded as only a 16-bit one. EGwhaven now makes an effort to clean up this variable when saving/loading, so the bug should be gone there. | Yes |
Weapons take damage even if attack misses | Both | Needs more research, it may be an intentional thing where swinging weapons in the air only damages them further if they're already damaged. | No |
Throwing a pike crashes the game | 1 | Possibly clock speed related as it does not seem to happen on a native machine. Seems to be fixed in Witchaven II. May be specifically triggered when aiming at a monster as opposed to throwing pikes with no monster in sight. | Yes? |
Sprite attributes not preserved in saved games | 2? | When reloading a saved game, sprites are re-initialized as if loading the map fresh, which has undesirable results such as restoring enemy HP and ammo to maximum. Known cause: game did not differentiate between loading a savegame map and loading a map normally. | Yes |
Freeze spell exploitable for excess XP | Both? | Enemies give XP upon being frozen with a freeze spell, however, it is possible for them to thaw out and be frozen again to farm multiple XP bonuses this way. EGwhaven moves the grant of XP to frozen enemies being smashed, rather than immediately when frozen. | Yes |
Automap is off center in 640x480 mode | 1 | Fixed in Witchaven II. | N/A |
Automap does not show red lines | 2 | Something seems to have changed between WH1's initial release and the release of WH2 that has caused Capstone's map display code to break, resulting in the red two-sided lines no longer displaying on map even though they are originally did. | Flight does not properly respect floor levels | Both | If using the fly down button over a floor, eye level can drop very low. | No |
Blue Midian swordsmen are deleted from the map | 2 | The save game system in WH2 uses a hack where a blue-caped Midian swordsman sprite is placed on Grondoval's position, and all of them are removed when loading maps to prevent attacks from this phantom enemy. WH1 uses a Palette #1 Fred instead, which is more of a non-issue since Fred is unused in the official maps and setting his palette to 1 does nothing beneficial even if he were to be placed in a custom map. | Yes |
Exit pentagram is not correctly translucent | 2 | Known cause: The map setup code in Witchaven II removes the translucency flag from pentagrams. | Yes |
Outro sequence crashes with "no more radbuff pointers" | 2 | Only had this happen once so far. Related to free memory perhaps? | No? |
Always run oddity | 2 | In Witchaven II, always run mode is on by default and the run key doesn't switch to walk mode, creating the illusion that the run key does nothing. If always run is turned off, it works normally. | Yes |
Can't remap strafing keys | 2 | Some versions of Witchaven II may be unable to remap the strafe left and strafe right keys, but also see troubleshooting notes. | Yes |
Sound and music volume reset to zero when starting game | 2? | Needs investigation. If intro cinematic has sound, but not the title screen, check the in-game sound settings. Possibly due to incorrect sound setup. | No |
Setup program crashes in Windows 9x | Both | If running through Windows 9x, drop to pure DOS mode to set up. The game can run in Windows 9x mode once set up, although plain DOS mode is recommended. | No |
Health potion causes health loss when near maximum HP | 2? | Bug that was reported but I have not confirmed yet. May be related to using a hacked version of the game. | Yes? |
RAP-10 audio crashes game in DOSBox | 1? | Bug that was reported but I have not confirmed yet. Reported to occur in the first level of WH1 where the lowering wall reveals a mino drake; only with EGwhaven?. | No? |