Jump to content
Sign in to follow this  
sickboy

6thSense.eu AI-Manager (Spawn, Wayp Gen, AI Enh)

Recommended Posts

BTW Sickboy, further to my previous (concerning manual & generated waypoints), is it possible to slip in some altitude-dependant algorithm? I mentioned before that I'd like to prevent coastal patrols in some circumstances, and I expect that sometimes I'd like to prevent ground troops climbing mountains too.

It would be nice to encourage shilkas to prefer a "band" of waypoints to make it more sensible for them to act as aircraft deterrents. Well, you know, that sort of thing, be nice to be able to encourage different sorts of behaviors.

For sure, v0.2 is all about Waypoint Generation etc. Heights and other parameters are planned smile_o.gif

I basicly try to get to near-DAC (OFP) features and try to go beyond where needed and possible.

Outstanding smile_o.gif

I can see that you like DAC as much as I do smile_o.gif

Share this post


Link to post
Share on other sites
Outstanding smile_o.gif

I can see that you like DAC as much as I do smile_o.gif

I like DAC so much that I did alot of the ground work for Silola to get it into ArmA smile_o.gif Still looking very much forward to his Release aswell.  thumbs-up.gif

Btw, some ppl reported issues with some missions, altough im not sure yet if they were speaking about older versions, still; It's important that you use the missions/AI-M inside the multiplayer editor and not the singleplayer editor. To get to the multiplayer editor, start your game and go to the Multiplayer screen and setup/host your own server, from there pick the island and create a new mission or edit yours desired. Your missions should reside in your arma profile folder "\MPMissions"

Share this post


Link to post
Share on other sites

I too love the DAC and at one point spent considerable time dissecting Silola's code to see how everything worked... Fascinating stuff!

Sickboy,

Haven't tried you system out yet (intend to dive in over the w/e) but based on everything I've read, sounds like you've got a real winner here!  smile_o.gif

Here's a few initial requests:

First off, if you are able to add in the bases/stations idea (which sounds very cool), might it be a good idea to keep the original method of reduction as an option.  May still be useful for various things.

Appears someone already mentioned implementing the ability too add pre-existing groups to the system via a command on the fly (as opposed to system generated units).  What would really steal the show would be the ability to break the groups back out on command.

So really talking about two new commands here.  For the moment, let’s call them addGroup and removeGroup.  (Just pulled these names off the top of my head.)

As an example, say you've got several AI zones, each with some number of generated enemy groups, all running the various AI enhancement scripts.  Suppose based on some dynamic event in the mission, you would like for one or more of these groups to leave their zone on a temporary hiatus and go perform some specific activity (requiring full control over them).  In this case you’d call removeGroup, which would remove them the system.  Then you could send them away to perform the said task, and afterwards if desired reincorporate them into the system via addGroup.

Now, based on my experimentation to do this in the DAC code (due to reduction and other factors), I realize it's likely something of a tall order.  But hopefully not impossible… Not to mention a way to expand the possibilities for mission makers many-fold!  tounge2.gif

Having said all that, if you like the removeGroup idea and wish to implement it, my guess is putting it in now would be far easier than later (due to all the many additional ai layers/other stuff you intend to add).

Anyhow, good luck with future versions.  I haven't a doubt I'm in for a real treat here.  biggrin_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]Didn't know about the Grouplink + helo paradrop thing, I didn't see it last night but I'll try & winkle that activity out of them tonight
Roger, im looking forward to hearing more of your findings and ideas smile_o.gif

Works as advertised smile_o.gif

Landed intrusions anyway, I didn't see paras but I'm happy if you say the code's there. The only thing I WOULD say is that the landing was rather close, close enough for me to throw a grenade at.

Can you say what the conditions need to be for paras to be dropped?

Share this post


Link to post
Share on other sites

Sickboy,

I just wanted to point out that

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(six_isServer)then{ ["z1",  getpos "z1tmp", "RECTANGLE", [200, 200]] call six_fCreateMarker; gz1=["z1", 1, getMarkerPos "z1", 100, [3, [5,20]], [], [], [], [], "RANDOM", "AI:", [1, ["SHOWMARKER"]]] call six_fCreateZone;};

getpos "z1tmp" should be:

getMarkerpos "z1tmp"

Also something really strange from creating a zone this way..

fCreateGroup generates an error on this part:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (_am>1)then

{

_i=1;

while {_i<_am}do

{

_sol=[_grp,_ar call six_fRndSelect,_pos,six_ranks_inf call six_fRndSelect] call six_fCreateUnit;

_sol setDir random 360;

_sol setSkill _skill;

six_aim_scount=six_aim_scount+1;

_i=_i+1;

sleep 0.005;

};

};

And its related to "sleep" of all things.  If I take out that sleep, it works without error.

Very strange. But I don't know if there will be unintended other consequences of removing that small pause.

Edit: Another question. If you create a zone like this with Group link... and there were already some zones in existence, will these units in this group be linked if use

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(six_isServer)then{ ["nubz1",getMarkerpos "nubz1tmp","RECTANGLE", [100, 100]] call six_fCreateMarker; nubgz1=["nubz1",2, getMarkerPos "nubz1",249, [3, [2,9]], [], [], [], [], "RANDOM", "AI:", [2, ["SHOWMARKER"]], "TRACK", "SHARE"] call six_fCreateZone;}

Is there a specified distance that they share information across? Is that defined?

Share this post


Link to post
Share on other sites

Hi sickboy,

is it possible to set a specific AI skill for a single enemy group?

Ciao

Share this post


Link to post
Share on other sites

Thanks for the comments guys, taking it apart (BTW, Please Excuse me if I forgot to reply to any of you, if you didn't get an answer or still have questions, please do ask):

Nubbin

Quote[/b] ]fCreateGroup generates an error on this part ...

And its related to "sleep" of all things.  If I take out that sleep, it works without error.

Very strange. But I don't know if there will be unintended other consequences of removing that small pause

The sleeps are there simply to give the Engine some breathing space. The functions and scripts can be used throughout the whole mission as such I try to pause a little here and there to not fully drain all FPS. The sleep probably gives an error because you are calling the script from within the Engine. You can't use sleeps in the editor fields and It might be possible that calling the functions from an SQS might have the same effect. I usually don't work with any of these, hence I didn't consider them smile_o.gif You could try this:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if(six_isServer)then{d=[] spawn { d=["z1",  getMarkerpos "z1tmp", "RECTANGLE", [200, 200]] call six_fCreateMarker; gz1=["z1", 1, getMarkerPos "z1", 100, [3, [5,20]], [], [], [], [], "RANDOM", "AI:", [1, []] ] call six_fCreateZone; }; };I added a:  d=  at the createmarker part aswell as added a d=[] spawn { ... }, and removed "SHOWMARKER" from the AI settings because the setting is obsolete. I also changed the getPos to getMarkerPos, thanks for spotting that horrible mistake smile_o.gif)

Quote[/b] ]Edit:  Another question.  If you create a zone like this with Group link... and there were already some zones in existence, will these units in this group be linked if use:

"AI:", [2, ["SHOWMARKER"]]

This needs to be changed to: "AI:", [2, ["SUPP"]]. Then it will work.  For More info, check the updated wiki page: http://trac.6thsense.eu:800/arma....cements
Quote[/b] ]Is there a specified distance that they share information across?  Is that defined?
If you mean the infoShare because of the "SHARE" parameter: At this time this is staticly defined in the SIX_AIM\s\infoShare.sqf , the infoSharing script is simply included while working on the other AI enhancements and it will probably not be needed anymore when finished with those wink_o.gif But I will in the meantime transfer that and other settings into the cfg_AIM.sqf file

If you mean the GroupLink AI: They Share info with everyone in their Chain, but always the closest groups (depending if their rating is high enough) would come for support.

Fideco

Quote[/b] ]Hi sickboy,

is it possible to set a specific AI skill for a single enemy group?

Ciao

Heya, I intend to include a Behaviour Configuration not unlike DAC had, this behaviour should be setable per zone and overwriteable per Unit-Type (Inf/veh/tanks/air). At this time the Skill is Randomly set to a value between 0.5 and 1.0

Currently there are Manual Ways to achieve the effect:

If you have created the group with fCreateGroup command you can simply change the skill of the group in the following way,

if you for instance used this code: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">gr1=[1, [10,20], getMarkerPos "test1", 100, 1, "test1", "AI:", [1, []], "TRACK" call six_fChkDbg, "SHARE"] call six_fCreate;If you go into the Init.sqf part AFTER the AI-M initializiation or in the script where you create this zone, add this:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{ _x setSkill 0.66 } forEach (units gr1);change 0.66 to your desired value

If you have created the group in a zone with more groups, you will have to use the array with groups created for this zone. But this becomes a bit tricky, I can at least show you how to change the skill for ALL groups in that zone, let's say you used:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">gz1=["z1", 1, getMarkerPos "z1", 100, [3, [5,20]], [], [], [], [], "RANDOM", "AI:", [1, []]] call six_fCreateZone; you would add to the init.sqf (after aim initialization) or in the script where you used this createzone function:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{ { _x setSkill 0.66 } forEach (units _x);} forEach gz1;

Incase you used the Easy Zone Configuration Options of cfg_Zones.sqf and you would have a zone called "obj1" it would be:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">{ { _x setSkill 0.66 } forEach (units _x);} forEach gobj1;

DMarkwick

Quote[/b] ]Works as advertised

Landed intrusions anyway, I didn't see paras but I'm happy if you say the code's there. The only thing I WOULD say is that the landing was rather close, close enough for me to throw a grenade at.

Can you say what the conditions need to be for paras to be dropped?

The conditions atm are a 70% chance on paratroopers but until now I have seen it happen only a few times compared to the amount of times they landed, I will dig into it soon smile_o.gif

MadRussian

Quote[/b] ]First off, if you are able to add in the bases/stations idea (which sounds very cool), might it be a good idea to keep the original method of reduction as an option.  May still be useful for various things.
Roger mate. I should rephrase my earlier opinion a little. For the things I had Reduce in Mind (Populating every single city, while still having 100's of units inside 1 city), it would not work so well with higher viewdistances, but indeed, in many other cases it sure can help a lot smile_o.gif
Quote[/b] ]Appears someone already mentioned implementing the ability too add pre-existing groups to the system via a command on the fly (as opposed to system generated units).  What would really steal the show would be the ability to break the groups back out on command.

So really talking about two new commands here.  For the moment, let’s call them addGroup and removeGroup.  (Just pulled these names off the top of my head.)

As an example, say you've got several AI zones, each with some number of generated enemy groups, all running the various AI enhancement scripts.  Suppose based on some dynamic event in the mission, you would like for one or more of these groups to leave their zone on a temporary hiatus and go perform some specific activity (requiring full control over them).  In this case you’d call removeGroup, which would remove them the system.  Then you could send them away to perform the said task, and afterwards if desired reincorporate them into the system via addGroup.

Now, based on my experimentation to do this in the DAC code (due to reduction and other factors), I realize it's likely something of a tall order.  But hopefully not impossible… Not to mention a way to expand the possibilities for mission makers many-fold!

Coolio Idea. I was already building in the ability to manipulate the Support etc. Arrays, but had not thought about adding functions yet. At this time GL2 only supports 1 chain of support (you can add and remove from it though). I'm probably rewriting parts of GL2 to make it usable for multiple chains but this will be a feature of my own AI Enhancement aswell. I'm playing around with the ideas, I want to be able to control the Support, halt, remove or change group parameters or even full zone parameters on the fly, etc. etc.
Quote[/b] ]Having said all that, if you like the removeGroup idea and wish to implement it, my guess is putting it in now would be far easier than later (due to all the many additional ai layers/other stuff you intend to add).
Agreed smile_o.gif
Quote[/b] ]Anyhow, good luck with future versions.  I haven't a doubt I'm in for a real treat here.
Thanks mate.

Last but not least, I am planning on making some sort of Debugger Dialogs which show you in realtime the groups, the alarms, how the arrays are filled atm etc. etc. But this is also for future versions

Share this post


Link to post
Share on other sites

Hi sickboy,

is there a easy way to monitor all debug process ?

I would like to track "infoShare.sqf" and "grouplink2.sqf" routines and observe all the info generated by mission events.

Thanks as always.

Ciao

Share this post


Link to post
Share on other sites
Hi sickboy,

is there a easy way to monitor all debug process ?

I would like to track "infoShare.sqf" and "grouplink2.sqf" routines and observe all the  info generated by mission events.

Thanks as always.

Ciao

Heya m8,

Put urself (your nickname, completely Capital Sensitive) in the SIX_RF array in the init.sqf of your mission, this should enable debug mode.

e.g: SIX_RF=["Sickboy"];  --->  SIX_RF=["Sickboy","fideco"];       or even remove my entry

Otherwise simply hardcode: six_debug_miss=true;  into your init.sqf, but you would need to remove that before you play on server with more ppl etc smile_o.gif

You will receive basic system messages.

To enable AI-M low-level debug messages, please use:

six_debug_lvl=12;

To enable GL2 low-level debug messages, please use:

six_debug_lvl=15;

To enable InfoShare low-level debug messages, please use:

six_debug_lvl=16;

I intend to document these debug levels more proper etc soon smile_o.gif

InfoShare has only an initialization message, if you like I could build in some more smile_o.gif

Share this post


Link to post
Share on other sites

InfoShare has only an initialization message, if you like I could build in some more smile_o.gif

Hi sickboy

i think this is a good idea, very useful for understanding AI behavior during the mission.

An extended  debug process for key routines would be very helpful

Ciao smile_o.gif

Share this post


Link to post
Share on other sites

Updated Help Section Extensively:

http://trac.6thsense.eu:800/arma/trac/wiki/6thSense.eu%20AIM#Help

v0.1 is now out of Beta and hoping for your Comments and Suggestions, in the meantime i'm prepping work on v0.2

Download: 6th-AIM_v0.1.rar

Changelog:

[*] Updated the ADV missions on Rahmadi with the CreateMarker methods like the ones on Sahrani. No markers will be visible in MP.

[*] GL2: Added Alert Cancel Distance. Default: 1000.

[*] Performance Optimized some of the Loops. (Thanks for the tips Crashdome! )

[*] Created less enemies, as the AI Enhancements should make up for the otherwise usual 10:1 Enemy AI/player ratio (Thanks Jinef for Remembering ;-))

[*] Added Debug Notice to Infoshare script, request by fideco. six_debug_lvl=16 will display the messages

[*] Added 4 more Objective Areas in the ADV missions on Sara

Quote[/b] ]Hi sickboy

i think this is a good idea, very useful for understanding AI behavior during the mission.

An extended debug process for key routines would be very helpful

Ciao

The debug lvl of infoshare now displays informations about groups revealing to others. I tried to minimize the info but it's a lot still smile_o.gif

There will be a better debugging system working as a LOG or different LOGs for better overview, incl timestamping

Share this post


Link to post
Share on other sites

Hi sickboy

you are faster than light speed....

Downloading..

smile_o.gif

Thanks

Ciao

Share this post


Link to post
Share on other sites

Hi sickboy,

at the beginning of "(BIS)_6th-AI-Man_W(ADV)-DEMO.intro.pbo" i got two errors (code lines) as reported in attached images .

Ciao

Share this post


Link to post
Share on other sites
Hi sickboy,

at the beginning of "(BIS)_6th-AI-Man_W(ADV)-DEMO.intro.pbo"  i got two errors (code lines) as reported in attached images .

Ciao

Thank you for reporting m8! Package on the Download Page is updated.

Share this post


Link to post
Share on other sites

For some reason I can't get debug stuff off. My init.sqf has lines:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

SIX_NOTPUBLIC=false;

//SIX_debug_lvl=15; // Enable GL2 Debugging Level

SIX_debug_lvl=0; // Enable GL2 Debugging Level

SIX_debug_miss=false;

Another thing, there says "Player Team, Currently only support 1 when using GroupLink2". What if I have many teams? Haven't yet noticed anything weird.

And is it possible to make BMP's stop before enemy has been detected. It's quite unrealistic for some small area that they are moving whole time wasting fuel. Even better if crew members would be idling near BMP before alarm.

EDIT: one more thing, AI doesn't seem to react at all to dropped HE shells by arty script I use. Anything that I could do to it?

Share this post


Link to post
Share on other sites
Quote[/b] ]For some reason I can't get debug stuff off. My init.sqf has lines
What debug stuff exactly can you not get off?
Quote[/b] ]Another thing, there says "Player Team, Currently only support 1 when using GroupLink2". What if I have many teams? Haven't yet noticed anything weird.
The GL2 script will only react on the first group you put in the array, not others.
Quote[/b] ]And is it possible to make BMP's stop before enemy has been detected. It's quite unrealistic for some small area that they are moving whole time wasting fuel. Even better if crew members would be idling near BMP before alarm.
At this time, create a specific zone for Supportive units that should stand still, and add "NOWP" to the _ai settings array for that zone.  Soon you will also be able to define such settings per Unit-Type per Zone,  instead of only per Zone.
Quote[/b] ]EDIT: one more thing, AI doesn't seem to react at all to dropped HE shells by arty script I use. Anything that I could do to it?
That's something I might consider implementing in my own AI Enhancement, it's a pitty that default ArmA doesn't give a proper reaction smile_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]For some reason I can't get debug stuff off. My init.sqf has lines
What debug stuff exactly can you not get off?

Tracking markers, GL messages (ie. how many units where placed, how many groups there are, etc.) and zone markers. I suppose editor placed zone markers should be hided automatically?

Share this post


Link to post
Share on other sites

General Info, IF your name is in the SIX_RF array, six_debug_miss will automaticly be set to true somewhere later in the scripts, so defining: six_debug_miss=false; while your name is in SIX_RF will have no effect, and still leaves six_debug_miss=true; (On your machine)

Quote[/b] ]Tracking markers
If you are speaking about 6thSenseMod GroupTracking Markers, they only show friendly groups when six_debug_miss=false; and will also show enemy groups when six_debug_miss=true;

If you are speaking about the small dots that get left behind every group to show a trail, they will always show if you have added "TRACK" to the zone _feats configuration. If you have used "TRACK" call six_fChkDbg in the zone _feats configuration, then it should only display if six_debug_miss=true; (So also if your name is in the SIX_RF array)

Quote[/b] ]GL messages (ie. how many units where placed, how many groups there are, etc.)
"How many units were created etc" messages, is a setting in cfg_AIM.sqf, disable the system-messages (true-->false). Mind you: When six_debug_miss=true (or ur name is in SIX_RF), this setting will always be true.

If you are speaking about the "SIX_AIM: GL2 Initializing for Groups:" Message, this is only visible on ServerClient and ONLY if six_Debug_miss=true; See above on how to get it to false wink_o.gif

Quote[/b] ]zone markers,I suppose editor placed zone markers should be hided automatically?
At this time, a ServerClient (Ingame hosting/editing) will always see the Markers. I am working on a system that will resolve this.

You will always see the Editor Placed zonemarkers, hence you should use the system that's used in the Final Release ADV Missions: Creating empty markers on the map but creating the real markers in cfg_Zones.sqf by using a function.

Since the configuration is only ran on the server, the created markers will NOT be visible on Clients... Only on ServerClient (Ingame hosting)

The whole problem can be resolved by using Triggers instead of Markers, but I rather only use markers and not Triggers, mainly because of the plans for using many many many many Zones, and the unnececairy use of Triggers (Which loop, generate output and await conditions etc), altough I might be looking into this more further

Share this post


Link to post
Share on other sites

Hi sickboy

i have switched side from 1 to 3 in "cfg_Zones.SQF", to fight against resistance

In Arma, i'm getting an error like "Type string, expected code.."

Is it fixable?

Or am i doing something wrong?

Ciao

p.s.

Any news about next release date ?

Share this post


Link to post
Share on other sites
Hi sickboy

i have switched side from 1 to 3 in "cfg_Zones.SQF", to fight against resistance

In Arma, i'm getting an error like "Type string, expected code.."

Is it fixable?

Or am i doing something wrong?

Ciao

p.s.

Any news about next release date ?

No info about Release date at this time, but I continue work everyday smile_o.gif

Make sure that the unit configuration you use is available on Resistance side, please double check the cfg_G.sqf and make sure that the unit config exists, or adjust your cfg_Zones.sqf unitconfig to the appropriete one.

I think the problem is that there is no special forces unit config setup for Resistance, please try copying in cfg_G.sqf the 349 unit config to 399.

So simply add this to the file before the last };

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> case 399:

{ // SF BIS

_Pool_S = ["SoldierGCrew","SoldierGPilot","SquadLeaderG","SoldierGb","SoldierGat","SoldierGg","SoldierGat","SoldierGmg","SoldierGaa","SoldierGmedic","SoldierGat","SoldierGaa","SoldierGsniper","SoldierGb","SoldierGmedic","SoldierGminer","SoldierGmg"]

_Pool_V = ["Landrover_Closed","Landrover","LandroverMG"]

_Pool_T = ["M113_RACS"]

_Pool_A = ["AH6_RACS"]

_Pool_C = ["usa_vlajka.pac","CampGuer","Shed",[100,3]]

};

Let me know if it works, ill add it in a next release aswell.

What I did is use a number for soldiers and then +50 for special forces of the same camo. This is not really usable when not using 6thSenseMod or other addons, but as you can see for the 6thsense configs its like:

100 = Default SLA Camo Soldiers

150 = Default SLA Camo SF

101 = Desert SLA Camo Soldiers

151 = Desert SLA Camo SF

102 = Urban SLA Camo Soldiers

152 = Urban SLA Camo SF

etc. etc.

But this was simply my personal preference for my personal use, you may all change it as much as you like smile_o.gif

Share this post


Link to post
Share on other sites

It seems it does not work , i get same error..

but don't worry, i will wait for the next release..

Cheers

Share this post


Link to post
Share on other sites

Sickboy.. incredible work thank you for sharing with the community. I'm developing a coop "defensive" style mission and would like to use your AI manager to dynamically spawn troops (based on player count and other variables), but I need the AI to accept a set of waypoints based on the mission progress.

For example, players start defending a town from waves of AI. If they lose control they respawn further back and try to defend the next town. The Ai manager should stop sending troops to the "captured" town and start targeting the next objective.

I see you have a note for v.2 to support waypoints.. is this what you had in mind or are you plans different?

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
Sign in to follow this  

×