Where is the cPersonalityCurrent Set?

Hello, I am new to modding AOMR and had a question. I wanted to look into adding new AI personalities. I’ve looked through the files for the ai and know that the variables cPersonalityCurrent, cPersonalityAttacker, cPersonalityDefender, and cPersonalityStandard are all variables used when setting the AI’s personality. Specifically cPersonalityCurrent gets checked against the other 3 variables to change the AI’s tactics.

My question is, where do these constants actually get set? I assume at some point the game has to take the personality value set by the player in the pre-game screen and apply it to cPersonalityCurrent, but I can’t find where this is done in the code. I assume to create a new personality I would need to create a constant variable associated with it, and I’d need to do that in the same place the other personality constants are created.

Can anyone help me find where these variables are created, or point me in the right direction?