Most MUDs adhere to the standard D&D ability set, and most players don’t bother to change them. Why bother? Strength, Dexterity, Constitution, Intelligence, Wisdom, and Charisma have worked well in the past, and they’re present on most MUDs, so lets stick with it. I had no intention of switching around statistics, or even messing with the base d20/d% D&D system, so why mess with how abilities are defined? Because it makes coding other elements a lot easier.
TbaMUD, like most MUDs, define abilities as individual bytes in the CHAR struct (in structs.h). Utils.h then takes these stats and converts them to an easy-to-use format, allowing shortened versions such as GET_DEX(ch) instead of ch->real_abilities.dexterity.
If you’re going to add ability checks for skills, you need to first redefine the CHAR struct. Instead of having variables ch->real_abilities.dexterity, str, con, etc., add a new array variable, such as “abilities[6]”, then define GET_DEX(ch) to ch->real_abilities.abilities[0]. This means that for checks of multiple ability scores, you can use a for loop. You can still use GET_DEX(ch) elsewhere in the code, so things shouldn’t change much.