Clerics and Paladins have the ability to turn undead creatures. When this mode is activated and the undead creatures are in range of the character, there is a possibility the undead, if they are of equal or lower Hit Dice (monster level) than the Turn Undead level, will stop attacking their targets and run away from the character until the effect is worn off.
If the Turn Undead level of a good or neutral aligned character is sufficiently higher than the HD of the undead, this mode will instead destroy it instantly, while evil characters will bring it under their control for 10 rounds (tested in BG1EE, doesn't seem to scale with level).
While the mode is active, the character using it can't perform any actions aside from moving. Silenced characters can still Turn Undead. Clerics under Sanctuary and Invisibility can also activate their TU button and move around.
Technical details[]
These details were explained by Troodon80, originally on a post in the Beamdog forums from May, 2016. In how far they can in the same way be applied to the original games, is unknown.
For the moment this is a direct quote from the post (with Troodon80's permission), until some further research has been done.
The Turn Undead Level under the Miscellaneous tab [in EE Keeper] is used. The effect state isn't used—it's not updated in-game.
The -2 is hardcoded for paladins.
How this works for a cleric is: Character level + turn undead level = total turn undead level
How it works for a paladin is: (Character level - 2) + turn undead level = total turn undead level
In both cases, if the level is below 0 before the bonus is applied, it will use 0 instead.
Now, in the case of the undead you're trying to turn, what happens here is this:
- A random roll of 1d4 is used. If any of the following are true at this point, then nothing happens:
- the roll is exactly 4;
- the character is immune to being turned;
- or the character is an ally.
- It takes the total turn undead level (obtained from above) and checks to see if it's higher than the undead character's level + random 1d4 roll + 5. If that fails, then;
- It takes the total turn undead level and checks to see if it's higher than the undead character's level + random 1d4 roll.
A skeleton at level 1 is nearby. You're a paladin at level 1, so you get -2 straight away. Your turn undead level is equal to (your level) 1 - (paladin penalty) 2 = -1. This converts to 0 since it's already below 0. Finally, the Turn Undead Level variable is added—let's say you set that at 10. Your total is now (0 + 10).
The 1d4 roll is made, since it's random let's take 3 as an example. The undead's level is now 1 + 3 + 5. Your total of 10 is more than that and will either destroy the undead or charm it (depending on whether your character is evil).
If that wasn't successful, it attempts the second check.
Let's say your Turn Undead Level is a total of 5 instead. That's 1 + 3 from the skeleton versus your 0 + 5, which causes the skeleton to run away from your paladin.
Notes[]
- The Turn Undead Level is normally 0. The Shield of Egons is the only item in any of the games that modifies it.
- Turn Undead is hard coded in the game engine. This makes it is difficult to see or analyze the inner workings of the code. Making modifications to hard coded parameters is also difficult and would require developer level access and source code.