Larian Studios basically had to be the DM for Baldur's Gate 3's take on Dungeons & Dragons, which means that the developer had to account for all the chaos that normally ensues at the tabletop.
"It was very much the core of the game when we started working on it, because it had to be a Dungeon & Dragons experience," Larian boss Swen Vincke says in an interview with the official D&D YouTube channel. Vincke says this "is literally what you have at the tabletop. You come in as a game master and you don't know what's going to happen. You have an idea in your head but then chaos is going to take off and it's going to go in all different kinds of directions than you expected, which is the fun part."
As an example, anyone who's ever DMed a D&D session has a story about coming up with a fascinating backstory for a new villain - only to have players murder that character on sight before he even has a chance to monologue. That's the sort of thing even highly open-ended digital RPGs have historically tried to avoid dealing with, but Larian wanted to make sure that they served multiple groups of players, including those who wanted a traditional story experience and those who prefer a murderhobo playground.
"There's players that follow the critical path, and they're happy because they get their really polished story experience," Vincke says. "Then there's the people that start killing the protagonist and antagonists instantly, and then are surprised that they can actually still continue playing. The story picks up and says 'well, you did all this stuff, but here's another protagonist for you to kill.'"
Vincke says the lengthy stay in Early Access helped the studio learn about what players liked to attempt, so the studio could "try to cover all eventualities and all permutations that come into it," which is why the studio invested so heavily in things "maybe 0.001%" of players were likely to see.
"We apply that throughout the entire game. We didn't play it safe. We said we'll take risks. We know they will probably find a way to break the game, but we have this system of rules that we have for ourselves that allows it to fall back in a way that you will always be able to finish it. As a player you'll know, 'Hey, all the shit that's happening right now? That's me. I did that. So I'm okay with it.'"
There were still limits to what Larian could do, as in the case of one gamebreaking D&D spell.