Before T.J. Miller appeared in Transformers: Age of Extinction, before he joined Thomas Middleditch on HBO’s Silicon Valley, he sat in a trailer on the set of Search Party sipping Coronas and riffing about that time he pranked a lieutenant governor. “Every single person I’ve met here has been gracious and tenacious and all the other -aciouses,” he joked in a thick Southern accent, sending Middleditch and Adam Pally into hysterics.

It’s the summer of 2013 in Baton Rouge, Louisiana, where the cool nights are actually sweaty nights. Their adrenaline is still high from filming a scene with The League’s Jason Mantzoukas and his “triple crossbow,” while earlier in production they attacked each other in a slap-happy “dude fight.” According to Miller, there is some serious “icing-my-knee-in-the-morning-and-at-night physical comedy” in Search Party, and all three were eager to do more — that included Pally’s zealous description of how he “waxed Thomas’ asshole.”

The only problem, it seemed, was that they were among the few actually excited to make this movie.

Before Search Party was Search Party, it was called The Road to Nardo. The spec script by Andrew Waller and Mike Gagerman was on the 2010 Blacklist and first set up at Columbia Pictures. It was to be the directorial debut of Scot Armstrong, the guy who wrote many of Todd Phillips’ movies, including The Hangover Part II, Road Trip, and Old School. Miller was formally announced for a leading role a year later, and the trades were calling this a “breakthrough” for him after his shaky-cam gig in Cloverfield. That same year, the media announced Middleditch had joined the party.

“I suppose the uniquely fortunate circumstance of this particular film is that the leads, all three of us, have known each other for quite some time,” Middleditch said on the set. “We’ve all performed with each other. I’ve known T.J. since back in Chicago — that’s like 8 or 9 years ago — and we did a two-man show [called “Practice Scaring a Bear”] together and then I met Adam when we were in New York.”

By his own estimation, the Happy Endings star had been attached to the film for about “2 to 3 years” after Armstrong, whom he knew through Upright Citizens Brigade, approached him. “I was an actor in his show called BFF that got picked up by NBC, but I couldn’t do it because I was still contractually obligated to Happy Endings. But after I did that, Scot was like, ‘I really want you to play this role in this movie that I’m doing.’”

He added, “I knew that it was something special, so I didn’t not want to fight for it, and I fought way too hard for it for this amount of money.”

Filming on The Road to Nardo didn’t begin until the summer of 2013, where this band of comedians discussed the project with three journalists. But by this point, it was no longer called The Road to Nardo nor was it being distributed by Columbia Pictures. According to an article from The Hollywood Reporter around that time, production seemed as though it would commence in 2012 before it was abruptly dropped. It resurfaced a few months later as a Universal release, and filming was finally underway.

“There’s only so many movies that Seth Rogen and Emily Blunt can do,” a half-joking Pally said. He later elaborated, “This movie-making business is really tough, and no one wants to give anyone a shot. We’ve been through three studios now, and even Scot Armstrong, who’s written over a billion dollars worth of movies…even then without certain people or certain things, studios get cold feet. But I think this’ll change that, and I think that there’s a wave of different people behind us that are really funny and hopefully this kicks open the doors a little bit.”

Search Party, described as a male-driven, R-rated action-comedy, sees Middleditch playing Nardo, a lovesick groom who travels to Mexico in search of his fiancé after his buddy Jason (Miller) puts a stop to their wedding. Things take a Hangover-y turn when Nardo is subsequently “carjacked and tuxedo-jacked,” as Middleditch put it, and left naked and stranded in the Mexican desert. It’s then up to Jason and the other member of their trio, Evan (Pally), to traverse hell, high water, a kidney-stealing stage magician, a drug lord, and various other obstacles to save him.

After such an extended development process, Pally explained the script underwent various changes to better suit the actors. “I would say after the first table read that we did together, which was about 2 years ago now, the script changed to basically instead when you picked it up you’re like, ‘These roles are funny,’ it became, ‘That’s T.J., that’s Adam, that’s Thomas.’ [Armstrong] zeroed in on what’s funny about us and made it funnier.” Miller added, “From the various tests — chemistry tests and table reads and rehearsals and conversations with him about the film — he’s incorporated a lot of our riffing and ad libs and improvisation into the scripts.”

And, boy, is there a lot of improv. For the bro fight, specifically, Armstrong wanted it to feel authentic so he chucked the choreography out the window. “Scot was like, ‘I want this to feel like a dude fight. I don’t want this to feel like Josh Brolin in a bar,’” Pally said. “He wants it to feel like two guys who don’t really fight that much are unleashing whatever physical strength they have.”

In a different scene the cast shot that night in Baton Rouge, Mantzoukas stood a top a car garage in black leather boots and matching underwear while brandishing a triple crossbow with flame-tipped arrows. His character — a whimsical “magician at a Pechanga-style, small Indian casino,” as Pally put it — drugs Evan to steal his kidney. Jason helps him escape, but he has to drag his paralyzed friend to a car while dodging arrows from above. Pally and Miller remarked how they were “bruised tip to tails,” but that these stunts make Search Party more “fun and unique.”

Middleditch, meanwhile, said he spends a large portion of the movie butt naked, which he largely filmed on location in Albuquerque, New Mexico. “The biggest stunt for me is showing my whole body,” he said, adding, “being covered in cocaine, getting tackled. I got my butt waxed, which was horrifying. I literally thought it would be quick and funny, but it was drawn out.”

Films like 48 Hours, Superbad, and Ferris Bueller’s Day off were thrown around in an attempt to describe the vibe of Search Party, but the trio of actors all agreed it’s really it’s own thing. “People will say it’s like The Hangover, and, yeah, there are parts of it that are reminiscent of The Hangover because The Hangover’s a great action-comedy, but this is it’s own style of that,” Pally said. “A lot of it is improvised, which is totally — I think it’ll feel really new to an action-comedy. So we have these long walk-and-talks, Sorkin-esque walk-and-talks that are improvised, which is really cool to do and to be allowed to do. I think it’s got it’s own totally unique vibe.”

Miller, Middleditch, and Pally didn’t know it at the time, but Universal Pictures, too, would eventually drop Search Party, where it would lie out of the spotlight for about a year. Now, nearly six years since development first began, it’s getting a theatrical release on top of VOD and Digital HD by Focus World on May 13.

Because of this latest shift, however, what may be forever lost are the viral videos the actors shot to promote the film. Miller’s bit with a lieutenant governor dressed as a “trashy reality show character” from Duck Dynasty was one of them. Another was shot at the same film event during a presentation. “They were showing why you would want to keep shooting in Louisiana,” Pally recalled. “They had a stunt guy get lit on fire and then jump off of us, and they did that and the whole crowd was like, ‘Ah,’ and they clapped, and we were screaming, ‘Why are you being so casual?! Everything’s on fire!’”

Armstrong remarked in between takes on the set, “This movie’s always seemed to have a lot of good will even when things fell apart in the past. I feel like everyone always felt really bad when it did fall apart and everyone’s always been rooting for this, and I think part of it is because everyone, at least it felt like they were excited about the script all along.”

During the interim, Miller would continue his movie streak with roles in Deadpool and Disney’s Big Hero 6, alongside his shared success with Middleditch on Silicon Valley. Pally, meanwhile, would stick mostly to the small screen, though the now-canceled Happy Endings remains a nostalgic hit, thanks to Hulu.

“This is the kind of movie that doesn’t have a lot of big movie stars or sort of like big guns,” Armstong said. “I think it’s a real transferring the next wave, the next generation of young, funny guys to show what they really can do in a leading role, not just a side role.”

More From ScreenCrush