Disney’s new film Moana has dropped anchor at the top of the box office, thanks to its winning combination of music, humor, gorgeous setting—and Moana herself. Critics and audiences alike love this Polynesian heroine who bristles at being called a princess and sets out on an adventure across the sea.

She and Felicity Jones’s rebel hero Jyn Erso in the Star Wars spinoff Rogue One, opening this week, are inspiring examples for writers wanting to create realistic female action characters, especially for young people. Although Moana follows some of the predictable Disney formula (animal sidekick? Check), she breaks the mold in key ways.

Heroic women in adventure stories have navigated a tricky path for years thanks to the idea that the target audience for such films was young men. Characters like Trinity in 1999’s The Matrix had cool moves that could take out multiple adversaries, but they often stepped aside by the story’s end so that the male character could fulfill the hero’s journey. Even family-oriented films like 2014’s The LEGO Movie saw empowering characters like Wyldstyle, a sassy “master builder” who crafts anything she needs out of odd LEGO bits, grind the third act to a halt by asking her boyfriend if it’s OK to break up with him so she can be with the film’s construction-worker protagonist instead. The pattern became so prevalent that writer Tasha Robinson in The Dissolve called it “Trinity Syndrome,” after The Matrix character.

Moana refreshingly doesn’t have this problem. Voiced by Hawaiian native Auli’i Cravalho, Moana is a sixteen-year-old chieftain’s daughter being groomed as a leader who feels torn when her ideas clash with her father’s. Their main conflict is that she loves the ocean, like her wayfinding ancestors, while her father insists that their island home has everything they need. He lost a friend at sea—Moana lives in a time of magic and monsters—and has banned anyone from traveling beyond their lagoon, even as their fishing grounds empty and disease strikes their crops. (Common sense would dictate they explore elsewhere. But without the father’s stance, Moana and her journey would have no initial obstacle.)

The script establishes Moana early as someone not cowed by the spooky stories her grandmother tells to the village children. As a toddler, she’s also drawn to the sea, a character itself that musses her hair and gives her a gift: a green jewel that turns out to be the heart of the mother island Te Fiti. In her grandmother’s stories, the demigod Maui literally stole Te Fiti’s heart while she slept, causing darkness to spread throughout the world. So to ensure her community’s survival, Moana sets out to return it.

She’s sympathetic in wanting to be both a good leader and a good daughter. She’s brave and confident, even against the braggadocio of Maui (voiced by Dwayne “The Rock” Johnson), which leads to setbacks along the way. But by the story’s end, she realizes she can have as many variations of her personality as that glorious gem. She can be a good leader, a good daughter, a navigator, and an adventurer.

As seen on the Final Draft blog

In short, she has purpose and value beyond who her boyfriend is or whom she’s going to marry. There’s no romance in Moana aside from her love of the water.

Rogue One: A Star Wars Story, designed as more of a war movie, has little time for romance, either. Like Rey (Daisy Ridley) from 2015’s Star Wars: The Force Awakens, Jyn is independent and resourceful, if a bit lonely. She, too, has a kind and brave core, albeit hidden within a prickly exterior.

We’re not against romance. But give your audience and female characters credit. If they want a romantic comedy, they’ll watch one. The enthusiastic response to these recent characters emphasizes what audiences have been saying for years: Women and girls like action heroes, too. (So do boys. My seven-year-old son turned a large cardboard box into Rey’s AT-AT home, with scavenging, flying, and fighting stories galore.)

If you have an adventurous female character, look to these recent ones to give her extra dimension. Make sure she does something significant to the plot that doesn’t involve being victimized to motivate a male character, or breaking up with him or nagging him to spur him to action, as Robinson wrote. If she’s strong, smart, mean, capable, or cool, keep her that way; a male character doesn’t have to impress her, surpass her, or rescue her to be heroic himself. And don’t use her just for exposition. As Robinson notes, you don’t have a strong female character if she could be “seamlessly replaced with a floor lamp with some useful information written on it.”

That might take your writing into unfamiliar territory. But like audiences lately, you also might enjoy the ride.