Wherever Danny McBride goes, Kenny Powers is right there with him.
Earlier this year, McBride was playing blackjack in an Australian casino, on a break from acting in a new “Alien” movie for Ridley Scott. Suddenly, he was accosted by a drunken gambler who recognized him and cheerfully pelted him with swear words.
This fan’s apparent mistake, McBride later explained, was thinking he was addressing Kenny Powers, the monstrously arrogant baseball player he played on four seasons of “Eastbound & Down,” the HBO comedy series that ended in 2013.
“I looked at him like, man, are you going to sit here and be annoying, or are you going to play?” McBride recalled in a recent interview. “He just starts laughing at it. He felt like he got some priceless comedy or something. But I was being serious!”
It’s a testament of sorts to McBride’s acting talents that after seeing him play comic narcissists on “Eastbound & Down” and in films like “Pineapple Express,” “Tropic Thunder” and “This Is the End” (which cast him as an especially egotistical version of himself), viewers cannot tell when he is being playfully cocky and when he means it.
And it’s something of a surprise when he is introduced in his new HBO series, “Vice Principals,” (filmed in Charleston) which makes its debut at 10:30 p.m. Sunday, as Neal Gamby, a seemingly strait-laced high school administrator in a sweater vest and tie. But rest assured that his scheming, back-stabbing inner Kenny Powers is eventually unleashed.
Over the span of two seasons and 18 episodes, which, in an unusual move, have already been ordered, written and produced, “Vice Principals” tells the story of its title characters: two rival high school officials (played by McBride and Walton Goggins) who vie furiously to be named principal, then become unlikely allies when they lose the job to an outside candidate (Kimberly Hebert Gregory).
If “Eastbound & Down” was a story about pure ego, McBride said that “Vice Principals” (created with his frequent collaborator and college classmate Jody Hill) is about friendship, morality and how much someone will compromise his personal beliefs in pursuit of a goal.
He added: “Having a guy that follows the rules and is a little buttoned-up is what Neal Gamby has to be, to take it to more dangerous territory. If he starts off willing to do anything, it’s not as interesting to watch him go off the rails.”
“Vice Principals” is also a project that dates back more than a decade, when McBride and Hill were breaking through with “The Foot Fist Way,” their 2006 independent comedy (written with Ben Best, and directed by Hill) in which McBride played an overconfident martial arts instructor.
Looking for a quick follow-up project, they contemplated a screenplay set at the high schools they had attended (McBride in Virginia and Hill in North Carolina) and where McBride had worked as a substitute teacher during a lull in his Hollywood career.
Visiting a teachers’ lounge as an adult, McBride said, “It was the first time where I realized these people want to be here less than these students.” The scene was like a 1980s teen comedy, he said, “but all the adults are going through those social crises that are usually for the nerdy 15-year-olds.”
At that time, McBride and Hill felt they could not come up with a movie script that felt surprising or distinct. But after concluding “Eastbound & Down,” they presented HBO with the idea of pursuing “Vice Principals” as one long story, played out over two semesters of a school year.
Naturally, McBride would have to play some sort of self-aggrandizing character, with a heart of gold far, far beneath.
“We’re not these bruiser Southern guys, so I think we’re always amused by guys like that,” McBride said of himself and Hill.
Hill said: “When I’ve met people like that in real life, it’s always coming from a place of insecurity or some hole that they’re trying to cover up. Danny is good at that because he lets that bit of him show through.
“It buys you all the cockiness,” Hill added. “What this guy has that Kenny Powers doesn’t is that he cares about the school, above everything else.”
For McBride’s slick, bowtie-clad nemesis, Lee Russell, the creators turned to Goggins, a star of “Justified,” “The Shield” and “The Hateful Eight,” who had once auditioned for an “Eastbound & Down” role that went to Jason Sudeikis of “Saturday Night Live.”
(As Goggins recalled of that encounter: “I got to the meeting, and it was me and five ex-‘SNL’ guys. What am I doing here, really?”)
This time, Goggins said he was still eager to work with McBride, who he called “a Woody Allen for flyover America,” and to tell a story about “the absurd need for power.”
“Both of these men are profoundly insecure,” he said, “and unfortunately for the people around them, they feel the only way they can be accepted in the world is through fear and intimidation.”
Knowing that all the episodes of “Vice Principals” had been written in advance, Goggins said, was a welcome change from “a world where so many decisions are based on public polls or how many likes you get on Instagram.”
“This isn’t,” he added. “This is 18 pictures posted without reading the comments.”
Gregory (“Devious Maids”), who plays Dr. Belinda Brown, the new principal targeted by Gamby and Russell’s wrath, said she might have been more concerned about the show’s racial optics, but she trusted the sensibility of McBride’s world, where every character has shortcomings and faces punishments for them.
“I didn’t read it as two white guys ganging up on a black woman,” she said. “I never see myself as that fragile, and I don’t believe Belinda does.
“Belinda walks in knowing that she’s smarter, she’s better, she’s more capable,” Gregory said, “which makes her flawed.
“If a white man had walked in,” she said, “they would have taken him down just as fiercely as they took that black woman down.”
Over the span of eight months of filming “Vice Principals” in South Carolina, McBride said that there were still plenty of opportunities for serendipitous surprises: among them, recruiting Bill Murray to play the outgoing principal whose retirement sets off the story.
After providing Murray with a copy of the script at a Charleston RiverDogs baseball game, McBride said, “The next day he emailed and was like, ‘I’d be very happy to play Principal What’s-His-Name.’”
The story of “Vice Principals” is almost certainly complete after two seasons. “I won’t be silly enough to say you’ll never see another ‘Vice Principals’ again,” McBride said.
But he said that its creation allowed him to work with friends he has known for years and to measure how they have (or have not) matured since the last project.
“Every single time we come back, somebody else is pregnant or married,” McBride said. “Now we’re paying baby sitters.
“We still rage, though,” he said. “We would come home sometimes, and those baby sitters would look at us like, ‘God, you guys party harder than people our age.’ ”
As McBride said he told his sitter: “We’ve only got you for four hours. I’ve got to live a lifetime in those four hours.”