Part One 

Possibly the most important decision to be made in bringing The Avengers to the screen was choosing a villain. It needed to be somebody BIG.  Someone powerful enough that the Hulk and Iron Man together couldn’t hope to take them out.  Imposing enough to demand that all these characters set aside their differences just to have a chance at surviving.  But if there’s one thing Marvel comics has in spades, it’s colorful, cosmically over-powered villains.  So of course they chose Loki.  Loki!

HE WILL RULE ALL THE NINE REALMS WITH AN IRON FIST. Also, he's got burgers, brats, and the piece of salmon is for Lauren, because she's like a vegetarian now, I guess?

Here’s a few reasons why Loki is a terrible choice.  And no, I don’t care a lick that he was the first enemy the team fought in the comcs.  His powers are ill-defined, physically, mostly bounded as “sort of like Thor, only not quite as good at any of it.”  He has magic, but mostly illusions rather than anything of the high-firepower variety.  He’s also already been defeated by 1/6 of the team in their solo movie, which compounds the threat level issue and relates to the worst bit, that as an enemy he “belongs” squarely to Thor in a way that Ultron or Klaw or Molecule Man would not be specific to anyone.  He brings a fundamental imbalance to the villain side of things, and I don’t know if I mentioned it yet, but balance is sort of key to making this film work.

So let’s look at why he works anyway.  Point one is Tom Hiddleston, who gives what is in my opinion the standout performance amongst a cast of standouts.  Between this and Thor, he gives the best supervillain performance this side of Heath Ledger’s virtuosic, objectivity-destroying turn as the Joker.  It can’t be overstated how much he brings to this table, providing a believable emotional core to his scheming that manages not to undercut the character’s sadistic elements and legitimate villainy.  You understand where his anger comes from, particularly if you’ve seen Thor, but you never approve, and still take glee in his getting slapped around.

Slappability has been key to the appeal of many classic characters in comics history

But I was talking about writing, not acting, so let’s look at what Whedon did on that front to make Loki work.  On the most superficial level, he gets a magic stick that boosts his firepower, and an army of alien drones for the good guys to shoot/smash.  This is a bland but serviceable as far as raising his threat level.

Where the script excels (besides threading the line between empathy and moustache-twirling mentioned about above) is taking this intensely personal adversary of Thor’s and turning him into an antagonist for the entire team.  Killing Coulson is a part of this, and that might have been enough on its own if this were The Avengers 2 and the team had already been established as a cohesive unit.  But Whedon knows that them coming together is the climax of this film, and the villain needs to help them come together, not rely on that unity to establish his own bonafides.

To that end, Whedon makes sure to devote time in this already overstuffed script to ensuring each character* can develop a personal beef with Loki.  Thor obviously brings existing history with his (adopted) brother to the film, and they get a couple of scenes to rehash it in their overwrought, Shakespearean way.  Cap gets a face-off in Germany that feels a bit perfunctory, but mostly because he uses his first breath to Godwin the fuck out of the trickster.  In screenwriting, much as on the internet, once you call the other guy Hitler there’s really nowhere else to go.

No need to waste your time campaigning, Mein President, this here pretty well wraps things up

Regardless, it succinctly sets up the sort of “gospel of totalitarianism” that Loki preaches throughout the film as the thematic antithesis of everything Cap’s about.  It would be horribly slight if Cap were one of only two or three good guys feuding with baddie, but as one of a larger group it’s a nice, brisk bit of shading.

Iron Man gets a wonderfully Downey-y bout of antagonism with Loki fairly late, fueled by his taking Coulson’s death the most personally.  Now, that isn’t really logical if you think about it, because the guy’s co-workers at SHIELD should have been closest to him. But Whedon has always been a guy who values emotional logic over logic-logic, and Tony is the guy who “seems” to have known him longest and best in terms of shared screentime  (which is not just shared between the characters, but also with us as the audience).

On the flip side, the SHIELD people don’t just get mad that Coulson is dead, because while that would make sense, it would feel hollow. No matter how much time they may have spent together, we didn’t get to share in it as screentime.  Also, they are significantly less well-developed than Thor/Cap/IM coming into this, so we can’t draw the same sort of conclusions about their relationships from brief moments.  So Fury gets to face off with Loki twice, and Black Widow…holy hell, did he just call her a “quim”?  Seriously?  I wonder what kind of havoc broke out at the MPAA once a dictionary finally got cracked.

...well, I'm fucking fired.

Anyway, Black Widow’s verbal sparring with Loki is a highlight of the film, an incredible character moment for both of them that is also a payoff of her introductory scene while revealing everything and nothing about her actual backstory.  It gives BW her personal motivation to stop the bad guy, but the real genius at work is that rather than going the obvious route and tying it to Coulson, it instead ties it to Hawkeye.

Hawkeye is the most underserved of the heroes, clocking only 1/3 of the screentime of Iron Man or Captain America, and spending half of that as a brainwashed lackey.  It’s a testament to Renner’s performance and Whedon’s writing that he doesn’t feel like a total afterthought given how little time we spend with Barton as himself.  And also to Johannson’s performance, because we only glimpse behind her steely professional facade when their relationship comes up.  Some of Barton’s most crucial development comes when he isn’t even on screen and she speaks about him.  And even when we find out she was play-acting, it still feels like she exposed something real and raw that changes how we view both characters going forward.  I don’t know that I really buy Johannson’s tough-as-nails bits (her delivery is a bit too laconic to be as commanding as the character should be capable of), but she nonetheless creates an effective contrast between that and the moments when something really hits home.

Who kills Dumbledore??? Wh-why would you..you know I'm only on Goblet of Fire!

That rapport between Widow and Hawkeye, established in the course of a few lines of exposition from her and a single shared scene, has me more intrigued for a potential SHIELD spin-off than for Thor or Captain America 2.  It doesn’t seem to be romantic, but they exhibit a disarming level of intimacy together for people who are so stone cold in every other respect we’ve seen.  I don’t care that they can’t smash giant alien snakecarriers, I just want to know more about their interpersonal relationship.  That’s what Joss Whedon brings to the superhero table, in case anyone is still doubting what he actually contributes.

Anyway, for the most underserved character, Hawkeye actually has, next to Thor, the most personal reason for wanting to take out Loki, as (in what I presume was a nice but unnecessary nod to his briefly-bad origin in the comics) he gets puppeteered into killing an undisclosed amount of his fellow agents by the bastard.  And Black Widow wants revenge on his behalf, and also presumably for the outdated misogynist slur.

That's what it means? Really? Man, I bet someone at the MPAA got fired over that one.

Sure, stopping the aliens is the primary objective in the final battle, but the cumulative effect of all these moments is that all the heroes go into it with their own reasons for wanting to get their licks in on the Bad Guy.  Maybe most of them would be too slight to hang a conventional action movie’s central conflict on, but The Avengers is not a conventional action movie.  It’s a strange new chimera of franchise filmmaking with dozens of masters to serve, one where balancing the demands of all those masters is the key to success.  And in that respect, I find it incredibly goddamn impressive that in the end it didn’t feel like any of the heroes were just tagging along for Thor’s fight.  Whedon took a single character’s archnemesis and found a way to balance his antagonism across the entire group.

And just to say it again, Tom Hiddleston.  Dude’s incredible.  Just one more thing to consider: he has these little clashes with each character throughout, and for the most part they all succeed in outsmarting him or slapping him around in rather short order.  This is great to build up our team of badasses, but to have him never stop feeling dangerous, never simply become a joke or a rag doll to be tossed around (until that final moment when, hilariously, he becomes precisely that)?  That’s where you need charisma, people.

Now, maybe none of these particular bits I’ve been examining seems particularly brilliant or groundbreaking on their own.  Laid out like this, it sounds a bit paint-by-numbers, like anyone with half a brain could have just gone down this list of characters and check off boxes to make sure they all got their quota of moments.  And maybe they could have, maybe you could have, hell, maybe I could have.  But that doesn’t mean that you or I could’ve written The Avengers.  Because despite the 3000 words I just wrote about them, the two particular aspects I’ve addressed only scratch the surface of what went into this script.

Because here’s something else.  I’ve read a lot of criticisms of this movie, and some of them are valid.  I think there are areas of weakness: the score was horribly anemic, Samuel L. Jackson still can’t seem to bring the Samuel L. Jackson energy to a character that might as well be named Samuel L. Jackson, plus the Chitauri should’ve had a) another variant of troop between stormtrooper and snakecarrier, and b) a recognizable lieutenant to be taken out for an added fist-pumping moment, and c) most importantly, a stronger color scheme so they didn’t look like they were made out of the same concrete as the streets/buildings they were fighting on.  But one thing I never thought about it, and that I haven’t seen any critic accuse the film of, is that it felt like it was just checking off boxes.  Nothing about this film feels dutiful, or tacked on, or like it’s ever doing anything but gleefully charging directly to where it wants to go at any given moment.

That’s what makes this script so goddamn good.  Most action movies, even the superhero movies that directly led into this one, don’t take on a tenth of the narrative responsibilities that The Avengers carries, and they still manage to be twice as plodding as they move a fifth of the cast to a resolution that is half as satisfying.

I’m excited to see what Whedon makes look easy next.

Part 3 

*Everyone but the Hulk, who is also absent from the rundown of how Coulson’s death affects the team.  This is a whole different can of beans, but he is exempt from this stuff because the Hulk is not actually a superhero, despite being on a team of them.  He’s essentially a werewolf, and thus does not need to be motivated in the same manner as the rest of the heroes.