Hello,
I am using runtime hierarchical generated PCG (with a modified biome core) for a procedural colony sim game. I have different biomes in my world with different graphs that generate resources that players and colonists can interact with (choppable trees, gatherable plants, minable rocks). When the player moves out of generation range, I would have to stop the colony simulation if the colonists are not also generation sources. While it works to have the colonists as generation sources, I do not need to generate the points at the same range as I would for the player, and furthermore, I don’t need to generate points for the non-gameplay related things like foliage when the generation source is an NPC.
My Feature Request: is to be able to specify a multiplier on the PcgGenerationSource component that would multiplied against the runtime generation generation radii when PCG is considering which grids to execute. And a follow up request would be to have access to a list of which sources caused a particular graph grid to be executed. This could be a node but really just an array somewhere in the source code that is accessible would be enough as I could just create a custom blueprint node to fetch it for the graph its ran in. Having a list of generation sources would allow me to cull certain sections of my graphs or sub graphs depending on who is causing the graph to generate. No more wasted resources on generating foliage for NPCs!
Right now, to somewhat get around this, I do not have my NPCs as generation sources. Instead I am serializing the different point-sets generated from my graphs (one for trees, one for foliage etc), and reading from which set I care about whenever a colonist needs to interact with it and the player is not around to have generated the points from PCG. The downside to this method is that I have to have generated the points via PCG at least once in order to get them serialized first, before it works. The side effect of this approach is that the sections of the world that the player has not been around yet are not ‘alive’ and interactable by the colony simulation. Dynamically adding and removing PcgGenerationSource components could solve that side effect but would probably come at quite a performance cost due to it generating points on the graphs that are not necessary.
I will probably still end up doing my PCG point serialization process and querying that from mass entity instanced actors regardless as it saves quite a bit of memory and cpu overhead during runtime, but having this feature request could make PCG a lot more scalable for myself and others using runtime hierarchical generation out of the box.