Complex sentence: Key wrote the novel during the depths of the Cold War, so his Deranian was a Communist agent; by the time the screenplay was being written, greedy capitalists had become the preferred villains of fiction.
Split into simpler sentences: Key wrote the novel during the depths of the Cold War. By the time the screenplay was being written, greedy capitalists had become the preferred villains of fiction.