set Priority Caps
Sets the priority threshold caps for how many NPCs can render at once in either of the priority groups.
It is important to note that if the priority caps are modified at "runtime" (as in, once NPCs are already being tracked), any existing NPCs which are being tracked will not be cleared out by calling this function. It will only prevent new additions from taking place beyond the new limits, but one would have to wait until the counts naturally decrement down in order to hit the desired limits.
The intended use-case here is to deprioritize dynamic NPCs such as pets which could fill up the entire high resolution with just pets, preventing more important NPCs, such as shopkeepers from rendering to the player. By restricting low priority to say 150 NPCs, and normal priority to 100, as long as we correctly flag the pet NPCs as low priority, we ensure that no more than 150 pets can ever render at once, leaving those 100 remaining slots for any NPCs that are deemed more important.
Due to the structure of the NPC info protocol, it is not viable to do an implementation where the high resolution is consistently capped out (e.g. allow up to 250 pets, but if more important NPCs come into range, drop some pets and render the higher resolution NPCs instead). This would be computationally heavy to check as the protocol first goes over any existing high resolution NPCs, which means we lack any context over how many higher resolution NPCs in need of rendering. Even if we allow the one tick delay to occur here, the implementation would be quite tricky and is not worth the headache it causes.
Parameters
the world id to set the caps for.
the maximum number of NPCs that can render at once with the low priority. If the low priority cap has been reached, no more NPCs with the low priority will be able to be added to high resolution.
the maximum number of normal priority NPCs that can render at once. Note that if the normal priority cap is reached, the low priority group will be utilized instead. In such cases, it is possible to end up with more normal priority NPCs than what is indicated by the soft cap.