Jump to content

Recommended Posts

JBOY AI Scripted PathBeta Release 12/2/19.   This script moves AI quickly through a path of positions while fighting.  In this video we see a stack of 4 units clear a house, breach doors, and dynamically fight.  Also this script can be used to create moving AI on static structures that have no AI paths (like new destroyer, Cargo Ship Mods, Oil Rig compositions). For example:  It's now possible to have AI defenders patrolling an Oil Rig, or AI attackers assault an Oil Rig.

 

 

 

Above video credits:  @beno_83au for breaching chard script, and RHS for pump shotgun.

Flashbangs:

Thank Phronk for flashbang.

Player orders teams to execute different paths, and orders a synchronized breaching by two teams:

Download "How To" Demo Mission: Dropbox Link (updated 12/2/19) Use this version to create your own path following my "how to" video.  Note: Requires mods CBA_A3 and Enhanced Movement.

Download Example Mission from 2 story clear building video:  Dropbox Link (updated 12/2/19).  Requires mods CBA_A3, Enhanced Movement and RHSUSAF

 

Older videos:

  Reveal hidden contents

Features added 6/24/2019:

  • Flashbangs (thanks Phronk)
  • Improved grenade and flashbang throwing accuracy
  • Player controlled team can execute paths for teams to follow (i.e., order team to sweep building)
    • AI will stack up outside entry and wait for Go order. This allows synchronized breaches of a building with more than one team.

Features working so far:

  • AI moves through series of hardcoded positions recorded in an array.
  • @beno_83au's awesome door breaching
  • Shotgun door breaching.  Aims exactly at door jamb where handle is.
  • Multiple stacks can execute multiple paths simultaneously
  • Supports 1 to 4 units running through movepoints
  • Lead unit uses hand gestures and in-game voice file to command team
  • Leader tosses Flash Bangs (thanks Phronk) and grenades into rooms or up stairs (and followers take cover)
  • If unit clips and falls off balcony, he is killed so does not ruin entire teams moves
  • AI can fire while moving
  • AI will stop before doors and open them.
  • AI plays animation to test if door is locked, and you see door handle animated, and hear custom locked door jiggle sound.
  • AI resumes ai behaviour and waypoints after successfully executing a move script
  • AI can climb ladders
  • AI can use Enhanced Movement mod and climb fences and objects

Planned:

  Reveal hidden contents

Known Issues:

  Reveal hidden contents

Path array used in latest video (6/14/2019

  Reveal hidden contents

 

I tried to generate a path through a building based on building positions and building door positions, but that is not enough information for a clear path.  The script uses "playMove animationName" to move a unit from one position to another.  This requires an unobstructed line from one positions to another.  If we used building positions alone, then AI would pass through walls and would not climb stairs.  I am creating a little utility so that you can walk through a building in the editor and record each path position in an array.  You can then copyToClipboard the array and paste it in a script to create a new path (like a series of waypoints).

 

How you create your own custom move path array:

 

These instructions assume you are editing my test demo mission to learn the basics of creating a custom path of movepoints.

  Reveal hidden contents

How to create a Climb Ladder or Enhanced Movement Climb move point:

  Reveal hidden contents

 

  • Like 30
  • Thanks 3

Share this post


Link to post
Share on other sites

That looks pretty good for a first cut. Teams would be a sight to see.

  • Like 1

Share this post


Link to post
Share on other sites

this looks like a great thing to have in game

  • Like 1

Share this post


Link to post
Share on other sites

could u post which informations u need to get a not hard coded solution?

maybe a talented scripter would try to get those by script...

Share this post


Link to post
Share on other sites
  On 4/12/2019 at 1:46 PM, sarogahtyp said:

could u post which informations u need to get a not hard coded solution?

maybe a talented scripter would try to get those by script...

Great minds think alike!  🙂   I plan on making a separate Script Challenge post for this with a screenshot showing existing Building Positions and Door positions, plus helper arrows marking the additional line of sight markers that I need for complete paths.   It is probably possible to do that starting from a door and raycasting around, but its not something I'm willing to take on...  I should post this request later today.

  • Like 1

Share this post


Link to post
Share on other sites

:icon_dj:  This could lead to something REVOLUTIONARY. Getting AI to follow hard coded waypoints...even on custom composition. (...OIL rigs for example...hehehehe)

As always...good job mate!

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites
  On 4/12/2019 at 3:05 PM, zagor64bz said:

This could lead to something REVOLUTIONARY. Getting AI to follow hard coded waypoints...even on custom composition. (...OIL rigs for example...hehehehe)

Thanks amigo.  That is EXACTLY what this script is good for.  Oil Rigs, Ship Addons, the new Destroyer, a custom fortification...they all are missing AI paths, so any missions made are all placing static AI units that can't move (i.e., a little boring...).  But a mission maker can now put AI on an oil rig and make different move scripts (patrol, etc.) and make the rig come alive.  And you could also script AI to assault the oil rig using different paths.

  • Like 3

Share this post


Link to post
Share on other sites

Cool bananas 🍌. Could be quite a big deal and a must-have mission include.

 

In addition to whatever turns up from the script challenge I hope you might accept submission of predefined pathing information by building class name for a data file distributed with the script. There are only so many unique buildings in the ArmAVerse and we might eventually get them all indexed (more reliable and efficient than real-time calculation). With the script acting as a fallback where the class is not present in the data file.

 

EDIT: Something else, hopefully weapon use, and particularly grenades might be moderated by some overall ROE (specified at the time of execution) in terms of likely threat level, presence of non-combatants and the like. Ranging from "Enter with Minimum Necessary Force" (no lethal grenades) up to "Breach with Maximum Prejudice" (shoot first, open doors later).

  • Like 2

Share this post


Link to post
Share on other sites
  On 4/12/2019 at 5:11 PM, Defunkt said:

In addition to whatever turns up from the script challenge I hope you might accept submission of predefined pathing information by building class name for a data file distributed with the script. There are only so many unique buildings in the ArmAVerse and we might eventually get them all indexed (more reliable and efficient than real-time calculation). With the script acting as a fallback where the class is not present in the data file.

Absolutely.  We should compile a path library that anybody can contribute to.  If it turns out we have to hardcode scripts per building, there's no way I can do them all.  So as people are interested in a particular building, they can contribute their own assault paths.  Personal preferences may drive many different paths for any given building.  And if the building generated path concept does end up working, a mission maker can choose that path, or a preferred hardcoded path.  I will have to document how create your own path, to make it as easy as possible for mission designers to construct their own.  I probably won't do that until the design is more mature.

  On 4/12/2019 at 5:11 PM, Defunkt said:

Something else, hopefully weapon use, and particularly grenades might be moderated by some overall ROE (specified at the time of execution) in terms of likely threat level, presence of non-combatants and the like. Ranging from "Enter with Minimum Necessary Force" (no lethal grenades) up to "Breach with Maximum Prejudice" (shoot first, open doors later).

All good ideas.  I'm considering how best to parameterize this type of stuff.  Hopefully support both fully customized at each move point, and more high level instructions as per your suggestion ("minimum force", "use non-lethal weapons", "maximum force").

 

But I need to get the basic framework and mechanics down before I take on too many requirements.  It will evolve.

 

Good thinking...we are on the same wavelength.

  • Like 1

Share this post


Link to post
Share on other sites
  On 4/12/2019 at 5:52 PM, johnnyboy said:

a mission maker can choose that path

 

Beyond choices by the mission maker it'd be good to see this as an action menu entry for any player with subordinate AI, most likely calling up a dialog listing nearby buildings and available assault plans for each then executed for all units in groupSelectedUnits.

 

But you're right of course, carefully defining an extensible path data format and creating a handy tool for generating it is the most important thing at this stage.

  • Like 2

Share this post


Link to post
Share on other sites
  On 4/12/2019 at 3:11 PM, johnnyboy said:

Thanks amigo.  That is EXACTLY what this script is good for.  Oil Rigs, Ship Addons, the new Destroyer, a custom fortification...they all are missing AI paths, so any missions made are all placing static AI units that can't move (i.e., a little boring...).  But a mission maker can now put AI on an oil rig and make different move scripts (patrol, etc.) and make the rig come alive.  And you could also script AI to assault the oil rig using different paths.

As I mentioned before, I wanted to do a REDUX of the old  PS "SOCOM:US NAVY SEALs" game...with iconic missions like the one in the Ship and the infamous Oil rig , but it would have been a nightmare to get AI to navigate those custom composition. Honestly I was ready to give up ...until your script shined some light in the dark. 

THANK YOU!!!

  • Like 2

Share this post


Link to post
Share on other sites
  On 4/12/2019 at 2:03 PM, johnnyboy said:
  On 4/12/2019 at 1:46 PM, sarogahtyp said:

could u post which informations u need to get a not hard coded solution?

maybe a talented scripter would try to get those by script...

Great minds think alike!  🙂   I plan on making a separate Script Challenge post

Script challenge for generating paths for buildings posted here: 

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
  On 4/12/2019 at 4:11 AM, johnnyboy said:

JBOY AI Scripted Path - This is my first draft of a script to have AI move quickly through a path of positions while fighting.  In this video I follow an AI unit as he clears a house, and uses grenades intelligently.  Also this script can be used to create moving AI on static structures that have no AI paths (like new destroyer, Cargo Ship Mods, Oil Rig compositions). For example:  It's now possible to have AI defenders patrolling an Oil Rig, or AI attackers assault an Oil Rig.

 

Ohhhh I knew I should've had delayed my Vdog Script release... this script tech you've developed is revolutionary indeed!

 

Bohemia... what are you waiting for and not hiring this guy already?

  • Like 3
  • Haha 1

Share this post


Link to post
Share on other sites

One thing i love about this is how quickly they move thru the house - it seems that with all House Clearing scripts they move at a snails pace -the crouch walk -which is fine if your in a Stealthy mood -but sometimes you just gotta bum rush a brutha

  • Like 2

Share this post


Link to post
Share on other sites
  On 4/13/2019 at 10:45 PM, froggyluv said:

One thing i love about this is how quickly they move thru the house - it seems that with all House Clearing scripts they move at a snails pace -the crouch walk -which is fine if your in a Stealthy mood -but sometimes you just gotta bum rush a brutha

Exactlioto, quasimoto.

  • Like 2

Share this post


Link to post
Share on other sites

More AI scripted path fun. Here we see AI climb 3 flights of stairs, cross 3 different building roof tops, jump from one building to another, step over low wall, jump to roof of van, and down to the ground.  The stair climbing would have been smoother if I used a slower walk animation in those tight spaces.

 

 

  • Like 9

Share this post


Link to post
Share on other sites

Nice. Watched it several times (with Froggy's soundtrack 😉).

 

First two turns at the bottom of the stairs he appears to rotate through the less natural of the two possible arcs.

 

Don't know what exists in terms of suitable moves but ideally they'd go up and down stairways sideways (facing toward the opposite stairs or the next landing) so as to appear to be  covering emerging threats - think it would also make each rotation on the landings look a little more natural. Possibly best implemented as properties of the 'waypoint' (rather than the script trying to add smarts which might prove not to be appropriate) - this may already be the case and the route just needs some tweaking


Can't help but want to drag those markers around a little to improve the path (for instance when he clips through the wooden ramp because the preceding marker wasn't as aligned with the base of the ramp as it might've been). Are you anticipating a facility to tweak marker positions visually in the editor?

Share this post


Link to post
Share on other sites

That Matrix jump by the AI in the last video was impressive. Did he make it on his first jump?

 

All joking aside, this looks really interesting, nice work. 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
  On 4/16/2019 at 9:41 AM, Defunkt said:

Don't know what exists in terms of suitable moves but ideally they'd go up and down stairways sideways (facing toward the opposite stairs or the next landing) so as to appear to be  covering emerging threats - think it would also make each rotation on the landings look a little more natural. Possibly best implemented as properties of the 'waypoint' (rather than the script trying to add smarts which might prove not to be appropriate) - this may already be the case and the route just needs some tweaking

  On 4/16/2019 at 9:41 AM, Defunkt said:

First two turns at the bottom of the stairs he appears to rotate through the less natural of the two possible arcs.

I was using fast tactical forward run animations on stairs (the default), so this can likely be improved by slowing him down for the the 2 points on the landing, and potentially using sidestepping as you suggest.  I haven't implemented his direction of covering while moving yet (points forward while moving, with his AI dragging the rifle a little left or right while moving).

  On 4/16/2019 at 9:41 AM, Defunkt said:

Can't help but want to drag those markers around a little to improve the path (for instance when he clips through the wooden ramp because the preceding marker wasn't as aligned with the base of the ramp as it might've been). Are you anticipating a facility to tweak marker positions visually in the editor?

Currently I set markers in a series by running player through editor and using a Fired event.  When I fire I capture position, stance, and direction for the "move point" and append it to an array. The array is copied to clipboard, so you can paste it into an editor at any time.  Once path array is assigned to a path variable, you can run it on an AI.  For tweaking positions, I observe the AI move (like the plank miss) and stand the player in a slightly different spot, fire, capture the new "move point" entry, and replace it in the array.  Visually dragging in editor is very doable and a  better solution (but down the road).  Part of the problem with the plank miss, is playMove doesn't always land him exactly on the move point.  The faster the animation the less accurate (can be off up to a meter it seems).  So I may switch to slower animation as he approaches the end point to improve accuracy.  Also, for the plank case, we could always add a second plank to make it wider (the path in that video would always be a World Position hardcoded path, so might as well add the plank.  It could never be a building generated path as it spanned multiple buildings, using only rooftops and one set of stairs.)

 

I also modified the capture code to sense if two move points are less than 2 meters apart.  If so, my code generates the slower tactical move, which should result in greater  end point arrival accuracy, and less twitchiness on tight corners like the stairs.

 

Anyway, all good observations dude, and I'm already giving thought to all that. Thanks for the interest.

Share this post


Link to post
Share on other sites
  On 4/16/2019 at 1:20 PM, stburr91 said:

That Matrix jump by the AI in the last video was impressive. Did he make it on his first jump?

 

First time, every time.  Guaranteed.  Thanks man!

Share this post


Link to post
Share on other sites
  On 4/16/2019 at 3:33 PM, johnnyboy said:

I also modified the capture code to sense if two move points are less than 2 meters apart.  If so, my code generates the slower tactical move, which should result in greater accuracy end point arrival accuracty, and less twitchiness on tight corners like the stairs.

This will make it look really cool!  Now...is there ever gonna be a way to automate this?  I'm thinking C2 style (by madcheese) .. you point at a building and an addaction appears (addaction attached to that particluar building of course)

Share this post


Link to post
Share on other sites
  On 4/16/2019 at 5:09 PM, kremator said:

This will make it look really cool!  Now...is there ever gonna be a way to automate this?  I'm thinking C2 style (by madcheese) .. you point at a building and an addaction appears (addaction attached to that particluar building of course)

Absolutely. Future:  Player looks at building and selects units, and action appears to clear building (if there is a path pre-defined for that particular building or building class).  Can also be triggered anyway a mission designer wants (proximity triggers, etc.).

Share this post


Link to post
Share on other sites

Gonna lmfao if I ever see an enemy ai jump off a roof to a van to take a shot at me. For ultimate cheese you should add the tumble animation from iron front for the landing

  • 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

×