Practicing AI

The idea of practicing guards was one of the first things I implemented when making Ranstall Keep and, although far from perfect - the guards have a tendency to ignore the player in favour of their target - it adds a touch of life to the mission. The methods for making these guards in Thief 1 and Thief 2 are slightly different, but the basics remain the same.

Thief 1/Gold - Screens taken from DromEd for T2

The actual AI used is a standard AI, all changes are made to the dummy or target on which the AI will be practicing.

First we need to find the name of the dummy/target's model. Look in the object hierarchy for the target:

Then double-click to open its properties and note the model's name.

In fact the dummy isn't really a dummy at all, but another AI assigned to a different team. Create a camera (under creature in the object hierarchy). The camera is both non-hostile and stationary, so makes a good choice. Now give it the model of either a dummy or target - go to
properties->add->shape->Model Name:

and enter the appropriate name in the box.

Next insure that the physical dimensions of the dummy match those of the graphical dimensions. Check the physics->model->dimensions

and make sure they are the same as the ones in the bottom right of DromEd.

Lastly, assign the team to which the dummy belongs. Go to properties->add->AI->AI Core->Team

And select one of the "bad x" teams from the drop down menu. Make sure the team you chose is different from the AI's team.

Now hop into game mode with ai_aware_of_player active and watch your guard take its frustrations out on your newly-made dummy.

Thief 2

The initial stages are the same as above, but if you go into game mode you will notice that the dummy is making whirring noises, and once killed by the AI, it no longer looks like a dummy, it reverts to a camera corpse. To fix this, several things need to be done.

  • Remove the whirring sound.
      Go to properties->add->AI->State->Current mode

      And set it to "Asleep"

      This prevents the camera from moving or becoming aware of the player, therefore it remains silent.

  • Prevent the camera from being killed.

      If the camera is killed, two things happen. It reverts to the camera corpse model, and the AI ceases to attack it as it is considered dead. We can prevent this by altering the slay result . Select properties->add->game->damage model->slay result

      and set the slay effect to no effect

  • Ensure the AI attacks.
      Sometimes the AI can fail to spot the dummy, depending on how it is set up, so an AIAttack link will ensure it does. Select links->add

      And enter

    • Flavor: AIAttack
    • From: AI
    • To: Dummy

    If you enter game mode now you should find that your AI is hacking away happily at your target.

  • Go to Index/ Tutorials