Have a good idea of their core personality traits in the eyes of the reader.
The core disagreement that a lot of people have from TLOU is that a lot of people felt that Tommy and Joel were extremely paranoid people who don't trust new people because lots of new people are bandits, and in TLOU2 they trusted people, and negative events happen. There's a lot of parallels between how they are seen acting in one scene with Henry and how they act in the sequel, enough to make this a large emotional dissonance in behaviour.
Druckmann felt very differently about this scene with Henry, and viewed Tommy as a person who easily trusted others and so would do so again.
A quote from Jim Butcher comes to mind on this.
Q: When you are writing books, do you keep character bibles for yourself or for the publisher?
A: I do keep them for myself every time I’m making up new characters and so on. I make up a little dossier entry on the character, of who they are, Sometimes I draw a picture of them, but because I can’t draw…they don’t look like that. I’m not sure where the Dresden Files one is right now. Probably in a box somewhere. Mostly I use the Dresden File wikipedia these days, because the fans, you guys, are so much more on the ball than I am with this stuff. Now, bear in mind that I’ve seen so many slightly different versions of the Dresden Files over the course of writing the books, whereas you’ve only seen the final version. So it’s much easier for you to remember, “Oh yeah, that character had purple eyes”, even though in my head they had been yellow. I’ll look at the book and think, “Oh, I must have changed the eye color and didn’t really think about that. Well, it was 4:30 in the morning when I was doing those edits.”
So now mostly I just go to the fan wiki. Fans are so much better at keeping track of that than I am, and the fans are the ones that want to say, “Look, you missed this detail, you got it wrong.” I guess you’re right, I did. But now people like that build wikis, so “No I didn’t, because I cheated.”
Have a beta, a fan wiki, or a discord.
As such, one of the key ways to avoid the issues that TLOU faced is to ask your fans what they think. You can have a person read the story for you, you can have a wiki, you can have a discord. You need to have some idea of what they think of characters so you don't get confused as to what's happened.
Have character notes which you consistently use.
When you have a character you need them to have consistent traits which they display again and again in scenes. For example I track these, and make sure every act they take is consistent with these, or an evolution they are undergoing in them.
- Their core goals.
- How they act differently around key relationships.
- Their personality in terms of braveness, intelligence, impulsiveness etc.
- What makes them especially emotional.
If these are gonna change in major ways I make sure to foreshadow them a lot. This helps people understand why they acted weird. Consulting with beta readers helps on this. Often I find a change that I thought made sense doesn't make sense. More bridging scenes are needed to make their behaviour understandable. TLOU 2 suffered, many felt, from having a fairly quick start to the Tommy scene. Having more time to make a change seem natural helps a lot.
For example, here are my notes for a character from one of my stories.
Keelan O'Kenny.
Core goal. Stop murderers like his father. Hide and suppress his psychotic nature. Protect his mother and sisters and adoptive father. Evolving towards unstable violence and towards valuing friends more.
Relationships. Mostly has rude arrogance to keep people from prying close. Respectful and polite to adoptive father. Complex mixture of love, hate, fear, and confusion around father. Fear of superheroes evolving towards more trust.
Personality. Impulsive, brave, disorganized in life and relationships, disagreeable, emotionally unstable.
Trigger points. They want stable family relationships, and will react with trust, fear, and hate towards people offering them (including serial killers who use them to get victims). They like showing off their knowledge of serial killers.
Or for a minor character.
Traffic warden in east.
Core goals. Collect bribes, support family, avoid trouble.
Relationships. Respect to superiors, condescension to subordinates.
Personality. Petty bully, suck up.
Trigger points. Threatening jail. Lots of money.
For any character turning up a lot in a story I make some short notes on who they are. This means I can make sure their personality traits shine in a scene, and I can keep them behaving consistently.
Avoid common problem areas.
- Be careful around suboptimal choices. If a character does something that makes life much worse for them then it'll cause more dissonance than if they change personality on some trivial matter.
- Be careful around making characters evil. If you make a person do a notably evil act, and they don't have a history of doing such you're more likely to cause dissociation from the character.
- Be careful around sexy characters. Characters that readers are likely to sexualize, such as bad boys with silver hair with an angsty past, are more likely to have people somewhat rationalize their acts as good and see it as out of character if they are evil.
- Be careful around sexual, racial, or ideological people. If you represent a popular group that people like and make them especially good or evil people are likely to feel you're making a political statement more than having characters.
- Be careful around characters you like or you dislike. Self inserts or characters modeled after lovers or enemies are more likely to be bent by you to act out of character.
Through experience and beta readers and fan reactions you can get a better idea of if your characters are viewed as behaving in character.