The comedy western is a peculiar subgenre, fraught with failure and mediocrity. For every BLAZING SADDLES, THREE AMIGOS or SHANGHAI NOON, there’s a dozen  RUSTLER’S RHAPSODYs, LIGHTNING JACKs or WAGONS EASTs, and many others so forgettable they’re quietly put out to straight-to-DVD pasture. You have to wonder then if Universal weren’t initially nervous when Seth McFarlane, riding high on the huge success of TED, tossed a pitch straight at Hollywood's genre Bermuda Triangle. They wouldn’t have been worried for long, of course – even on the page, for all its Ol’ West trimmings, A MILLION WAYS TO DIE IN THE WEST never strays too far from McFarlane’s profane, purile and frequently hilarious comfort zone.

Albert Stark (McFarlane) is a man born in the wrong time. It's 1882, and he's a sheep farmer in the Monument Valley territory of America’s ‘wild’ western frontier. He hates his environment and all of the perils that it presents on a daily basis. He’s also severely lacking in self-confidence, especially when he’s dumped by his girlfriend Louise (Amanda Seyfried) for talking his way out of a gunfight. Even his best friends (Giovanni Ribisi and Sarah Silverman) can’t talk him out of his funk when Louise takes up with town moustache tycoon Foy (Neil Patrick Harris), until new stranger in town Anna (Charlize Theron) befriends Albert and turns him into a straight shooter. Things are destined to get rocky though, as she hasn’t mentioned that she’s the reluctant wife of the meanest, deadliest outlaw in the territory, Clinch Leatherwood (Liam Neeson) – and he’s on his way into town...

McFarlane’s most bankable skill has always been with the pen, and he's never short of a gag. This time out though, it’s not all gold – more like panning for gold in a river that a buffalo has recently shat in. When settles for the broadest first-base stuff, the results are anywhere from eye-rolling (an early reliance on the word ‘penis’ being funny in and of itself makes for a worrying start) to chucklesome (a particularly dim sheep). To be completely fair though, on more than one occasion he uses these bunts to build slightly better jokes on further into the film. Once he’s got most of the dick and poo jokes out of his system (so to speak) and finds wittier, more original and less obvious material – a sermon from an utterly corrupt pastor is a great, throwaway touch – he’s on much steadier, funnier ground.

Casting himself in the lead is possibly not as heavy a burden as it sounds: most of his time, McFarlane is simply being himself, and that works just fine – Albert being a man of surprisingly modern outlook and observation is A MILLION WAYS TO DIE IN THE WEST’s core premise/joke. That said, in the few scenes where he drops the postmodern clown façade and has to actually act, he’s genuinely good.

He’s got great support in Charlize Theron, who does a lot better with her down to earth and ‘real girl’ funny scenes with McFarlane than - through no fault of her own - with the thinly written plot-advancement bits, where she has to submit to Clinch’s mean will. It’s great to hear Liam Neeson going ‘full brogue’, and he’s always performed well as an imposing bully. Silverman and Ribisi in particular have to make the best of simply performing variations on the same joke (why spoil it here?), while NPH – always great value – makes a fine coxcomb.

Like TED, there’s nothing particularly flashy about A MILLION WAYS TO DIE IN THE WEST’s direction, but the scenery looks as pretty as it needs to for the jokes pour out in the foreground. Joel McNeely’s score hits all of the right Elmer Bernstein-inspired notes (the opening salvo gives the feeling of an early Ivan Reitman comedy), and McFarlane hasn’t lost his touch for deploying a good pop culture cameo here and there (including a sly, terrific callback to TED from Ribisi). There’s evidence to suggest quite a bit of tuning went on in post-production, so expect a raunchier cut when the film arrives on DVD, but the overall pace both of plot and gag rate are solid.  And make sure you stick around to the very end for one last, so-wrong-it’s-right howler from a special guest.

A MILLION WAYS TO DIE IN THE WEST is released May 29 in Australia and New Zealand; May 30 in the UK and US.