AutoDC(int, int, object)

Determines whether a skill check succeeds.

int AutoDC(
    int nDC,
    int nSkill,
    object oTarget
);

Parameters

nDC

Value to indicate the relative difficulty of the check. (DC_EASY, DC_MEDIUM, DC_HARD)

nSkill

SKILL_*

oTarget

The creature rolling to determine success.


Description

Returns TRUE if oTarget succeeds a check based on nSkill for a crude difficulty category DC.



Remarks

As of patch 1.30, this function will work on non-creatures as well. It uses the hitdice of the caller in a division, but if that hitdice is 0 (as for non-creature), it just divides by 1 instead. Due to the bug noted below, you may be better of using the new GetIsSkillSuccessful function.


Known Bugs

This function, the way it looks in patch 1.30 at least, is quite poorly constructed. It rolls a d20, adds that to the skill rank, and tests that against a number which is nTest+10. Thus, the higher the DC of the AutoDC, the higher nTest should be.

nTest is calculated using a switch statement using the DC, the logic of which is flawed. Easy and medium should work just fine, but then it goes wrong, as the nTest value for hard will always be 7 times higher than superior, 14 times higher than master, and 21 times higher than legendary. Thus, hard is the toughest one of all to beat, and apart from easy and medium, legendary is easiest.

I have contacted Bioware about this, and hopefully it will be fixed in an upcoming patch.


Requirements

#include "nw_i0_plot"

Version

1.30

See Also

functions: GetIsSkillSuccessful
categories: Talents/Skills/Feats Functions
constants: SKILL_* Constants


 author: Tom Cassiotis, editor: Lilac Soul, additional contributor(s): Lilac Soul
 Send comments on this topic.