Story

The Story of Detention is explained through in-game cutscenes and collectible notes, and at times through symbolism.

Background
Detention is set in 1960s Taiwan, a period when Taiwan is under martial law by the Republic of China. The government was eager to find and eliminate any supporters of communist ideas or people who didn't support Chinese rule, people they identified as "enemies of the state".

Fang Ray Shin
Fang Ray Shin was a senior at the school. She was initially a talented academic achiever, but her grades began to slip as her parents' fighting grew worse. She would sometimes be in her room hearing her parents scream at each other. Her father would often come home drunk, throw things, physically abuse her mother, and on at least one occasion slept with another woman.

Ray's falling grades earned her a visit to the school counselor, Chang Ming Hui. Chang met with her over several months, and her grades got back on track. During this time, Ray became emotionally attached to Mr. Chang. When teacher Yin Tsui Han, an implied romantic partner to Mr. Chang, found out about what was going on between them, she confronted Mr. Chang about it - a conversation that Ray overheard. Mr. Chang agreed and stopped seeing Ray, telling her that since her grades had improved, his services were no longer needed.

This sent Ray into a spiral of anger, depression, and desperation. She believed that between society's pressure on her to achieve academically, and her separation from Mr. Chang, that the world was not allowing her to be herself. She believed Ms. Yin to be one of the causes of this, and hated her for it.

Book Club
The Book Club, hosted by Ms. Yin, was a gathering of a handful of students who read books from the list of banned books that had been smuggled into the country with the help of Mr. Chang. Yin believed that everyone, especially the young students, should be free to be exposed to all manner of ideas and to form their own views and beliefs. The students were aware of how much danger they were in by reading the book, as Yin would remind them every meeting not to tell anyone about it, and when the book club was later shut down, the students burned all the books.

Ray's Leaking of the Book Club
Ray heard about the book club from Wei Chung Ting, a student attending and helping to manage it. She saw this as an opportunity to take revenge on Ms. Yin. She got the reading list from Wei and brought it to Bai Guo Fong, a veteran of the war loyal to China, and told him that he found it on Ms. Yin's desk. Bai had the entirety of the book club arrested shortly after. Ms. Yin and Mr. Chang were sentenced to death by execution, although Ms. Yin managed to escape the country before they apprehended her. Wei and the other students were sentenced to 15 years imprisoned, although they were granted amnesty after serving most of the sentence.

In-game Events
The events of the game take place after all of this has happened, and is assumed to all take place inside of Ray's mind. Her lack of knowledge of the situation is her journey out of denial, recreating the events of her life that led to this point. The demons and rapidly deteriorating environment are symbolic of her mind becoming increasing wracked with grief over her actions.