[Video] Enemy NPCs & AI

GUIDE TITLE: Enemy NPCs & AI - Series
ESTIMATED COMPLETION TIME: 10-30 Minutes per video
CORE VERSION: 1.0.150-prod-s

SUGGESTED PREREQUISITES: All other basic tutorials. The more you know about Core the more you will learn with this series.

TUTORIAL SUMMARY:
Learn about the NPC AI Kit from Community Content. This is a multi-video series that covers all the fundamental knowledge necessary to build games with enemy NPCs.

EXPECT TO LEARN:

  • How to add the NPC Kit to a game
  • Setup combat and customize weapons to work correctly with NPCs
  • Enemies, but also allied NPCs
  • Create custom NPCs that are unique to your game
  • Design levels using NPC spawn camps
  • Drop loot when NPCs are defeated and setup custom loot for your game with the Loot Drop Factory
  • Edit Navigational Mesh for NPCs to function indoors.

VIDEO:

PART 2:

PART 3:

PART 4:

10 Likes

Definitely looking forward to this video and any future videos on the topic of NPC & AI. I can't wait to dig into it as soon as I have a little bit of extra time. Definitely hoping to see more tutorials being posted on the forum. :slight_smile:

1 Like

Just added Part 2 above.
Cheers!

3 Likes

Part 3 has been added above!
More to come.

2 Likes

Ah thats you... Wonderfull - I followed all 3 tutorials... just awesome.

1 Like

Part 4 added above! See ya later

1 Like

This is "the standard" for creating in Core. Thank you Sir! :fire: :fire: :fire:

Release Notes - v0.11.2

Highlights

  • Added headshots.
  • Improved animation controller.
  • Breaking changes to Combat Wrapper.
  • NavMesh Zones, a new component that allows level designs to be hybrid, with Nav Mesh in some areas and terrain in others.
  • Reduced network objects by a third.

General Improvements

  • NPC templates have been restructured, reducing the amount of networked objects per NPC from 6 to 4.
  • Added support for headshot damage to dragons, skeletons and raptor.
  • The NPCAIServer script now has an optional "EngageEffect" custom property. Assign a template to be spawned when the NPC finds a target and engages it.
  • NPCs now abandon a chase after a certain distance.
  • NPCs now have an optional "PatrolSpeed" custom property, resulting in more complex behavior when they are not engaged in combat. If not defined, the default patrol speed is 1/3 the movement speed.
  • NPCs now have a SetTarget() function that can be used for a variety of custom interactions.
  • NPCs now switch target if they are damaged by an enemy that is much closer than their current target.
  • Added NavMesh Zones to help NPCs distinguish between outdoor and indoor pathing logic in games with hybrid environments.
  • NPCs can now look at and engage projectiles (used with Zombie Bait, in Survival Kit).
  • New NPCKitKillFeedAdapter and SetObjectName scripts allow NPC names to appear in the kill feed when they kill a player. To use this, add the Adapter to the hierarchy and a copy of SetObjectName to each NPC template's server context.
  • Added new enemy RPG Skeleton - Unarmed.
  • Added engage sound effect to dragons.
  • Added optional property Attack Min Angle that can be used to constrain NPCs from attacking while the target is behind them.
  • Added a new health bar with minimalistic design, as an alternate version to the larger one. Now used by the skeletons.
  • Added HomingTarget custom property so each NPC can specify where on their body homing shots will hit.

Combat Wrapper

  • Breaking change: The ApplyDamage() function has been refactored. It now takes a single table parameter. This allows much more flexibility and power in implementing auxilary systems that react to combat events. E.g. damage types, defensive moves, quest progress, etc.
  • Added GetVelocity()
  • Added GetMaxHitPoints()
  • Optional parameters for FindInSphere() are now implemented to match those of Player API.

Animation Controller

  • Added new animation controller AnimControllerZombie, a versatile humanoid controller.
  • The NPCAIClient script no longer has custom properties for each of the states. If your NPCs have different visual pieces that should turn on/off according to state, set those up with an additional animation controller script.
  • Skeleton Marksman arrow now hides/shows its crossbow by using the new AnimControllerHideAttackProp script.
  • Skeletons now use the AnimControllerZombie.
  • Added new animation controller StateBasedAnimController for use with NPCs that don't have an animated mesh. E.g. Minions in the MOBA example.

Bugs

  • Fixed a bug where NPC colliders could pitch up or down when searching or returning to their spawn points.
  • Dragon NPCs have been adjusted so the vertical position of their animated mesh during edit mode coincides with how it will behave at runtime.
  • Decreased the size of Easy RPG Dragon's collider.
  • Changed the shape of RPG Raptor's collider.
  • Fixed an error when NPCs collide with an object that is in the process of being destroyed.
  • Health bars no longer cast shadows.
  • Fixed a bug where NPCs could be dealt damage and drop multiple loot after they were already dead, if damaged with AOE.
  • Fixed usability isses when swapping the artwork on an NPC, such as jitter from not assigning some custom properties correctly.

Combat Dependencies - v1.1.1

  • Combat Wrap API - v0.11.2
  • Includes the new NPCKitKillFeedAdapter - v1.0

Leaping Staff - v2.2

  • Compatible with Combat Wrapper v0.11.2.
  • Now deals 50 headshot damage.
  • Replaced a deprecated call to .isVisible with .visibility

The Carlos Blade - v2.4.0

  • Compatible with Combat Wrapper v0.11.2.
  • Now supports different damage values for players and NPCs.
  • Now supports headshot damage.
3 Likes