When we hear Buscapé (Alexandre Rodrigues) talking to Marina (Graziella Moretto) about how "he never took a hot bath", that was not scripted. Actually, that was Rodrigues and Moretto talking off camera, during a pause in the shooting, when the boy (who lived on the slums) was telling her about his life.
All the amateur actors were recruited from "favelas" (slums) in Rio de Janeiro, and a couple of them--Buscapé/Rocket (Alexandre Rodrigues), for example--actually lived in the Cidade de Deus (City of God) itself.
Leandro Firmino (Zé Pequeno) really was from the City of God and had no ambitions to be an actor, he only went to the audition to keep his friend company.
The scene where the gang prays before the war was not scripted. During the shooting, a young boy, who used to be in a real gang, asked director Fernando Meirelles if the group was not going to pray like they always did before an important confrontation with their enemies. Meirelles told him to go ahead and lead the prayer, and they shot the scene.
Fernando Meirelles wanted the cast to consist of people who had never acted before and professional actors who were not widely known. One such actor was Matheus Nachtergaele, whom Meirelles had seen in a play. While Meirelles was working on the script, however, Nachtergaele suddenly became a huge star in Brazil after starring in the hit film A Dog's Will (2000). Meirelles was a little disappointed at first but Nachtergaele promised him that he would disappear into the role of Sandro Cenoura so completely that his stardom would not distract from the film. He actually moved to the real Cidade de Deus where most of the cast lived and lived there for three months to prepare for the role.