Moved script generator to dialogue state.