In addition, the film did not have as much input from chief creative officer John Lasseter, who was focused on restructuring Walt Disney Animation Studios in Los Angeles at the time of its production.Docter recruited a story crew to help develop the film's plot line.
In desperation, Anger inserts an idea into the console prompting Riley to run away, believing that her return to Minnesota will enable her to make new happy core memories.
Joy and Sadness encounter Bing Bong, Riley's childhood imaginary friend, who suggests riding the train of thought back to Headquarters.
He imagined what happens in the human mind when emotions set in.
The idea to depict it through animation excited Docter, who felt it the ideal form to portray "strong, opinionated, caricatured personalities." He began researching information about the mind, alongside Jonas Rivera, a producer, and Ronnie del Carmen, a secondary director.
When Sadness begins touching Riley's happy memories, turning them sad, Joy tries to guard them by isolating her.
On Riley's first day at her new school, Sadness accidentally causes Riley to cry in front of her class, creating a sad core memory.
Her five most important "core memories" (all of which are happy ones) are housed in a hub that each power an aspect of her personality which take the form of floating islands.
In Headquarters, Joy acts as a de facto leader to maintain Riley's cheerful childhood, but since she and the other emotions do not understand Sadness' purpose, she frequently tries to keep Sadness away from the console.
At the age of eleven, Riley and her parents move to San Francisco for her father's new business.
Riley has poor first experiences: the new house is cramped and old, the moving van with all their belongings was misdirected, her father is under stress from his business, and a poor encounter at a pizza restaurant leaves her disheartened.
Docter found surprise and fear to be too similar, which left him with five emotions to build characters around.