This might be an excessively broad question, but it speaks to a really common problem I’ve had working with very large game worlds. Take, as a case study, my current problem: I have a procedural question generator that lives in the persistent level, and if it generates a quest to kill the unique bad guy in the haunted castle, that bad guy had darned well be there when I arrive. More to the point, he needs to be there consistently. Since the level itself is static, and resets itself every time it streams out, it seems like the only way to position him would be to manually stream the level in, place him there, and keep the level in memory until he’s dead, but that’s obviously ridiculous and wouldn’t scale at all.
Likewise, there are lots of cases where my generator needs to query a specific level in order to do things like “Determine how many buildings are in this chunk, and make one of them the quest’s next destination,” but any reference I make to the level’s geometry, or any unique components I add to quest-important objects, are going to get deleted and not re-created next time that level goes poof.
This seems like such a common issue that so many games deal with, is there a standard or recommended way to deal with what I’m discussing?