Kristen Bell plays the title character in “Veronica Mars.” The film version of the ’90s television series opened in March, 2014. CREDIT: ROBERT VOETS

Fans of the the CW’s criminally short-lived teen detective series “Veronica Mars” are well aware that the show took place in the radically divided Neptune, Calif., a town where all that separated the elite socialites from the seedy criminals was a murky gray line of questionable morality.

But, as Entertainment Weekly has revealed, the show wasn’t always set in California. In fact, “Veronica Mars” wasn’t even originally imagined as a TV show. At first, it was going to be a Young Adult novel set right here in Austin at Westlake High School, and the titular character later became Veronica’s dad, Keith.

First things first: If you haven’t already seen “Veronica Mars,” you’re missing out. The plot centered around Veronica Mars (Kristen Bell), a high school student who moonlighted as a private eye for her father Keith. Keith was a former sheriff who opened up his own detective agency when he failed to get re-elected after he accused a Neptune socialite of murdering his own daughter (and Veronica’s best friend).

“Veronica Mars” was full of noir, camp, crime, quippy teens and lots of high school mysteries to solve. It also went to some pretty dark places in its examinations of class, race, wealth, sex and morality. The show was cancelled after three seasons, but a crowd-funded film was released in 2014 after a fourth season pilot was ordered by a network but never aired. Since the film’s release, series creator Rob Thomas has partnered with Austin author Jennifer Graham to write two books continuing the story of the plucky sleuth.

Rob Thomas on the red carpet for the movie Veronica Mars in Austin, Texas on March 7, 2014. (Thao Nguyen/FOR AMERICAN-STATESMAN)

Anyway, Thomas originally intended for the story to be told as a young adult novel. He started a draft, “Untitled Teen Detective,” in 1996. That draft was shared with Entertainment Weekly this week for its “Hollywood’s Greatest Untold Stories” issue.

Thomas set “Untitled Teen Detective” in Austin. His story revolved around Keith Mars, teenage detective. Keith became a detective after his father quit a promising career with the Austin Police Department to open up a private investigation agency. Like in the TV show, there is no mother figure in the picture. Also like in the show, the titular young detective starts out by catching the parents of his wealthy Westlake High School classmates in after-hours trysts at seedy motels.

Another Texas twist: Keith pines for a popular girl who’s said to be dating a University of Texas football player.

But perhaps the biggest Austin element to the “Veronica Mars”-that-almost-was is a still-unsolved mystery that’s only hinted at. In the original draft, Keith discovers that the reason his dad left the police force is because he knowingly sent the wrong men to Death Row for involvement in Austin’s “Chocolate Shop Murders case,” a name which bears a striking resemblance to the real-life, still-unsolved Austin yogurt shop murders from 1991.

Years later, when Thomas took ideas from the draft into a spec script he sold to UPN (now The CW), Keith Mars became the disgraced law enforcement father figure, the main character became Veronica, and the main plot centered on a different kid of murder.

All of the Texas setting came natural to Thomas. He grew up in Texas, graduating from San Marcos High school in 1983. His father was a vice-principal at Westlake until the early 1990s, and Thomas attended Texas Christian University on a football scholarship before transferring to UT and graduating in 1987. Thomas was working as a high school teacher at John H. Reagan High School in Austin when he wrote the first draft of “Untitled Teen Detective,” and many characters in “Veronica Mars” were named for Austinites he met or musicians he played with. The music of several Austin bands also played in the show.

Alas, the Texas version of “Veronica Mars” is not the version that made it to the small screen. Maybe someday, if Netflix reboots the series (one can only hope) a mystery might take Veronica all the way to Austin.