The difference is exactly the same as in English : it is a matter of sequence of tenses. If you are narrating something, using a past tense, and you want to indicate that an action took place before the rest of your narrative, you need to use pluperfect. If it took place at the same time as, or in sequence with, the rest of your narrative, you'll use either present perfect (in French, most cases) or simple past (in French, literature only). In English, you'd use simple past and not present perfect, but the role of the pluperfect remains the same : it's a "past-in-the-past" tense.
S'est means that mistaking the sword for a real one took place in sequence with the rest of the narrative, s'était means it took place before all the rest.
For a clearer example :
Je suis allé chercher du pain, et quand je suis rentré je me suis aperçu que j'avais oublié mes clés.
I went to buy bread, and when I came home I realised I had forgotten my keys.
Going for bread, coming home and realising are a sequence of actions, so all these verbs use the same past tense. Forgetting your keys took place before this sequence, so you need to use the "past-in-the-past" / pluperfect tense.