RageLeague Posted April 27, 2021 Share Posted April 27, 2021 So when an agent "retires", their home is set to nothing and if their home location has no more occupants at this point, they gets marked for removal. This normally is done to save space, but issues will arise if a mod sets an agent's home location to an important story location, and there is a possibility of that agent getting killed while that location is still important. When the agent is killed, that location will get deleted, even though the story still requires it. Perhaps, like how agent culling works, automatically marking homes for deletion should check whether that location is still casted in like a quest or something, or somehow manually marking that location to not get automatically removed. Or make it so that permanent locations like the ones defined in region.locations don't get automatically removed. That works for most situations. Link to comment Share on other sites More sharing options...
Developer rooks Posted May 14, 2021 Developer Share Posted May 14, 2021 Would verifying that not self:IsCurrentlyImportant() before culling the location in Location:UpdateLocation() work for your case? It is something I can try adding to the testing branch if so. If you have a reference to the home after it was marked for deletion, you can also try manually removing the TRANSIENT flag. Link to comment Share on other sites More sharing options...
RageLeague Posted May 15, 2021 Author Share Posted May 15, 2021 23 hours ago, rooks said: Would verifying that not self:IsCurrentlyImportant() before culling the location in Location:UpdateLocation() work for your case? It is something I can try adding to the testing branch if so. If you have a reference to the home after it was marked for deletion, you can also try manually removing the TRANSIENT flag. That would probably work. Thanks. Removing the transient flag when something gets marked for deletion may be too roundabout for my taste, because for every location affected, I have to manually set up an event listener that listens for agent retirement. And also unmarking a location after it gets marked might cause issues when the original location is to be marked for deletion anyway for some reason. Link to comment Share on other sites More sharing options...
Developer rooks Posted May 17, 2021 Developer Share Posted May 17, 2021 That makes sense. I will submit this patch and it will appear next time we push a testing build. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.