The way novice novelist Liam McIlvanney came to secure a publishing deal with a leading London firm reads like the plot of a good book itself: University academic attends his one and only literary party and falls into conversation with an editor with Faber and Faber with whom he is vaguely acquainted.
Editor discovers academic has written book reviews and literary articles for newspapers.
Editor tells academic he is about to launch a new literary journal and asks academic if he has any writing on the go which might be suitable.
Academic just happens to have a short descriptive piece he has written about the militant Protestant orange walks of Western Scotland.
Editor loves the piece and thinks it would make the nucleus of a great novel.
Why not make it two, the editor suggests. Flattered, the academic agrees. And that was when reality kicked in.
"Within two weeks I had a two-book publishing contract, which is pretty unheard of for a first-time fiction author. Then came the sobering process of producing the goods," Prof McIlvanney said.
Fiction writing was a completely different genre for an author whose most recent major publication to that point had been an doctoral thesis entitled Burns the Radical: Poetry and Politics in 18th Century Scotland.
Then there was his full-time job - he was at that time a senior lecturer at the University of Aberdeen, specialising in Scottish literature.
There was also the need to spend family time with wife, Valerie, and their three young sons (another is on the way now).
"It was fairly full-on," he says.
His solution was to write 500 words a day early in the morning or late at night.
"The trick is, you have to do it every day. You can't miss one. It's amazing how quickly the word count mounts up if you are disciplined."
All the Colours of the Town is a political thriller with Protestant-Catholic sectarian unrest in Scotland and Ireland its central theme.
Its main characters are hard-bitten political journalist Gerry Conway, and rising political star MP Peter Lyons, whose secret past Conway is trying to uncover.
For Prof McIlvanney, whose great-grandfather was Irish, sectarian divisions were a way of life growing up in the west of Scotland.
"Only 12 miles separate Scotland and Ireland at their closest point. Not many people outside West Scotland know it is inherently a sectarian society, an anti-Catholic society.
"It is nothing like Northern Ireland where there is divided housing and discrimination against Catholics in the labour market, but it is there."
Part-way through the writing process, Prof McIlvanney was appointed to his professorship at Otago, moving here with his family at the start of 2009.
Dunedin's Scottish roots, and the fact the university had created a specific chair in Scottish studies, were attractions too strong to pass up, he says.
"There are so few Scottish studies positions available outside Scotland I had to apply. And it was a chance to experience a new country and a new style of Scottishness."
Unsurprisingly, by the time All the Colours of the Town was published in October, the occasional New Zealand reference had crept in.
Conway had acquired a New Zealand girlfriend and was partial to a Central Otago pinot noir.
Conway will also be the central character in book number two, expected at the publishers by August next year.
Prof McIlvanney says he toyed with the idea of setting the book in Dunedin, but decided to stick with Glasgow.
"Conway may make a visit to Dunedin though. Now that he has a New Zealand girlfriend it wouldn't be beyond the bounds of possibility."
Prof McIlvanney says the move to Dunedin has been good for himself and his family.
For an expert on things Scottish and Robert Burns, he admits he had never visited Dunedin before, did not know much about its Scottish links and did not know how strong Dunedin's connection to Burns was. (Burn's nephew, the Rev Dr Thomas Burns, was a Free Church of Scotland minister and the first spiritual adviser to the church's Dunedin settlement when it was established in 1848.)
Now he feels at home, drawn by a mix of "the foreign and the familiar".
As well as teaching Scottish literature papers, he has begun researching two writers with links to Scotland.
One is poet John Barr, who emigrated from Scotland in the 1850s and, among other achievements, founded Dunedin's Burns Club; the other is poet James K. Baxter, who wrote and lectured on Burns.