That’s the problem:
If i copy a creature with feat dragon ability, so a red dragon disciple, or a creature with a epic feat greater ability, the function start with copy creature with its stats, than apply all the feats, with the result to apply the ability score mods two time.
Similar problem: if I lost a level of RDD, the ability bonus given by the feat dragon ability still remain on the character, with the result that, when I’ll get again a new level in RDD, the game will apply again the dragon ability bonus.
I think this is a very old knowed bug since 2006.
Has anyone developed a solution over the years?
Otherwise I believe I will have to develop a function that understands if a given creature has the above-mentioned talents, and does all the math to adjust the skill scores to the correct values.
But maybe someone has already done it …