Jump to content
t-800a

[RELEASE] T8 Units - a less dynamic AI creator

Recommended Posts

Hey T-800 your script seems to have some nice features.  There are some ideas I like to implement though

 

spawnContainer = ["INFANTRY",10,5,east] call randomSpawnContainer;

spawnContainer = ["LIGHT_VEHICLE",10,5,east] call randomSpawnContainer;

spawnContainer = ["ANTI_AIR",10,5,east] call randomSpawnContainer;

spawnContainer = ["TANK",10,5,east] call randomSpawnContainer;

spawnContainer = ["AIR",10,5,east] call randomSpawnContainer;

 

just some wrappers to create random spawncontainers.  This might not even be the final interface for them , just a preliminary thought.  I forked your project and I'll send a pull request should you like the result.

 

BTW GREAT ( T8U_dir_ROOT + T8U_dir_FNCS + "fn_assignTask.sqf" ) finally someone that understands the importance of not hardcoding your directory paths in the code !

Share this post


Link to post
Share on other sites

I encountered a bug in one of the patrol scripts, it doesn't happen often though

 

21:00:13 Error in expression <; };
};
} forEach _wpArray;


[ _group, _cycle, "CYCLE", "SAFE", "", 100 ] call >
21:00:13   Error position: <_cycle, "CYCLE", "SAFE", "", 100 ] call >
21:00:13   Error Undefined variable in expression: _cycle
21:00:13 File C:\Users\Sunspot\Documents\Arma 3\mpmissions\dynmlb.Altis\dynmlb\common\T8\T8_tasks\patrolUrban.sqf, line 74

 

This time I spawned ten groups at random points around a center marker.  Maybe a fallback could be created when _cycle couldn't be determined the script fallsback to a default behavior for the group.  Something like garrison or wander around a marker ?

Share this post


Link to post
Share on other sites

Did this happen when there were no roads near your randomly generated points?

I think reverting back to the normal Patrol in that case would be best. I'll make myself a note.

  • Like 1

Share this post


Link to post
Share on other sites

Did this happen when there were no roads near your randomly generated points?

I think reverting back to the normal Patrol in that case would be best. I'll make myself a note.

 

There where around three roads around that squad, it was actually right in the middle of the town.  I believe they where close to a house and in a garden, maybe they didn't had a path towards a road ?  I never investigated how waypoint selection exactly works.

Share this post


Link to post
Share on other sites

I noticed the error a few times more but it's not consistent.  On another note, I tried spawning vehicles and choppers and let them patrol but the weirdest thing :)  The choppers land and the crew starts patrolling and the vehicles well they just stop and again crew gets out and starts patrolling ... NOT what I had in mind :)

Share this post


Link to post
Share on other sites

I noticed the error a few times more but it's not consistent.  On another note, I tried spawning vehicles and choppers and let them patrol but the weirdest thing :)  The choppers land and the crew starts patrolling and the vehicles well they just stop and again crew gets out and starts patrolling ... NOT what I had in mind :)

[ [ myFireTeam,        "Marker" ],        [ "PATROL_URBAN" ] ],
[ [ myFireTeamWithAPC, "Marker", false ], [ "PATROL_URBAN" ] ]

The false will make them stay inside. And I never tried or intended to use choppers with my script! :O :D

  • Like 1

Share this post


Link to post
Share on other sites
[ [ myFireTeam,        "Marker" ],        [ "PATROL_URBAN" ] ],
[ [ myFireTeamWithAPC, "Marker", false ], [ "PATROL_URBAN" ] ]

The false will make them stay inside. And I never tried or intended to use choppers with my script! :o :D

 

 

Hehe yeah I figured it out :)  Works like a charm now, choppers as well btw they fly around, and shoot stuff like they should.  There is one more thing that seems to need a bit of work.  When I spawn a group of 5 ifrits, and they are to close to eachother on spawn, they spawn on eachother and blow up.  I'll investigate some more maybe it had to do with the false flag but if not, spreading them around on the spawnlocation might work with a check if there is room to spawn

Share this post


Link to post
Share on other sites

This is a fantastic tool. I really appreciate how easy it is to just flip a switch and have units spawn on a headless client. Thanks a lot for your hard work!

Share this post


Link to post
Share on other sites

T8,

I found a bug in the PATROL_AROUND task: the T8U_var_PatAroundRange is never used.

it's only used to calculate _maxDistance in createWaypointPositions but later in the code, _maxDistance is only used if _useRoad is true, something that is never true when called from patrol_around

cf: _wpArray = [ _marker, _infGroup, false, false ] call T8U_fnc_CreateWaypointPositions;

 

Result: all units are patrolling at about 20 meters from their area.

 

Could you fix this ?

Thx !!

Share this post


Link to post
Share on other sites

Really nice script!  :) Prost!

 

This is a fantastic tool. I really appreciate how easy it is to just flip a switch and have units spawn on a headless client. Thanks a lot for your hard work!

Thanks magnetar and beaar!

 

T8,

I found a bug in the PATROL_AROUND task: the T8U_var_PatAroundRange is never used.

it's only used to calculate _maxDistance in createWaypointPositions but later in the code, _maxDistance is only used if _useRoad is true, something that is never true when called from patrol_around

cf: _wpArray = [ _marker, _infGroup, false, false ] call T8U_fnc_CreateWaypointPositions;

 

Result: all units are patrolling at about 20 meters from their area.

 

Could you fix this ?

Thx !!

I'll look into this, should probably build a new version anyways as I have been implementing various fixes / changes in the last months.

Share this post


Link to post
Share on other sites

Thx T8 !

 

I also noticed an issue with all the waypoints for PATROL_GARRISON endind around 0,0 on the map but I need to create a vanilla repro mission to make sure the issue is not coming from my mods (except the map itself).

Share this post


Link to post
Share on other sites

Maybe you could check with my dev version on Github. I tried to improve the waypoint finding to avoid those [0,0,0] waypoints.

But be aware that there were some bigger changes:

- I now use cfgFunctions instead of pre-processing all files manually. (see the example description.ext)

- the script is there for initialized automatically (no more T8_UnitsINIT.sqf & T8_UnitsCONFIG.sqf)

- file structure has changed, better delete old stuff and not just overwrite (find config now at T8/CONFIG.hpp)

- if you use a iteration of the missionEXEC.sqf the "init-part" of it has also changed a bit.

Share this post


Link to post
Share on other sites

Thx,

I'll port my test mission on your latest dev build.

Is it the same version used in 1Para sunday's session or do we stick on 0.52 for those games ? (yes, I could have opened the pbo... I should have thought about that sooner...)

Share this post


Link to post
Share on other sites

v0.60 beta working like a charm !! :) 

 

One feature request:

what do you think about switching T8U_var_PatAroundRange from being global to being a parameter in calling PATROL_AROUND ?

Something like: [ [PAT4, "WZ_A2"], ["PATROL_AROUND", 75], [true, false, true] ] where 75 is the patAroundRange for this specific unit ?

That way, we could create short, medium and long range patrol around an area.

  • Like 3

Share this post


Link to post
Share on other sites

I also confirm v0.60 to work really well, although I have to admit I have not played with all features.

  • Like 1

Share this post


Link to post
Share on other sites

I also confirm v0.60 to work really well, although I have to admit I have not played with all features.

Thanks!

I updated everything to V.060, see first post ... only to lazy for a propper changelog, everything else updated!

  • Like 3

Share this post


Link to post
Share on other sites

As usual top quality, best AI spawn around and easiest to use by far !

 

 

One feature request:

what do you think about switching T8U_var_PatAroundRange from being global to being a parameter in calling PATROL_AROUND ?

Something like: [ [PAT4, "WZ_A2"], ["PATROL_AROUND", 75], [true, false, true] ] where 75 is the patAroundRange for this specific unit ?

That way, we could create short, medium and long range patrol around an area.

 

 

Has this been added ?

Share this post


Link to post
Share on other sites

T8, due to lack of time on my end I have yet to do the batism fo fire for T8Units on our server but so far it's really a nice set of scripts !

 

Thx again for this !

Share this post


Link to post
Share on other sites

T8,

I have another feature request, for a friend ;) 

 

Could you add a PATROL_MARKER_AREA so that a group would patrol the area of a marker for some time then switch to another area ?

 

It would be like this:

 

mySpawnContainer =
[
 [ [ BASIC ], [ "PATROL_MARKER_AREA", ["mkr1", "mkr2",...], time_to_patrol ], [ COMMUNICATION ] ],
 [ [ _group, "marker" ], [ "PATROL_MARKER_AREA", ["patrolMkr1", "patrolMkr2"], 500], [ true, true, true ]]
]; 
 
Thx!
  • 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

×