Jump to content

Turn()


Avenger

Recommended Posts

Ok, Turn() is used to start the turn undead action of paladin/clerics.

It is also noted that Turn() chances are based on the class (of the cleric/paladin), and the levels (both the undead and the cleric). () was added by me.

 

What isn't clear: where are the chance/success tables? Are they hardcoded in the exe?

Or, there is no table but a single formula? What is it then?

 

I know there is a stat 'level of turning undead'. Which is apparently not moddable (in the old engine), but will be moddable in GemRB.

Link to comment

It's moddable in the IWD series, IIRC.

I've don't recall seeing any tables or information relating to the chances of success anywhere.

 

Is this based on a D&D rule - if so, Bio may have taken the numbers from that for a base.

Link to comment

No, not TurnAMT, but Turn().

I'd guess it uses Stat 55 TURNUNDEADLEVEL, which I'd guess could be modified by action

242 ChangeStat(O:Object*,I:Stat*Stats,I:Value*,I:Modifier*StatMod).

It's one of those things I've been meaning to look into, but never got around to.

Link to comment
What isn't clear: where are the chance/success tables? Are they hardcoded in the exe?

Or, there is no table but a single formula? What is it then?

 

According to my testing, in BG2:ToB Turn Undead seems to work like this:

 

If the character's Turn Undead Level is at least 3 points higher than the target's level, the target will get turned (i.e. it will flee).

If the character's Turn Undead Level is at least 7 points higher than the target's level, the target will be Destroyed (i.e. chunked) or Controlled (i.e. green circle) depending on the character's alignment.

 

For example, a level 10 Cleric can Turn a level 7 Mummy (MUMMY01.CRE) and make it flee, but it takes a level 14 Cleric to Destroy/Control it.

Link to comment

I can confirm the 7 point difference (target_cre_level, turn_undead_level) for destroying/controlling but the one for turning is actually variable (0 - 3).

It depends on a value that the engine uses internally for identifying the actors. (I think it's the "actor enumeration value" that is mentioned in the CRE file format.)

Not sure what the programmers were thinking, maybe they needed some kind of random value. (Although it's not random at all.)

The lower two bits of this value are used. So in the worst case your turn_undead_ level has to be 3 points greater than the target_cre_level, but it is also possible to turn a cre that has the same level.

Link to comment

If this is about the target undead, then i guess the goal is to destroy every 2nd, or 3rd undead.

So, it is a cheap d4 value with the side effect of being distributed evenly (not random at all).

 

Thanks for the good information!

Link to comment

I would agree if it was the "actor id" of the undead target that this behaviour depends on, but it's actually the id of the caster. (If you start a new game, your main char usually has 0xE0, the first npc 0xE1, and so on. But it seems that they can change, while you are playing.)

 

Doesn't make any sense to me.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...