I never could get a definitive answer to this question, so i looked into it myself and now would like to present my results. After some testing, I think i figured it out for the most part so i'll present the mechanics of the general's body guard unit:
A general's body guard unit has a base size that is determined by its entry in 'export_descr_unit.txt' in the appropriate define 'soldier' in all cases it's 16. This number determines the amount of men the unit has on small unit scale. Thus the formula is as follows:
Code:
Total men = base_size x unit_scale x FactionHeir_Modifier x FactionLeader_Modifier + 'Personal Security' levels
A FactionHeir receives a bonus modifier of 1.25x
A FactionLeader receives a bonus modifier of 1.375x
Each 'level' of personal security adds another soldier to the unit or conversely takes one away if its in the negative (this can be seen with William the Conqueror).
To Maximum of 40 men (this can be seen on huge scale, where every general's bodyguard has 40).
The unit scaling is:
- 1.0x for small
- 1.25x for normal
- 1.875x for large
- 2.5x for Huge
These status modifiers are inherent to the character, even if i remove all the personal security levels (+2 for heir, +3 for leader) they still have an innate modifier to their body guard unit. I think its hard coded.
Examples: