The unreal past is used to talk about imaginary situation in the past. You can describe what you would have done differently or how something could have happened different if circumstances had been different.
examples:
- We use wish + past simple to talk about things, we would like to be different in present.
example:
I wish you were famous.
- We use wish + past perfect to talk about that happened in the past that we wish hadn't happened.
example:
I wish I had asked her out before she moves away.
- We use if only for emphasis, or to emphasize something,
example:
If only I had my bill on time, now I owe more money
- We use wish + would to talk about things we want to stop because we find them annoying.
example:
I wish the dog would stop barking.
When we want to express a wish or we want to refer us to something unreal, we can use some expressions which will help us to demonstrate a specific situation... for example:
I wish you were here at this moment.
I'd rather you do the daily chores instead of me.
If only I knew the correct answer.
Reflections
These grammar structures are so useful when we are talking about regrets, past situations which we want to change or remind. In my personal opinion, sometimes these structures are confusing, because depends about what you want to say... depending of the intention of the speaker because isn't the same try to say "If only I knew the answer" that "If only I had known the answer", we have to identify what exactly what we want to express and be careful with which unreal past we want to use.