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.


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.

BugWhich game?DescriptionEGwhaven fix?
Jumping/falling speed is dependent on machine speedBothKnown cause: dophysics in WHINP.C handles player's vertical movement, but fails to adjust it to the game speed.Yes
Slippery movementBothPlayer's deceleration after moving was clock speed dependant.Yes
Projectile autoaim is misguidedBothKnown 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?
Sprite doors rotate too far1Witchaven 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 correctly2SMK 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.

BugWhich game?DescriptionEGwhaven fix?
Ice Razor can freeze Cirae-Argoth and break the game2Cirae-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 properly2If 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.
Breaking frozen enemies fails to increase kill count2When enemies are frozen and shattered, they are not counted as kills for the end of level kill score.Yes
"SHOCKED" does nothing2Instead 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 weapon2When 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.
Lose enchanted weapon by picking up regular one2Known cause: Exceptions simply weren't coded in.Yes
Dagger can't be collected1In 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.
Onyx Ring has no effect (besides small XP gain)BothKnown 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 away2Code 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 animationBothOccurs if the player is using a scare spell and closes to melee range, then backs off.Yes
Clansman with sword is unusually hard to hit2During 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.
Non-fireball trap projectiles do not hit GrondovalBoth?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.
Sound effect gets stuck on loopBoth?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.

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.

BugWhich game?DescriptionEGwhaven fix?
Skeleton animates incorrectly2Known cause: transformactors in WHOBJ.C (which handles angle rotations of sprites) contains the wrong frame count for the skeleton actor.Yes
Imp gets stuck in attack animation2The imp sometimes gets stuck in its attack animation even when the player backs out of melee range.
Known cause: a partially commented out if block originally meant to make a sound effect ended up placing the animation change statement under the if condition instead.
Giryon Knight's phantom spawning is faulty2Giryon Knights, if set with a particular property, are apparently meant to spawn a ghost, but the functions for doing so are faulty resulting in several ghosts appearing and other undesirable side effects.
Known cause: faulty SHADE and EVILSPIRIT behavior in WHANI.C animateobjs.
Glass Skull does not trigger level up, can result in XP loss2Known cause: Witchaven II uses different XP point per level values than the original, but the values in WHOBJ.C processobjs were not updated to match.Yes
Trap shots are displaced upwards2Shots from various wall traps are launched from a spot well above the hole in the wall. Probably due to the graphic being made much larger in Witchaven II and the code not adjusted properly for scaling it down.Yes
On higher skill levels, health potions and Ankhs count double, can sometimes exceed normal max health2Witchaven II added a check that halved or doubled most alterations to the player's HP value on certain skill levels, seemingly with the intent of making enemies stronger on higher skill levels. However, it was being applied to increases of health as well with strange results.Yes
Some treasure chest contents never occurBothRandom armor in a treasure chest will always be a Hero Time helmet (should be a random choice of helmet, leather, chain, or plate).
When choosing between XP bonus / poison trap, always chooses XP bonus.
Known cause: Some of the random rolls in WHOBJ.C processobjs are coded incorrectly (incorrect placement of & operator in if() condition).
Non-enchanted pike axes make enchanted weapon auras disappear2Known cause: faulty checks in WHPLR.C caused the regular weapon animations to be selected if the player's weapon[7] equaled 2 (non-enchanted pike axe with throwing ammo), even if the pike axe was not the currently wielded weapon.Yes
Extreme running speed when mouselooking1Mouse code in Witchaven I contained a limitation on player's forward/backward velocity when in mouse movement mode. Switching to mouse look mode bypassed this limit.Yes
Incorrect weapon enchantment on hardest skill2Known cause: when choosing how many charges to give to an enchanted weapon, difficulty levels were treated as starting at 0 when they properly start at 1. This meant that at the hardest skill level, enchantment charge would be left equal to the weapon's remaining durability points, often much more than the charge should have been.Yes
Shields are (practically) indestructible2Known cause: the amount of damage being done to the shield was expressed as a negative number, and then subtracted from the shield points, resulting in shield points increasing whenever the shield should have been damaged.
Shields could theoretically still be destroyed by overflow of the shield durability value, but it would require an immense number of accumulated hits, beyond what would reasonably occur in play.
Jukebox shuffle doesn't pick tracks 11-152Known cause: randomizer was instructed to give a range from 0-9 instead of the correct 0-14.Yes

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!

Bumping certain walls kills Grondoval instantlySeems 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 corruptionWitchaven 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.

Pull chain on WH1 Level 5 doesn't workThe 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 13The 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 1Known 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 5A sprite erroneously set to use a sky graphic exists on this level, near the glass skull.Yes
No exit indicator sprite on WH2 Level 13Cosmetic 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 13The 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.

BugWhich game?Native machine?Description
Reloaded saved game exhibits bizarre behavior2?YesI'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 not2??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 air2?YesObserved 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 incorrectly2NoElusive 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 ceiling1?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 game1?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.

Fire resistance protects against projectiles that are not fireFire 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 playerProbably intentional. XP grant is done upon death of the monster, regardless of cause.


Other bugs and oddities.

BugWhich game?DescriptionEGwhaven fix?
Player not hit by thrown halberds2?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 wallBothPossibly 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 gameBothSeems 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.
Weapons take damage even if attack missesBothNeeds 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 game1Possibly 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.
Sprite attributes not preserved in saved games2?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.
Freeze spell exploitable for excess XPBoth?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.
Automap is off center in 640x480 mode1Fixed in Witchaven II.N/A
Automap does not show red lines2Something 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 levelsBothIf using the fly down button over a floor, eye level can drop very low.No
Blue Midian swordsmen are deleted from the map2The 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.
Exit pentagram is not correctly translucent2Known cause: The map setup code in Witchaven II removes the translucency flag from pentagrams.Yes
Outro sequence crashes with "no more radbuff pointers"2Only had this happen once so far. Related to free memory perhaps?No?
Always run oddity2In 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 keys2Some 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 game2?Needs investigation. If intro cinematic has sound, but not the title screen, check the in-game sound settings.
Possibly due to incorrect sound setup.
Setup program crashes in Windows 9xBothIf 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 HP2?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 DOSBox1?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?