If it ain’t meat, it’s sauce.
Dialogue material comes in two main categories: meat and sauce. Mixing the two is like putting ketchup on prime rib.
Anything thick and juicy is meat. It often has an emotional edge that helps bring the player into the world. It’s serious and delivers important lore to the player. We don’t fool around with meat.
Anything light and superficial is sauce. This is where you want to put your humor and silliness. No one takes ketchup seriously. And A1? What a joke!
When dealing with meat, keep the humor away. For example, I’ve been re-watching Buffy recently, and Joss Whedon is a master at dialogue. Everyone agrees (or most everyone). When the shit is hitting the fan, really hitting the fan, there are no jokes. No snide comments. No slapstick. Because Whedon understands that humor isn’t always appropriate. When Buffy is telling Spike that Willow didn’t save her from Hell, but dragged her out of Heaven, the scene goes deathly serious. Meat, truly good meat, requires no sauce.
On the other hand, if your basic material has no deep emotional content and isn’t striving to make an important lore point, then spread the sauce on liberally. Keep it light. Keep it sassy and humorous. Even the darkest games have a dark sense of humor, if they’re good. Humor is critical to any game’s success. People love to laugh. It’s why they play games. It makes the characters in the game seem more real, and it builds bonds between the players/viewers and the characters, as evidenced by 90% of the Buffy scripts.