Jump to content

Recommended Posts

2 hours ago, SmoothWaterUSA said:

Amazing work Leopard! I usually lurk these forums and never felt the need to post hence I never made an account.... however, your mod was so dang mind blowing I had to make an account just to say how amazed I am and how I look forward to your mod.

Additionally I will be donating in the hopes this wont be abandoned or severely watered down. Lastly, would it be possible to release an early development of the Super AI in it's current state to play around with it? This is what Arma has needed and I am foaming out the mouth right now just to play with it! 

 

Once again, awesome work and I look forward to a release of the mod!

Thank you!

 

The current state of super AI is not fully playable. I have to activate it using certain test codes (as you see in the video) and even then there are some stuff that need to be manipulated using the debug console. Plus the path generation functions are not complete yet (the one for the buildings, for example, has a problem with detecting stairs. There are also some issues with weird geometries, such as the radar in Mike 26, which is circular)

Once I throw in the squad leader and tactical planning stuff I might make a preview release.

There's at least one more "cool" addition that I'm gonna reveal in the final release as a surprise! 😉

  • Like 3

Share this post


Link to post
Share on other sites
6 hours ago, Leopard20 said:

Plus the path generation functions are not complete yet (the one for the buildings, for example, has a problem with detecting stairs.

Hi Leopard.  You might want to reach out to @madrussian as he has made some great progress on generating building meshes.  Maybe you two can collaborate or knowledge share.  I believe he has solved stair detection.  Check out his bad ass videos.

And if there is any code you want to use from my crude attempt at scripted AI navigation of buildings you have my full permission to do so.  It includes AI door opening, shotgun door breaching, explosive door breaching (thanks to @beno_83au ...NOT pronounced "bean-o"!), flashbang prior to entry (thanks @phronk ), and more.  It currently requires pre-defined node paths, so is not dynamic and as sophisticated as what you are doing.  Current unpublished version supports ladder usage and @bad benson's enhanced movement so ai can climb walls and  buildings. I hope to publish an update soon (a broken wrist stalled my progress for 2 months).

Also you may want to reach out to @sarogahtyp regarding his excellent work on shortest path calculation:

I was dreaming of doing what you are doing but I think you can get there quicker than I.  I am following this closely, and am excited about your progress.

 

Best of luck!

  • Like 4
  • Thanks 2

Share this post


Link to post
Share on other sites
3 hours ago, johnnyboy said:

Hi Leopard.  You might want to reach out to @madrussian as he has made some great progress on generating building meshes.  Maybe you two can collaborate or knowledge share.  I believe he has solved stair detection.  Check out his bad ass videos.

It's actually pretty impressive. But there's one major problem: it's extremely slow. I want the mesh to be generated in a few seconds, because for example, I want my units to quickly move inside the building if they comes under fire. My current script generates the mesh for a big building (the one in my video) in roughly 3 seconds per floor, with a mesh accuracy of 0.75 m, which is enough for most buildings. For the building in @madrussian's video, it takes less than a second for the whole building.
I have also written another code which is still not complete, but way faster (less than 1 second per floor).


@madrussian BTW, do you think your script could become faster if you traded some accuracy for speed? I'm actually very impressed by how nicely the grids are connected (mine has many more grids!)

 

3 hours ago, johnnyboy said:

And if there is any code you want to use from my crude attempt at scripted AI navigation of buildings you have my full permission to do so.  It includes AI door opening, shotgun door breaching, explosive door breaching (thanks to @beno_83au ...NOT pronounced "bean-o"!), flashbang prior to entry (thanks @phronk ), and more.  It currently requires pre-defined node paths, so is not dynamic and as sophisticated as what you are doing.  Current unpublished version supports ladder usage and @bad benson's enhanced movement so ai can climb walls and  buildings. I hope to publish an update soon (a broken wrist stalled my progress for 2 months). 

Thanks. Those stuff are pretty badass! I'm currently aiming for a more "vanilla-like" AI without the breaching stuff, but adding them as a "candy-eye" feature is not a bad idea. I'll probably look back on this when I'm further down the development road!


 

3 hours ago, johnnyboy said:

Also you may want to reach out to @sarogahtyp regarding his excellent work on shortest path calculation: 

The path calculation (for buildings) is done in a different way in my mod. I use a "recursive function" that finds the connections in one grid and then searches the connections in the next...it basically "forks" every time it reaches new connections (e.g. if the starting zone has 2 connections and each of these connected zones have 3 connections, each ending in the final zone, I get 6 paths in total). The mesh makes the this algorithm very fast, considering I'm only dealing with zones, not nodes.
Then it measures the fastest one by calculating the approximate distances.

The one for "open terrain" is another story. The current one moves in a relatively blind way (just moves straight, when it reaches an object it tries to move around it and creates a "fork", one to the left and one to the right, and keeps doing that until it reaches the destination). But it doesn't work well in towns and also has a problem with compounds enclosed with walls. I'm currently trying to work on a new one that pre-calculates the object bounds to solve this. Plus I'm also working on a grid-based algorithm which is gonna complement this algorithm to solve the problem with steep slopes and also big bodies of water that might be faster to move around.

It sure is a lot of work! 😉

 

Edit: My bad. After actually reading the shortest path algorithm by @sarogahtyp, I realized it does the same thing as mine!

Share this post


Link to post
Share on other sites

That all sounds great.  Regarding mesh calculation being slow, one option is to pre-calculate meshes for vanilla building types (and most commonly used mods like CUP), and create a building mesh library for the community,  If this library existed, your run-time code would simply find near building and lookup the meshes based on building type (no run-time mesh calculation needed).  Something to consider.

Share this post


Link to post
Share on other sites
1 hour ago, johnnyboy said:

 Regarding mesh calculation being slow, one option is to pre-calculate meshes for vanilla building types (and most commonly used mods like CUP), and create a building mesh library [...]

Thats what i also partially meant with my youtube comment:
For an existing asset, the algorithm could do its magic. If we have a manual way to save the output, it just has to be loaded again the next time the building is used (or in next mission)- so the calculations can be more complex if necessary.

This means someone (not a buildingmaker) could pre-generate the stuff manually - in a batch, and write it in a custom config or a function or something. A buildingmaker could also do this directly.

Especially information thats not so trivial to retrieve could be very usefull to manually fine tune either by someone (mission maker/scripter/etc) checking ingame, or directly pre-specified by the buildingmaker himself.

 

The only thing thats not possible to precalculate on per-building-class level is, when obstacles are placed inside buildings - this still has to be checked "on demand", at least once per mission.

 

To make better AI that behaves more like a human it needs to receive more information about its surrounding. In case of building overabundance (urban environment/ crazy user mission) it would be best from FSM perspective to first check if a building is suited for a purpose or not based on some summary of detail-data   - and only then decide if to enter at all, and then perform calculations on pathing. With dynamic calculation you would have to first calculate every building there is, retrieve summary data, and then find the suitors you might want to enter. If detail-data was already partially pre-specified you would only have to check on buildings that didn't have data.

e.g. task - setup defense against expected enemy -> occupy buildings. There are many buildings, so a player would decide based on several criteria:

How many firing positions does it have, which directions can they cover

How many access points does it have, where are they located

How well covered are the firing positions (giant window in a shop is worse than tiny embrasure in bunker) - and from which direction (e.g. a medieval wall only provides cover in one direction, and has no overhead cover).

How strong is the protection (wallthickness and materialtype,  wooden shack vs. concrete pillbox - data from firegeometry)
How durable is the building against collapse (collected data from hitpoints class and hitpoint LOD)

 

I am making a fortification system (pillboxes, fort-like walls, towers and other things) with proper embrasures, machicolations, vehicle firing emplacements and all that. As it stands i would have to 'glue' AI in place by invisible fire-from-vehicle turrets (which is a poor bandaid) for defense. Attack would be a hilarious catastrophical failure.  Due to the restrictive firing angles and complex shapes that can appear, i'm not sure if an algorithm could handle all the data in reasonable time I think it would be best to have a "manually overwride"/pre-specifications for "difficult" buildings or areas  - esp. infantry & vehicle embrasures, so that AI know which position to take / defend against enemy from direction xyz. And most FSM thus far dont deal well with buildings at all. They'd rather occupy a windowless wooden shack 20m away than a concrete pillbox 150m away.

 

here's some inspirational pictures, perhabs

https://media.moddb.com/images/mods/1/35/34680/cornerfuse.jpg

https://abload.de/img/gatesys6yece9.jpg

https://media.moddb.com/images/mods/1/35/34680/towerb_combo1.jpg

https://media.moddb.com/images/mods/1/35/34680/towerb_combo2.jpg

https://media.moddb.com/images/mods/1/35/34680/20190217223006_1.jpg
https://forums.bohemia.net/forums/topic/209157-wip-samarsk-uprising-a-w40k-total-conversion/?do=findComment&comment=3323730
 

 

 

  • Like 2

Share this post


Link to post
Share on other sites
52 minutes ago, johnnyboy said:

That all sounds great.  Regarding mesh calculation being slow, one option is to pre-calculate meshes for vanilla building types (and most commonly used mods like CUP), and create a building mesh library for the community,  If this library existed, your run-time code would simply find near building and lookup the meshes based on building type (no run-time mesh calculation needed).  Something to consider.

Yeah. But if there happens to be a new building on the map, the user will have to wait like a few minutes for the mesh to complete.

 

Also, that mesh is way too accurate. There's no need for so much accuracy. Just look how nicely shaped the corners are. But the problem is it's hard (and time consuming) to find where the unit is in that mesh (at least the way I see it). Because currently I use "inArea" to find out where the unit and his destination are to generate the path.

 

So long story short, I'm looking for a practical and fast method here.

Share this post


Link to post
Share on other sites
1 hour ago, x3kj said:

The only thing thats not possible to precalculate on per-building-class level is, when obstacles are placed inside buildings - this still has to be checked "on demand", at least once per mission.

That's why I'm more inclined towards dynamic mesh generation.

 

1 hour ago, x3kj said:

To make better AI that behaves more like a human it needs to receive more information about its surrounding. In case of building overabundance (urban environment/ crazy user mission) it would be best from FSM perspective to first check if a building is suited for a purpose or not based on some summary of detail-data   - and only then decide if to enter at all, and then perform calculations on pathing. With dynamic calculation you would have to first calculate every building there is, retrieve summary data, and then find the suitors you might want to enter. If detail-data was already partially pre-specified you would only have to check on buildings that didn't have data.

I know. That's the plan.

At the moment, a building (or obj) is analyzed in three situations:

1. The unit needs to use it (e.g. it's a building and I must generate a path for it)

2. It's an object over a river, which means its a bridge, and I analyze that to see if I can calculate a shorter path. 

3. An object which could be a potential hiding spot for the enemy. In the case of a building, I also need to calculate the window positions, etc. This is not complete yet so right now I'm just using available buildingPos.

 

1 hour ago, x3kj said:

e.g. task - setup defense against expected enemy -> occupy buildings. There are many buildings, so a player would decide based on several criteria:

How many firing positions does it have, which directions can they cover

How many access points does it have, where are they located

How well covered are the firing positions (giant window in a shop is worse than tiny embrasure in bunker) - and from which direction (e.g. a medieval wall only provides cover in one direction, and has no overhead cover).

How strong is the protection (wallthickness and materialtype,  wooden shack vs. concrete pillbox - data from firegeometry)
How durable is the building against collapse (collected data from hitpoints class and hitpoint LOD)

Some of this stuff (e.g. level of penetration) may make it too complex. Remember: too much accuracy comes at the cost of performance. The vanilla AI without any of this stuff is already too slow, especially if they have a target. Now imagine what would happen if this stuff were added! 

My AI are already a bit slower than the vanilla. Of course, I'm not gonna use this code on too many AI, just the player's squad plus one or two nearby squads for CQB, but I still think it will be too slow.

 

Anyway, these are good suggestions, but I don't want to get too ambitious here only to fail because of frustration.
 

Spoiler

Edit: I swear, as soon as I opened a video on YouTube, this video was being "Recommended to me":
"The cancelled open-world game that was too ambitious... Eight Days"
What a weird coincidence! 😉

 

 

  • Like 3

Share this post


Link to post
Share on other sites

Hey Leopard20 looking forward to release,

wanted to add an interesting point idk if its something you had considered or maybe i haven't seen enough of your work for the AI command,

and you have implemented something like this but an idea i had is giving the AI under your command the ability or rather function to perform cqb maneuvers.

 

  For example:  Stacking

  Instead of a normal formation like the file where the AI follow close and in a line, you could have them form up into a stack where they get closer and

"copy your stance", then when entering a room big or small with no door or with door, instead of following you in, in the same tight formation, they

would actually split and cover the room.

 

     So first guy in, 2nd guy goes right or left based on lead's direction (opposite) , next guy in would follow lead, 3rd goes right,

4rth can go center, all this time they are taking cover, and are spaced from each other so they not only have muzzle discipline but are spaced enough to

be able to engage any threats, at the same time it would be fast and response and follow your lead.

Or you could have a command to stack up, basically the AI is coded and knows how to clear a room.

 

Wingman Concept

     Another interesting tactic that could possibly integrated is called a Wingman Concept,

its where an AI would follow close to either the player or a lead AI, and based on the floor, terrain, openings, walls, obstacles, and enemy position and threat

the wingman will adjust his position around the lead moving from to the left or right of the lead, the wingman would always be slightly off the side of the lead in order to engage any target

the lead is engage, and covering what the lead is not.

A good example of this and how its really done is this CQB training video for professionals, they talk and demonstrate how its done here:

starts at 2:30

 

So ideally the AI would need to stick to the lead no matter where he goes, also have muzzle disciple as in not be aiming ahead when moving to

the otherside of the lead, with weapon up.

Thats probably one of the things i hate the most in this game is the AI will shoot you in the back, its like they have no LOS when it comes to the player.

If anything is it possible to have an AI stick with you and cover what your not covering, and not shoot you at the same time?

 

Your thoughts?

  • Like 3

Share this post


Link to post
Share on other sites
46 minutes ago, Gunter Severloh said:

Or you could have a command to stack up, basically the AI is coded and knows how to clear a room.

THAT WOULD BE A DREAM!!!! There was an old game, Delta Force: Black hawk down, where you could get the AI team to stack up and enter the room and clear it "Delta-style" LOL.

 

58 minutes ago, Gunter Severloh said:

Wingman Concept

That will do as well..

Keep up the awesome work Leopard20...you're getting there...

  • Like 3

Share this post


Link to post
Share on other sites
4 hours ago, Gunter Severloh said:

Stacking

  Instead of a normal formation like the file where the AI follow close and in a line, you could have them form up into a stack where they get closer and

"copy your stance", then when entering a room big or small with no door or with door, instead of following you in, in the same tight formation, they

would actually split and cover the room.

 

     So first guy in, 2nd guy goes right or left based on lead's direction (opposite) , next guy in would follow lead, 3rd goes right,

4rth can go center, all this time they are taking cover, and are spaced from each other so they not only have muzzle discipline but are spaced enough to

be able to engage any threats, at the same time it would be fast and response and follow your lead.

Or you could have a command to stack up, basically the AI is coded and knows how to clear a room.

It's a good idea. I'll see what I can do.
 

 

4 hours ago, Gunter Severloh said:

Wingman Concept

     Another interesting tactic that could possibly integrated is called a Wingman Concept,

its where an AI would follow close to either the player or a lead AI, and based on the floor, terrain, openings, walls, obstacles, and enemy position and threat

the wingman will adjust his position around the lead moving from to the left or right of the lead, the wingman would always be slightly off the side of the lead in order to engage any target

the lead is engage, and covering what the lead is not.

A good example of this and how its really done is this CQB training video for professionals, they talk and demonstrate how its done here:

starts at 2:30

 

So ideally the AI would need to stick to the lead no matter where he goes, also have muzzle disciple as in not be aiming ahead when moving to

the otherside of the lead, with weapon up.

Thats probably one of the things i hate the most in this game is the AI will shoot you in the back, its like they have no LOS when it comes to the player.

If anything is it possible to have an AI stick with you and cover what your not covering, and not shoot you at the same time? 

 

Your thoughts?

At the moment, the AI follow you exactly in the formation. In other words, unlike the vanilla formation, the formation angle doesn't change as you turn. If the formation angle changes too much suddenly (e.g the player suddenly turns 180 degrees) the AI swap places in the formation. Otherwise this would result in chaotic movement.
If the formation angle doesn't change, there's no chance of AI shooting you in the back.

Speaking of wingmen, the W and M formations that I've added actually give you two wingmen on both sides.

The File and Column formations are a bit of a problem. The AI can lean even if they are behind another unit (they lean when sth blocks their line of sight now), but if there are too many units in the formation, the ones in the back might not be able to fire at all.
I'm thinking of making AI break formation temporarily for such formations. I haven't given this enough thought yet.

As for covering angles, I'm gonna add a feature that makes them cover all angles as they move (only in COMBAT behavior, so they don't slow down too much)

 

3 hours ago, zagor64bz said:

THAT WOULD BE A DREAM!!!! There was an old game, Delta Force: Black hawk down, where you could get the AI team to stack up and enter the room and clear it "Delta-style" LOL.

 

That was my favorite mission in that game!

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites

I'd like to report a possible bug. While playing HWS recently I decided to recruit some nearby units to replace some of the losses in my squad. I was playing West Germany vs East Germany using GM assets so all the nearby units had German names. I went through the list and recruited all the names that were shown (about 5) and after I ordered the new squad members to regroup, I noticed that one of them was an East German soldier with full uniform, weapon and kit. I wondered if it was some kind of anomaly, so the next time I was near a group of enemy soldiers I did it again and recruited every one of them to my side. Is it supposed to be possible to enlist enemies? I'm fine with being able to enlist civilians because I can always arm them and find them proper clothing but it seems a bit odd to be able to enlist enemies. I exited ARMA and reloaded with just CBA and AIOSP enabled and went in the editor to see if I could do it again and rule out any bugs caused by other mods or the mission I was playing. I loaded Altis and then placed a BLUFOR rifleman and an OPFOR survivor (unarmed) and hit the play button and sure enough I was able to recruit the enemy soldier to my side. Is this intentional or a bug? Just curious.

Share this post


Link to post
Share on other sites
3 hours ago, scimitar said:

I'd like to report a possible bug. While playing HWS recently I decided to recruit some nearby units to replace some of the losses in my squad. I was playing West Germany vs East Germany using GM assets so all the nearby units had German names. I went through the list and recruited all the names that were shown (about 5) and after I ordered the new squad members to regroup, I noticed that one of them was an East German soldier with full uniform, weapon and kit. I wondered if it was some kind of anomaly, so the next time I was near a group of enemy soldiers I did it again and recruited every one of them to my side. Is it supposed to be possible to enlist enemies? I'm fine with being able to enlist civilians because I can always arm them and find them proper clothing but it seems a bit odd to be able to enlist enemies. I exited ARMA and reloaded with just CBA and AIOSP enabled and went in the editor to see if I could do it again and rule out any bugs caused by other mods or the mission I was playing. I loaded Altis and then placed a BLUFOR rifleman and an OPFOR survivor (unarmed) and hit the play button and sure enough I was able to recruit the enemy soldier to my side. Is this intentional or a bug? Just curious.

Hi. It's a bug. Thanks for the report.

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, Leopard20 said:

which allowed you to recruit enemies.

You ever get shot and have no idea where it came from, you look around and theres no one in the windows, floor, ground, roof, and your like im in a desert

amongst a few buildings, where the f*ck did that come from?!   ...

     Now i know why i was getting shot in the back 😄

Nice work Leopard!

  • Haha 3

Share this post


Link to post
Share on other sites

 

Love watching AI do things like toss a grenade in a room and then clear it. That Delta Force game looks fun even now -people forget how much gameplay matters more than flashy graphics. Another thing is that those buildings are nice and roomy for AI, while the Arma buildings tend to be too tight -hopefully future Arma titles will keep that in mind (yeah right..)

  • Like 4

Share this post


Link to post
Share on other sites

Hi, 

Is there a way to order units in my group to Hold Fire under any circumstances? Eg. even if they get shot?

 

Thsnks

rainbow

Share this post


Link to post
Share on other sites
4 hours ago, rainbow47 said:

Hi, 

Is there a way to order units in my group to Hold Fire under any circumstances? Eg. even if they get shot?

 

Thsnks

rainbow

If you order them to fire on your lead, they will not open fire until you fire (I use the "BLUE" combat mode)

I plan to replace the hold fire command in the menu with a custom one to also fix the problem which makes them open fire again if you, for example, tell them to copy your stance. I'll see if I can also add all combat modes that are available in Arma: https://community.bistudio.com/wiki/setCombatMode

Share this post


Link to post
Share on other sites
24 minutes ago, Leopard20 said:

they will not open fire until you fire

This is so badass, this very idea reminds me of how it works in Ghost Recon Wildlands, where when you give your AI squad mates targets, they will move to a position to acquire

the targets, and will not fire until you give them the go or you fire first, this imo is very realistic and immersive nice work Leopard!

 

Just to note, dont forget to add the link to the Armaholic page on your first post.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Ya its on Armaholic news, he patrols the forum here so to speak looking for any new releases or updates, hes been doing that for along time now.

If you ever need to make changes or updates to your page send him a pm on Armaholic and he'll update the page.

 

Share this post


Link to post
Share on other sites
On 9/23/2019 at 6:39 PM, Leopard20 said:

If you order them to fire on your lead, they will not open fire until you fire (I use the "BLUE" combat mode)

I plan to replace the hold fire command in the menu with a custom one to also fix the problem which makes them open fire again if you, for example, tell them to copy your stance. I'll see if I can also add all combat modes that are available in Arma: https://community.bistudio.com/wiki/setCombatMode


Thank you Leopard. Would be awesome to have a custom command. In particular for stealth missions, it is sometimes required to fire while my team holds fire under any circumstances. 

Share this post


Link to post
Share on other sites
On 9/23/2019 at 7:02 PM, Gunter Severloh said:

This is so badass, this very idea reminds me of how it works in Ghost Recon Wildlands, where when you give your AI squad mates targets, they will move to a position to acquire

the targets, and will not fire until you give them the go or you fire first, this imo is very realistic and immersive nice work Leopard!

 

Just to note, dont forget to add the link to the Armaholic page on your first post.


That’s exactly what I am aiming for. Small squad tactical gameplay. 

  • Like 1

Share this post


Link to post
Share on other sites

Update:
All-in-one Command Menu (Deluxe) - v1.1.2-Beta

 

# Added:
* Medical: Added an indicator icon to show you where the medic is. This icon is always shown when you're unconscious. If you don't want it to be shown when you're "conscious", use the option that's been added in CBA settings.

 

# Fixes:
* Revive cheat: Fixed the death timer for AI (they wouldn't die when they where unconscious). Unconscious units die after 5 minutes + some minor bug fixes
* Super pilot: Fixed another loophole which would allow the helicopter to fly with engine off + improved the object detection to make sure the helicopter doesn't move through objects (which would result in instant explosion)

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Update:
https://github.com/leopard20/All-In-One-Command-Menu/releases/tag/v1.1.3-Beta

 

# Fixed:
* Medical: Medic icon wouldn't disappear if the medic "abandoned" you.
* Super pilot: The pilot lowers the landing gear automatically if the "altitude" (technically it's height above surface) is below 20 m and the helicopter is descending.

  • Like 3

Share this post


Link to post
Share on other sites

Wow.

 

The medic part of this mod is amazing. 

 

Another mod, Project Injury Reaction, has squad members dragging a wounded squad mate out of danger, but they were really slow.

 

I'll have to adjust my tactics, like smoking up to allow the medic to do his business.

 

Truly amazing.

 

Well done.

  • Like 2

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

×