Add AUTO_REPLICATE_EVENTS function for Generate