This mostly happens where there is some kind of fantasy, a made-up world, sword and sorcery, where anything or anyone has a special power. I have no idea why this is. Just because you’re not writing sword and sorcery, however, doesn’t mean you’re not making the same mistake!
“Just in time manufacturing” means you don’t keep a pile of parts on your warehouse shelves waiting around to be used when called upon. When you’re running low, you ask the supplier to bring you more. The new stack of parts arrives the instant before you need them on your assembly line and you use them right then. Nothing is lying around taking up warehouse space when it is not needed.
It is also known as the Toyota production system because it was invented at Toyota.
This works great if you have a 50,000 square foot warehouse you are desperately trying not to lose money on. It doesn’t work in storytelling. Not at all.
The most common example is when there are special weapons or superpowers. When a character is in a pickle and is about to have his head chopped off by the Gorgon, he looks under the carpet and finds a magic sword and slices off the Gorgon’s head. The supersecret, fabulous thing was delivered to him just in the nick of time! Delivered by writer who did not have his act together.
You can’t gives the character the thing that he or she needs just as they need it. You cannot have a payoff with no setup. You have to gently set up the thing they need far in advance of their needing it, so when you do deliver it, the enraged audience does not scour the internet, looking for your home address.
This also works with characters. If suddenly towards the end of your story, during the incredibly tense riverfront standoff, the hero needs someone to be able to read lips, that character is magically sitting on the riverbank, reading a newspaper, waiting to be summoned at the climactic moment of the scene… to save the hero’s ass.
Little Mr. Lip Reader must be set up an hour earlier, so it is credible for him to be at the river, when he at last is needed.
A fabulously well done example of this is in Shane. You should have seen it, so I don’t care if I’m going to spoil the ending for you.
At the end, Shane, a retired gunfire is in a bar with the main bad guy and his hired gun, Wilson. There’s a shoot out. Shane kills Wilson and the boss. Shane is a very good shot. The entire conversation and shootout is witnessed by the little boy, on whose ranch Shane lives and works. As Shane is leaving the bar, the little boy looks up and sees a henchmen on the balcony, with a rifle aimed at Shane. The boy screams, “Shane! Look out!” Shane twirls around and shoots the guy.
It is totally, completely unbelievable that that little boy would be up this late at night, peeking under the door to the bar. But. The writer has to have him there to save Shane’s life. If the kid isn’t there, Shane dies, and there are no sequels and no merchandising.
So what did A.B. Guthrie, jr., the writer, do?
Working our way backwards, so that it is very clear the set up is set up correctly… Before the boy slides under the door to watch Shane talk to the bad guys…
Shane rides his horse across most of Wyoming. The boy runs after him. Shane rides and the boy follows, across what looks like ten to twenty miles of rugged Day For Night terrain.
Before that, at the ranch, Shane is on his horse riding towards town. The boy calls after him, “Shane, I’m sorry.” The boy’s mother tells him that Shane did not hear him. Now the boy has an excellent motivation to follow Shane across the Western landscape. He wants to apologize, but Shane didn’t hear him. What does the boy want to apologize for? It must be something extraordinarily powerful because it pushes him to run several miles after a man on a horse.
Before that, the boy is crouched down beside his mother and his returning-to-consciousness father, who’s lying in the dirt. The mother says, “you don’t hate Shane.”
Before that, Shane unties the father’s horse, slaps it and sends it away. As he’s walking past the boy, the child yells at him “you hit them with your gun! I hate you!” Shane has been idolized by the boy for most of the movie. “I hate you” is a terrible thing for Shane to hear.
Before that, Shane and the father get in an intense fistfight, ending with both of them leaning against a huge stump that they had pulled out of the ground together long before. It is a visual representation of their friendship. That closeness has been destroyed by the fistfight. The fistfight is so out of the ordinary, so strange, so horrible that all of the animals are jumping out of the corrals howling, screeching, and going crazy. The world is truly thrown out of joint by this horrific fight.
Before that, Shane tells the father he’s going into town to fight Wilson. The father feels it is his duty to go into town and fight for the honor of his farm. Shane knows that if the father faces Wilson, the father will die. But, because the father is a proud man he will not listen to reason. So, Shane has to fight him and eventually knock him out with his gun.
All of this setup, very carefully pieced together, exists only so we will not feel any kind of story bump when the boy saves Shane’s life at the end.
If you give a character a magic gizmo, you need to explain the rules of the gizmo as soon as it is introduced. Sort of like Q showing James Bond his gadgets. Q tells Bond all about them, so when they are used, nothing is a surprise.
What you cannot do, ever, is have the magic gizmo is appear out of the blue or suddenly do something we had no idea it was able to do… just in time for the hero or the bad guy or someone to use that hitherto un-set-up power.
This also applies to knowledge. Character traits. Special abilities that a person suddenly finds. But, at its lowest level (and the one that is easiest to spot) is the magic gizmo or talent arriving right when it is needed in the story. It has to be set up ahead of time, like in Shane.