Jump to content
Rimsiakas

[Release] AI vs AI battle scenario template (SP/MP/COOP)

Recommended Posts

https://github.com/RimantasGalvonas/Arma-3-AI-vs-AI-Battle-Scenario-Template

 

This is a customizeable mission template (or a collection of scripts, not sure how to call this) to be used in the Eden editor. It allows you to quickly create a variety of battle scenarios involving many AI units just by placing and configuring a few objects in the editor.

 

  • Randomize the position of units across a certain area and make the units roam the mission area looking for enemies.
  • Groups inform each other of known enemy locations and respond if they are able.
  • Waypoints for infantry units are placed in a way that prefers moving between and attacking from areas with cover.

  • Works on all levels of command: you can play as a simple soldier, a squad leader or a battlefield commander.
  • Colored grid on the map showing the approximate location of enemies.
  • Dynamic mission location - select the mission location on start.
  • Works from small scale engagements to battles spanning across the entire map.
  • Suitable both for singleplayer and multiplayer scenarios.

 

A couple example missions and instructions on how to use this template for your own scenarios: https://github.com/RimantasGalvonas/Arma-3-AI-vs-AI-Battle-Scenario-Template#readme

 

Check it out 🙂

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

This now supports multiplayer!

 

Note when updating mission made previously on an earlier version (<0.5.0) to support multiplayer:
If you were using a High Command - Commander module, place a High Command - Subordinate module and sync it to the High Command - Commander module. You don't need to sync any units to the subordinate module but the module itself is required for High Command to work in multiplayer.

Share this post


Link to post
Share on other sites

I hope I'm not posting too frequently, but I've added an important new feature:

You can now enable a dialog on mission start that enables you to select the mission location.

Share this post


Link to post
Share on other sites

Have you got any premade missions that we can look at ?  BTW thanks for this.

Share this post


Link to post
Share on other sites

This looks really fun. Will give it a try and provide feedback.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, kremator said:

Have you got any premade missions that we can look at ?  BTW thanks for this.

 

Yup, there are links to a few of them in the github link, towards the bottom of the page.

  • Like 1

Share this post


Link to post
Share on other sites

Another update:

The infantry combat movement got an overhaul - squads will now try to find a position with good visibility and cover to attack the enemies from rather than advance onto their location directly.

Also some bug fixes and optimizations.

 

Also reworked the main example mission to make it easier to understand what's going on in the editor.

Share this post


Link to post
Share on other sites

Tried the Altis whole island mission ... REALLY good mate.  It is a shame that I'm too (busy/lazy/distracted .. insert correct word) to make my own missions !

 

Quick question ... would AI improvers, like Lambs DangerFSM or VCOM_AI screw with your AI movement stuff ?

Share this post


Link to post
Share on other sites
5 hours ago, kremator said:

Tried the Altis whole island mission ... REALLY good mate.  It is a shame that I'm too (busy/lazy/distracted .. insert correct word) to make my own missions !

 

Quick question ... would AI improvers, like Lambs DangerFSM or VCOM_AI screw with your AI movement stuff ?

 

Thanks, really glad you liked it! Hehe, the whole island mission hadn't been updated in a while, so I just did that. I suggest you give the main example mission a try as well, it shows off the capabilities of this better. The whole island mission is pretty much just a scalability benchmark 🙂

 

As for the AI improvers, I don't think they would screw with my scripts. I'm not sure how they work exactly, but I think they modify the lower-level things deeper in the engine while my scripts just try to find good positions for waypoints.

Share this post


Link to post
Share on other sites

I feel a lot of missions have this surreal quality where the player group is the only one present on the map when facing tanks and airplanes and all sorts of large scale set pieces. It feels artificial. There are several good client-side ambient battle sounds and effects scripts, but this is obviously the most immersive solution. When doing the test mission "PartakeInAnAssaultAgainstAnEnemySector.Altis" (airport assault), you really get this sense of dread as you are running through the surrounding town towards the fighting sounds from the airfield. Good stuff! 

Just wondering what the CPU cost of this will be for the server. There's another scenario which provides AI vs AI battles, Evannex. But it brings my dedicated i9 server to its knees (25 server FPS). Note: it does provide a LOT of action. So I will test on how this works and try to remember to report findings. 

Question: is it possible to just remove or rename "CreateGrid.sqf" ? Or will that have other unintended effects?

Share this post


Link to post
Share on other sites

Glad to hear!

 

Did you run that mission on a dedicated server? That exact mission actually works better when launched from the game itself as in that case it allows you to select a custom mission location when starting it - the airport is just the default.

 

I've definitely tried keeping CPU performance in mind when making these scripts but I confess - I'm no expert at this and haven't done any in-depth profiling. All I can say is that the FPS I get in-game with this don't seem to be much lower than if I were to place the same amount of units on the map and had them run around without any scripts. So I think the biggest performance issues comes just from the game engine doing all the things it has to do with a large amount of units by default.

As for my scripts being hard on the CPU, the colored grid can get really hard on the CPU if configured incorrectly. On a large mission area with a small grid square size it would create a lot of triggers. But you can change the size of the grid squares to optimize it.

I suspect the function for scanning the terrain for advantageous attack positions could also get the CPU busy. But it runs on the scheduler, one instance of it at a time. So I imagine that should not affect FPS all that much either unless my understanding of the scheduler is wrong.

 

As for the "CreateGrid.sqf" - yeah, deleting or renaming will throw an error. But you can disable it in the mission editor instead:

Find a Game Logic entity named patrolCenter. Find this line in its init box:

this setVariable ["intelGridSize", 200];

Change the 200 to 0. This will disable the grid.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Like the script so far very interesting. Could I ask if you would consider making an A3 Wounding System - AIS Revive by [TcB]-Psycho-. I have used Grimes revive in the past but prefer AIS Revive. Keep up the good work.

Cheers Rolly

Share this post


Link to post
Share on other sites

Hi, rolly-uk!

 

I've chosen the Grimes Revive because the AIS Revive doesn't work with team switching and I wanted my template to be compatible with that feature. Unfortunately, I can't have them both in the project.

 

I made a version of the main example mission with AIS Revive for you: https://github.com/RimantasGalvonas/Arma-3-AI-vs-AI-Battle-Scenario-Template/releases/download/0.7.1/AIS-PartakeInAnAssaultAgainstEnemySector.Altis.zip

 

I will keep using the Grimes Revive though, so if you are going to want to update the scripts in your mission with some newer version later on, you will have to do these steps to replace Grimes Revive with AIS:

  1. Download the AIS Revive System from https://www.armaholic.com/page.php?id=24088
  2. Extract the AIS folder from the zip into the mission folder.
  3. Delete the G_Revive folder and G_Revive_init.sqf, G_Revive_loadScreen.paa files.
  4. Open up initServer.sqf file, delete this line:
    [] execVM "G_Revive_init.sqf";

     

  5. Open up Description.ext.
    Replace this line:
    #include "G_Revive\G_Desc_Include.hpp"
    With:
    #include "AIS\Effects\BarDlg.hpp"

     

  6. In the same file, add a line with #include "AIS\cfgFunctions.hpp" inside CfgFunctions. It should be like this:
    class CfgFunctions
    {
        #include "CHVD\CfgFunctions.hpp"
        #include "AIS\cfgFunctions.hpp"
        class Rimsiakas
        {
    ...
  • Like 1

Share this post


Link to post
Share on other sites

Another update.

 

I've fixed mounted groups using a wrong waypoint for their targets which would often result in tank battles within melee distance.

 

This marks this project as complete - v1.0.0. I'll still continue supporting it, fixing bugs, perhaps adding more features every now and then, but at this point I've done pretty much all that I was planning to do.

 

Hope you guys enjoy this and find it useful. Any feedback is much appreciated.

 

  • Like 3

Share this post


Link to post
Share on other sites

Mission area selection is now more configurable - you will find an Advanced Config button which will allow you to resize and rotate the mission area.

Combat movement waypoint placement was also improved and will now place waypoints near cover much more precisely.

 

I've also recently published my first project using this template: https://steamcommunity.com/sharedfiles/filedetails/?id=2427506774

  • Like 3

Share this post


Link to post
Share on other sites

Enjoyed playing your Force Through Game mode scenario and it saves a restarts fine as an ongoing fight. Going to try the other examples. Thanks for this.

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×