If there is a referendum prior to the next UK general election, I think it would be a shoo-in for independence. I think the only thing that would prevent a clear vote for independence would be a change from the UK being being a unitary state to becoming a federal state where each of the countries has control over a much wider range of powers. Key to this is that becoming a federal state would constitutionally prevent the federal government from arbitrarily withdrawing or changing any powers given to the individual countries based on the politics of the day. In that way Scotland (and Wales / NI) would effectively have its independence but would still be ultimately under UK sovereignty. I think that's the only way the UK can survive as a four nation country but even if that happened or was promised, the appalling way in which the country has been run in recent years would probably be enough to secure a vote for independence.
Sadly I think it's much more likely that Scotland will vote for full independence whenever it gets the chance and irrespective of who wins the next GE, and I also believe that longer term NI will unite with the republic - probably on a federal basis to appease the unionists.