Being goal-oriented instead of self-oriented is crucial. I know so many people who want to be writers. But let me tell you, they really don't want to be writers. They want to have been writers. They wish they had a book in print. They don't want to go through the work of getting the damn book out. There is a huge difference.
We, and I think I'm speaking for many writers, don't know what it is that sometimes comes to make our books alive. All we can do is write dutifully and day after day, every day, giving our work the very best of what we are capable. I don't that we can consciously put the magic in; it doesn't work that way. When the magic comes, it's a gift.