Most often in the use of pqp, one action precedes another. Sometimes the action the plus-que-parfait precedes will not be explicit, but will be implied in the sentence:
Je m'étais trompé de date cette fois-là.I'd got the date wrong that time.Vous vous étiez amusés cette nuit-là?Had you had fun that night?Both these examples, weakly imply, that you were mistaken and had fun in a prior time. I find this difficult to think I would be able to discern the need for the pqp in constructing a sentence. Can you please explain this more in depth? Thank you, Ken