Search the Community
Showing results for tags 'gaia'.
Found 1 result
-
As part of the Mission Template Stand Alone GAIA - Make missions FAST by using MCC GAIA engine tread and this post: https://forums.bistudio.com/forums/topic/172933-mission-template-stand-alone-gaia-make-missions-fast-by-using-mcc-gaia-engine/?do=findComment&comment=3242519 Edit: I lost the original mission and when I went to re-create it I deciced the description needed an update. This is the result: I said I would post the current interface I use for running the GAIA system and adding groups to GAIA. I'm releasing it as a quick simple mission you can open in Eden to have a look at. https://1drv.ms/u/s!AnX2_vGoXf5F9gzTinvXW7GUQB2o Unpack the zip file to the where your Eden missions are stored. Usually one of: C:\Users\win-username\Documents\Arma 3 - Other Profiles\arma-profile-name\missions C:\Users\win-username\Documents\Arma 3 - Other Profiles\arma-profile-name\mpmissions Then open it in the Eden editor. The mission does not need any mods but note it does not like running with MCC. The mission only has OPFOR units and a single civilian (and helicopter) you can use to observe the behaviour of the GAIA controlled units. Note in particular the placed static HMG and static AT that the squad nearby will occupy as they are give the STRI_GAIA_FORTIFY command. Adding to a Current/New Mission Start by creating a mission in the editor and saving it. Now copy the gaia, Mission and Stri folders from the template mission's root directory (gaia_stri_temp.Stratis). Then you need to add the following to the description.ext file (if you don't have one then you can copy the file from the example mission and skip the next bit). Then add the following line to the file inside the CfgFunctions class declaration: // Mission scripts. #include "Mission\miss_functions.hpp" // Library scripts. #include "Stri\stri_functions.hpp" If you don't have a CfgFunctions in your file you will need to add: class CfgFunctions { // Mission scripts. #include "Mission\miss_functions.hpp" // Library scripts. #include "Stri\stri_functions.hpp" }; Then you need to create an init.sqf or edit your current one: Add the following line near the start of the file. #include "Mission\Gaia\gaia_gaia.hpp" Now we want to initialise the GAIA system but we only want this to run on the server (or dedicated server) so add the following: if ( isServer ) then { // Initialise GAIA system. [] call miss_fnc_gaia_init; }; // if ( isServer ). Finally any units you want to be controlled by GAIA will need to be added using the miss_fnc_gaia_addGroupToGaia function. These can be groups created in the editor or spawned using your own code. Again you probably only want this code to run the code on the server server so use something like this: // Only run code on server. if ( isServer ) then { // Create groups command array. _gaiaGroups = [ [ ALPHA_1_1, "0", STRI_GAIA_FORTIFY, STRI_GAIA_DISABLE_CACHING ], // Squad defending Agia Marina, North side by radio tower. [ ALPHA_1_2, "1", STRI_GAIA_DEFEND, STRI_GAIA_DISABLE_CACHING ], // Recon squad will patrol town, starting in the military range in the // South East of Agia Marina. [ ALPHA_1_3, "1", STRI_GAIA_DEFEND, STRI_GAIA_DISABLE_CACHING ], // Recon squad will patrol town, starting by the breakwater on the // North West side of Agia Marina. [ ALPHA_1_4, "2", STRI_GAIA_PATROL, STRI_GAIA_DISABLE_CACHING ] // IFV squad patroling the areal around Agai Marina. ]; // Add placed untis to GAIA system. { _group = _x; // Add the group to the GAIA system. _group call miss_fnc_gaia_addGroupToGaia; } forEach _gaiaGroups; }; // if ( isServer ). Note: In the above example we are adding groups created in the editor. To set the group variable name you have to set the properties of the group by right clicking the Alpha 1-1 tag above the list of units in the group and selecting Attributes... and setting the Variable Name field. #include "Mission\Gaia\gaia_gaia.hpp" #define STRI_GAIA_ENABLE_CACHING true #define STRI_GAIA_DISABLE_CACHING false // Initialise the GAIA system. [] call miss_fnc_gaia_init; // Add the AI to GAIA. { [_x, "0", STRI_GAIA_FORTIFY, true ] call miss_fnc_gaia_addGroupToGaia; } forEach [ ENEMY_1 ]; // Report that the systemChat "Game init.sqf complete"; The interface is just 3 functions: miss_fnc_gaia_init - This does the GAIA initialisation, a background task to run GAIA. Call this before trying to add groups to GAIA. e.g: // Initialise GAIA system. [] call miss_fnc_gaia_init; miss_fnc_gaia_addGroupToGaia - This does what is says on the tin. It adds a group to GAIA, allowing a full set of controls. i.e. You can set the marker, the command and weather caching of the group is to be used. It has up to 4 parameter that are passed to it: The group you want to add to GAIA. The marker that specifies the area where the command will be applied. The command. For this you should use either STRI_GAIA_FORTIFY (GAIA's "FORTIFY"), STRI_GAIA_DEFEND (GAIA's "NOFOLLOW")or STRI_GAIA_PATROL (GAIA's "MOVE"). Whether caching is enabled. This parameter is optional and can be set to STRI_GAIA_ENABLE_CACHING, STRI_GAIA_DISABLE_CACHING. If the parameter is not passed then STRI_GAIA_ENABLE_CACHING is assumed. e.g. Typically: [ ALPHA_1_2, "1", STRI_GAIA_DEFEND, STRI_GAIA_DISABLE_CACHING ] call miss_fnc_gaia_addGroupToGaia; [ _patrolGroup "2", STRI_GAIA_PATROL, STRI_GAIA_DISABLE_CACHING ] call miss_fnc_gaia_addGroupToGaia; Both the following will result in GAIA caching being disabled: [ ALPHA_1_1, "0", STRI_GAIA_FORTIFY, STRI_GAIA_ENABLE_CACHING ] call miss_fnc_gaia_addGroupToGaia; [ _fortifyGroup, "0", STRI_GAIA_FORTIFY ] call miss_fnc_gaia_addGroupToGaia; miss_fnc_gaia_nextMarker - This is meant to be used as part of a automatic placement system and will generate a new marker name for the next GAIA marker zone. e.g. _nextGaiaMrk = [] call miss_fnc_gaia_nextMarker; This makes it easier to create markers in a script and give them a name. Good luck! S