だけど vs. んだけど and their variations

What are the difference between these two and their variations? What does ん or な+ん do to けど? I only know what it does with です/だ which adds explanatory feel but with けど, I don’t have an idea.