Character is determined by personal beliefs.
My beliefs that form my perspective of reality also determine the character of the role that I play in that reality.
As my environment changes and my role in that environment changes, my character changes accordingly.
I may have the same personality & character at home as at work, or they may differ.
I may have the same beliefs about the reality of my home life as I do about my work life, or they may be different.
My character will change according to my beliefs about my environment.
A very distinct change in my belief system, caused by a dramatic or traumatic fearful experience, can cause a very distinct change in my character.
A similarly positive dramatic experience, such as a lottery win, can have the opposite effect on both my personality & my character.
Character is a choice, although that choice may be made at a sub-conscious level of the mind.