RvS Mapping Tutorials
Odds & Ends
Navigation

Customizing RvS Terrorist Equipment and Behavior
-by Beckett, last updated March 27, 2003

This tutorial will teach you how to customize terrorist equipment and orchestrate terrorist behavior.

This tutorial assumes that you are already familiar with UnrealED and know how to load a simple custom map into Raven Shield. If this is not the case, take a look at my earlier tutorial,
Building Your First Raven Shield Map, and then come back to this one. I'm not going to spend much time in this tutorial dealing with textures, lighting, or insertion points. I'll assume you know what you're doing and can improvise these as you go along.

To start out, let's build a simple 4 room map. Set your grid to 128 units. Select any wall texture you like, and then carve out a cube sized Height=256,Width=768,Breadth=768. Now drag the builder brush and carve out a second room exactly 128 units to the North and 128 units to the West of the first room. Repeat this procedure two more times, so that you have four rooms, spaced out in a diagonal line. Now let's connect the rooms, but we don't want a direct line of sight between the rooms so we'll create right angle hallways. Carve out a hallway to the North of the very first room, sized Height=256,Width=640,Breadth=256. Carve identical hallways North of the 2nd and 3rd rooms. Now carve out a hallway to the East of the 2nd room, sized Height=256,Width=256,Breadth=384 (this should connect the 1st room to the 2nd). Carve identical hallways East of the 3rd and 4th rooms. Now, all four rooms are connected, and we'll be able to design one encounter (to use a role-playing term) at a time. Your map should look like this:


Add an insertion zone in the first room (
click here if you need instructions for this). Open the Actor Classes browser, expand "Info" and select "ZoneInfo". Right click anywhere in the first room, and choose "Add ZoneInfo here". Reposition the icon if necessary, making sure it isn't embedded in any floors or walls. Open the properties for the ZoneInfo icon, expand "ZoneLight", and set AmbientBrightness to "128" and AmbientHue to "64". (This is a lazy way to light a level, but lazy is good for testing and tutorials.)

Path Nodes

We need to add path nodes so that terrorists and operatives can find their way around the map. The insertion point itself serves as one path node. The rule for path nodes is very simple: each path node must be visible from at least one other path node, and they should not be over 1000 units apart. Right click in the hallway corner between the 1st and 2nd rooms and choose "Add Path Node Here". An apple icon will appear. The icon should sit about 40 units above the floor (if you add it from the 3d perspective view, it will place itself at the proper height). Add a path node in each hallway corner and in the direct center of each room (except room 1, which has the insertion zone). Now, rebuild your map, using the "Rebuild Paths" button, or the "Build All" button (assuming you have "Build Paths" turned on in the build settings). If any of your path nodes is isolated from the others, an error message will appear. If this happens, select the Actor name, click the "Go to Actor" button, and then reposition that path node, making sure that it is within visible range of another path node.

You do not need to go overboard with placing path nodes. The AI is pretty smart, it just needs help finding it's way around corners and across long distances. But keep in mind that the AI does think for itself, so it will wander off the beaten path sometimes. If you've got a broom closet that you think will never be used... it's a still good idea to drop a path node outside it just in case a terrorist flees into the closet in a moment of cowardice, so he can later find his way back out. Without path nodes, if you leave your team a room or two behind and then call them to rejoin you, they will object because they don't know how to get to you. And without path nodes, you will need to place waypoints every few feet in the planning stage; whereas if you have good path nodes on your map, you can place a waypoint on the far side of the map and the engine will auto calculate the best path to get there.

Placing Tangos and Hostages

Let's place some terrorists. Open the actor class browser, expand "R6DeploymentZone", and select "R6DZonePoint". Right click somewhere in the 2nd room and choose "Add R6DZonePoint Here". Place two R6DZonePoints anywhere in the 3rd room, and place two in the 4th room as well. Open the properties for the very last R6DZonePoint you added (in the 4th room). We're going to make this guy a hostage. Expand "R6DZoneHostage". Set m_iMaxHostage to "1", and m_iMinHostage to "1". Expand "R6DZoneTerrorist". Set m_iMaxTerrorist to "0", and m_iMinTErrorist to "0". We haven't setup the proper hostage rescue mission objectives (I'll cover this in a future tutorial), so we won't be able to extract/rescue this guy, but the terrorists will be able to interact with him (in other words menace and kill him).

Let's throw in one random terrorist for tango hunt and lone wolf missions. (Note that by default, random tangos will appear in "mission" game types, however fixed tangos will not appear in tango hunts. Random tangos can be removed from fixed missions using the R6Availability settings.) Open the actor class browser, expand "R6DeploymentZone", and select "R6DZoneRandomPoints". Right click near the center of the hostage room and choose "Add R6DZoneRandomPoints Here". Two new icons will appear. The larger icon represents the random tango who will spawn, and the smaller icon represent a RandomPointNode, one possible position where he could spawn. Open the properties for the R6DZoneRandomPoints (the larger icon) and expand "R6DZone". Select m_aNode and then click the "New" button. Reselect m_aNode and click the "New" button two more times to create four random nodes in all. Drag each random node to a separate corner of the room. Now, each tango hunt game, a single terrorist will spawn in one random corner of this room.

Several things to note about random terrorist spawns: First, you should only ever have one 'R6DZoneRandomPoints' actor in your entire map. All RandomPointNodes should be created from this single RandomPoint. Second, make sure that you create each RandomPointNode using the steps described above. If you try to duplicate a 'R6DZoneRandomPointNode' using [Ctrl]+w, it won't work properly. Finally, please note that if the player launching your custom mission selects a number of terrorists higher than the total number of RandomPointNodes available on your map, the game will attempt to fill every Node.


Kits/Templates

At this point, rebuild and run through the map once in-game if you'd like (choose "Practice Mission"). You'll see that all five terrorists are identical twins, they all carry silenced MP5s, and they all have Spanish accents. Let's adjust those accents first. From the "View" menu in the editor, select "Level Properties". Expand "R6Sound" and set m_eTerroristVoices to "TN_German1". Close the level properties window.

Now open the properties for the lone tango in the 2nd room. Expand "R6ZoneTerrorist". At the bottom, expand "m_Template" and then expand "[0]". These settings show us that by default, there is a 100% chance to load a template named "Normal". Leave the properties window for a moment, open the "View" menu in the editor, and select "Show Template Browser". Scroll down in the left column of Terrorist Templates, and double click on "Normal". As we can see, the default terrorist has a 100% chance to wear the R6TParamilitary01 skin, and a 100% chance to carry a silencedSubMP5SD5. We could modify this template if we wanted to, but I think it would be better if we created our own template instead. Change the Template name from "Normal" to "Abnormal". Set Assault to "100". Under Pawn chance, select "100%, R6TParamilitary01" and click the "Remove" button. Now, in the Pawn chance dropdown box, select "R6TSkinhead1" and change "100" to "50". Click the "Add" button. Next, select "R6TTropical1" from the dropdown box, keep the percentage set to "50", and click the "Add" button again. In the "Weapon" section, select "100%, SilencedSubMP5SD5" and click the "Remove" button. Now, in the Weapon dropdown box, select "NormalPistolP228", keep the percentage set to "100", and Click the "Add" button. Finally, set Flashlight to "80". Click the "Create" button at the bottom. This will create a new terrorist template option named "Abnormal" without modifying the "Normal" kit. Back in the properties window, with "m_Template | [0]" still expanded, change m_szName to "Abnormal". Now our terrorist friend will have a 50% chance of being a skinhead and 50% chance of being a Miami Vice hood. He will usually carry a flashlight, and will only be armed with a pistol. He'll also be a pretty good shot. Note that templates are stored in the "\RavenShield\template\" folder (".tpt" for tango kits and ".tph" for hostage kits). If you create custom templates, it is very important that you distribute the new ".tpt" and ".tph" files along with your map.

Let's change the kits of the other three terrorists as well. Open the properties for each one, expand "R6ZoneTerrorist", "m_Template", and "[0]", and then assign an existing template from the Template Browser ("Alpines-3", "Garage-5", etc., but make sure the template actually exists). Click here if you'd like to see a labeled picture of every possible terrorist kit (thanks to Trancer for putting this together). On the last guy, change m_iChance to "30" and keep m_szName set to "Normal". Then, expand "[1]" and set m_iChance to "70" and m_szName t0 "Abnormal". This tango will now have a 30% chance to appear as the familiar clone with the MP5SD and a 70% chance to be born with our custom pistol and flashlight kit. Of course, this also means that there is a 35% chance he'll appear as a skinhead, and a 35% chance he'll appear as a beach bum. So between the percentages you specify in the editor, and those you specify in the template file, you can easily add a large random element to exactly who the Rainbow team will be fighting each time.

You should know how to assign kits/templates now. Go ahead and assign a new template to the hostage in the 4th room (make sure it's a hostage kit and not a tango kit, for obvious reasons).


Patrols

Let's add another tango to the 2nd room and give this one a patrol route. Open the actor class browser, expand "R6DeploymentZone", and select "R6DZonePath". Right click in any corner of the 2nd room and choose "Add R6DZonePath Here". Three icons will appear, one large gingerbread man symbolizing the tango, and two smaller icons identifying nodes in his patrol path. The position of the larger icon really doesn't matter. Let's reposition the smaller icons so that each is in a different corner of the room. Select the larger icon, open the R6DZonePath properties, and expand "R6DZone". Select m_aNode and then click the "New" button. A third node in this path, will be created on the map. Drag this node to a third corner of the room and open it's properties. Expand "R6DZone". Set m_AnimChance to "100" and set m_AnimToPlay to "RelaxWaitLookFar". This terrorist will pace slowly between the three nodes. When he reaches the third, he will peer into the distance and then retrace his steps, continuing to patrol until the enemy is spotted.

Reactions

Move to the 3rd room, open up the properties for one of the tangos, and expand "R6DZoneTerrorist". Change m_eDefCon to "DEFCON_0" (highest alert status--kudos to the developer who named this setting) and and m_eEngageReaction to "EREACT_AimedFire". Switch to the other tango in that room and set m_eDefCon to "DEFCON_5" and and m_eEngageReaction to "EREACT_RunAway". Rebuild and save the map. Load the map in-game and immediately type "PlayerInvisible" into the console (open and close the console with the "~" key). Now, hold your fire, and walk around the map to observe the behavior of the terrorists. Notice that the tango in DefCon_5 mode is pretty laid back: yawning, picking gum off his shoe, and looking pretty bored with his assignment. Meanwhile, the tango in DefCon_0 mode is aiming at the doorway with his eye to the gun sights. You can switch out of invisible mode if you'd like, but at this point the bad guys' reactions upon spotting you will be pretty standard.


Action Spots

Return to the editor. Open the actor class browser and select "R6ActionSpot". Right click near the center of the 2nd room and choose "Add R6ActionSpot Here". A question mark icon will appear. (For some inexplicable reason, I couldn't add an action spot on this map by right clicking; it worked on other maps, so I ended up copying the object from another map... I only mention it in case anyone encounters the same problem.) Open the properties for the R6ActionSpot and expand "R6ActionSpot". Set m_blInvestigate to "True", m_eCover to "STAN_Crouching", and m_eFire to "STAN_Crouching". Rotate the R6ActionSpot icon so that the red arrow points toward the 1st room. Note, that unless you tell the terrorists to stay put, they will make a beeline for your position (or where they think they heard you) regardless of any action spots. So open the properties for our original "Abnormal" fellow in the 1st room, expand "R6DZoneTerrorist" and set m_bAllowLeave to "False". Now, if that tango hears trouble from the 1st room, he'll take position on that action spot. However, once he spots you, his survival instinct will take over and his behavior may change...

Reinforcements

That 2nd room will be pretty easy to clear, so let's allow the tangos to call in reinforcements. Select both tangos in the 3rd room, open their properties, and expand "R6DZoneTerrorist" again. Set m_iGroupID to "1". This of course, assigns these two to an AI group named "1". Now, select the patrolling terrorist in the first room. We're going to make him a scout. Open his properties, and expand "R6DZoneTerrorist". Change m_eEngageReaction to "EREACT_Surrender". Select m_iGroupIDsToCall and then click the "Add" button. Set [0] to "1", telling the scout to call in reinforcements at the first sign of trouble.

Guarding Hostages

Finally, move to the 4th room and open up properties for the fixed (not the random) terrorist in that room. Set m_bAllowLeave to "False", m_eDefCon to "DEFCON_0", and m_eEngageReaction to "EREACT_AimedFire". Change m_HostageShootChance to "100". Select m_HostagZoneToCheck and click the "Add" button. Next, click the "Pick" button. Left click the eyedropper on the hostage icon (the pink gingerbread man) to identify the hostage that we want this terrorist to shoot.

Conclusion

Play the map again, and don't go invisible this time. As soon as the scout spots you, he will surrender, but not before first calling for his associates, who will immediately come running to kill you. (Mr. DefCon_5 will humorously come to his friend's aid but then run away as soon as he sees you.) Notice that the EngageReactions and GroupIDsToCall do not kick in until the terrorist has spotted you with his own eyes.

Once you've cleared the outer defenses, move into position outside the hostage room. Be careful, because as soon as the terrorist inside sees you he will focus all of his efforts on immediately killing the poor hostage. (Luckily, if he spawns using the "abnormal" template we created, he will only have a pistol and it may take him a few shots.)

I hope you found this tutorial helpful. If there's anything I've gotten wrong, please let me know and I'll correct the information. Email me if you have any questions or mapping issues you'd like to discuss.
-Beckett

Display a printable version of this article


2005, RvSMaps.com, all rights reserved
Send questions, critiques, etc. to http://www.juncmodule.net/rvs/rvsmaps/content/contact.htm