AI actions can be found under leveldesign/game_elem/creature/.../aiaction.
A script to generate a generic set of actions is available under code/ryzom/tools/extract_r2_required/generate_aiaction.py.
Total Creature Damage = (100 * creature.PlayerHpLevel / creature.NbHitToKillPlayer) / (1.0 - _AverageDodgeFactor) * EGS BotDamageFactor
Value _AverageDodgeFactor is applied optionally depending on EGS ApplyAverageDodgeFactor flag.
Phrase DamageFactor (from AI Action for NPC) = (aiaction.DamageFactor + 1.0) * AI bot DamageCoef
Total Player Melee Damage = (EGS MinDamage + (EGS DamageStep * min(skill.Level, weapon.Quality))) * lerp(EGS WeaponDmg, EGS WeaponDmgMax, weapon.Damage) * phrase.DamageFactor
The EGS ExponentialPower configuration value should always be 1, since spell attack level for NPCs does not have an exponential power configuration modifier. Otherwise it cannot be balanced. Hence, it's not listed in this document's calculation.
Total Magic Damage = DamageValue + (SpellPowerFactor * creature.AttackLevel)