- "It's not his fault he had a bad motivator!"
- ―Wil Wheaton
R5-D4, a.k.a. Arfive-Defore, or "Red", as Luke Skywalker called him (yeah, real nice, coming from a guy nicknamed "Wormie"), was a thoughtful, pensive astromech droid who frequently pondered the great philosophical questions, such as "Why am I here?" "What is my purpose in life?" "Does God exist?" and "Why am I surrounded by short hooded creatures yelling Utinni?"
R5-D4 was part of the unfortunately malfunction-prone R5 series produced by Industrial Automation. It was sort of the Windows Vista of the droid world. He was passed on from master to master until he ended up on Tatooine being peddled by Jawas. R5-D4 pondered his horrible situation, become a bitter, crotchety, jealous old grouch, and only his basic decency as a sentient being prevented him from being an existentialist.
Things did not improve when he met C-3PO and R2-D2 aboard a sandcrawler. R2-D2 was from the much more successful R2 series which got all the awards and got to hang out with BD-3000 luxury droids in their private oil baths. But R5-D4 and R2-D2 got to talking and philosophizing with each other, and it turned out R2 wasn't such a bad old guy, and he certainly deserved praise for putting up with C-3PO all the time. R5-D4 swore to aid his fellow astromech droid in serving the Rebel Alliance. So when Owen Lars and Luke Skywalker bought C-3PO and R5-D4 at the Jawa droid sale, R5 intentionally blew his own motivator (i.e., autoerotic motivation) so that R2 could take his place.
Later, R5-D4 came into the possession of Rebel historian Voren Na'al, who cleaned the droid up, repaired his motivator, and programmed him to be a spy in Mos Eisley. R5-D4 became a smooth, suave secret agent, known to all the lady droids as R5-007.
Behind the scenes
Comic writer Peter David envisioned R5-D4 as "Skippy the Jedi Droid," a droid with Force powers who was secretly a Jedi. But that's just silly, and Peter David should stick to writing Star Trek novels.