TrForge advent calendar

Tutorial (part 1)

by uranos1 / Translations by Codo, CuahianoSmall, Soul

deutsch / english

Peaceful Characters

You can not only use enemies that attack Lara, but other persons that are peaceful towards her. Some of them just run around, others can help her in battles or show her the way. This can be useful to enliven peaceful levels, for example advent levels or levels for children, to make a passage easier, to who the player something or just to bring forward the story.

There are two grounds: The guardians that are peaceful at first, but attack as soon as Lara gets aggressive. They can get assigned different but rather simple behaviors.

And there are the guides. The can get assigned considerably more complex behaviors for showing the way or help Lara. They cannot get attacked and killed by Lara. This assures that they do not abort their route and activate all events they are supposed to trigger. You can use them as well for creating cut scenes, to make levels with peaceful citizens more vivid or to have a bit more diversion besides the guardians.

In this tutorial it is described how you use them and how you control their behavior.


1. Guardians

The object slot of a character is determining all behaviors of the a character, how he moves, which AI can be used, how he interacts with other objects and so on.

1.1. AI Objects

The AI objects are the most important method to give enemies a specific behavior. Thus they should not be missing in any level. Furthermore they control the behavior of the peaceful characters in the level.

They are nullmesh objects that are represented in the level editor by a red and white cone that is not visible in the game. They do not need to get triggered. They just have to be placed onto the same square as the enemy/friend or the goal square where they are supposed to go. From this it follows the first limitation: If you want to influence the behavior of the enemies/friends you are not allowed to place two onto the same square.

Not all characters function with all AI objects. Some of them allow just some behaviors and ignore other AI objects.

The front of all AI objects, thus the direction in which the enemy is looking, is the flat side of the cone. The front is not in the direction of the tip, even if the nullmesh objects resembles an arrow!

  • 1.1.1. AI_GUARD

    The guardian stands still on his position and looks around. AI_GUARD simply has to be placed on the same square as the guardian and needs no more adjustments.

  • 1.1.2. AI_MODIFY

    It works only together with AI_GUARD. It has to be placed on the same square. It cases the guardian to stand still and stops him from turning his head.

  • 1.1.3. AI_AMBUSH

    It makes the enemy run from his starting point to a certain point, where he also can activate an heavy trigger. You have to place a AI_AMBUSH onto the square with the enemy and a second one onto the square where he is supposed to run to. You can place a heavy trigger onto the goal square. It gets activated as soon as the enemy gets there. It is important that the heavy trigger is on the same square as the AI_AMBUSH, because heavy triggers that are just somewhere on the way will not get activated.

    If you want to control multiple enemies/friends with AI_AMBUSH and simply place multiple AI_AMBUSHs it ends in chaos. How should they know which is their AI_AMBUSH and which are designated for the others? But this problem can be solved easily. You simply have to number the AI objects. If two AI_ABUSH belong together, one is placed together with the enemy, the other on the goal square, they get the same number in the OCB. For example, if you have three TROOPS that are supposed to run somewhere, you place under one of them an AI_AMBUSH with 1 in the OCB and another one with 1 in the OCB on the goal square. For the other troops you use the start and goal AI_AMBUSHs with 2 in the OCB, respectively. And for the third troop the same with 3 in the OCB. Now everybody knows where he is supposed to run. It is not important which number you choose, because numbers do not have any other function for the AI objects. Thus you can use 12, 35 and 42 instead of 1, 2, 3. It is only important that AI objects that belong together have the same number.

  • 1.1.4. AI_PATROL1 und AI_PATROL2

    They let guardians patrol between two points. One AI_PATROL1 has to be placed on the square with the guardian, the second one where he is supposed to go first to start his patrol. AI_PATROL2 has to be placed at the second turning point. If the guardian has arrived at the second AI_PATROL, he starts to patrol between it and the AI_PATROL2. He can also activate triggers that are placed on the same square as the AI objects (not in between!).

    It is important that all three objects get placed and the guardian can reach them. Otherwise he will run around pointlessly. If you want more than one guardian or enemies to patrol, you have to number the AI objects, similar to AI_AMBUSH. All three AI_Patrol objects that belong together get the same number.

    You can make them take another return path between two turning points. For this purpose you have to make the rooms where the AI_PATROLs are placed to flipmaps (with the same number) and place boxes on different positions so that the path is blocked in one case. The flipmap gets activated somewhere before. The heavy triggers for flipon are placed on the square with the AI_Patrols in the normal room, and for flipoff in the fliproom. The enemy himself switches between the paths and can even go in an circle instead of just simply running back and forth.

  • 1.1.5. AI_FOLLOW

    This is probably the most interesting AI object. It is absolutely necessary to control the guides who show Lara the way. A number of AI_FOLLOWs define the exact route and control further behaviors.

    But AI_FOLLOW can be also used with guardians. However it is not possible to cause such complex behavior, but it can be used similar to AI_AMBUSH. You place one of them on the square with the guardian and another one where he is supposed to go. If you used more than one guardians or enemies you can number the AI objects again. (If you use ENEMY_JEEP, GUIDE or VON_CROY in the level, you should use for enemies and friends very high numbers for the AI_FOLLOWS of the enemies and friends so that there are no numbers used twice and the AI will not get confused.)

    The difference to AI_AMBUSH is that the guardians/enemies for which they work, perform special animations at the goal square.

1.2. Peaceful characters
  • 1.2.1. TROOPS

    This is normally a human character with a fire arm. If he gets used without AI objects he runs around in the area in arbitrary paths. If he is supposed to stay at a position you should use AI_GUARD. Together with AI_MODIFY you can stop him from turning his head.

    You can make him run to a certain position and activate a heavy trigger there by AI_AMBUSH. For example you can make him open a door. If it is possible you should use at the goal square a switch dummy so it looks like he activates it. You can also place the door so that it opens outward and let TROOPS run directly in front of it. By that it looks like he has pushed it open.

    AI_PATROL works with TROOPS, too. If you place them close together it looks like he is guards something. You can place the turning points further away from each other und place some barriers on the direct path, or use grey boxes. Now it looks like he is sauntering.

    By AI_FOLLOW you can make him run to a goal square. The difference to the behavior with AI_AMBUSH is that he waits for Lara on the way. This it suitable if he is supposed to show Lara something.

    He attacks enemies and can help Lara with the fights, or he can protect her in levels without weapons. A good effect would be to encircle Lara with just triggered enemies and let him rush to help by AI_AMBUSH.

    You can use him as the only protection in levels without weapons. If an enemy is chasing after Lara she hast o run to the next TROOPs and stay with him until he killed the enemy.

    It is helpful to know that he has nearly the same animations as the SAS. Thus it is no problem to copy an enemy in the SAS slot to this slot to make him peaceful. However, the scorpion attack will probably not work (see there).

  • 1.2.2. SCORPION

    It attacks other enemies and can help Lara in the fight. But he is not really peaceful and attacks Lara when no other enemies are left. You can use a trick to make him at least half peaceful. He always attacks other enemies first. You only have to place an enemy somewhere nearby but out of sight and his attacking range. As long as this enemy is active the scorpion will run around hectically but will not attack Lara.

    He also attacks TROOPS, and vice versa. Thus you cannot use both as support but only as rivals.

    You can make him attack a TROOPS that Lara has to rescue. You have to place a TROOPS on the square in front of the SCORPION and adjusts 1 in the OCB of both. The SCORPION grabs the TROOPS and kills him after a while as long as Lara does not attack in the meantime. This effect is suitable for cut scenes.

    AI objects do not work with the SCORPION.

  • 1.2.3. BABOON_NORMAL

    This is a monkey. He goes a few steps and stops again to scratch himself or do other stuff. He totally ignores Lara. He will only attack if Lara shoots at him. His special feature is that he can get triggered after death again and again.

    You can hold him in one position with AI_GUARD. AI_MODIFY has no effect. AI_PATROL and AI_AMBUSH work normally.

    A special behavior can be reached by AI_FOLLOW: He can pull a lever that for example opens a door. If you use the original animation the AI_FOLLOW should be placed on infront of a nine click platform, that flat end towards the wall. The lever should be placed at the top. It is a normal animating that you can get from the TR4 level “The Mastaba.” It must be lifted six clicks. It gets triggered by a heavy that is placed on the same square as AI_FOLLOW and the lever. If you have experience in animation, you can let him do something different.

    BABOON_NORMAL can activate more heavy triggers after he has pulled the lever (or has done something else, if you changed the animation). They have to be placed to the north of the AI_FOLLOW (north in the game is the right side in the plan view of the level editor). It is important that they are to the north of the AI_FOLLOW, even if the lever is on another square, for example to the south of the AI_FOLLOW, because the monkey came from the north! Anyhow he activates the heavy trigger north of the AI_FOLLOW.

    You also have to keep in mind that the BABOON is quite erratic. Even if you use AI_FOLLOW he will not go the direct path, but will stop, scratch himself or saunter before he reaches the goal. Thus you should limit the area of movement for the monkey so he will not fritter away too much time. Otherwise the player has to wait several minutes before the monkey triggers the action and the game play goes on. You should avoid this, unless you have a damn good reason.

  • 1.2.4. SAS

    Normally this is an enemy that fights Lara. However he has a special feature: If he gets assigned a special behavior he initially stays peaceful and will not attack her at once he sees her. He will only attack if Lara shows aggression. However she does not need to attack him directly. It is sufficient if she shoots another enemy or shoots in the air. He can be used as a peaceful character in levels without weapons.

    The behavior with the AI objects is the same as with TROOPS.


    Those * are enemies and cannot be made peaceful. But if you control them by AI_FOLLOW they go through their attack animation over and over at the goal square. They do not attack normally anymore and are useless as enemies. But this behavior might be useful for cutscenes. If you place something else at the goal square, it looks like they attack it. KNIGHTS_TEMPLAR can even destroy barricades in the SHATTER9 slot, if they are placed on the square behind the AI_FOLLOW.

  • 1.2.6. JEAN_YVES

    He cannot move around the level but stays in the same room. But he can do different animations in arbitrary order. Thus he looks more alive as if you only use Animatings. He is very suitable to enliven city levels.

    He has got 16 animations that are divided in 4 groups of 4 animations. If he gets activated he executes the first four animations (0 to 3). In the original object he sits at the desk. If you want to change to the next group Lara has to activate a trigger with flipeffect 30 with the timer 1. This flip effect works globally, so you can trigger it in another level. It was done this way in the original game, too. If JEAN_EVES is in level 1 and Lara activates the flipeffect 30 in level 2, it affects JEAN_YVES as soon as she gets back to level 1.

    After flipeffect 30 with timer 1 gets activated JEAN_YVES executes the second group (animations 4 to 7) in arbitrary order. Now he stands at the book shelf. With timer 2 he changes to the third animation group (8 to 11) and with higher numbers to the forth (12 to 15). If flipeffect 30 was activated you cannot go back. A flipeffect with a lower timer number has no effect.

    hus it is not good to use him in the same level als GUIDE, VON_CROY or ENEMY_JEEP, because they are also controlled by flipeffect 30 and higher timer values are used very soon. JEAN_YVES would only perfom the last animation group.

And in the second part you'll see the explanation for the guides.

Information: This publication is intellectual property of the author and is therefore protected. The author reserves itself all rights. It is permit to store, to copy or to print the text for private purpose. A duplication, spreading, holding ready for download or on-line accessible making (assumption into another web page) of the work, the layout of the web page, other contents (e.g. pictures) totally or partly, in changed or unchanged form is permissible only after previous explicit agreement of the author.
Tomb Raider and Lara Croft are registered registered trade marks of Eidos Interactive Limited.