Upcoming Marketplace Asset: Diverse AI

Hello everyone,

Issue:

I have discovered a bug that causes pre-existing object/trace channels in the Project Settings of a target project to overwrite values assigned to trace logic in Diverse AI; it appears that it is order specific. For example, if you have a Trace Channel named “Water” in your target project, then add the Trace Channel “AI” in accordance to the Prep/Setup instructions, then all traces in Diverse AI that initially used “AI” Trace Channel, will use “Water” upon migrating.

Who Is Affected:

For now, this seems to only affect users that have pre-existing custom Trace/Object Channels in their target project.

What You (the end user) Can Do:

There is no “simple” remedy for the end user that is guaranteed to not compromise the pre-existing Channels. You can attempt to rearrange the Trace/Object Channels in such a way that Diverse AI exclusive values are at the top of the stack (using the exported .ini may be an option), but do so at your own risk. Then re-migrate Diverse AI to your target project.

What I Will Do:

Following this message, I will begin working on a hotfix and roll it out soon.

I apologize for any inconvenience this may have caused. Thank you for your patience.

The hotfix (v1.21) was submitted and is pending file update by Epic.

While that is processing, you can check the changes in the Migration section (steps 6 - 9) of the documentation. An amended tutorial video is available here.

Hello,

I was wondering is it difficult to add Network replication to this AI system? I’m willing to try and do this myself but is it possible to do without having to change everything? Would it cause too much network traffic if there are too many AIs running around for several clients? Not being able to use the AI in an online multiplayer game is a deal breaker for me :frowning:

Thanks

@Zeriel00

Unfortunately I do not have much experience with replication, so I cannot provide you with a sufficient answer. Diverse AI is relatively intricate and was constructed for use in a single player setting, so there may be a considerable amount of work necessary for replication.

Diverse AI v1.21 is available for download. This version contains the aforementioned hotfix. Please read the changelog within the documentation for more details.

A new tutorial video is available for view at Diverse AI Tutorial 07: Creating a Custom Blueprint - Part IV - YouTube.

It covers one possible setup for: weapon switching, uninterruptible attacks, block/parry, and counter attacks.

Enjoy!

Hi everyone,

I just published a teaser video for the upcoming v1.30 build. You can watch it at Diverse AI: Companion System and Evasion Teaser - YouTube.

Enjoy!

I’ve purchased this, but not investigated it yet.

I was wanting to know in advance if it plays nicely with level streaming?

Cheers.

Hi @Loucsam ,

Diverse AI does work with streaming levels, but there are some considerations:

  1. If you plan to use Roaming Targets (splines included) with AI that are added to the level via drag-and-drop, then it is best to add a relatively short delay between 0.2 and 0.5 seconds in a custom Grandchild BP, between the Event BeginPlay and Parent: BeginPlay nodes. When using this in relatively small streaming levels, it allowed enough time for the Roaming Targets to load before the roaming AI executed its check for Roaming Targets. I am sure there are other workarounds, but this seems to be the most simple solution;

  2. If you do not plan to use Roaming Targets with AI that are added to the level via drag-and-drop, then there should not be anything additional required for setup. If you do discover an issue, please contact me;

  3. If you plan to use spawned AI for any purpose via the custom spawner Grandchild, then there should not be anything additional required. Just ensure the Roaming Target for the spawned AI is already loaded if it uses Roaming Targets.

I hope this answers your question. Please contact me if there are any issues.

I followed along with the documentation to add the trace channels, the object channel, and setting the runtime generation to dynamic. After migrating the project files I then set Lib_Math to the required configuration.

When opening the demo levels included with Diverse AI in the migrated project I get the following error messages. Is this expected behavior or is something wrong? This is with engine version 4.26.

Edit: After comparing things between the migrated files and the originals it appears that the nav volumes in the demo map were not having their ObjectType set to NavMesh correctly. Changing them solved the problem.

Hi @spacegear,

This is the result of differences in navigation settings between projects. Under the Demo Levels section of the documentation it is advised to only explore the demo. levels from within the Diverse AI project. If you would like to explore the demo. levels from within your target project, then you can try to copy the navigation settings from the Diverse AI Project Settings and apply them to the Project Settings of your target project.

I hope this answers your question. Please let me know if the demo. levels function well within the Diverse AI project or if you have further questions.

Hi everyone,

Work towards the v1.30 build is progressing relatively well; there is currently no estimated date for its release. Included with the aforementioned 1.30 features (companion/evasion) will be the following bug fixes/improvements:

  • Increase in Advanced Pursuit effective range based on AI’s max attack distance;
  • Toggle for using the Advanced Pursuit location selection logic and speed control without need for strafe animations;
  • Added per-instance AI target selection behaviors: Target Closest, Target Least Health, Target Most Recent (original), Target Random, and Target Player, for AI receiving damage from multiple instigators;
  • Player is now included (has been exclusively AI) in search for a new Target Actor when AI’s current Target Actor is dead;
  • Assigned “tags” to variables and hid internal use variables from list of defaults to allow the user to have confidence when changing their values;
  • AI Discrete Rotation events are now framerate independent;
  • Optimized Pawn-to-Pawn collision and added cluster control for AI in Pursuit State;
  • Fixed a bug where some AI were not being optimized correctly;
  • And more …

How to make task oriented ones to loop the tasks, now it seems those get stuck idling even if i have roam loop ticked.
Another problem is that AI class (custom child) pawns seem not to cause collisions (physical) where they should trigget events when walking into trigger boxes. same meshed did work without / when not using this AI classses.
Minor annoying problem I already figured out is that one cannot add tags to AI directly all must be added to the tags table and there is nothing to tell about this problem, took a little while to figure it out. (might be in docs, but it mainly talked about those when spawning). Was wondering why enemy AIs are attacking eachother even tho i set the tags…
Should navmeshboudaries have different tags if there are multiple ones in one level?

Hi @savitapio ,

You may find this video helpful for setting up roaming targets if you have not viewed it already.

For an AI to be treated as friendly to another AI, you will need to ensure one of its actor tags matches a name in the other AI’s array_ActorTagsToExclude. This is covered to some extent in the documentation within the section titled “Friend/Enemy Distinction.”

You can have multiple Nav Mesh Bounds Volumes sharing the same Actor Tag within your level. Most of the Nav Meshes in the demo. level are configured this way.

I hope this information helps. Please feel free to contact me further regarding anything related to Diverse AI.

Targets are registered ok and visible with the debug thing. Problem is that it seems like roaming loop is not working AI just end in endless idlestate. (Task_Oriented does had use roaming loop on)

Please provide as much information as possible for the following questions.

  1. Does this behavior occur in the demo level of the Diverse AI project?

  2. With Use Debug enabled for the offending AI, are there any messages being displayed when that AI transitions to idle?

  3. Does the offending AI move correctly to its Roaming Target?

  4. Is this occuring for multiple AI?

  5. How many Roaming Targets does each offending AI have?

  6. Does the offending AI use a montage event at the completion of a roaming iteration?

  7. If yes to 6, does a montage play when the AI reaches its Roaming Target?

  8. Are the Roaming Targets AI from Diverse AI or another object type or a mix?

  9. Were the offending AI dragged into the level or spawned?

  1. No

  2. No i think

  3. Yes at the beginning

  4. Yes, of same or derived type. Can all have common targets? There is some test if target is occupied then idle. this might be the case if there is no path back to roam from this?
    is target marked as occupied when AI takes it as its target or when reaching it? There are more AI istances than targets

  5. I set some 6 targets there

  6. yes by target type

  7. yes it does

  8. static targets, with or without static / skeletan meshes (some targets should be kickable, but I am not that far yet)

9 so far I have used only dragged AI

Thank you for the information.

For your response to 4:
You are correct that AI Roaming Targets are marked as occupied when a roaming AI is interacting with them (this does not apply to non-AI Roaming Targets) . The intent was to only have exclusively one-to-one interactions between roaming AI and their AI Roaming Targets; however, the roaming AI should still roam to a new Roaming Target when it becomes available. If using a significantly greater number of roaming AI compared to the number of their AI Roaming Targets, then this could potentially cause a “bind”; this may be the issue that you are experiencing.

I will test this further and report back with the results and potential solutions.


Ok today it seems I occasionally get this infinite loop error

Are you able to left-click “Show” and provide a screenshot of the logic that is displayed?