Jump to content
spirit6

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

Recommended Posts

Yeah that would be awesome. I just tried doing that now to see what happens...doesn't quite work.

OK I will make a mission. For 10/12 players (?), pretty simple attack a town/city, perhaps one other objective, something like that. But I will try and add as many GAIA features as possible. I will let you know when it's done.

Share this post


Link to post
Share on other sites

Cool! Yep, it's not working yet, as I need to build it first ;)

Share this post


Link to post
Share on other sites

Spirit, Thanks to you and your team for all the work done to improve MCC! My group has experimented with a combination of MCC(GAIA AI) and VCOM AI, In the big picture it seems to work well together. MCC handles largescale flanking/troop movement while VCOM tweaks unit level movement to use better cover and concealment while increasing the level of aggressive pursuit on blufor (enemy).

There seems to be a natural synergy between both mods and an official support(collaboration), I feel, would greatly enhance the GAIA system

Thanks again!

  • Like 1

Share this post


Link to post
Share on other sites

Im trying to use GAIA with AI on HCs.

AIs and Zones are generated trough a Script, made from "Silent Map Converter".

The Mission is made that if HCs is there, Spawn that Script on HC, if not there then on DediServer.

This Script wörks fine on Dedicated but not on HCs. They´re not moving.

I´m using fortify. Latest MCC Mod running.

Bug or do i something wrong?

/edit

Related to MCC Mod Thread Reply 3666

Edited by Astrell

Share this post


Link to post
Share on other sites

hey am getting an error here. ideas to fix?

_group1 = [_spawnPos, east, (configfile >> "CfgGroups" >> "West" >> "Guerilla" >> "Infantry" >> "IRG_InfSentry")] call BIS_fnc_spawnGroup;
(group this) setVariable ["GAIA_ZONE_INTEND",["area2", "MOVE"], false];

ERROR

(group this) setVariable ["GAIA_ZONE_INTEND",[">
15:22:58   Error position: <this) setVariable ["GAIA_ZONE_INTEND",[">
15:22:58   Error Undefined variable in expression: this

Share this post


Link to post
Share on other sites

The name of the marker and the zone can only be numbers. No letters or signs.

Share this post


Link to post
Share on other sites
The name of the marker and the zone can only be numbers. No letters or signs.

No. this error has to do with the way i need to call GAIA. not sure how to have this be called when spawning units in via script and trigger.

btw the "area2" marker name works fine when used in INIT of leader.

Anyone else?

_group1 = [_spawnPos, east, (configfile >> "CfgGroups" >> "West" >> "Guerilla" >> "Infantry" >> "IRG_InfSentry")] call BIS_fnc_spawnGroup;
(group this) setVariable ["GAIA_ZONE_INTEND",["area2", "MOVE"], false];

ERROR

(group this) setVariable ["GAIA_ZONE_INTEND",[">
15:22:58   Error position: <this) setVariable ["GAIA_ZONE_INTEND",[">
15:22:58   Error Undefined variable in expression: this

Edited by JAndrews1

Share this post


Link to post
Share on other sites

(group [color="#B22222"]_group1[/color]) setVariable ["GAIA_ZONE_INTEND",["area2", "MOVE"], false];

Thats what the error message says is wrong anyways.

Share this post


Link to post
Share on other sites
No. this error has to do with the way i need to call GAIA. not sure how to have this be called when spawning units in via script and trigger.

btw the "area2" marker name works fine when used in INIT of leader.

Anyone else?

_group1 = [_spawnPos, east, (configfile >> "CfgGroups" >> "West" >> "Guerilla" >> "Infantry" >> "IRG_InfSentry")] call BIS_fnc_spawnGroup;
(group this) setVariable ["GAIA_ZONE_INTEND",["area2", "MOVE"], false];

ERROR

(group this) setVariable ["GAIA_ZONE_INTEND",[">
15:22:58   Error position: <this) setVariable ["GAIA_ZONE_INTEND",[">
15:22:58   Error Undefined variable in expression: this

Zone needs to be number like stated and indeed "this" cannot be used like you do. Checkout Setvariable (in this case it expects a group) -> https://community.bistudio.com/wiki/setVariable

Share this post


Link to post
Share on other sites
hey am getting an error here. ideas to fix?

_group1 = [_spawnPos, east, (configfile >> "CfgGroups" >> "West" >> "Guerilla" >> "Infantry" >> "IRG_InfSentry")] call BIS_fnc_spawnGroup;
(group this) setVariable ["GAIA_ZONE_INTEND",["area2", "MOVE"], false];

ERROR

(group this) setVariable ["GAIA_ZONE_INTEND",[">
15:22:58   Error position: <this) setVariable ["GAIA_ZONE_INTEND",[">
15:22:58   Error Undefined variable in expression: this

If calling within a script like this, you have already defined the "group" i.e. _group1 so adding (group this), etc. will cause an error.

So, what it should look like is this:

 

[php]_group1 = [_spawnPos, east, (configfile >> "CfgGroups" >> "West" >> "Guerilla" >> "Infantry" >> "IRG_InfSentry")] call BIS_fnc_spawnGroup;
_group1 setVariable ["GAIA_ZONE_INTEND",["area2", "MOVE"], false];

That should work fine now.

As spirt and others have mentioned the marker you intend to spawn the units on needs to be a number between 1 and 100- take out the area2 marker and replace it with a number.

Share this post


Link to post
Share on other sites

Though I have, and love, MCC, I've been using the GAIA standalone script in my missions so they don't have to be dependent on having MCC. It works great, but the only problem that I have is occasionally I get an error message that won't go away once it comes up. It tells me that _x is undefined in line 106 of the fnc_sortGroupsByCA.sqf. Was gonna try to fix it myself, but after a quick glance I'm not sure what is to be defined there.

Share this post


Link to post
Share on other sites

thanks for help with

_group1 = [_spawnPos, east, (configfile >> "CfgGroups" >> "West" >> "Guerilla" >> "Infantry" >> "IRG_InfSentry")] call BIS_fnc_spawnGroup;
_group1 setVariable ["GAIA_ZONE_INTEND",["area2", "MOVE"], false];

it works..

FYI. I changed "area2" to "2" with no change in units. they still acted the same when "area2" so just an observation but I don't think it necessarily needs to be a #. I know the directions say so.. but the units act accordingly with either.

Thanks again.

Share this post


Link to post
Share on other sites
thanks for help with

_group1 = [_spawnPos, east, (configfile >> "CfgGroups" >> "West" >> "Guerilla" >> "Infantry" >> "IRG_InfSentry")] call BIS_fnc_spawnGroup;
_group1 setVariable ["GAIA_ZONE_INTEND",["area2", "MOVE"], false];

it works..

FYI. I changed "area2" to "2" with no change in units. they still acted the same when "area2" so just an observation but I don't think it necessarily needs to be a #. I know the directions say so.. but the units act accordingly with either.

Thanks again.

Well, I wrote the code and I guarantee you that it is needed :)

---------- Post added at 01:01 PM ---------- Previous post was at 01:00 PM ----------

Though I have, and love, MCC, I've been using the GAIA standalone script in my missions so they don't have to be dependent on having MCC. It works great, but the only problem that I have is occasionally I get an error message that won't go away once it comes up. It tells me that _x is undefined in line 106 of the fnc_sortGroupsByCA.sqf. Was gonna try to fix it myself, but after a quick glance I'm not sure what is to be defined there.

I think i solved that issue in the MCC version already. I will update the GAIA stand alone some time ...

Share this post


Link to post
Share on other sites

Hi Spirit,

Getting this error on the dedicated server:

_mklist = [_HQ_side,_mklist] call fnc_GAIA_AnalyzeTargets;
Error position: <_mklist] call fnc_GAIA_AnalyzeTargets;
Error Undefined variable in expression: _mklist
File mpmissions\__cur_mp.ThirskW\gaia\scripts\fnc_GAIA.sqf, line 72

I have seen this error before, but as I'm having issues with units spawning x3 times :j: just want to ensure that this error isn't the cause ? I'm calling the units (isServer), etc and usually don't have issues. I have feeling the issue is with our headless clients (we have 3...) and that each headless is spawning a group. But never the less, would like get to the bottom of this issue. Would appreciate some help please.

many thanks.

Share this post


Link to post
Share on other sites
Hi Spirit,

Getting this error on the dedicated server:

_mklist = [_HQ_side,_mklist] call fnc_GAIA_AnalyzeTargets;
Error position: <_mklist] call fnc_GAIA_AnalyzeTargets;
Error Undefined variable in expression: _mklist
File mpmissions\__cur_mp.ThirskW\gaia\scripts\fnc_GAIA.sqf, line 72

I have seen this error before, but as I'm having issues with units spawning x3 times :j: just want to ensure that this error isn't the cause ? I'm calling the units (isServer), etc and usually don't have issues. I have feeling the issue is with our headless clients (we have 3...) and that each headless is spawning a group. But never the less, would like get to the bottom of this issue. Would appreciate some help please.

many thanks.

Does the issue happen only during use of headless clients? It is kinda hard to reproduce on my end with 3 headless clients :) Does it happen also when using one headless client? Does it only happen when using the respawn option?

Share this post


Link to post
Share on other sites
Does the issue happen only during use of headless clients? It is kinda hard to reproduce on my end with 3 headless clients :) Does it happen also when using one headless client? Does it only happen when using the respawn option?

Thanks for the response Spirit. What do you mean you don't have 3 headless clients to test on ;)

OK, it does seem to be a headless issue. When not running the HC the error didn't appear. It did appear when running 1 HC or all 3. I'm not using the respawn option for these units.

Thanks for your help.

Share this post


Link to post
Share on other sites

I'm posting this here because its GAIA related although it was through the use of MCC. I've used GAIA stand alone as well but again this behavior is witnessed through MCC.

 

Here is the situation. We remained undetected by the enemy (as checked through debug and the knowsAbout command). We ambushed a roadblock and killed the enemy within about 1-2 seconds. Not 1 enemy even had time to raise their rifles or even look in our direction before they were dead. Immediately following GAIA knew our EXACT location and sent 2 or 3 groups in search of us with an S&D waypoint on our EXACT location. I checked debug again and knowsAbout was 0 (ie. the enemy had zero knowledge on our position let alone that we existed anywhere at all).

 

It would be nice to change this GAIA behavior. It is possible that the gunshots were heard but we were at mimimum 500m from any other enemy unit and some of us were using silencers. This was also in very woody and hilly terrain. In real life it would be next to impossible to have any clue where we were. Perhaps a general direction but pinpointing our exact location would certainly not be. I can live with GAIA maybe sending some troops to investigate if for instance it was simulated that this roadblock team had not checked in via radio to higher command. This would add delay in sending the GAIA units.

 

Another potential thing you can simulate is to start a timer when contact is made and randomly select some time value where the units would simulate calling in support via radio. If they are dead before this time limit comes up then there would be no call via radio.

 

Might also not give GAIA your exact location but randomized somewhere near you or based on knowsAbout on how accurate that position is known.

 

In any event something like this.

 

I believe DAC simulates something along these lines.

 

It would certainly add to the realism of GAIA and I'd really love to see it.

Share this post


Link to post
Share on other sites

Hi Delta,

 

Actualy it is already quite how you describe. That said, every now and then it can still happen. For GAIA to send out troops certain few things need to happen:

 

- The units spotting should still be alive. This "alive" setting can sometimes run a bit behind.

- GAIA waits every cycle like 30 seconds or so. So together with the above you might be on the lucky or unly side. I mean. If they targets are dead and GAIA is in its pause time then, they would not notice you.

 

Secondly. Targets are used. It is positions that is used, combined with "what they saw". To be precise:

https://community.bistudio.com/wiki/nearTargets

 

Only if argument 5 is smaller then 18 it is considered to be a valid spot. 

https://github.com/shaygman/mcc_sandbox.Altis/blob/GAIA/gaia/functions/control/fn_analyzeTargets.sqf

 

So, I think (and I tested this few times) it is already quite ok as it is. STill it is possible (with all odd against you) that they did spot you when all variables like above come together in an unlucky way. Also. If the dude was unconcisous but not dead, then the system will continue to communicate.

 

Hope this clears it up a bit?

 

The actual system to check on possbiel target threats is a lot more complicated then "knowsabout".  Tests with Knowsabout gave much less results then the code that is in now. Originaly I also checked if a line between the spotter and the target could be made to check on visiblity. However, this came at a much higher cost. I skipped that.

     {

       _Target_Pos  = _x select 0;

       _Target_PosAcc= _x select 5;

       _Target_Side = _x select 2;

       _Target    = _x select 4;

 

       if  (

          _Target_Side!= _HQ_side

           and

           ((_Target_Side getFriend _HQ_side)<0.6)

           and

           alive(leader(group _Target))

           and

           !captive(_target)

           and

           //How sure are we? For now accuracy of 18 seems to work ok

           _Target_PosAcc < 18

           and

           (_Target iskindof "AllVehicles")

           //and

           //If the lead has a clear LOS to a unit, that is valid enough (might expand later to check on all members)

           //([_unit,_Target,1500] call GAIA_fnc_hasLineOfSight)

          )

        then

        {

         _Target setVariable ["GAIA_TargetInfo", [time,_Target_Pos,_Target_posAcc], false];

 

        };

      }foreach (_unit neartargets 1500);

Share this post


Link to post
Share on other sites

Spirit,

 

So I guess it really hinges on how well nearTargets works and I suspect since its BIS and spotting its too damn accurate and unrealistic. In other words, even though I have killed those units within a second and there is no way they could possibly know where I am or know about me there probably is a small chance that within a split second that array is filled and GAIA happens to pickup on it. I've just never been able to make a surprise attack killing enemies without GAIA pretty much immediately knowing where I am.

 

As for your "alive" comment it looks like you are checking whether the "target" is alive not the spotter.

 

I am surprised you are not using item 3 in the result array to determine the importance of the target but maybe not needed for what you are doing.

 

They don't really describe what the position accuracy is but seems to me if you are using a higher precision then you are going to get positions that are much more precise. Perhaps the setting under 18 pretty much means exact position.

 

Every single time I've checked MCC and GAIA waypoints. the S&D marker is exactly on the position I was at when spotted. But again that is an Arma thing mostly out of your control. That is why I suggested randomizing it a little yourself. I mean randomizing anything anytime under your own code gives things a little bit of realism to it simulating fog of war, communication mishaps, delays in reporting up the chain etc etc. You can't rely on Arma engine to do any of that.

 

I know this might be nitpicking on what I otherwise consider GAIA to be a great piece of work.

 

Hi Delta,

 

Actualy it is already quite how you describe. That said, every now and then it can still happen. For GAIA to send out troops certain few things need to happen:

 

- The units spotting should still be alive. This "alive" setting can sometimes run a bit behind.

- GAIA waits every cycle like 30 seconds or so. So together with the above you might be on the lucky or unly side. I mean. If they targets are dead and GAIA is in its pause time then, they would not notice you.

 

Secondly. Targets are used. It is positions that is used, combined with "what they saw". To be precise:

https://community.bistudio.com/wiki/nearTargets

 

Only if argument 5 is smaller then 18 it is considered to be a valid spot. 

https://github.com/shaygman/mcc_sandbox.Altis/blob/GAIA/gaia/functions/control/fn_analyzeTargets.sqf

 

So, I think (and I tested this few times) it is already quite ok as it is. STill it is possible (with all odd against you) that they did spot you when all variables like above come together in an unlucky way. Also. If the dude was unconcisous but not dead, then the system will continue to communicate.

 

Hope this clears it up a bit?

 

The actual system to check on possbiel target threats is a lot more complicated then "knowsabout".  Tests with Knowsabout gave much less results then the code that is in now. Originaly I also checked if a line between the spotter and the target could be made to check on visiblity. However, this came at a much higher cost. I skipped that.

     {

       _Target_Pos  = _x select 0;

       _Target_PosAcc= _x select 5;

       _Target_Side = _x select 2;

       _Target    = _x select 4;

 

       if  (

          _Target_Side!= _HQ_side

           and

           ((_Target_Side getFriend _HQ_side)<0.6)

           and

           alive(leader(group _Target))

           and

           !captive(_target)

           and

           //How sure are we? For now accuracy of 18 seems to work ok

           _Target_PosAcc < 18

           and

           (_Target iskindof "AllVehicles")

           //and

           //If the lead has a clear LOS to a unit, that is valid enough (might expand later to check on all members)

           //([_unit,_Target,1500] call GAIA_fnc_hasLineOfSight)

          )

        then

        {

         _Target setVariable ["GAIA_TargetInfo", [time,_Target_Pos,_Target_posAcc], false];

 

        };

      }foreach (_unit neartargets 1500);

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi Spirit,

 

I have a question regarding zone definitions. I downloaded the template your provided and started playing with it.

You clearly state the unique integers should be used, however strings seem to be used. I tested this by altering the zone name '5'  to 'mission_5' and updating the init line for the squad leaders. It still works. In my currently missions where i use UPSMON I use strings for the zones. It would be an easy adoption of GAIA if I could remain with the current zone names.

 

Could you explain what the downside will be when not using the number defined zones ?

 

Thanks,

 

Patrick

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

×