Traits are determined by their "rarity" - http://rogue-legacy.wikia.com/wiki/Traits_Breakdown
The higher the rarity, the harder the trait is to acquire. There's no way that you can influence which traits your family gets.
There is a 94% chance that a champion will have at least 1 trait, and a 55% chance that a champion will have 2 traits.
The game makes a "dice roll" to determine which rarity of traits to select from.
- 50% chance to be level 1
- 36% chance to be level 2
- 14% chance to be level 3
The game then gathers all of the traits with the given rarity and randomly selects one of those traits to give the player.
The game also checks for trait conflicts, which means the following will not occur:
- Muscle Wk. and Hypergonadism
- Endomorph and Ectomorph
- Gigantism and Dwarfism
- Near-sighted and Far-sighted
- Color Blind and Nostalgic
The game also ensures the same trait isn't selected twice.