Love this concept and can't wait for it to release.
Suggestion:
Create portraits with faction and merchant tags. Establish race portraits for the different factions, but the merchants (since they are more like vagabonds) would show a random portrait.
IF it's possible, I have another suggest to account for other faction mods. Instead of setting each faction a constant value, can you return the value of all of the factions (factions.lua?) that load up for the player/server, then randomly define each faction with a portrait value? This would allow for each server/playthrough to be different because the factions wouldn't always be the same. I.e., Faction "A" isn't always bug people, Faction "B" isn't pink, three-eyed aliens, etc.
I hope that didn't sound to confusing :P