I’m using really aggressive level streaming, and I’ve hand-placed a bunch of actors around the level symbolizing locations that can have resources or encounters, and what sort they produce. When a level is streamed in, it’s trivial to get a reference to every node, randomly select a certain number of them, and instruct them to spawn some kind of harvestable resource.
Where it gets tricky is that I don’t want this to happen every time the level loads- there’s a day/night system, and I only want nodes to regenerate at certain intervals; once you’ve entered a level and prompted it to spawn nodes, enemies and resources should stick around for 24 hours (or until killed/harvested), and encounters with NPCs should stick around for some arbitrary number of hours.
So is there a straightforward method to handle this? If I wasn’t using level streaming I could just put logic on the spawner nodes teaching them when to despawn/respawn, but every solution I can think of requires retaining lots of data about the resource nodes in the persistent level, which defeats the entire point of using level streaming.