I noticed that roughly every third patrician being adopted or married into the family is called Sergivs Orata. Today, I took a look into trigger section of the traits and realized why this is.
The way the triggers work is you have a list of names and probability pi:
Name1 p1
Name2 p2
...
Name38 p38
Name39 p39 (=100%)
Now, the engine throws a dice if Name1 gets drawn with probability p1. If not, it jumps to Name2 and so on. Now, the task is how to assign the right probabilities such that every name is drawn with roughly the same probability. Well, the answer the EB-Code gives is the following:
However, this answer is wrong, unfortunately. If you give every name the same probability 1/39~3%, then the newly adopted patrician will be called Mr. "Sergivs Orata" (= Name 39) with the following probability 0.97^38 ~ 31%. And this is exactly why every third patrician gets that name.; Assign gens and cognomen to patrician marriage suitors
;
; RandomPercent values are assigned assuming the order of these
; triggers doesn't change. New triggers must be added at the top
; and the RandomPercent value must be 1/N * 100, where N is the
; total number of triggers.
;
; Possible Patrician Names: 39
Now, the right answer is to distribute the probabilities inversely proportional to the position in the list, i.e. as follows:
Name1 p1 (=1/39)
Name2 p2 (=1/38)
...
Name38 p38 (=1/2)
Name39 p39 (=1/1)
This fixes the problem. With this probability distribution, every name gets drawn with roughly the same probability on average.
edit: I implemented this for myself and started testing. So far, works really terrifically. Diversity of assigned names has vastly improved!