AI Customization - Thieves
From FleshWorks
by Shadow Sneaker
This tutorial will show you how to make a Thief AI similar to the T1/2 thieves.
Open the Actor Class Browser, select :
Pawn-->AIPawn-->T3AIPawn-->T3AIPawnHuman-->T3AIPawnHumanCombat-->Thug
Scroll down the list to 'ThugCity' then Right-click on 'ThugCity' and select 'New' and name it 'ThugThief'. Right-click on 'ThugThief' and select 'Placeable/Unplaceable' an asterisk will appear infront of the name. This enables you to place the AI in the map.
Right-click on 'Properties'in the window on the right and select 'AIPawn'. You want every property in this section so add them all. Set :
BehaviourModelClass to ThugCity
CombatModelClass to CitySection
FactionModelClass to UniqueThugFaction
MovementModelClass to ThinMovement
SensoryModelClass to HostileCitySection
Right-Click on 'Render' and add the 'Skeletal Tag' and 'Material Skin' properties. For this Thief we're going to set :
Skeletal Tag to 'maleshirtpants' and
Material Skin to 'Thug_02'
Rigid Attachment Links
Right-click on 'ThugThief' in the ActorClass Browser and select 'Show Links'. Click on 'Add Link'. In the Create Link window scroll down to 'Rigid Attachment and click on it. Then in the 'TO' field, type 'HoodAccessory' and click 'Ok'.
http://i212.photobucket.com/albums/cc4/Fumigated/TTHLinksmall.jpg
Click on the new link and select 'Edit Selected Link'. Click on Properties--> Attachment-->m_attachmentBone and select 'HP_Head' click 'OK'. Click m_parentBone and scroll down the list until you find HP_Head select it and click 'Ok'.
http://i212.photobucket.com/albums/cc4/Fumigated/TTHLink2small.jpg
Each human AI has teeth and eyes as rigid attachment links which this thief will have inherited since he is a child of 'ThugCity' but for some reason adding new object links deletes them so we will have to add them again. Add another link, select 'Rigid Attachment' and in the 'TO' field enter 'AIPawnEyeball'. Click 'Ok'. Select the new link and click 'Edit Selected Link'. In the m_attachmentBone select HP_Leye and the same in the m_parentBone. Add another eye using the same process. Set the m_attachmentBone to HP_Leye once again but set the m_parentBone to HP_Reye.
For the teeth repeat the same process using 'AIPawnTeethUpper' with the m_attachmentBone to 'HP_teeth_up_'and the m_parentBone to 'HP_teeth_up'. For the AIPawnTeethLower set the attachment Bones to 'HP_teeth_lw_' and 'HP_teeth_lw'.
Weapons
In the Actor Browser right-click on 'ThugThief' and select 'Edit Weapon Loadout'. Select LeftHip. Click 'Make Local'. Click 'Add Item to Slot' then select 'Longsword'. Click 'Done'. If you want to give him a bow instead then choose 'BackPickpocket'. Bow and Firebow are both in that list.
Save the Gamesys
With 'ThugThief' highlighted, click on the File menu at the top of the actor browser and select 'Export Current Class' then click ok. Then also in the File menu select 'Save Selected Packages'.
That's your thief finished. If you did everything correctly, when you place the AI on your map you should see this on your screen :
http://i212.photobucket.com/albums/cc4/Fumigated/TDSThief1small.jpg
Variations
You can make nine different thieves in total using the skeletal tags :
'maleshirtpants' 'MaleShirtPants_02' and 'MaleSkirt'
and using the material skins :
'Thug_02' 'Thug_03' and 'Thug_10'
For the 'MaleShirtPants_02' and 'MaleSkirt' skeletons I would change the MovementModelClass to 'MuscularMovementModel' as these both look more bulky than 'maleshirtpants'. For the thinner thieves I add the 'AnimationSpeedMultiplier' to the AI property and raise the value to 1.1 or 1.2 so that they run slightly faster and for the archers you can add the 'bPerfectAccuracyTarget' property in the AI properties so that their arrows are harder to avoid. Since they are thieves I think they should be more alert and suspicious than regular human AI so I add the 'bTensePatrol' property to the AI properties and set it to 'true'.
To make new thieves, just right-click on 'ThugThief' select 'New' and give it whatever name you want. The new thief will inherit all the properties and links from the parent thief so you don't have to go through the whole process each time. You can just change the skeletal tag, material skin, weapon and any other extra things you want to add to it.
Be sure to 'Export Current Class' and 'Save Selected Packages' in the file menu with each new thief you make or if you change anything about the existing thieves you've already made.
Back to Mission Design: AI Tutorials Page
