This project began when it appeared to me (Paul Stevens) that DSB behaved quite differently than CSBwin when I was fighting Worms in the opening of Chaso Strikes Back. When playing with CSBwin, the worms always paused after approaching the party and before attacking. This allowed a reincarnated Toadrot to defeat the worms by using the infamous 'Dungeon Master Two-Step'; wait for the Worm to approach, kick it, and step aside. When using the DSB engine, this was not effective and poor old Toadrot was quite helpless. Oftentimes a Worm would approach the party and attack in what seemed like a single action. I created a small test dungeon with a single 3x3 circular hallway. I placed a single worm at one corner and entered at the diagonal corner. I waited for the Worm to approach and attack. Then I moved to an adjacent corner and repeated the entire sequence until Toadrot was dead. About 29 iteraction. This game is included at http://dianneandpaul.net/CSBwin/documentation/MonsterAI/SingleWormInCircle/ The MonsterAI folder also includes this 'Discussion.txt' and other documents I have created to support my findings. The game is complete with a 'Playfile.log' so that you can watch the entire game. It also includes a (Debug version) of the CSBwin engine that I used. Here is a summary of the timing of the 29 encounters as taken from the 'trace001.txt' file that is included with the game. Move Attack delay ------------------- 0ca 0d7 0d 112 122 10 160 16f 0f 1a9 1bb 12 ------------------ 1f8 20b 13 248 253 0b <----Minimum 294 2a4 10 2dc 2f0 14 ------------------- 32c 33b 0f 378 389 11 3c9 3d9 10 418 428 10 ------------------- 467 47c 15 <----Maximum 4b9 4c7 0e 503 515 12 551 55d 0c ------------------- 599 5a7 0e 5e8 5f7 0f 636 643 0d 683 693 10 ------------------- 6d1 6e5 14 723 734 11 777 785 0e 7c9 7d7 0e ------------------- 814 81f 0b <----Minimum 85a 86d 13 8b2 8c0 0e 901 910 0f ------------------- 94d 95e 11 I was most interested in the minimum time between move and attack and concentrated on the sequence starting at time 248. The 'trace001.txt' file that is included in the game file contains some added comments that help me understand what is going on during that encounter. My understanding (subject to change!) is that the monster AI employs two types of timers that run concurrently for each group of monsters. There is a 'Fidget' timer which I called an 'A' timer and a 'Action' timer which I called a 'B' timer. The timers run more-or-less independently but when the monster's mode changes dramatically, both timers are cleared and restarted. The A timer is always associated with the monster group as a whole. The B timer is a single group timer when the monster is wandering far from the party. It changes into individual timers (one for each monster in the group) when the party is within attacking distance. When the monster is far from the party both timers run independently. The A timer causes the monster to 'fidget'; turn randomly. The B timer causes the monster to 'smell out' the party and move toward or away from the party, as appropriate. Whe the A timer discovers that the moster has just come into attacking distance of the party, it deletes all A and B timers and generates a new A timer and a new B timer for each individual member of the monster group. The delay that it assigns to the B timers is the delay that I see between monster movement and monster attacks. It changes the 'fear factor' (misnamed ???) to 6 to note that the monster is in attacking position.(?) But no attack can take place until one of the individual B timers expires. Now....what is the delay applied to the individual B timers when the A timer first creates them? More study is in order. But, as you can see in the table above, it seems to always be at least 0x0b in the case of a single worm.