BOOK festival appearances can do more than connect an author with his readers. One innocent question to Christopher Brookmyre about a favourite character actually inspired a storyline.

When the writer of Dead Girl Walking, Bedlam and Flesh Wounds gives a reading and takes questions from the floor next month at New Lanark Book Festival, who knows where it could lead.

"Somebody asked during an event when I was bringing back the character of Spammy, who was in Country of the Blind," remembers Christopher.

"I was writing Attack of the Unsinkable Rubber Ducks, and knew there was a particular bit in the story coming up and I had vague ideas of what I was going to put in there.

"I gave my stock answer, which was to say you wait for the right opportunity for characters to come along.

"In his case he was a bit of a stoner who was going to avoid ever ending up in another adventure. Even as I said that, I thought he would be perfect for a small role I was going to write in the next couple of days."

At the first New Lanark Book Festival, from October 1-4, Christopher, who lives in Bothwell, will be talking about his most recent book, Dead Girl Walking, and the return of maverick investigative journalist Jack Parlabane.

Looking ahead, devotees will also get a sneak preview of his next book Black Widow, due out in January.

It follows the story of a surgeon who was very outspoken in a blog about sexism in her profession but then has to cope with the fallout when blog is hacked.

"She ends up having to leave a prestigious job and move to Inverness to start again. She is someone who has given the best years of her life to her career and thinks she has had to sacrifice this idea of relationships and family," explains Christopher.

"She finds someone and within six months they are married, six months late he is dead.

"There is a court case about whether she did it, and if so, why? It is very twisty, turny about a lot of hot button issues: social media trolling, revenge porn and things like that."

Readers also get to know better the rebooted version of Jack, seeing a human side to the character.

"After the Leveson Inquiry and thinking about the reputation of journalism at that time, I thought he would be in a very low place. For a perverse side of me, that made him far more interesting," says Christopher.

"I think I've given him a lot more depth as a character and that's why I keep coming back to him. I've written two in a row and am writing a third just now.

"Dead Girl Walking and Black Widow are a wee bit more mature and realistic, more emotionally centred, compared to some of the more farcical, satirical stories I wrote about before."

He adds: "I think it was Ian Rankin who once said you're just constantly looking for ways to make it hard for yourself. Whenever you find something that works, it works once and the next time you want to find a new way of doing it."

With a writing career that goes back to Quite Ugly One Morning in 1996, Christopher's style and subjects have grown, finding added depth and expanding on current issues of the day.

It is as much to do with him getting older, along with his characters.

"The type of book I'm going to write in my 40s is different from the book I'm going to write in my 20s," he reasons.

"To put it more simply, I don't know everything any more. When you're in your 20s you're pretty sure about most things and then everything just gets more and more grey. That's metaphorically and physically."

Jack, always cocksure in the past, as Christopher says, is really not sure of anything any more.

In the pages of Dead Girl Walking he is dealing with the fallout of the Leveson Inquiry and its implications for his career. While in Black Widow the journalist is dealing with the fact his marriage is over and that gives him a poignant perspective on the fact that it is a book, essentially, about a relationship that ends in a spectacularly bad way.

What Christopher says he has learned over the years is that he is still passionate about issues, it is his approach that has changed.

"There's a part of me wishes I could still write the type of thing I was comfortable writing 15 years ago because it was much lighter in tone and there are things that seem simpler and yet there's also the opposite," he says.

"There is a great pleasure in realising you've learned a lot and have developed a few more literary muscles. There are things I do now I would never have been able to write back then, characters that are far more complex."

He is particularly proud of Heike Gunn, the lead character in Dead Girl Walking and one of the most morally complex he has written.

Other authors appearing at New Lanark Book Festival include James Robertson, Alistair Moffat and Jonathan Whitelaw.

There will be a programme of sessions designed to appeal to a broad spectrum of literary tastes, the themes of which all have a link to New Lanark in some way, from Scottish fiction and history, to whisky, food and drink.

Visit www.newlanark.org/visitorcentre/2015-book-festival.shtml