I made a function for doing ability score checks with combat log feedback similar to skill checks. The colors might not be exact, but they are close.
//------------------------------------------------------------------------------
// Ability Check Roll vs. DC
//------------------------------------------------------------------------------
int GetIsAbilitySuccessful(object oTarget, int nAbility, int nDifficulty, int nHideRoll = FALSE)
{
int nRoll = d20();
int nMod = GetAbilityModifier(nAbility, oTarget);
int nTotal = nRoll + nMod;
// determine if check succeeds
int nResult;
// 1 is automatic fail, 20 is automatic success
if (nRoll == 1) nResult = FALSE;
else if (nRoll == 20) nResult = TRUE;
else nResult = nTotal >= nDifficulty;
// display the roll in combat log if PC
if (GetIsPC(oTarget) && !nHideRoll)
{
string sAbility;
switch (nAbility)
{
case ABILITY_STRENGTH: sAbility = "Strength"; break;
case ABILITY_DEXTERITY: sAbility = "Dexterity"; break;
case ABILITY_CONSTITUTION: sAbility = "Constitution"; break;
case ABILITY_INTELLIGENCE: sAbility = "Intelligence"; break;
case ABILITY_WISDOM: sAbility = "Wisdom"; break;
case ABILITY_CHARISMA: sAbility = "Charisma"; break;
}
string sMsg = StringToRGBString(GetName(oTarget), "477") + StringToRGBString(" : " + sAbility + " : *" + (nResult ? "success" : "failure") + "* : (" + IntToString(nRoll) + " " + ((nMod > 0) ? "+" : "") + IntToString(nMod) + " = " + IntToString(nTotal) + " vs. DC: " + IntToString(nDifficulty) + ")", "026");
SendMessageToPC(oTarget, sMsg);
}
return nResult;
}