At this stage, I don't think it's possible to add a trait to a Player (as opposed to a Unit) once the game has started. If it doesn't already exist, could you make an "UnlockPlayerAbility" tag for Spells, Items and Improvements? For example, you might want a Spell, Item or Improvement to unlock a unit design item, so you could have a spell or a usable (ie. like a tome) item that is only available after completing a custom quest that unlocks/gives a Player trait which enables Unit Traits and Items (ie. Weapons, Armor, Cloaks, Trinkets, Mounts) etc. Or once you build a certain improvement you get a Player trait that allows you to add new Traits and Items to your unit design repertoire.