Generally means that

なのに

Like all の, needs a な for nouns.

バカ~~だの~~に
バカなのに He's such a fool... (complaint)

In order to (...)

as in "to do the action of (...)"

話すのにLineを使おうか? Wanna use line to chat?

The opposite of what you expected

States that something is unlike what you expected. Similar to けど, but the nuance is more on it being a little disappointing. It is also not used with feelings, requests and commands

Despite

Note that it derives form explanatory の・んだ, and hence must go with a な whennoun+ !

毎日運動したのに、全然軽くなった Despite exercising daily, I did not get thinner.

ご飯を食べたのにすぐお腹がすきます。 Even though I ate, my stomach felt empty right away.

風邪なのに働く To work despite of a cold.

安いのにとても美味しいです。 despite being cheap, it's delicious.

Complaint or surprise

it also has an edge of it being a complaint, just generally expressing something was unexpected.. When the actual reason is omitted, it can be just as asentence-ending , and it just becomes like a :(

疲れているのに。 I'm tired.

風邪なのに。 I have a cold :(

安いのに。 wtf it's so cheap!

Regret that something didn't happen

expresses a slight annoyance or regret that something should take place, while it hasn't or won't.

Form

〜ば + のに

俺に力があれば、フリアエを守れるのに

If only you were powerful, you would have been able to protect Furiae (from drakengard)

あの時、頑張って彼女に好きって言えばよかったのに。 Back then, If only I had tried my best and told that girl I liked her (it would have been better).

It's more emotional and less polite than ばよかった

こんな日が続けば良かった... It would be nice if days like this could last forever... こんな日が続けば良いのに... Why can't days like this last forever, aaaa

Youtube: Game gengo #2 〜ば〜のに
nihongokyoshi-net.com ~ば~のに nihongokyoiku-shiken.com - のに vs けど