I can’t speak for any other writer out there, but when it comes to my own books, they are the end product of seventy percent research time plus thirty percent writing.
When I finally decide on a topic, I spend many months finding out everything I can about it. It doesn’t matter which of the genres I write in.
Without comprehensive research, no story gels. More often than not, as I spend ten hours a day, seven days a week for maybe four to six months reading up on the subject, I will come across a sentence in some dusty tome which gives me the inkling of an idea for the story. As for my resources, here at home I have an extensive research library of my own. Plus I also make use of the internet. Although, having said that, there is a lot of disinformation and plainly incorrect articles on the net.
To give you an example, take most things which appear in Wikipedia with a large pinch of salt. Never rely on just one source! Use Wikipedia by all means. But check what is there with reputable sources like the British Museum, British Library and other institutions. Many of the better universities across the planet can also prove invaluable when it comes to research, especially these days via the internet.
Another excellent source for me are serious documentaries on television, particularly when it comes to history, geography and the universe in general.
So, to sum up – research is the key to a great story unless you are merely engaged in writing what the Victorian’s termed ‘A Penny Dreadful’, or a potboiler if you prefer. But remember this, even they needed a degree of research to be beleaved by their readers…