Jump to content
nkenny

LAMBS Improved Danger.fsm

Recommended Posts

The shear amount of work you have had to put into this mod is staggering, and that shines through when in use. 

However, a lot of maps out there are using Arma ported structures, like CUP etc. which does result in some rather unfortunate AI behavior (AI walking through doors etc). Is there a workaround to negate these issues one way or another? As far as I can tell from an earlier post of yours this is due to a lack of positions and paths defined in these ports. Would it be feasible to add a setting which "disable" the AI usage of these buildings altogether? 

  • Like 1

Share this post


Link to post
Share on other sites

I'm trying to get the AI to retreat in a script.

I have a trigger at a position that I'd like them to retreat to.

How do I go about this? I'm trying several different things, like:

[myUnit, getPos retreatpoint, true, 10, 2, true] call lambs_wp_fnc_taskAssault;

(myUnit is the variable name of the leader of an AI group, retreatpoint is a trigger).

Which does not work, the AI just go prone and stand back up. What am I doing wrong?

Share this post


Link to post
Share on other sites

@jo spanner
I'll do a little bit of testing tomorrow. 

It should be simpy: 

myUnit, getPos retreatpoint, true ] spawn lambs_wp_fnc_taskAssault;

Note spawn. Also I suspect your sixth argument confused things. It is an internal variable when the point of assault/retreat is a waypoint. 🙂

-k 

  • Thanks 1

Share this post


Link to post
Share on other sites

@tittoffer
We'll look into it. I am afraid it is an all or nothing thing in regards to buildings however. Some buildings are simply poorly configured. 😕

-k 

Share this post


Link to post
Share on other sites

Is it possible to make the AI go into Fleeing/Panic state manually, and consequently have an adjustable control in the CBA menu where you could select, say a percentage of casualties a squad begins to flee at?

Share this post


Link to post
Share on other sites

@mjolnir66
Unfortunately the fleeing variable has only one point of contact "<group> allowFleeing 0/1".  And once the group has started fleeing, it is difficult to unflee it.  If you want more fine control for your own missions, I would set the fleeing variable to 0 and let the panic function do its work 🙂

 

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

 

-k 

Share this post


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

@mjolnir66
Unfortunately the fleeing variable has only one point of contact "<group> allowFleeing 0/1".  And once the group has started fleeing, it is difficult to unflee it.  If you want more fine control for your own missions, I would set the fleeing variable to 0 and let the panic function do its work 🙂

 

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

 

-k 

 

What is the panic function controlled by?

Share this post


Link to post
Share on other sites
On 4/21/2020 at 1:56 PM, mjolnir66 said:

Is it possible to make the AI go into Fleeing/Panic state manually, and consequently have an adjustable control in the CBA menu where you could select, say a percentage of casualties a squad begins to flee at?

This is basically what I've been working on in a little script.

Each group has a random threshold at which they run, and once they hit that threshold, they use the LAMBS retreat waypoint to run away (or there's a low chance that they'll surrender instead.

Share this post


Link to post
Share on other sites

~Showcasing three small new features: Flares, throwing smoke and deploying static weapons 

@mjolnir66
It is essentially an expanded Suppression function. Units which are heavily suppressed have a chance to be panicked.  You can configure this chance 0-100% in the CBA settings menu. You can also attach custom scripts to it via CBA eventhandlers. 

@jo spanner
Cool idea 🙂

-k 
 

  • Like 12

Share this post


Link to post
Share on other sites

Nice feature! Would the functionality be negatively affected by ACE's new CSW system? The ammo carrier would have to be programed to reload the mortar after every shot, or just give the mortar unlimited ammo.

Share this post


Link to post
Share on other sites

Hi @nkenny !

 

I have a question - please tell me LAMBS has an effect on vanilla waypoints or not?
I'm interested in whether you have improved ai-behavior in vanilla waypoints such as SEEK AND DESTROY, GUARD, DESTROY, SUPPORT etc?

Or is the influence of the LAMBS mod limited to ONLY new additional waypoints from this mod?

If you have improved AI behavior for vanilla waypoints, please explain how LAMBS affects this.

 

Thanks

 

 

Share this post


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

Hi @nkenny !

 

I have a question - please tell me LAMBS has an effect on vanilla waypoints or not?
I'm interested in whether you have improved ai-behavior in vanilla waypoints such as SEEK AND DESTROY, GUARD, DESTROY, SUPPORT etc?

Or is the influence of the LAMBS mod limited to ONLY new additional waypoints from this mod?

If you have improved AI behavior for vanilla waypoints, please explain how LAMBS affects this.

 

Thanks

 

 

This mod is not just waypoints, it will affect what AI will do once they detect danger, hence the name of the mod.

 

That said, no, the vanilla waypoints are untouched. Yet the AI will behave differently due to the reaction to danger and how it now assess this. If an AI does not detect danger and go into combat mode the waypoints will be exactly as vanilla AI. The waypoints added by this mod are basically a bonus on top, these are scripted behavior to make AI more controllable to a mission maker if they choose to have AI do certain specific tasks such as hunt, retreat, garrison etc.

  • Like 1

Share this post


Link to post
Share on other sites
21 hours ago, diwako said:

it will affect what AI will do once they detect danger, hence the name of the mod.

That said, no, the vanilla waypoints are untouched

 

 

21 hours ago, diwako said:

Yet the AI will behave differently due to the reaction to danger and how it now assess this

 

I do not discuss the response to AI danger.

I discuss behavior at certain waypoints, which has its own characteristics even without danger for AI - this is also a very important point in the gameplay. 

 

Just one example out of many:  I've always been bothered by the SEEK AND DESTROY waypoint when the AI sees no danger, when is no enemy near.

Most frustrating was the fact that the vanilla AI search lasted approximately 25-30 seconds in a radius of approximately no more than 50 meters! At the same time,

AI will never enter buildings - Is that what the search should look like? 

If it is a vehicle it also uses a narrow radius and stops as frozen after a short time. Open the vanilla game and put such a waypoint in an urban environment - you will see the result that I described.

AI sees no danger, but the enemy can still hide in buildings or vegetation. If AI had a longer action for its movements and a larger radius, then this would increase the ability to find an enemy

 

Unfortunately, vanilla SEEK AND DESTROY not much different from waypoint MOVE. In my understanding, SEEK AND DESTROY should justify its name - the AI must search, search, search long time, not stops searching after 25 seconds and must search inside buildings, at least a little. Or another example. If the unit has a GUARD waypoint, they must deploy static weapons (if has) or must occupy armed empty vehicles, turrets, maybe buildings - but in the vanilla game we don't have it.

 

IMHO - would be great if @nkenny also improved AI when player using vanilla waypoints. At least the main waypoints - DESTROY, SEEK AND DESTROY, GUARD, SUPPORT

Improvements might not be radical, such as increasing the duration and radius for searches or same garrison of buildings, deploy static weapons.

 

I like @nkenny LAMBS thank you very much for this work, but without affecting vanilla waypoints to say the least it looks weird. 

Because the player does not have the ability to redo all downloaded missions  and change the all waypoints in them, change to those that LAMBS offers

 

Share this post


Link to post
Share on other sites

Is it possible to get AI vehicles to use HE rounds on infantry? The AI behaviour in armoured vehicles is pretty amazing now, but tanks just fire Sabot rounds at infantry which isn't particularly effective, though it is pretty miserable to be on the receiving end of.

Share this post


Link to post
Share on other sites

@mickeymen
The mod does not at present alter the built in behaviours of waypoints. That code is unfortunately not accessible. 

What you describe is something I have considered. At least reading the waypoints units are currently working under and then somehow taking these into account in their decision making process. One limitation is that the Danger fsm is purely reactive. The AI only makes assessments when actually in combat.  What you describe would require another cycle to run on the group (or all groups) in question.  Now this isn't completely out of bounds, in future versions we will be adding a post-battle assessment phase. Where just such things can be accounted for. 

So the answer is yes, we are aware of it. At the present, though we have the ability to, it is not within the scope of existing technologies, at this stage of development to add such features. Its also worth mentioning that LAMBS Danger seeks to be a non-invasive enhancement of the game. Suddenly manning (potentially stealing) vehicles or extended garrisoning of buildings is outside what we intend to do. 

With that said, armed with LAMBS Danger it is quite easy to write your own mission script (or mod for that matter) to suit your needs.
1. Periodically cycle through all local groups
2. Check each groups  waypoints
3. If the waypoint is of types X, Y, and Z  AND has a blank script/init field:  Add your own intended script to that field suitable to the waypoint in question.  The next version of LAMBS Danger will come with simpler garrisoning scripts and so on. 🙂

@mjolnir66
Vehicles (of all stripes) are due another pass in the future. One reason I have been hesitant to delve too deep into features such as changing to HE rounds is:
1. I want the mod to be universally compatible with content mods:  I do not want to add and maintain of all ammunition types in all mods. 
2. Creating a powerful and flexible engine to make that decision is harder than you might think. When to change from one round to another is hard enough for humans, you do not want AI to be stuck in an endless reloading cycle. 
3. It would make tanks EXTREMELY dangerous. 

-k 

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

@nkenny thank you for the detailed answer

 

21 hours ago, nkenny said:

The mod does not at present alter the built in behaviours of waypoints. That code is unfortunately not accessible

 

Yet here I did not quite understand. I would like to know technically is it possible to edit vanilla waypoints or not?  Edit - I mean to add additional settings or just change the behavior of AI.

I ask you because I have never seen a mod that modifies vanilla waypoints

 

I always dreamed that vanilla waypoints had additional settings inside.

For example, SEEK AND DESTROY could have some useful settings inside:

 

a) search duration (sec)
b) search radius (meters)
с) check near buildings

 

such a setting could significantly improve the gameplay. If this is possible, please consider this in the future.

 

 

Some Hours later

 

@nkenny, I want to say your mod is great, Thank you so much for your work, this is Christmas!

I tried my old mission in which only vanilla waypoints and I noticed a lot of changes in ai behavior. I couldn’t hide for a long time inside the building. AI penetrates inside, even without your special LAMB waypoints! 

How did you do it? You said that you did not change the vanilla waypoints, but the AI still penetrates the buildings. There are special waypoints in your mod to penetrate buildings, but they are not required.

Bliss, I was trembling with fear while inside the building, there was no sense of security - AI infiltrates buildings anyway, tracking down the player inside.

 

I also noticed that the ai-shooter of the static turret kill me from the specific angle at which he cannot kill me in the my vanilla mission.

Have you changed the angles (increased) at which the AI can attack the player by means static turrets?

Share this post


Link to post
Share on other sites

Hi @nkenny, thanks again.  A while back I asked:

 

On 2/19/2020 at 11:28 AM, madrussian said:

4. Do you guys ever move or delete group waypoints?  (Specifically, do you ever move or delete WPs that mission makers place in editor or that we add via script?)  In short if we add WPs, are they subject to LAMBS manipulation?

 

to which you responded:

 

On 2/19/2020 at 1:01 PM, nkenny said:

Thanks @madrussian, glad you are enjoying it!

...
4. Never. It is a design goal of the core component that LAMBS Danger merge seamlessly. This means never altering existing waypoints nor toggling enableAI/disableAI features.  The waypoints are stood somewhat beyond this design goal and are allowed to push the envelope. The logic being simply this:  When LAMBS WPs or custom scripts are used, they are meant to be used by the mission maker. 

 

Again, I think this is 100% the right approach and is much appreciated.  Unfortunately, I found a spot in Lambs where you guys indeed alter existing WPs.  It's this line of code in "fnc_leadermanoeuvre.sqf":

(group _unit) move ([_overwatch, _target] select (_overwatch isEqualto []));

So in my dynamic mission, I noticed that often while playing with Lambs, groups were losing their WPs (whereas when playing without Lambs that never happens).  This is a huge problem, because these AI groups never reach their objective.  After extensive research, low and behold I discovered this move command as the culprit.  To confirm my recollection of how the move command operates, I did some quick independent testing in the editor and turns out indeed:  The move command will effectively cause the group to skip their current WP.

 

Test is pretty simple:

 

1. Create an AI group give them a handful of new WPs, and watch for a moment as they move out towards first of these new WPs.

2. Midway through their travel towards first WP, call this:

_group move (getPos player);

3. Watch as they redirect towards the player, and eventually reach his position.

4. Observe this group now moves on to second WP, completely skipping first WP.

 

In my mission, every time I order a group to a new objective, I delete all existing WPs and give them one new WP, but I do this all over the place within my mission code.  So it would be quite tough to try to somehow mitigate all this WP skipping (to play nice with Lambs).  Now of course I can simply disable leader manoeuvres in the Lambs settings, but wanted to make you guys aware in you are indeed altering WPs (currently) in this case.

 

My suggestion for leadermanoeuvre:  Perhaps simply doMove all units in the group at once instead?  (Turns out doMove does accept an array of multiple units.)

 

Anyhow love your mod, please keep it going! 😄

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

@madrussian
That's a massive find! In my experiments I found that the move command overrode the current WP, but then set the unit back on their previous one. I will promptly investigate. We are adding a considerable rework and expansion of fn_leaderManoeuvre So changing this will be quick-- and you can expect a fix soon.

-k

 

Update: Error has been confirmed, exactly as described. We will institute a fix. Thnx madrussian

  • Like 3
  • Thanks 1

Share this post


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

@madrussian
That's a massive find! In my experiments I found that the move command overrode the current WP, but then set the unit back on their previous one. I will promptly investigate. We are adding a considerable rework and expansion of fn_leaderManoeuvre So changing this will be quick-- and you can expect a fix soon.

-k

 

Update: Error has been confirmed, exactly as described. We will institute a fix. Thnx madrussian

 

Great find both @madrussian and @nkenny!

 

Please share with us the approach you take in fixing this 😃

Would be great for our own Ai moving scripts 😉 

  • Like 1

Share this post


Link to post
Share on other sites

@LSValmont
Nothing fancy. In our case the move just gave the squad extra impetus to keep on target. Based on our new tactical manoeuvres , substituting with doMove, as suggested, was sufficient. 

 

-k

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites


Realised half-way through this video that I didn't have my headset on. Which in turn messed with the sound quite a bit. Initially I had intended to remake it, but didn't really have the time for it.  Take it for what it is. An early development video showcasing the new group manoeuvre system being introduced in version 2.4

Oh, and errors in suppression (i.e., friendly fire have since been fixed) 

-k 

  • Like 10

Share this post


Link to post
Share on other sites

Hey @nkenny, hell of a mod and I'm really enjoying it. Quick question for you regarding the game difficulty settings: what are your parameters for both the AI Skill and precision? Do you keep it to the default regular and expert settings or do you customize those options? If you customize them what do you use?  Keep up the good work my man. Really appreciate you keeping up with this project

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

×