I've thought a lot about NPCs in games, and one thing I tend to forget to mention is that there are some very simple guidelines. Follow the guidelines, you tend to get great NPCs.
The most basic thing to keep in mind: in order to care about an NPC, you have to see the NPC do things.
More basically, "screen time = appreciation"
There are a lot of games where the NPCs don't have much screen time, and you are expected to "choose" who you like best. Who you want on your party, or want to talk to every day in town, or whatever.
This is really the wrong approach. If you show a bunch of options and ask someone to choose, they have to choose based on stereotypes.
It's better to never give the player a choice.
Wait, let me explain a bit more.
"Screen time = appreciation" is a powerful concept. Let's look at Final Fantasy VII, since most people will be familiar with it. Let's think about which woman your teenage-boy self had the biggest feelings for. Just bear with me if you weren't a teenage boy, the point is easiest to make like this.
The three prospective crushes are Tifa, Aerith, and Yuffie.
After playing the game, Aerith was the one everyone remembered and felt most fondly for. That's not because of her design: a painfully quiet girl in a demure dress can't visually compete against the lure of Lara Croft. I mean Tifa. Even in terms of personality, Aerith has nothing going for her - she's got no personality at all. Tifa and Yuffie both have personalities - one reliable, one annoying, both better than the play-doh brain of Aerith.
But the player's preference for the NPCs doesn't come from their visual design or their personalities. It comes strictly from how much screen time they have.
Aerith has the most screen time by an order of magnitude. Also, the quality of her screen time is very high. Not only is she usually the core focus of the cut scene, the cut scene is also usually about her. Tifa, on the other hand, often participates in cut scenes as one of the group rather than solo, and is often focused on resolving the current situation instead of building herself up.
"Yuffie has solo screen time, and everyone hated her!"
Yup! Her screen time was followed by a long stretch of the player having to wade through annoying shit with the only reward being a return to status quo. So players hated her.
But although the setup made people hate Yuffie, they did remember her. They did care about her. They did appreciate her in line with her screen time. It's just that their appreciation was of the "arrrgh youuuuuuuuuuu" nature, rather than the more positive feelings assigned to the others.
All the characters in all games follow this same basic rule, as you can easily find out just by looking. The reason I used FFVII is because of the clarity of the situation: Aerith is worthless as a character. She has no personality, no arc: you could replace her with a lamp and the story wouldn't change in the slightest. But she was suuuuuper popular.
Because of screen time.
Similarly, Yuffie was quite unpopular.
Because of screen time.
Obviously, the design of the character does matter some. As does what they are actually doing on screen. Also, they have to actually be doing something of their own volition: just having them participate in battles doesn't really count.
Anyway, this basic assumption can be used to really change how you design characters, and you can see that in, say, the Dragon Age games.
Dragon Age games feature a lot of incredibly uninspired character designs, but everyone likes the characters because they feel real. You know why they feel real?
The characters banter with each other on the road, say character-specific combat lines, and spend an inordinate amount of time talking about their backstory if you go to camp. Combine this with a selection of character-specific missions, you have a good amount of screen time for each character. There's a lot of little details that turn "passive time" (wandering around, battle moments) into small amounts of screen time, which is powerful.
Moreover, you have a balanced amount of screen time.
Unlike FFVII, Dragon's Age gives every character a specific amount of specific types of screen time. Maybe there's 130 lines of banter dialog for each. Maybe they each have 3 sidequests. Maybe they each have 13 backstory conversations, all paced identically. Maybe they inject an identical amount of personality into their combat shouts.
Because of this balance, everyone appreciates a lot of different Dragon's Age characters. I even found myself appreciating characters I doubt I would have cared about in another game, such as the painfully generic templar or the old lady sorceress. Similarly, I found myself siding against the characters I would have picked as my favorites if I was just shown a picture and a catchphrase.
Say it with me-
The characters have balanced screen times, so I have an appreciation for all of them.
This does falter a bit here and there. You still tend to settle into one primary combat party (a huge flaw in all modern RPGs), and that affects your affections. Also, there's a ton of really dumb backstory. While it does give them more screen time, it is distractingly stupid.
But those are flaws I think could be addressed.
Anyway, that's my rant on screen time.