What it means
つもりだった expresses a past intention or assumption. With a verb in the plain non-past form, it means that the subject intended to do something at that time. It often suggests that the plan changed or was not carried out, although this is decided by context rather than by the grammar alone. With a noun followed by の, it means that the subject intended something to be regarded as that noun or meant it in that way. The polite counterpart is つもりでした.
Usage note
つもりだった describes a past intention or understanding, so it should not be used for a current plan; use つもりだ or つもりです for that meaning. Do not confuse it with つもりで, which means doing something with the intention or assumption that another action is true.
How to use it
私は冗談のつもりでした。
I intended it as a joke.
私は来月、京都へ行くつもりでした。
I was intending to go to Kyoto next month.
私は冗談のつもりだった。
I intended it as a joke.
私は来月、京都へ行くつもりだった。
I was intending to go to Kyoto next month.
