10-30-2003, 10:16 PM
This can be messy stuff and I doing a little guessing here, but it does fit with the targeting sequences that I have used (and exploited) in the past (see second link above).
Typically the a game like this will track all the monsters (or other objects) in a linked list. When it needs to build something like a targeting list based on range it will run the the master list and build a set of pointers to the targets that are in range. At this point the target pointer list is roughly the order that the game generated for the master list in the first place, not necessarily by the current x/y coordinates.
Now some of the game population code needs to be considered. When there are monsters like the Fallen Shaman that will appear with a pack of followers, the 'boss' is generated first and then the followers. This will lead to the situation where the 'boss' who may be farther away is actually earlier in the master list and therfore will end up being towards the begining of the target pointer list also.
some of the other aspects of this should be reasoned out along similar lines. But there may be some quirks to this in cases where there might be a static map that places all the monsters ahead of time (Bloody Foot Hills) or one that has a mixture of the two set ups (Durance3). In these cases the monster order is probably the order of the there placement in the map file and then the randomly placed monsters.
As to the sequence, it seem to just loop through the target pointer list and if it get to the end it will just start at teh begining again.
Also as monsters enter and leave (or die) the area they are removed from the list or placed at the end of the list (Thunderstorm targeting info from long ago).
Typically the a game like this will track all the monsters (or other objects) in a linked list. When it needs to build something like a targeting list based on range it will run the the master list and build a set of pointers to the targets that are in range. At this point the target pointer list is roughly the order that the game generated for the master list in the first place, not necessarily by the current x/y coordinates.
Now some of the game population code needs to be considered. When there are monsters like the Fallen Shaman that will appear with a pack of followers, the 'boss' is generated first and then the followers. This will lead to the situation where the 'boss' who may be farther away is actually earlier in the master list and therfore will end up being towards the begining of the target pointer list also.
some of the other aspects of this should be reasoned out along similar lines. But there may be some quirks to this in cases where there might be a static map that places all the monsters ahead of time (Bloody Foot Hills) or one that has a mixture of the two set ups (Durance3). In these cases the monster order is probably the order of the there placement in the map file and then the randomly placed monsters.
As to the sequence, it seem to just loop through the target pointer list and if it get to the end it will just start at teh begining again.
Also as monsters enter and leave (or die) the area they are removed from the list or placed at the end of the list (Thunderstorm targeting info from long ago).