User:Pgunn/How monster grouping works

(This is written based on observation of Dofus 1.x, and might not be valid in 2.x. It is speculative in nature, and there may be stronger ways to parse the observations)

When an adventurer enters an area, there are often groups of monsters (mobs) there, waiting to attack or be attacked by the adventurer. Not everything about how this works is obvious - thinking like a programmer helps reveal how this mechanic works.

Maps without adventurers
Without adventurers, the game does not place monster mobs. If an area has not been visited by adventurers since the last time all mobs were reset (happens with new servers, some upgrades), they would be devoid of monsters. When a player enters such a map, the game spends some time building an appropriate group and placing it on the map. If the players are moving quickly, they might pass through the map before the monsters are actually placed (this is useful in areas where the monsters are naturally aggressive). The number of stars is not technically how long the mob has been around - it's how long it has been since that slot on the map has been defeated (this difference is only exposed because of spawn-on-request - a little-visited area might suddenly need to spawn a mob, and the player might wait around for that, but the mob might come into existence with a few stars).

Group slots
A given map has a certain number of slots for groups. In Dofus 1.x, for most maps there are three slots (four in 2.x). Monster groups can be created that don't belong to a slot (GMs can spawn mobs, players might use a kwak egg), but usually when these are defeated, they disappear from the map. The slots occupy positions on the map, the actual group in the slot does not. When the slot moves, the group in the slot is shown to. When a mob is defeated, it is removed from the map (but the slot remains in that position, and may move around just as if it were not empty); a new mob will eventually be placed into the slot (the time it takes for this to happen depends on the particular map - some areas have an almost instant respawn (or might even respawn during a fight with another mob in that slot), others might respawn very slowly, although the vast majority of maps in Dofus have the same respawn.

Slots do not replace their mobs on their own - apart from rare events (like a dofus update), when a mob is placed in a slot, it will remain there until it is defeated. Players hunting a rare monster in an enclosed space should, once they have covered the entire area and not seen any, begin to clear the mobs to free the slots needed for their desired monster to be spawned.