Hi all,
I’ve been making (and still am) some changes to the pooling in TC (3.3.5 branch, but I don’t know - it could be extended perhaps).
Essentially one of the things I’ve noticed is that in certain zones quest mobs were a real problem. Not enough spawns of them. Now, aside from more spawns being made in the DB. I also noticed a feature that is on retail (and I’ve seen it a few times, specifically when in starting zones on a new realm for example).
That is, if many people are killing a certain class of creature - then that creature will start to respawn faster. Such that people can still finish their quests. Now, I don’t actually think they respawned faster, I think what they actually have is a minimum quota on their pooling system. Such that when the number of creatures in that class drop below that limit it will start to clean them up and respawn in an expedited fashion.
The solution I’ve made is a bit crude. It doesn’t really have a delay in place. But, probably it will work almost the same in practice.
I think this could also be extended to resource nodes. Such that (only normal nodes) would have a minimum limit. What I need to add here though is something a little different. But when I move onto that area of things I’ll describe why and what I mean.
For now, here’s the paste from the readme about the progress so far, and a link to the repo should anyone want to try. I’d like some feedback from experienced core developers on the changes (I program for a living, but not with c++ so input would be appreciated), and maybe some people that can actually try and see what they think.
Disclaimer, by default the database really has zero use of pooling for creatures. So, you will need to make some useful data before you will notice any difference at all!
https://github.com/pete318/TrinityCore/tree/pooling_wip
The aim of this branch is to update the pooling system as follows:
- Create a possibility to specify a minimum number of spawned objects
- Ensure the maximum value are actually spawned
- Ensure that the minumum number are maintained in the world
Completion: 40%
- Databases and Pool functionality updated to handle minimum value in template: 100%
- Added pool information to npc info (creature pool): 100%
- Spawn insurance of 100% max spawn if possible: 80% (this seems to work, but I have seen npc info report not all spawned. So need to check)
Creature specific:
- When creatures in pool drop below minimum, then process is as follows: (100% but needs testing)
- looks for a dead despawned creature in the pool, if found - instant respawn
- if none despawned, looks for a looted corpse. If found, despawns corpse
- if no looted corpses found, then finds an unlooted corpse and despawns it
- Creature class upon creature despawn, will check if an expedited respawn is required. If so, will respawn right away.
Resource Node (maybe all game objects in pools) specific:
- When nodes in pool drop below minimum, then process to be determined to maintain minimum nodes in pool (0%)
To Do:
- Currently more is exposed in PoolManager class than needs to be (this is due to extra detail being shows in npc info for debug purposes during development)
- I’m not too happy about making the ExplicitlyChanced and EqualChanced lists directly available from PoolGroup. But, it was the fastest way to achieve this.
It doesn’t seem to pose a terrible problem.