Top Down Stealth Toolkit Tutorial: How to Migrate the Patrol Bots to a new Third Person/First Person project

[The following information is based on the v1.4 of the Top Down Stealth Toolkit & hence may not remain entirely relevant in later versions. For more information about the toolkit, check out the official support thread in the Unreal Engine forums: https://forums.unrealengine.com/showthread.php?97156-Top-Down-Stealth-Toolkit]


This tutorial goes over the steps involved in migrating the patrol bot AI from the toolkit onto a new Third Person/First Person template.

Since some of the AI classes contain references to the default toolkit game mode, player character, HUD class, etc we need to first remove those references before migration in order to avoid having those linked classes migrated to the new project unnecessarily. They can be replaced with your own custom classes in the new project after the migration.

Apart from that, the vision arcs used by the AI in the toolkit becomes completely useless when you're using the AI in a third person or first person stealth game. As a result, I'll be deleting the functionality associated with it as well before migrating the AI blueprints.

Keeping both these factors in mind, the screenshots posted below goes through the different AI blueprints to depict the changes that need to be made in order to aid in the migration process.

BB_PatrolAI:



BTT_CallEndGameLogic: Event Graph



BPC_AutomatedLaserTracker: Function 'Processing Lock On Request'



BPC_AutomatedLaserTracker: Function 'UpdateLaserTracker'


BP_PatrolAI_Parent: EventGraph



BPC_DistressSignalBroadcaster: Function 'BroadcastDistressSignal'



BPC_DistressSignalBroadcaster: Function 'CancelDistressResponse'



BTS_VisionCheck: Event Graph




Now that all the necessary changes are made, the only thing left is to right click on the 'PatrolAI' folder & select Migrate Asset into the Content folder of your new custom project. Unreal Engine will automatically transfer other associated files such as the animations, materials & textures, etc. Since we have made sure that references to the Toolkit Game Mode & Player Character are removed, they will not get transferred into your new project, thus leaving you with the option of using your own custom classes for the same.

Once the content is migrated into the new project, just head over to the Patrol AI Parent class & then remove the variable 'MID_VisionArc' & delete all instances of it within the class. Without the Vision Arc, we no longer need the dynamic material instance to update it's color at runtime. Apart from that just make sure that you've added a Nav Mesh Bounds volume so that the bots can move around. Now just drop the Melee/Ranged Patrol Bot into the level & you should be good to go.

If you have any other queries regarding the migration process, feel free to let me know in the comments & I'll get back to you on that.