I've written this to turn the GoodTaxman trait linked to the town_hall buildings with increases based on chance each turn:
Sorry don't know how to do spoilers. I have removed any other relevant triggers for GoodTaxman (only marriage proposals/adoptions have a GoodTaxman trigger apart from above).
Issue I'm having is that the chance rate in game is way too high compared with what I set. Within 4 turns my military minded king has reached threshold 1. Then while he is in a city with only a town_hall he gets to threshold 2 in another 4 turns, which shouldn't happen.
I've tried to link the level of advancement with the level of the relevant structure (town_hall line of buildings in this case), but may remove this to save on EndCharacterTurn triggers. Even if I change it the rate of increase is ridiculous, I've done a few tests and while I set an increase on average 25 turns for Military_Inclined types they get lucky in 4-8 turns.
I'm a beginner at this, I don't know any programming languages, but from what I have done it escapes me what I have done wrong.
*edit* thinking about it is the random number generator not so random?