Jump to content
spirit6

Mission Template Stand Alone GAIA - Make missions FAST by using MCC GAIA engine

Recommended Posts

You should check the latest AI discussion in dev branch, there's improvements in detection feature (both in term of scripting -  targetKnowledge command [/size]- and the Arma engine itself). It should be included in 1.50

The only thing I remember reading there is about fixing AI being able to see through certain trees. But since the forum updates I may have forgotten to refollow that thread so will go take a look.

Share this post


Link to post
Share on other sites

So is this still being updated? would make a good replacement for what were currently using to spawn ai if it works with headless client  

Share this post


Link to post
Share on other sites

GAIA is perfectly working on a HC.

 

but is it with this mission framework? without mcc that is.

Share this post


Link to post
Share on other sites

its late and i just stumbled upon this. i have a quick question, idk if its been answered, but does GAIA script take control of units spawned from a seperate spawn script or ALIVE? like is it compatible with other spawn scripts or no?

 

EDIT: a better question is does this work on a host game? do i need to change isServer to hasInterface? im super green to scripting, but i am learning. i just notice im not getting any editor placed units to cache. im putting the code in their init boxes

Share this post


Link to post
Share on other sites

but is it with this mission framework? without mcc that is.

 

Yes, without MCC. In our community we are not using MCC but some mission makers are using the script version of GAIA, on dedi or HC, without any issue (except an excessive killing of players... :) )

Share this post


Link to post
Share on other sites

Can anyone confirm that caching works on dedicated and performance on it is good?

Share this post


Link to post
Share on other sites

Can anyone confirm that caching works on dedicated and performance on it is good?

 

Yes to both. :)

Share this post


Link to post
Share on other sites

Is there a way to get the respawn function of gaia to operate on a delay? My issue is that sometimes dead squads respawn and rush to re0-support a little too fast, and i'd like to pace it out more without moving the spawn areas.

 

I tried inserting a sleep command in a few different spots in the code in the init.sqf as referenced by the answer to the same question earlier in the thread, but at best worked in a glitched way (stopped after 1st respawn) or not at all.

Share this post


Link to post
Share on other sites

Is there a way to get the respawn function of gaia to operate on a delay? My issue is that sometimes dead squads respawn and rush to re0-support a little too fast, and i'd like to pace it out more without moving the spawn areas.

 

I tried inserting a sleep command in a few different spots in the code in the init.sqf as referenced by the answer to the same question earlier in the thread, but at best worked in a glitched way (stopped after 1st respawn) or not at all.

 

I've used my respawning script Jebus successfully with GAIA:

 

https://forums.bistudio.com/topic/174661-jebus-just-editor-based-unit-spawning/

 

http://www.armaholic.com/page.php?id=27160

 

For example:

 

nul = [this, "DELAY=", [60,120], "INIT=", "(group _proxythis) setVariable ['GAIA_ZONE_INTEND',['1', 'NOFOLLOW']];"] execVM "Jebus.sqf" ;

 

Would respawn between 60 and 120 seconds and assign them to zone 1.....

Share this post


Link to post
Share on other sites

I've used my respawning script Jebus successfully with GAIA:

 

https://forums.bistudio.com/topic/174661-jebus-just-editor-based-unit-spawning/

 

http://www.armaholic.com/page.php?id=27160

 

For example:

 

nul = [this, "DELAY=", [60,120], "INIT=", "(group _proxythis) setVariable ['GAIA_ZONE_INTEND',['1', 'NOFOLLOW']];"] execVM "Jebus.sqf" ;

 

Would respawn between 60 and 120 seconds and assign them to zone 1.....

 

Thanks so much for sharing. I'll be testing this and if it works it'll of made my mission about 10x better! Much appreciated.

 

Edit: Amazing. Seems to work. This coupled with GAIA will keep my map constantly populated without a retarded never-ending stream of enemies that never let up.

 

I'll try to test it myself but any confirmation on if it works with the cacheing as well? My concern is basically this:

 

If in the init line I put:

 

nul = [this, "DELAY=", [60,120], "INIT=", "(group _proxythis) setVariable ['GAIA_ZONE_INTEND',['1', 'NOFOLLOW']];"] execVM "Jebus.sqf" ;

(group this) setVariable ["mcc_gaia_cache",true, true];

 

After testing it myself the cacheing doesn't work at all when entered in this format.

 

Editx2: So I figured out how to combine them and get them to work but had a few new problems arise,

 

nul = [this, "INIT=", "(group _proxythis) setVariable ['mcc_gaia_cache',true, true]; (group _proxythis) setVariable ['GAIA_ZONE_INTEND',['5', 'NOFOLLOW']];"] execVM "Jebus.sqf";

 

After testing the cacheing in the editor I noticed 2 odd things. 1) It doesn't kick in instantly, and when my cache distance was set to 5m they disappeared only when I went about 50m away.  Afterwords they would only reappear closer 5m, and disappear at 5m away again. When running back and forth multiple times to test the cacheing the group started to "clone" itself, basically after a bit I'd run back and there'd be now 2 identical groups when I had initially placed one.

 

This got even worse when the GAIA patrol started to kick in. The patrol would leave its spawn point, get cache'd and then a copy of them would get "respawned" at their spawn, so moving back and forth between the two each squad would start to steadily duplicate itself further.

 

If I could guess, I'd wager that GAIA's cacheing system triggers JEBUS to think the squad is dead and respawn it, then when GAIA uncaches the unit again you get duplication. How to fix that is way beyond my skills.

 

So now I'm stumped. I got the cacheing code to work buts generated a problematic bug.

 

It seems at this point it'd be simpler to insert a respawn delay in GAIA's own respawn system, though being able to use JEBUS would allow for setting individual respawn times per group which would be very nice. (having armor/helicopters respawn less frequently then technicals/infantry for example)

 

Edit x3:

 

So, my attempt at just adding a delay into the GAIA respawn itself (in the init.sqf bottom section)

 

 waitUntil { sleep 10; if (count(_gaia_respawn)==2) then {    [_gaia_respawn,(_x getVariable  ["MCC_GAIA_RESPAWN",-1]),(_x getVariable  ["MCC_GAIA_CACHE",false]),(_x getVariable  ["GAIA_zone_intend",[]])] call fn_uncache_original_group; false}};  

 

This works, however it seems to cause an issue with the other scripts at hand (units keep "respawning/spawning" even though the 1st one hasn't been killed)

 

Final edit:

 

It seems putting a sleep command in the start fn_uncache_orginal_Group.sqf works and doesnt seem to cause any delays/pauses with respawning

Share this post


Link to post
Share on other sites

When you set units to FORTIFY, will they stay in the building when there is a fight outside or will they run out? Trying to get them to stay in so I can force some building clearing exercises.

Share this post


Link to post
Share on other sites

Hey Guys. Beginning of november I will update GAIA again (so in sync with MCC) and put some fun stuff extra in it. Also the delay part. Just to let ya know ;)

  • Like 1

Share this post


Link to post
Share on other sites

Hey Guys. Beginning of november I will update GAIA again (so in sync with MCC) and put some fun stuff extra in it. Also the delay part. Just to let ya know ;)

Fun stuff sounds great!

 

Sounds great Spririt i can't wait.

Share this post


Link to post
Share on other sites

Hey Guys. Beginning of november I will update GAIA again (so in sync with MCC) and put some fun stuff extra in it. Also the delay part. Just to let ya know ;)

 

Glad to hear!  I just recently stumbled back into Arma 3 and this post so Im excited to get started using GAIA.

 

Few questions:

 

Do fully cached groups get simulated travel still?  (if not, would you recommend stage 2 cache being tripled/quadrupled in comparison to stage 1 to enable traveling AI?)

 

How far do AI travel out of their zone if in "MOVE" compared to FORTIFY etc.?

 

Do GAIA AI go after players in buildings?

 

Thanks again!

Share this post


Link to post
Share on other sites

I hope that the fortify behaviour will be fixed if transfered to hc. Right now they stop after a few seconds or don't even start moving.

Share this post


Link to post
Share on other sites

I hope that the fortify behaviour will be fixed if transfered to hc. Right now they stop after a few seconds or don't even start moving.

 

 

What script are you using to transfer to HC ?

Share this post


Link to post
Share on other sites

Im also getting this error which essentially breaks GAIA AI.

 

_sortedArray set [count _sortedArray,_selectedItem];
_sortedValues set [count>
 0:33:31   Error position: <_selectedItem];
_sortedValues set [count>
 0:33:31   Error Undefined variable in expression: _selecteditem
 0:33:31 File mpmissions\__CUR_MP.Altis\gaia\scripts\fnc_SortGroupsByCA.sqf, line 131
 0:33:31 Error in expression <
 
 
Im running GAIA AI on 1 headless client.  For most part it works, but happens ever so often in mission.
 
 
EDIT So I seemed to have fix this with a bandaid counter to exit loop:
 
in fnc_SortGroupsByCA.sqf
 
I added:
 
_maxLoops = 0;
if (count _values > 0) then {
while {count _values > 0 || _maxLoops >= 300} do {
_maxLoops = _maxLoops + 1;

Share this post


Link to post
Share on other sites

daimyo21, can you describe what issue you add with GAIA running on HC ?

In our case, some groups just stopped getting waypoint. They didn't move at all.

Did you had the same problem ?

 

Thx !

Share this post


Link to post
Share on other sites

Hey all! Things dont go quite as planned and my freetime is still close to zero. So I am postponing my promise for november with for now possible some light in the horizon at the beginning of next year :(

Share this post


Link to post
Share on other sites

daimyo21, can you describe what issue you add with GAIA running on HC ?

In our case, some groups just stopped getting waypoint. They didn't move at all.

Did you had the same problem ?

 

Thx !

 

 

Yes they stop moving eventually.  Seems like it usually only happens when I wipe them completely (set respawns to -1), delete them, then spawn new ones.

Share this post


Link to post
Share on other sites

Hey all! Things dont go quite as planned and my freetime is still close to zero. So I am postponing my promise for november with for now possible some light in the horizon at the beginning of next year :(

 

Later is better than never. :) 
 

 

Yes they stop moving eventually.  Seems like it usually only happens when I wipe them completely (set respawns to -1), delete them, then spawn new ones.

 

Thx for the answer.

One quick question: I don't fully understand what your code is doing. Basically, if the 'while' loop is executed 300 times, the function will never exit because _maxLoops >= 300 will always be true. Is that intended ? Did I got it right ?

Share this post


Link to post
Share on other sites

 

Later is better than never. :)
 

 

 

Thx for the answer.

One quick question: I don't fully understand what your code is doing. Basically, if the 'while' loop is executed 300 times, the function will never exit because _maxLoops >= 300 will always be true. Is that intended ? Did I got it right ?

 

 

 

It would get stuck in that while loop and AI would stop working.. so its just a fail safe. You can probably change it to 100 and be safe.

Share this post


Link to post
Share on other sites
MCC_GAIA_ZONESTATUS_WEST = []; for "_i" from 0 to 90 do  { MCC_GAIA_ZONESTATUS_WEST set [_i,"0"];};  

This is in the GAIA_INIT under //Side Specifics  

 

Can I put zone numbers in here to allow the AI to know which zone this is controlled by in the beginning?  

 

so like

MCC_GAIA_ZONESTATUS_WEST	=	[1,2,3,4]; for "_i" from 0 to 90 do  { MCC_GAIA_ZONESTATUS_WEST set [_i,"0"];};  

would be zones 1 - 4 are initially occupied by Blufor, so Opfor AI will approach these zones differently? 

 

Thanks!

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

×