Bounding around on giant hind limbs, using its giant tail to balance, the well-named giant kangaroo rat of Southern California is half Pokemon, half Mighty Mouse. It emerges at night to forage on seeds, building up underground stores. When it’s not busy foraging, it’s busy scrapping with its peers to claim territory. It dominates these grasslands, outcompeting smaller rodents while doing its best to dodge foxes and snakes.

But the giant kangaroo rat isn’t invincible. In 2012, a once-in-a-millennium drought, exacerbated by climate change, sent the rodent’s California ecosystem into chaos. Luckily, scientists were watching, and they’ve now published a fascinating analysis of how the giant kangaroo rat and over 400 other species of plants and animals struggled and triumphed in a world gone dry. If you want to see how climate change is going to affect Earth’s most precious ecosystems, this is a good place to start.

The Carrizo Plain National Monument is a portal to a time before big ag turned California’s Central Valley into a monocultural wasteland. The refuge is home to insane wildflower blooms in the spring, and a long cast of characters—arthropods like wind scorpions (not really scorpions, but equally horrifying, if you feel like googling), reptiles like the side-blotched lizard, and fliers like barn owls. All of them are delicately balanced in an ecosystem of eaters and eatees.

To keep track of those relationships, scientists at several US universities had to trap and collect all these critters. Some, like mammalian carnivores, they tracked at night by driving around shining spotlights, hoping to catch the glow of their eyes. They set traps for others, like insects and rodents. And they walked around doing plant surveys in April, when things were nice and bloomed up—or, at least, when they were supposed to be.

Unsurprisingly, the plants suffered right from the start of the drought. That in turn was bad news for the giant kangaroo rats, which survive on seeds. But it wasn’t until the second year that their numbers crashed, likely because they were surviving on seed stores. Then the carnivores took a hit: the owls and foxes and snakes that were now out of a reliable food source.

Opportunists were waiting, though, to fill in the vacuum left by the giant kangaroo rats. Rarer, smaller species that require fewer resources, like the short-nosed kangaroo rat and southern grasshopper mouse, exploded in number between 2013 and 2015. And the rodents weren’t alone. While barn owls and western meadowlarks were “losers” during the drought, killdeer and greater roadrunners were “winners.” The blunt-nosed leopard lizard suffered; the side-blotched lizard came up in the world.

“The drought kind of knocked down the species that were dominating and allowed the underdogs to do better and stay in the system,” says wildlife ecologist Laura Prugh of the University of Washington, lead author on the new paper in Nature Climate Change.

For all the winners and losers, nearly three quarters of species weren’t strongly affected by the drought. “That was definitely a surprise,” says Prugh. “It looked kind of like the surface of the moon by year three of the drought. But when we went out and did our surveys, we would catch animals, we would find some plants here and there.”

In a perverse kind of way, the researchers were fortunate that the drought landed right in the middle of their survey. It’s rare that scientists get to study this many species over such a long period of time, and even rarer that they get to see a climate-change-exacerbated drought rapidly morph an ecosystem. “To address this number of species in a study across a disturbance like this is really unusual,” says Lee Hannah, senior scientist of climate change biology at Conservation International, who wasn’t involved in the study.