#enfusion_ai
1 messages · Page 6 of 1
So its not possible?
My setup is..
Conflict
Using ambientspawnpatrols
yes if you are using ambient ai they will spawn within 750m of a player's presence
But they do not. They all spawn no matter the distance
I get this on both worthy islands and kunar maps. Which are fairly big, hence the need for me to restrict them. Things get abit lumpy with a constant AI presence
Is this distance thing a standard thing from AI World and AmbientSpawnPatrols? Or are people having to set a distance in some moduel? 🤷♂️
as far as i know the spawning distance can't be changed unless you are working with triggers but not sure if that's possible in conflict
Hmm okay but no not working with triggers 🤔
Makes me wonder if the pve side of things has messed it up
what do you mean?
My scenario is setup for Pve so makes me wonder if maybe thats causing issues with the ai always being spawned no matter the distance
From what I remember it's only the entity that spawns the ai that spawns in, and then if players get close enough they are actually spawned in and activated. I edited the script in my scenario to not spawn the spawner entities in until players are close enough.
for some reason the ai wont use my turret even tho its setup the same as the btr turret any idea?
it triggers and follow them but they will not shoot at all
actually i closed it down the 50 version of the turret does shoot but the 762 version does not , even tho they are setup the same way only diffrence is the caliber of the gun
(i also believe ai is jsut braindead ...) half the time it does work and other half not on the 50 aswel. they just spin around and act like they braindead and then randomly start shooting
Hello, does anyone have any idea why you can see hit decals when shooting AI from very far away but the AI doesn't seem to receive any damage?
Happens with all guns, sniper or assault.
do you think it's possible to create a PVP-like experience in a PVE scenario? Like a conflict match but PVE that feels like PVP? what would I have to implement to achieve this? I've not seen other PVE conflict other than Gramp's PVERemixed.20
is this your own scenario? did you set SCR AI WORLD correctly?
It's an edited version of Gogland, SCR AI WORLD should be fine, everything else works just shooting from far away doesn't seem to work
Of course. Just use gramps script code. Then do as u please. Well thats what ive done and works well
do you have any scenarios available on the workshop? I'd love to try some new ones. just wanna see what things are people doing differently from the usual Gramps mod
I do but i wouldnt say mine is the best to learn from 😆 i also used gramps mod to get to the stage mine are at
My latest is RTR-Conflict-Islands. Possibly my best one so far for cleaness. Using worthy islands
alright thanks i'll check it out!

what does this mean for a Newbie? In Arma you just place an AI and a bullet does the rest...?
hes asking if its ur own created scenario, because if it is then maybe you have not setup SCR AIWorld up correctly, (i presume) but yes.. have you made sure all your ai setup correclty
assuming thats ur own scenario on ur own server
Right but im just questioning (as an outsider to reforger) that in Arma 1-3 , bullet hit registry was built right in -no matter what the landscape/navmesh/self made mission etc...so here you need to do extra steps for just that?
i cant say anything on any arma before reforger, it realy depends on what you plan is with a server, you can easily just use other mods to give u what u want and then any more custom just do your self in tools
your clip above, is that on your server or someone elses?
in regards to tryna help u problem solve knowing if u created the scenario is kinda key lol
i mean maybe bullet registering it's by default, yeah. but i noticed in the video that the AI didn't even react to gunfire. that might suggest a problem with the SCR_AIWorld not configured correctly. Basically, you have to add the managers to make the AI functional otherwise they just stay there not knowing what to do, where to go and blind. lol
how could i make the ai harder or easier like hit more shots with better accuracy
there are difficulty settings in the AI prefabs.
ok yea i was coming back to ask where i go to change like the line or folder to look for thanks
@cinder gulch would that be in world editor or enfusion workbench
Do they actually play out that way ie AI skill setting? Meaning I remember in Arma 3 setting an AI skill to .2 vs skill level 1.0 -yet they fought and aimed exactly the same
Couldnt find that AI Prefab menu -but Editing the Unit I only see something about Aim Improvement -how does this work?
I thought you were using the Tools. If you are doing game master there are mods that can be used to tweak the AI difficulty. Crx enfusion AI for example or the one you have there
Oh -lol I forgot I had DCO expirimental -that must be what this menu is
World editor. Depends what game mode you are using but basically place the AI and go into the components (right side of the screen) and the difficulty settings is almost at the bottom of the list
so im using gramps as a learning scenario and have been going through it all and just seeing how he has or adds or combine stuff but ive been looking for that ai prefab
conflict its gramps scenario im using his as a learning instead of base vanilla but ill go see if i find it thanks
Okay so gramps uses the conflict game mode I think. So it's as easy as search for the AI in the resource manager (USSR character for example) and you just drag it and drop it in the world
Then go to the right side of the screen there's a menu there. It's hard to explain on text lol I'll send some screen shots later if you still need them
ok thanks ill go do that
i messaged you respond at youre own pace
This is my server indeed
Well, a couple of meters (or feet, whatever you prefer) in front of the one that didn't react, they did react. Everything else works perfectly fine from closeby, just the hitregistry doesn't seem to work from x amount of meter / feet.
Is it possible this has to do with the networkViewDistance or serverMaxViewDistance setting in the server config?
Did u manage to resolve it? I was replying to someone else yday for what you asked 🥲 only just realised 😆
Not really, do you think that it could be the networkViewDistance that's set too low?
Im not sure that relates, i thought that was just like visual distance we can see
Cant say for sure though
I think that's the serverMaxViewDistance
Rather odd if you say close range is fine, but over x distance no damage
Was thinking maybe the faction was set to freindly but if u confirmed close range good then unsure
what is the difference between waypoint Move and Search & Destroy?
Guessing its kinda in the name
Yeah, but when they "move" to a location, they still engage enemies, so I’m not sure what the difference is. The only thing I noticed is that with Search and Destroy, they seem hyper-focused on reaching their destination, almost ignoring enemies along the way. They only engage once they arrive, but other than that, I didn’t see much of a difference.
Bit odd then, ud think they would engauge all targets along the way, unless search and destroy has a point they ment to attack when arrive at said location
While basically ignoring anything upto that point
Yeah it's kinda weird. I'm trying to do a defend outpost type of thing with lots of enemy waves but with the search and destroy waypoint they would keep running towards the point even if I shot at them lol.
Wouldnt it be best to just use defend for that ? If defending the outpost. Unless u mean they need to make it to that outpost first to then defend it
No I mean I am the one defending the outpost
the enemies have to attack it
the "move" waypoint works well for that. I'm going to try the "attack" one to see what's the difference
Ahh sure.. my bad 🤣
Im clueless to the AI in reforger 😅 still in the deep ole pit tryna learn them, hence why im in this channel
When using search and destroy they will search a pre determined area and destroy all threats until there are none left, when using move they will only engage when seeing a threat but not specifically search for the threat
alright thanks!
Good day all.
There's been a change to AIWaypoint_Scout.et. It doesn't function as it use to. In the past, If you used the waypoint on an AI, it would move around randomly within the radius of the waypoint. This worked great for inside buildings if you set a small radius. They would move from room to room.
Now they just stand there and don't move at all. Has anyone done any work with scouting waypoints. Any ideas on how to get them to move again in a random fashion.
I've looked at the attributes to the waypoint itself and played around with them. It must be deeper in the behavior tree, which I don't have any experience with .bt.
Hello - AIWaypoint_Scout wasn't actually ever exposed to GM and game in broad. So basically it's more a leftover than actually maintained feature.
I guess what you want is use AIWaypoint_SearchAndDestroy essential should be the same.
No unfortunately S&D does not exhibit the same movement behavior of a scout wp. Scout wp they moved relaxed, upright and walked from point to point randomly.
It would be great to bring that back as it works well for interiors of buildings.
But that said, I will try and modify the S&D wp to replicate the scout behavior since it does have the movement within the radius.
Appreciate the reply. Good day.
Don't understand this part
" since it does have the movement within the radius. "
That exactly whot S&D does no?
That is correct. The search and destroy way point has the same random movement within the radius of the way point that the scout way point had. So I just need to modify the search and destroy way point, if possible, to get the AI to move relaxed and upright. Not crouched and running from point to point.
yea as actually it was invoking search and destroy inside the BT
relaxed and upright - yea should be easy
It was SUPER EASY!
Viktor is da man! 
Can anyone help? I'm doing a scenario with lots of Defend tasks and I've tried setting the AI to "Move", "Search and Destroy" and "Attack" waypoints to attack the base I am defending but they seem really brain dead
They walk past right by me and not react. It's like they are hyper focused on getting to the waypoint area and they ignore all threats
Once they reach their destination they start to engage but I don't like this behavior at all is very unrealistic
Are you using a "Force Move" instead of "Move" waypoint?
No just regular "Move" waypoint. And I've tried with others but the results is always similar to this. they don't engage until they reach the completion radius
They are game master placed or scripted?
I'm using the workbench, Scenario Framework game mode
This is the one I'm using right now and they behave like in the video I sent earlier
Guess "Priority Level" should be 0 else they will not be able to switch to attack behavior.
Or at least below 70.
Hmm. interesting. I'll try that! Thanks!
it's weird that 2000 is the default value in that case!
Yes no clue why.
Must be a scenario framework thing.
Oh its the attack waypoint.
Check the move waypoint priority.
Attack should be okay.
Hmm... when I change to move the priority remains the same, 2000. BUT if I add a new SlotWaypoint and set it to "Move" it's priority level is 0.
Maybe that was the issue ? I'll try with the Move waypoint set to 0
Yeah move waypoint always has to be lower priority than attack else they will always prioritize the move waypoint.
Thats why force move has a very high priority by default.
Thanks for the help!
Sure np.
Did it work?
Hey all, so I'm new to any form of Development, the only thing I've ever done previously was simply just some very basic .ini File edits.
However, I thought I would jump into Enfusion and see how I go. I have mainly gone in blind with just winging things mostly and have come up with a bunch of stuff that works well enough.
I tried to go as long as I could without asking for any advice, but I think I am now at the point of total frustration.
[AI Single Player PvE Scenario]
Things like the following has been pretty frequent, but for 1 example, I am creating a Ambush where I rescue a Officer from the Russians.
2 other friendly AI's join me in a Convoy where they are #1, #2, with me following in 3rd.
The Ambush works well, however afterwards, the AI just become incredibly dumb and don't even acknowledge very simple commands like "move" or "wait".
The only way I can get these to work again, is usually redo the entire Area again exactly the same...
However, even when I have had this Ambush working start to finish, if I add a single extra Move waypoint to another AI, it will break everything and I will once again need to reset the Area...
I am not seeing any Errors in the Console that look like it would be linked, nor am I getting any crashes.
https://www.youtube.com/watch?v=2EcpJ9-DLSc
With the Video above, I had it working start to finish last night, I go to bed, I wake up and go to work, I get home and test it again... all of a sudden, even though I didn't make a single change, the AI will now no longer follow their directions.
The AI in the M10 is suppose to wait for 30 seconds before driving off, yet he just drives off instantly. The Medic is supposed to run back to the Ambulance and drive me to Camp, yet he just runs away in the complete opposite direction.
I've now spent the past week just redoing and redoing and redoing the same Mission. I get it working, slightly change 1 thing, and then it's completely broken again. What's going on?
It can be pretty tricky to setup something very A.I. specific in reforger.
As you've already noticed there is a lot of random/autonomous stuff going on.
The A.I. in your scenario is stand alone, like you do not command them by using the recruit feature?
A.I. driving also is not fully/properly working yet, so maybe something gets messed up there from time to time.
Everything is Scenario Frameworks. No AI Commanding, I actually wanted to set it up for other things, but have not worked out how to make that function yet. I have increased my Rank above what is needed, yet it still states I need that certain Rank. That's something I'll look into later though as it's not really mandatory.
Indeed, the Vehicle's are terrible with AI. I went through many variations and also altering the Vehicles Files with 50/50 success rate. The M10's though I find the AI drive the best. I have had no issues so far except lazy AI.
It's not just the AI and Vehicles though, the Medic that gets in the Ambulance has a Move Waypoint before the GetInNrst which he even ignores that, yet goes to his first Move Waypoint.
I've come across this issue many times since I started, and I seem to think the Area's are just getting too busy, so a workaround I have been doing is deleting and respawning the AI.
In this instance, after the Ambush, I "Patrol" a little further up which deletes the USSR if any are still unconscious to prevent the AI from driving away then stopping when they see a Enemy, then everything goes to shit.
After the USSR are despawned, I then delete the 2 Drivers, and respawn them in a fresh Area. This way there is nothing that could possibly interfere with what they should do. They aren't in conflict, they spawn, and only do the first 2 Waypoints before doing their own thing.
Similar things happen with my Audio Triggers as well. Too often I need to reset the Triggers as; for an example; when I have a Trigger to be activated by a specific prefab, it will bug out many times and just activate on any presence. I need to fix this by deleting the Trigger and remaking it, and it works fine again until I change something completely unrealated to it's own Area.
I "Patrol" a little further up which deletes the USSR if any are still unconscious
This could be due to LOD switching.
If a player or game master camera is far away from an A.I. they will get their simulation disabled for performance reasons.
They will become invisible but "should" still be there and be re-enabled once you get closer to them.
So you have the whole thing setup/pre-build by using the scenario framework?
Pretty hard to tell if or how you could fix this.
Like i've said there are things going on with the A.I. in reforger, which may can make it pretty hard to fully properly controle them and have them do exactly what you like them to do.
I'm not very familar with the whole scenario framework anyways...
So sadly not much really i can tell you or give any good helpfull advice besides i can feel you. 😅
Nah me deleting the USSR is completely intentional, as if they are unconscious and the Friendly AI go out of Alert Mode before the unconscoius enemy wakes up, they will continue their Waypoints and start driving away, an Enemy will then wake up and the Friendly will stop and get out of the Vehicle. Once the enemy is dead, they then do their own thing.
So me deleting them is completely what I want to do to prevent anything interferring with the AI's behaviour.
Yeah, the whole thing is setup in Scenario Frameworks. Know nothing about this stuff, have been working on my Single Player Experience for over 300hrs now. am pleased with what I have gotten so far, with a LOT left to learn, but it's simply becoming frustrating when it works one day, and not the next.
Video below shows the Area in Question.
https://www.youtube.com/watch?v=8OjG5PeX9_4
Once I despawn everything from pre-Ambush, the new Area is very small and simple. Containing 2 SlotTriggers, 2 AIs, and 2 Layers of short simple Waypoints.
I cant see anything that could be leading them to not want to follow. There is no conflict, they have very simple Waypoints, and it's a completely fresh Area.
The only thing that I can think of, is because I am working on sort of a "Story", I do have "Main Characters". As the AI are so dumb, these Characters died very easily, so I did Duplicate and edit their Health and clothing.
When I changed their clothes though, I now get errors in the Consoles about certain "Ammo not spawning", which I assume is due to me removing Gear yet it's trying to load it still.
So my only inexperienced knowledge MAY suggest that even though I personally wouldn't think this error would prevent such basic functionality with the AI at certain points to not work, I could also be completely wrong.
Maybe you can get it a bit sorted, by increasing the Waypoint > Priority Level of some specific waypoints, which you like to kinda force to be used.
For example: A.I. attack behavior prioritys are 70, 90 and 1120 based on how threatening an enemy is.
So lets say if you like the A.I. to execute a specific waypoint at all cost set the waypoint priority to 1130.
If you like them to execute the waypoint, whenever they are somewhat threatened, but not fully attacked yet set the priority to 100.
You can play around with it, to see if it may help with the order and execution of the waypoints.
Just in case you don't know.
All the prioritys can be found in SCR_AIActionBase class.
There is no real do this and it will work properly answer.
It will need a lot of testing and tweaking just what you've already done, till you find the right parameters which will work at least most of the time.
I'll test later and let you know!
If a player or game master camera is far away from an "A.I. they will get their simulation disabled for performance reasons ~ this is worrisome." Is it toggable? Meaning in all the previous games, OFP/ARMA was famous for the fact that all bullets etc were being simulated, even if halfway across the map, everything was happening in real time. It'd be a mighty shame if this aint true no more
You can disable their LOD to still make this possible, but that is simply to spawn them. Once they are spawned, if you are still within their Area, they will remain active and doing their business regardless of if you are close to them or not.
Personally, I've only found the LOD to really be useful for Vehicles and AI, as far as I'm aware, if an Area is active, all AI will do what they do.
I don't think the priority is the issue, as they are ignoring all waypoints after the first one and simply going into Area's that are the complete opposite way.
Personally, I just feel like things are bugging out for such simple things to not work.
I'll keep at it, but almost at the point where I may just move on and come back in a few more years when the Engine has been updated.
Hey, is the current AI limited to be a Character? Or would it be possible to be a self fireing gun?
Like a drone?
Yeah, self firing turret.
I think bacon made something like this.
A armed drone mod.
No clue how it works.
TheBonBon released an auto turret
1.2 bug will be fixed in 1.3.
👍
Guys i got question, what is the danger event unsafe area? and how it triggers?
Iirc it is used to detect if A.I. can be placed in a specific area.
Like if something is blocking the area where they should be placed.
SCR_AIMoveFromUnsafeAreaBehavior
SCR_CampaignBuildingLayoutComponent > CreateUnsafeAreaEvent()
Is it normal killed A.I. gets deleted after some time even if i'm in the area with the game master camera all the time?
Never noticed this befor.
Yes, it's normal behavior, I do this all the time to check if the garbage system is working as intended when I set it up to shorter clean ups
How can i make an AI Group respawn only after they've died using Scenario Framework?
Alright thanks.
Strange i never noticed befor.
Guess i've alway restarted pre-cleanup.
thanks for the Info, i will check it
If anybody is getting the 2 SCRAIWorlds message when you only have 1, I figured out why. It's because the scraiworld prefab is open in workbench.
Hi, question: I have a turret with HMG and RocketPod (MultiFireWeaponComponent). But the AI only use the HMG and not the Rockets, even if the enemy is a vehicle. Do i need to setup something special or does the AI not handle Rockets?
First of all you need setup on rockets itself if they are viable for those targets. (I'm not sure its setup)
As vanilla AI doesn't operate helis we never ensured there isn't some problem with it. But if you will setup it in same manner as LAV/BTR does it could work as those also use two weapons.
Thanks Viktor, do you know the component to set the usage against? I did not find anything and its a static ground turret
AICombatPropertiesComponent <--- will check it TY
Ok i now setup that HMG = Infantry Only and RocketPod is Vehicles Only. But now the turret is only firing on Infantry and ignores vehicles. It looks like the Pod get selected, but the AI cannot aim or trigger it.
maybe this isn't the place to ask. If anyone knows a better place to ask, I'll take my question there.
I'm trying to set up counter attacks in my conflict game mode. I think I could do it just by having my outer patrols respawn after long intervals. But I'd really like them to push from one end of the map, in towards us again.
Is there anyway I could link up an enemy respawn to say, the radio system? So they'd only be able to respawn if the enemy owns a bordering town?
Fixed! The original PKM Box mag have high Prio!
Ok, next problem 😄 Ai only using 1 of the 8 Rockets
I would like to help you but really no clue on my side 😅
Has anyone tested the AI to see if they are obey commands easier and get stuck on objects less?
All I can tell you is that the ai combat got a major buff. Not as easy to flank them anymore and they are really accurate with RPGs. If they have line of sight, you're most likely gonna get shot down. Gotta keep as low as possible now, use the trees/hills for cover etc.
Excellent!!
Are you talking about the 1.3 experimental that’s been around for a while or something new ?
yes 1.3 exp
Why isn't this made like the LOD switch?
Where stuff gets deleted, whenever there is no player or game master camera nearby.
It really feels kind weird, to see stuff vanishing right in front of your eyes.
I agree! There's a player proximity thing in the player chimera settings that can be adjusted. I think it resets the timer for despawn but only once.
Anybody got any good resources for getting started with AI in enfusion? Like for instance basic behaviour so they react when shot and move around and such. Is that by default or do I need to setup and use the task system?
For custom faction ai characters
There is already pretty much everything you need in the game.
So you can already do a lot by just modding classes /methodes.
Like for your question have a look at:
DangerReaction_ProjectileHit or DangerReaction_WeaponFired class.
player chimera settings?
Where exactly can i find them?
@shy lake this is your chance to show them how it's done!! 
Thank you very much. Can you tell me where I would assign these or if they should be assigned by default so I can check?
I have custom characters using custom faction that were designed from the ground up with the base prefabs not with like The Rifleman prefab or the us or USSR faction prefabs.
But they won't move or react when they are shot they will just stand there until they die
Only warnings in the log are catalog type item doesn't exist for this faction all that stuff. All of the config files do exist but I'm not sure how to tell the system that they are there
I have put them in the correct slots on the main faction configuration file for my faction
And I've added my faction to the EEditableLabels or whatever that script is called so I can assign the correct faction in the drop-down lists
Wow -sounds like you guys are serious about AI for Arma 4 -Love it !!
Many thanks. 👍
If you don't inherit from vanilla you may have to add/assign the reactions on your own.
I think they are used with the ChimeraAIAgent_Full in vanilla so you can check how it was made there.
Excellent thanks.
Looks intresting
Is there a way to make AI groups respawn after being killed using the Scenario Framework? The only method I've found so far is setting a restore layer to a default trigger, but that doesn't work for what I need.
I want to set up AI that moves and attacks my base in "waves." I know I can configure respawns to happen at set time intervals, but that's not ideal. Instead, I want the next wave to spawn only after the previous wave has been completely eliminated—this would help conserve resources significantly. However, I haven't been able to find a way to achieve this. Any ideas?
Really curious about this one.
Will we be able to set path filter for individual A.I. at some point in the future?
yes - should go at some point after 1.3
There will be config on path finding component and script API for setting different config on the fly.
small note to my previous comment: I just figured out recently that moding at this point allow you just add new navmesh project setups not modify already existing one
Wow nice excited for this!
Will open a whole new level of A.I. movement. 👍
Thank you for the hint. 🙂
is it possible to have AI in vehicles not full stop at a waypoint target, but pass through at current speed and smoothly move on to the next one? I'm essentially trying to make vehicles follow a road over greater distance, but I do not want them to detour because of their pathfinding and take exactly the route I want.
I am currently adding waypoints just before each junction. this creates a somewhat plausible behavior of "stop before a junction and make sure it's clear / where should I turn?", but they often stop, attempt a turn, back up a meter, attempt another turn... generally janky. I tried playing with completion radius hoping they will complete the WP earlier while at speed and move on, but to no avail.
Keep moving the waypoint away from them along a spline lol
Carrot on a stick
I dont know if that would work actually though
Actually I think it could.
There is not much else what you can try
too bad, I think I already tried that… but I’ll give it another go with 1.3.
btw I noticed 1.3 finally made AI pedestrians move out of the way in front of vics and vehicles dont ram into each other blindly now, great stuff. big step forward to having properly living map with ambient traffic and pedestrians
A.I. moving away from vehicles is a thing since day 1 of reforger.
But yeah it is indeed a pretty cool feature.
I have never seen this behavior, so maybe something changed in default prefabs config?
2+ year's ago.
https://youtu.be/GyzkFEATVhE?t=23
I wasn’t around pre 1.1/1.2 so cant tell, but I am 100% sure they do not do that at all in 1.2.1.
I had a problem with towns being littered with civilian corpses after 20mins of random traffic to the point that I hacked in disabling any damage if instigator is a driver AI
Yeah maybe there was a bug at some point in time with this feature.
Can't tell for sure i did not use it very regulary.
So yeah possible.
it bugged as much as i know, i tried it before, but i tried the move on honk is running ok
Is there a good resource on creation of entirely new waypoint entities with custom behaviour trees? I've had no issues with overriding existing behaviours to get more functionality but cant find much on entirely new waypoints. I'm finding informaiton on setup of Activity/waypoint parameters and Goal message and how they link wp_ files to activities to be slim to none.
Oh okay.
Yeah i wasn't aware of it being bugged in 1.2.
Yeah there is very little information.
May this can help you a little further: #enfusion_gui message
unfortunately this doesn't explain adding new activities via a new send goal message node
Do you even need the goal message at all?
I did create my own waypoints by simply duplicating a vanilla one and changing the parameters/behavior trees.
Some parameters are not set/used from the WP trees and are instead set in the activity logic not having to override base game activities would be preferable here
for instance the follow activity bt forces the use vehicle parameter to false regardless of the WP bt
it would be fine if the activities respected the WP bt parameters passed in via the AImessage nodes but they don't always
here's the input to the follow goal message vs the used follow activity parameters. as can be seen half of them are not used and thats before you get into conditional check values within the logic of the activity
Well some of the goal stuff is defined in the SCR_ChimeraAIAgent_Full.et.
I'm not rly knowledgable with this goal/group activity stuff...
yeah I've spent 3 days diving into the scripts and keep hitting a brick wall getting the message system to work with the activity's without dev help I'm probably not going to decipher this
Pretty sure you will at some point in time. 😉
I will try to look at it tomorrow.
What exactly is the point you stuck with?
How to send and execute the wp activity message stuff?
Like the goal reaction/message?
oh i've tried this before its a complex system
i've set up classes inhereting from EMessageType_Goal SCR_AIMessage_Move SCR_AIActivityBase SCR_AIGetActionParameters SCR_AIGoalReaction and generated SCR_AISendMessageGenerated. I've created the wp bt and the activity bt plus created an inherited version of SCR_ChimeraAIAgent_Full.et with the new enums/activities setup. I can add the custom send goal message node and get the get parameters node in the activity bt. the problem is I don't know if I messing anything up along the way since all i can do is try to replicate existing waypoints/activities
it should be Relate to each other
with this as well
Since you have to define it on SCR_AIConfig
CMIIW
as above i've set all those up and they all have the same references as found in existing AI behaviours which is why I'm lost as I don't have a definitive list of things to check are in place
there's all the script classes i've setup for a new FollowVehicle waypoint
maybe i missed something in there
Yeah i have alreaady seen multiple ppl trying to figure out, how the system works exactly and all got stuck with it at some point in time.
I guess it should be doable but yeah maybe a little how to from official side would be a nice thing to have in long term.
Like all the classes it requires and the order of how it sends/executes stuff from start to finish.
Somehow overriding SCR_AIWorld.et doesn't work.
When i do so and change the distance between covers to 1.5 A.I. will not move at all.
Also it will give me errors about multiple AIWorlds.
When i override SCR_AIWorld_Arland.et it works.
Why not with SCR_AIWorld.et?
If i wanted to make the ia fight in a melee way what would be the best way to approach this?
I was thinking of doing it with like dummy invisible weapons
Like a weapon called fist that didn't have a mesh
hmmm anyway to get the A.I to prio getting in BTR's or vehicles automatically like they do when there's a nearby turret?
Some feedback about A.I. driving:
There are problems but one of the most confusing which i think would highly help fixing it at least somewhat is the path regeneration or path resetting.
I've noticed whenever a vehicle got stuck somewhere and i use game master to place it on a better spot they seem to be forced to move back to the exact same position of where they were stuck.
So if there would be some kind of path re-planning whenever a game master re-placed the vehicle to another position this would probably already help a lot.
Only way to get this fixed so far is by using a new move waypoint.
Alright so i did some testing with vanilla A.I. driving and it turned out to be much better.
Putting them all in the same move handler was making it worse and was the biggest part of the problem, due to vehicle avoidance was triggere all the time.
They even drove in column very well...
So now i don't know where all the complains are coming from. 
I did quite a lot of testing and yeah there are still problems but now they look pretty minor.
Turned out failing the SCR_AIPilotMoveFromIncomingVehicleBehavior while moving in column formation even fixed the all same move handler modded problem. 
what could be the reason - or at least a method to mitigate - for AIs randomly going into idle state (as shown in game master tooltip)? I think this started to happen in 1.3, or wasn't previously noticeable. they are assigned an infinite cycle waypoint with two patrol waypoints inside. at random points they switch to idle and just stand in place. appears really random, as some groups work fine for 20 minutes, in other instances multiple groups bug out almost right after spawn.
I added logging to each OnWaypointXXX callback from SCR_AIGroup, everything looks good. I also tried iterating over my groups and testing for null GetCurrentWaypoint(), nothing comes up.
extra question: what is the game master checking to display the idle or following orders label? it seems to be the only route for me to debug it further
How far away from the player are they?
within 300m, and a group closer to any player can bug out while more distant one works, so shouldnt be LOD related.
it may be relevant that they are single character groups, and I use a lot of groups in world in general (50-100). yet those idle ones are active ai, they react to danger events and so on. pretty baffling problem
A suggestion for doing a long distance move command for AI: when you issue the move command, the projected route is shown on the map, and the player can drag and drop nodes on that path in a manner similar to navigation in google maps.
Also damn they need to know to avoid barbed wire
Why does some modded AI attack each other even tho they are in the same faction
Are you using a mod called CRX?
Is the terrain flat?
Like easy to walk on?
Also which map? Vanilla or modded?
A.I. moving on mountain like terrain has the highest chance to break their movement.
vanilla maps, happens on both arland and eden, they walk around in towns. now thinking about it, maybe it's the case the target position is unreachable. but then it should somehow be indicated by the waypoint failing (or rather just completing without reaching target).
I also use vanilla factions group prefabs and no 3rd party mods. makes me wonder how come it affects my game mode so much, but is not an issue in vanilla (or it is, but somehow only my use case specifically amplifies the problem).
Hello everyone,
since the 1.3 update, I've been having an issue with a vehicle. Every time the AI tries to get in as the driver, the game crashes. All other seat positions are no problem. Does anyone know what could be causing this? A player can use the driver's seat without any issues.
so, 8 hrs of debugging and learning how AI works later, I know what the problem is:
21:32:27 709266 (N): (21:31:06 628381 T-080.9s) ACTION SCR_AIMoveInFormationBehavior<0x0000018A12143AF8>: Fail: Reason: 1, SCR_AIMoveInFormationBehavior<0x0000018A12143AF8>```
`AITaskMoveInFormation` node is failing **a lot** with `EMoveError.STUCK`, even though the character is not stuck at all and in an accessible location. it cancels the behavior, and the character/group is left in idle forever, despite having an active waypoint which will never complete. hooking into `SCR_AIGroupUtilityComponent.OnMoveFailed` and calling `group.CompleteWaypoint(group.GetCurrentWaypoint());` seems to resolve the problem, though this will obviously make AI give up current move target.
Good job!
Can be quite a task to find all the still existing flaws ( bugs ) in A.I. behavior.
There were times, where i spend more time debugging A.I. than actually modding them just like in your case. 😅
Is there anyway to check if the cover AI using is sucks (like in Screenshot) especially this kind of cover is not realistic on CQB Situation. for now i only know the cover are determined from Height of the object
and what is the color code Flags on Navmesh? because i dont see any clue on how to see this
Should i define a new one here? or i shouldn't
Yeah some cover type flags would be pretty cool! 😉
#enfusion_ai message
the node for cover finding is scripted, but the actual cover query is cpp-side (it's costly obv.), so no luck. it would be nice to have a filter callback to the script there, just like with querying entities from world. so right now you can test whether the cover is shitty, but you can't pick the next-best-result
I'm in the same boat, but I want to force AIs to take cover into buildings under certain conditions. I think I'm going to bypass vanilla search altogether, or force the AI into the building first, and then run vanilla cover query.
oh yeah, exactly. it was blazing fast anyway for such an issue in an unknown system, it's fortunate we can breakpoint BTs while the world is running, and there's the per-character debug panel available with AI_DEBUG define.
gotta say, it looks really flexible and accessible to modding so far, and I already have many awesome ideas for my gamemode. after all, good job bohemia
Agree.
HUGH step up to RV A.I. in pretty much everything! 😎
Works well against Fat bullets
Someone familar with "Scenario Framework" knows:
SCR_ScenarioFrameworkAIActionChangeAttachedAI, SCR_ScenarioFrameworkAIActionSetFormation, SCR_ScenarioFrameworkAIActionSetCharacterStance
Are those actions already implemented and working?
What does SCR_ScenarioFrameworkAIActionChangeAttachedAI do?
The guru of SF is in #enfusion_scenario
Hello,
I hope this is the right channel. I'm new to creating scenarios and would like to create a type of zone control game mode. I already know how to set up capture zones and respawn points for AI and players. Now I want to have two parallel capture zones. Is it possible to let the AI decide which zone it captures first, and if so, how? I would also like to know if it is possible to link a respawn point to a zone, e.g. Team A has the zone, so Team A can use the point; if Team B captures the zone, only Team B can use this respawn.
Thank you in advance.
Yeah makes sense.
Thank you. 🙂
Anybody got tips for how to make AI fire back at me? They were built from base versions not US or ussr versions. I have them running away when damaged but they wont return fire.
Do they have all the attack logic and stuff like reactions/components/behavior trees etc?
Pretty hard to make a guess...
You could use the AI_Debug startup parameter to get the A.I. debug panel.
So you can tell, if they have a assigned BaseTarget.
Does this show current number of danger messages or total that were ever created?
Nvm it's total
Also when my AI is going to a position and bumps into another AI it stops and I cant figure out why
Alsou you need setup relationships of factions so you are enemy for them
unfortunately problem of AI movement, not sure you can do much about that
you could modify movement trees and when move fails try to do new one but it can lead to spamming pathfinding requests etc.
They just stop and look at the guy in front of them lol
And when the guy in front of them starts moving they follow
Its really weird
Do you know where to do this? I have only found the spot where to set friendly factions.
If i set the behaviour to defend they just stand in place even when shot. If I switch it to soldier.bt they patrol around the defend area and run when shot, but still don't return fire.
Ok got it partially figured out. I had faction affiliation component on player controllers instead of characters, so now the AI are saying "Contact enemy front" and stuff when they see me, but still not shooting.
Haha i just figured out why they aren't shooting. One of them just said "Out of ammo"
I never gave them ammo just rifles smh
what's the best reforger A.I for dummies 101 resource out there?
Edit: They are now shooting. It was because i had the weapon in the weapon in the prefab slot but not the weapon template slot on WeaponSlotComponent
Does anyone know how to put a patch on the vest in the base loadout on rifleman.us when you connect to the server?
That has nothing to do with AI.
I dont think there is one. No one understands it THAT well
aww thanks for letting me know tho 👍
BaselLoadoutClothComponent
Is there any way to forbid abandoning 100% health vehicles with full ammo? I noticed that AI drivers and gunners have tendency to leave their vehicles and fight on their own for some reason.
anyone know how i wuold make vehicles move? for cinamtic ctyle stuffor turn on the engine. im so lost rn, do i need a ai to dd it or
I've noticed sometimes they do it if they can't reach the target or the gunner doesnt have ammo/doesnt know how to reload the gun
That doesnt help you at all probably tho
yeah, I notice this behaviour mostly with modded vehicles
also, some vehicles has poorly tuned ai driving component so they hit every tree they encounter until engine brakes or they're stuck after multiple unstuck attempts
I don't think you can lock the vehicle like in A3 so guess it's unfixable
can you not use the smart actions for this so they will then only continue to waypoint with a vehicle
"Hello, I have an issue: when I kill FIA units, I lose XP because it says it's forbidden to kill while wearing a deceptive uniform. Have you ever encountered this kind of message when killing a bot? Do you know how to change or disable this? Thanks in advance!
Anyone know if there is such a Priority Level for the AI in Scenario Framework that forces the AI to move to a Waypoint while ignoring sound perception, yet engage if they are shot at?
If it's going to be all the time you can probably just disable the sound perception on the AI prefab
Unless you only need it to do it for a certain situation or something
Yeah certain situation so disabling perception wouldn't work.
where is the location of me to edit ai values for skill and accuracy?
SCR_AICombatComponent on character
If you want to affect all AI, override Character_Base.et
Did something change related to AI LOD on dedicated servers in the recent hotfix?
So how can I make the AI more dangerous for CQB scenarios? I'm using a waypoint defend set to 4m radius, so that they don't get out of their rooms/buildings. But their reaction times are not too challenging. It's easy to take them out before they even shoot. is there a way to tweak this?
Dont understand the point of this video
Ive never dug into reforger AI -just old Arma AI. The thing Arma AI CQB/Building AI really needed was basically some qualified different behaviours while they are known to be isInside. Specifically, that markers need to be added for preferred watching directions -doors/Windows and common travelways need to have priority unless the Ai is set to careless ie guard duty/hanging out. Also, imo rotating to threat should be speeded up or at least given a much higher priority as the reaction to a very close proximity imminent threat should be different than a unit taking pot shots from 500m out. Similiar to the imminent threat reaction of Ai about to get hit by a car
The point is the video is from an ais 1pp
Literally
what is ais 1pp?
Ooof. Is there anyway to make the ai less accurate and not engage at super long range? I kept getting headshotted playing against normal ai 😭
Bruh look at the video
My character is the ai
I am not controlling him
I am viewing as him
You should probably specify that when you, ya know, post a video of it. Without that context it just looks like you're playing the game...
Does AI Set Permanent LOD no longer work on DS?
In singleplayer I have 20 fps but DS has 60 fps with same AI action going on
I did not see this in changelog of recent hotfix
Or was AI simulation improved so much?
How to solve the problem that he can't move?
How does the AI know I am close by if they can't see me? if I know there's an enemy inside a house and I try to be stealthy they just detect me even if I am moving slowly and haven't even entered the house. It's very annoying and unrealistic.
You have proper world setup with navmesh?
I assume you did not shoot or do anything to make him aware of any threat.
I think A.I. can hear you within 20m or so even if crouch or prone.
I did some testing a while ago and was never able to get very close without the A.I. turning to me.
Can someone remind me how to do something like if true then do this else do other thing in behavior editor
selector + decorator?
So I am trying to use the Is Friendly In Aim decorator
I want to do X when that condition is true and Y when false
do a selector with deco as child and then another child branch which will be the else
What settings should the deco have?
I don't think it needs special settings
The thing is - sure maybe they should roll the dice to see if they’d go into a state of readiness - but they should have to either get a solid visual check or some pretty loud surface movement sounds to know exactly where you are
Then that decorator doesnt work because its not printing anything and my AI is shooting friendlies in the back
Actually it works once and then never again
When I move the AI entity behind another one it doesnt work
It works once immediately after the AI agent spawns and activates
Then never works again
I guess I'll ray trace on my own since Random Issue Number 3843 is preventing me from working on my project again
True.
I think the A.I. sound detection and the sound source itself are still very generic.
Like there is no real stepping or difference in surface type and stuff.
Its just a simple distance thing if i got this right.
Did you use the "Friendly In Aim" as the Deco?
What does the else do?
Depending on this you may need to use a selector with a parallel: if ( left ) the "Friendly In Aim" Deco and "Abort parent node" condition and else ( right ) a Running task so the condition "Friendly In Aim" gets constantly evaluated.
If you like DM me your .bt and i will check it.
Hey maybe you’d know - is there any sort of “tile detection” that units are on? If there were we could incorporate things like camouflage both audio and visual from them among other things
I don't know if that's possible.
I think i've already asked but the answer was no iirc.
But why the tile?
Guess some kind of surface type would be better to use?
But there already should be something like this used for movement sound selection.
I just meant terrain tile or surface tile whatever you want to call it. Basically the ground a unit is currently on having certain innate qualities
There was a very basic concept like this in Arma as I remember but wasn’t reliable and didn’t have much value
Or if you could successfully call the tile type you could apply properties to it etc
I put print debug under the deco and it never prints so its broken
You are using the vanilla deco right?
Well look at SCR_AIAttackBehavior.c.
There is:
//----------------------------------------------------------------------------------
override void OnActionSelected()
{
super.OnActionSelected();
m_bSelected = true;
EnableFriendlyFireCheck(true);
// Update target selection properties if in close combat
m_bCloseRange = m_Target.m_Value.GetDistance() < SCR_AICombatComponent.CLOSE_RANGE_COMBAT_DISTANCE;
m_CombatComponent.SetTargetSelectionProperties(m_bCloseRange);
}
So you have to use EnableFriendlyFireCheck(true); in the constructor or the OnActionSelected methode of the beahvior to get the "Friendly In Aim" deco to work.
In the "Friendly In Aim" deco it uses: IEntity friendlyEntInAim = m_PerceptionComponent.GetFriendlyInLineOfFire();
Also in the SCR_AIAttackBehavior.c:
void EnableFriendlyFireCheck(bool enable)
{
if (m_Utility && m_Utility.m_PerceptionComponent)
m_Utility.m_PerceptionComponent.SetFriendlyFireCheck(enable);
}
Set this to true inside EOnInit for the entity and it doesnt work still
It works on vanilla characters because I can see the WB debug from the deco
OK I figured out I have to do SetFriendlyFireCheck(true) in a deco above Is Friendly In Aim
Now another problem is my Idle is not making the bt pause
And my Move doesnt work
Is debug broken?
How do I correctly use the character aim task with the fire weapon task to make sure the agent doesnt fire into the sky?
Did you already check the vanilla Fire_Single/Fire_Burst bts?
I figure out the movement
Alright.
Hi ViktorP.
Question:
Are you guy's aware of any kind of bug, where A.I. get hostile to self and killing eaach other even within the own group?
Esp. in MP/Dedi?
Also is there a bug with the disguise feature?
I can wear full enemy uniform with their symbol in inventory, they keep recognizing me as enemy.
I already had multiple reports, where ppl experianced this in vanilla. ( A.I. killing each other/friendlies )
Are you guy's aware of any kind of bug, where A.I. get hostile to self and killing eaach other even within the own group?
What? 😮
I can wear full enemy uniform with their symbol in inventory, they keep recognizing me as enemy.
First of all AI don't use perceived faction unless you enable that by moding right? So is problem when using that? Any details how to repro it?
How does weapon loudness factor in to ai perception? Is it possible to make a silenced weapon ‘less perceivable’ by ai or is it calculated based off some output value like weapon sound space output volume?
can anyone help me what kind of target category are representing?
what if its a weapon or Deadbodies?
because i see DangerEventType there are Danger_Deadbody but there are no use in it.
I wonder how AI recognize weapon on the ground or anything on the world that are not attached into Targets?
Which behavior tree controls AI turret gunner stuff? I quite literally want to make an agent that only does turret gunner stuff, nothing else.
Nevermind it's literally characteraim and fire lol, easy peasy
does Reforger have "invisible targets" like the old Arma? Id like to place them around stairwells so when AI going up/down would somewhat target them akin to the old swat 4 way
Yeah no clue...
I was blaming my mod for the A.I. killing each other all the time.
However turned out ppl experianced it even without it.
So far i wasn't able to reproduce it myself so i thought i ask if there is any known problem related to this.
I think its all scripted in "Danger_Reaction_WeaponFired".
Suppressed weapon ( audible ) reaction distance is 100m in vanilla, so you would need to mod this part.
May adjust distance based on weapon type.
The "DeadBody" reaction is not implemented afaik.
Guess the only way to do this would be by using any of the touched by "Sphere" or the "AABB" thing.
There is no "invisible target" afaik.
I don't really understand what you are trying to do?
You like them to aim at something specific ( position ) while going up or down stairs?
yep. Similar to how Swat 4 had their AI agents focus up/down while on stairs, travelways and doors and windows. They used invisible targeting nodes. if units are inside , they would be alot more robust if already oriented toward likely threat position ie...Not the Wall
We used to use invisible targets to get units to suppress buildings etc back in hacky Arma days
Nevermind my mistake... 🤪
Sorry. 😇
doing the sphere casting will impact perfomance, so i think i will avoid it as far as possible
Well alternatively you could probably do/use a vicinity check, but the range is only 3m in vanilla afaik.
Another way would be to store dropped weapons in a array and do a distance check or whatever you need/like.
cache all the ent to global array you mean?
Yes.
Will be way less things to check compared to "Sphere" check.
Sphere check will always have to cycle through something between 50 - 250 entities depending on distance and world objects in the area every time.
Dropped weapons array will always be less than this.
Except you have like 250 A.I. which all dropped their weapons, which i guess should be highly unlikely. 🙂
Thank you!
Did you already test this in 1.3?
The "Observe Threat Position" behavior introduced in 1.3 should already help a lot to make them face into the right ( threat ) direction/position.
But yeah i get what you are talking about.
Not quite sure how this could be made in reforger.
Maybe you could create a invisible target on your own?
Still would probably need a lot of scripting and other stuff.
You looking for this kind of stuff to be dynamic and autonomous or everything pre-setup.
So like a movie scene?
do same things like suppression volume i believe
i will consider this
Definietly NOT movie scenes lol -the opposite in fact. Not a fan of cool "cutscenes" in which the AI look very robust at tacticool building entry etc (Red Harvest anyone) but then cant remotely stop staring at a wall in actual gameplay. Now i can see the large improvement of AI and houses already with Reforger due to better target orientation, the new open navmesh, the buildings also being designed more in mind with multiple units being able to move around -much more spacious than the rowhouses of Arma2/3 which were hideous for AI. AI can now follow me up stairs and somewhat hunt me down but they are often traversing the stairs with gun at safe position ( perhaps this is during a respawn im not sure so maybe they are in Safe mode), but also planting themselves sometimes still oriented torwards the wall when right on a stairwell landing in which they should be pointing up/down or at least the travelways. Im suggesting something like the nodes made 20 years ago by Swat 4 - for all buildings in the game. So if an AI is in anything but Careless/Safe mode, they have various points of orientation that make sense and would really tighten up the feel of AI when indoors. I timestamped the explanation (dont have to watch whole thing to get idea) https://youtu.be/TGTn4JPPkoU?si=UUhc5fVTQO2INvZF&t=138
Patreon: patreon.com/MitchellGodsend
[ I have the SEF mod installed! ]
Swat 4 - How Does the AI Work?
Between constant crashes while using the debugging tools, rewriting the script four separate times, and then finally saying screw it and going scriptless, five days later, I finally made this video :D
Swat 4 Gold Edition: https://www.gog.co...
AI using my turrets always aims like 1 meter above the target
Is there some variable for this?
Agree its pretty nice to have such in-depth behavior.
Bet something similar to this would already be possible with reforger A.I. as well.
Thing is Arma ( Reforger ) is open world with many different buildings/environments.
Swat is more of a rail shooter kind of thing compared to Arma, where you can choose different paths and ways of how to approche but still very restricted to a specific area/location.
Maybe there could be some kind of building preset behavior, where those nodes are pre-defined for ( each ) specific building types just like the cover points.
So yeah maybe possible with a pretty big amount of effort.
Bruh copy pasting nodes still crashes BT editor
I think it only does when "Script Editor" or "World Editor" is open or if you compiled scripts while "Behavior Editor" was open.
So i think any combination of this will mess it up leading to crash.
But as usually i can be wrong...
Anyone know which option and where controls my AI agent always overshooting targets? regenerating ballistic tables changes nothing, I have the same aim error offset/compensation stuff as the vanilla attack behavior
Its my turret and/or weapon specific and not character specific as vanilla characters also overshoot
They are aiming the turret with some weird offset I dont know where it is coming from
Ok the offset comes from the Get Aim Compensation node
But I need it for ballistics, how can I make it aim properly instead of 1 meter above the target?
As in it overshoots targets by 1 meter
I guess it might be trying to compensate for ballistic drop
But my ballistic tables are correct
couldn't aggree more
Does the AI intentionally target and destroy deployed radios in reforger?
Yes they will shoot the radio if they find it
Ah, so they do shoot it on purpose then. That’s good to know. I had a few cases where it felt way too frequent to be random lol
We use ace trenches and build a dirt mound over the radio. This seems to prevent them from destroying it.
In vanilla or in a specific game mode?
What waypoint is best to use if I want AI to not follow any specific waypoints/orders but rather to just react to what's going on around them and make their own choices?
Afaik it's not related to game mode. Maybe they just see the enemy faction?
Hey, i have a ton of Formation Errors in my Server log. How can i debug them or what cause this Errors?
01:31:06.529 WORLD : UpdateEntities
01:31:06.529 WORLD : FixedFrame
01:31:06.529 NETWORK : PerformActions
01:31:06.529 AI (E): GetFormationDefinition was given an invalid handler ID.
01:33:53.444 WORLD : UpdateEntities
01:33:53.444 WORLD : FixedFrame
01:33:53.444 NETWORK : PerformActions
01:33:53.444 AI (E): GetFormationDefinition was given an invalid handler ID.
01:33:54.162 WORLD : UpdateEntities
01:33:54.162 WORLD : FixedFrame
01:33:54.162 NETWORK : PerformActions
01:33:54.162 AI (E): GetFormationDefinition was given an invalid handler ID.
01:36:48.576 WORLD : UpdateEntities
01:36:48.576 WORLD : FixedFrame
01:36:48.576 NETWORK : PerformActions
01:36:48.576 AI (E): GetFormationDefinition was given an invalid handler ID.
01:36:49.142 WORLD : UpdateEntities
01:36:49.142 WORLD : FixedFrame
01:36:49.142 NETWORK : PerformActions
01:36:49.142 AI (E): GetFormationDefinition was given an invalid handler ID.
01:39:47.842 WORLD : UpdateEntities
Looks like a bad/wrong formation handler.
The default hanler ID is 1.
Are you doing something with the SCR_AIGroupMovementComponent?
"SCR_AIGroupMovementComponent" - Nope not in use
Also in Vanilla, its only used for Sub groups
Well the moment a group is using multiple vehicles they will get different move handler IDs based on the vehicle they are in.
You can enable the move handler ID debug in the diag menu.
"AI > Movement > Move Handler"
Maybe this can help you to find out what's wrong.
Hi, the Units showing "Default Handler" and the Vehicles showing "1"
Well thats the way it should be.
what exactly did you do prior to when those errors occure?
Did you edit or modify anything related to A.I. like any prefab or formation related stuff?
I will have to check what the GetFormationDefinition is linked to maybe there is something else wrong/missing.
HiHi, i just changed the Def. Formation in my Group Prefab:
You are using "AIGroupMovementComponent".
In vanilla they are using "SCR_AIGroupMovementComponent".
Also the "SCR_AIGroupMovementComponent" has a "Default Formation" as well.
I think you should change it there?
You already have the "SCR_AIGroupMovementComponent" so just remove the "AIGroupMovementComponent".
hmm ok i will change it. but the prefab is from Base
Ah lol... i got both MovementComps in my prefab 😦
Yep. 😉
Working. TY
@shy lake do you know which BT controls avoidance for driving AI? so they try not to drive over friendlies
In 1.3 they should automatically stop and honk at friendlies in the way
I noticed it and was honestly a bit surprised. An AI was driving a LAV and stopped abruptly right before running over a teammate who stepped in its path. It was actually pretty cool, kinda like watching a Tesla stop automatically when it detects something. lol
Yeah, the thing is I want to apply some of this functionality to my single digit IQ characters so they can stop driving over other characters
Also, would love to hear how to make ai movement component stop making my agent phase through walls that are not covered by navmesh
If a point is unreachable then dont move to it instead of noclipping through things
MoveFromDanger_Vehicle.bt iirc.
Thanks
Its triggered by a "Danger Reaction".
Vehicle Avoidance or something like this.
Is turning lights on at night also through AI behaviors?
Was anyone able to figure anything out with the AI behavior wanting to look into the sky when in vehicle turrets that got introduced in 1.3? Seems to be a vanilla problem, but it effects every modded vehicle with a main cannon 30mm or larger. Seems like the AI think it is a mortar tube or something?
If there is some sort of work around so we can get back to using some more interesting vehicles than a BTR-70 in our PVE missions that would be amazing.
Where do I put magazines on AI for them to use them?
I put them in pants via SCR_InventoryStorageManagerComponent and they arent using them
They drop them when I kill them so I know they ahve them in inventory
Flashlight yes.
Vehicle idk.
I use TryInsertItem() methode and it works properly.
Do you by any chance use rhs? I feel like I've heard people complain about that when using that mod. I don't use that mod and don't have that issue.
Lol
Yeah after some more digging and mod isolation it looks like the problem is with RHS vehicles and any other vehicle that is using RHS as a dependency. Or maybe SpaceStrider did something that RHS didn't. Seems like all the vehicles in the game are on one side or the other for dependencies.
I used Save As and it destroyed my previous behavior tree by overwriting it despite me saving it somewhere else
Thanks guys
Submitted an issue to the RHS github, hopefully someone takes a look at it. Despite my wants for little things and fixes, messing around in the workbench is not where my talents are. Thank you guys for your underappreciated hard work. 🫡
What do I gotta set on my entity for AI to fire rockets at it?
Pretty sure I saw an enum somewhere with target types per weapon.
Gotcha
I am also tryna figure out how does a vehicle change faction when I get in as gunner
Because my vehicle doesnt do that, it stays factionless when there is a gunner only but no driver
Maybe I need a registeringcompartmentthingamabob
Thanks you mean doing that by script I assume. I know I did it in the editor before also but can't remember which component / slot lol
I think: EAIUnitType and any kind of vehicle like: EAIUnitType.UnitType_VehicleUnarmored;
At least this is how i make them to use rocket launchers for whatever target type.
There is: class SCR_CompartmentAccessComponent : CompartmentAccessComponent OnCompartmentEntered and OnCompartmentLeft
Example:
//------------------------------------------------------------------------------------------------
override void OnCompartmentLeft(IEntity targetEntity, BaseCompartmentManagerComponent manager, int mgrID, int slotID, bool move)
{
Vehicle vehicle = Vehicle.Cast(targetEntity);
if (vehicle)
{
VehiclePerceivableComponent vehiclePerceivableComponent = vehicle.GetVehiclePerceivableComponent();
if (vehiclePerceivableComponent)
{
Faction perceivedFactionOverride = vehiclePerceivableComponent.GetPerceivedFactionOverride();
if (perceivedFactionOverride)
vehiclePerceivableComponent.SetPerceivedFactionOverride(null);
}
}
super.OnCompartmentLeft(targetEntity, manager, mgrID, slotID, move);
}
Hi guys,
Does anyone know how to make the AI not spawn until players are nearby?
Ambient Spawn System already does this
Or rather it spawns in and enables/disables the agents
Do you have an example of how to set it so that they come out when a player is 300 m away?
They use server max view distance to trigger
I'm working with the RHS groups, but if I don't tell them to quit from the start, they won't respawn.
I don't want the entire AI to load from the start, my players will explode haha
what game mode are you working with?
@shy lake when you ever gonna make a SP pack of missions 🥸
game master
Approximately 20 year's ago for OFP and Arma 1. 😜
My interest in mission making died the moment i've started A.I. modding.
What better way to showcase new AI *hint hint *
Hello, I'm having a problem when creating a scenario. I'm getting this error message that I didn't get before. The AIs all move to a single location instead of patrolling. I even deleted the camp, placing only the AIs and the same observation, but they all move to a single location. I don't understand anything anymore.
Thank you for your help.
Hi you need choose navmesh files
Go to SCR_AiWorld component and add the Navmeshes for your world. If you are using the vanilla maps you should find the navmeshes under Maps - MP or something like that
This is the right place, am I right?
It works, great thanks, however I still have this error message with the script
@thin belfry and @cinder gulch thank you both of you
your welcome
How does the AI Character Movement component know when it has passed through a point? Where can I get the current movement point? I know I can get path, but I want only the target it's heading towards
proto external void GetCurrentPath(notnull array<vector> outPoints);
How about "GetCurrentDestination"
Bruh
Please
Alternatively, is it possible to call AI BT on some entity from script?
do you mean trigger AI from script, so that AIAgent will start executing the BT you want, or do you mean passing data to already executed BT?
I mean run a method that makes the AI agent run a specific BT
Hello mr AI agent please run this BT for me thanks
inherit a class from SCR_AIBehaviorBase, in ctor assign your BT resource name to m_sBehaviorTree, then call SCR_AIUtilityComponent.AddAction(new YourBehaviorClass(...))
you will also need to set priority in the behavior as required, otherwise agent will ignore it. look at other behavior classes to get a grasp on it
Damn
So turret gunners still only see targets when they are in front of the vehicle not the turret
Pretty sure AIGroup has a GetWaypoint or something like that. Maybe get current waypoint? Not at my PC rn.
Can anyone help with this error? I have no idea why it's happening. Working in Scenario Framework so not using Ambient Patrols because they are not possible to use in SF. And thus error is new never seen it before
Yeah the AI agent in the turret is aiming the turret at my head but since I'm behind the vehicle he doesn't know how to shoot
Did you duplicate the prefab to your workshop project? Changing it in there should persist. Not sure if this is the solution just thinking with ya
really I'm not sure what you are talking about?
I had to make it so that the turret rotates the character along with the turret, then they fire at me when I am in front of the barrel behind the vehicle
Otherwise they only fire when in some cone around the forward vector of the vehicle
All right now I understand. yea the perception works from "head" bone.
So if you have detached gun with optics they still perceive surroundings as you say.
I was meant to be able setup sensors on the vehicle but as base game doesn't have such one it's not there. Sorry about that but no plan to change it in any near future.
That's ok, it's working fine now
Now I want to try to make the AI more efficient at using turrets while the vehicle is moving, but without stabilization of the turret itself I think it's always going to be bad
yea not sure what to suggest
I somehow remember we added compensation for also you moving not only your target. But it's not a default use case we have.
I guess I need to decide if I want to DIY stabilization or wait until the stabilization in vanilla works
I'm unsure if there will be one for Reforger. Wouldn't bet on that but I'm not the one to ask.
There are attributes for it just not functional but I understand
ENTITY : Create entity @"ENTITY:2305843009213694071" ('SCR_AIWorld') at <3522.679932 2.417000 1850.128052>
PATHFINDING : Navmesh Init 'Soldiers'
PATHFINDING(W): Modulo(Tile width, cell size) doesn't equal 0. Navmesh generation compromised. Please, set a new Tile width for navmesh using worlds/GameMaster/Navmeshes/GM_Arland.nmn.
Default AiWorld Arland + default Navmesh
One more issue to figure out for now is why my AI agent aims almost always wrong
At least the vehicle one
They fire like 0.5m above my head, and I only die due to random spread of the weapon making the bullet hit me
How can I give the AI driver a move order that will be performed in reverse? As in the vehicle would reverse instead of trying to face the destination point
When I set auto orientation to off it just drives forward instead of in reverse hehe
Tried GM_Arland and it looks ok 🤔 What world are you on? Do you have changes to AIWorld or maybe some mod?
Hi Sinewa, i did not changed anything. Using the AiWorld and the GM Navmesh since 5 month without any changes. But since the last update i got this warning in Workbench
Maybe its a problem of the Tile regeneration from ScenarioFramework, but do not know how i can debug this
i also did not found any option to change the Tile width like the message tell me
Hey, could you check those two properties?
Well, I would say that 0.065 in cell size is super weird. Are you sure you are using our SCR_AIWorld_Arland.et? Cause in all versions I can see there 0.05
Was an old Prefab (AiWorld) placed month ago. I changed to 0.05... warning is gone. Thanks
unfortunately no
there is no way how to micromanage drivers
They get path and tries to follow it in the best possible way. (I know I know.. sometimes it's pretty junky)
What if I make the destination really close to the rear of vehicle, will he still try to turn around?
you can try to experiment with it as he won't turn fully if it's realy close
Ok thank u
Does anybody know what script / config file I can edit to make more group types?
Hmm sometimes my AI driver drives over friendlies sometimes he doesnt
Not sure what controls it
Ugh Is Friendly In Aim is very unreliable, I wish there was something like "is friendly next to our target so I dont blast the friendly with my cannon's area damage"
question: is there a way to limit how many times an AI can spawn from a specific spawn area?
Does anyone know if I can have a ai group spawn when my character spawns and be able to controll them like a squad lead in gamemode scenario frame work
If you're using slot ai to spawn them there's options that let put how many times they spawn.
How do I use FindCover in a way that the agent puts cover between the agent and the target?
I don't understand the question. It's like that by default isn't it? 😅
Not really lol they find cover but dont go behind it just near it
Maybe I messed up something
yea so actually the problem isn't the cover position most likely but precision of move you are using
vanila seems fine in this regard
Ah okie
Could you remind me, which parameters of perception component do I increase for cheat vision? angular size factor?
in which way?
I just want my agent to be very good at seeing, in general
there are multiple things but you refers to this one?
SetPerceptionFactor(float value);
that's what scenario framework is using internaly if I remember correctly but there are more on the preception component...
they will have different results
all of them should have some effect but maybe not visible on first sight
Awesome thanks
Are there some common things to avoid when making behavior trees in terms of performance?
well expensive decorator check (like some spatial querry on big area) which would be done every BT evaluation
(the best in such case would be some aggregation on some component etc. or at least usage of timed decorator if small delay doesn't matter)
Hey guys 🙂
I think you could like this one. It should somehow covers questions appearing here now and than how this all AI is somehow supposed to work together and how to do custom feature in it.
Enjoy
https://discord.gg/kFPmHyef?event=1365295941762154566
Missed this -is there a way to listen to recording or a recap?
Is there no other way than GetClosestPositionOnNavmesh to access the Navmesh?
All I want is to give it a target pos and it should return the path
It will be uploaded to the arma platform youtube channel like the other bootcamps.
can someone help? i have made a full scenario, all aspects work EXCEPT the ai, when i test in enfusion through the play button they spawn in and shoot and everything but when i upload to the workshop and test it by hosting locally they dont show up?
So I was wondering about the spawn children, random based on player count spawn option. If I have a layer with 2 slot ai what randomization percent I should use if I want both of them to spawn with 2 players and only 1 to spawn with 1 player
Do we have a option to disable forever unconscious for AI character?
I think I finally may have figured out why my AI artillery attacks are randomly stopping. I saw this and am thinking maybe another activity is started and the group can not hit the new target/waypoint from their position. ```c
SetIsUniqueInActionQueue(false); // Otherwise it will fail if a second one is added, which causes waypoint to be completed, which we don't want
not too sure how to go about resolving that
actually I think I narrowed it down to this return: ```c
// Ignore if it was cancelled by this group, there is no reason to fail this activity in this case.
// For instance the behavior could be cancelled because the group temporary selected another activity.
int failReason = childBehavior.GetFailReason();
if (failReason == EAIActionFailReason.CANCELLED)
return;
you are using real AI to fire mortars? is just spawning the mortar not an option for you?
this is in conflict, but yeah, I spawn the modified ambientPatrolSpawnpoint and then spawn a mortar emplacement near them and have them crew it, also setting an artillery support waypoint for them to aim/shoot at.
I finally figured out its cancelling the action for some reason, so Im going to try to restart it on cancel
I mean yes that's nice if that's your goal but you can also use SF components in Campaign mode to use triggers to spawn mortar in a more controlled way (or more randomized too) but maybe you already knew that. haha
but having AI doing it it's more immersive for sure
Ive already got randomization going around the cap points, just took a bit of scripting to coordinate them with the final wave of counter attacks. This is for a PVE scenario as well, so that probably makes more sense why Im using AI.
yeah makes sense 👍
Im not sure scenario framework was even a thing back when I started this scenario
I think the fence jump thing is bit bugged in general.
Sometimes it works, sometimes they need multiple attemps and sometimes it doesn't work at all.
I have this problem on vanilla Arland as well.
I'm messing with the old find cover ( trace ) logic since couple weeks.
I really improved a lot and added a lot of additional logic based on my current scripting knowledge just to see if there may is any good use case for it.
Still the only main thing i was able to find out is how good the new vanilla cover system is. 😉 👍
hey guys, how can we get AI automatically capture relay tower? I tried add a capture relay waypoint to them, but it failed with crash/error.
the waypoint is spawn at the task origin point (Conflict mode)
Question:
What does the "SA" stand for in the "Fraction of SA"
Smart Actions I think
Is there a way to limit ambientpatrolspawnpoint to just one character in the group? Trying to find the best way to garrison buildings without having the ai Spawn until the players are in range.
probably the easiest way is to override one of the groups it uses and limit that to one character. You can't really do too much to the groups (like delete members) until they are actually spawned in.
Any way to control the angles of indirect fire for the AI? For example between 35 to 65 degrees, instead of 45 to 90
Should I just limit the turret min and max vertical angles instead?
Where can we learn more of this 'Smart Action" capability?
By reading scripts / behavior trees. AI is barely documented.
Ah I see..
Essentially, smart actions are available to the AI in physical locations in the world. AI agents can perform them, which starts the smart actions behavior tree.
Would an example be a Fence Vault type action for example?
No, vaulting would just be part of regular movement - smart actions are usually more specialized.
Examples include gate/door opening (smart action is on the gate/door prefab, BT makes the AI open the gate) or loiter posts (e. g. on checkpoint composition prefabs, makes the AI stand/sit around in a particular spot).
The smart action is added in the form of a component, usually on some physical prefab.
If you want to look at the existing smart actions, search for behavior trees starting with SA_.
Can you steer me to information in where to get started on all this? Im arma SQF brain and thats all I know 😅
there's also the most recent bootcamp on ai modding https://youtu.be/SsL8arV1lMA
Ahh this is really helpful -thanks
Quick Quest: So running thru that video BT tutorial, I had alot of it complete following verbatim and then my Editor just crashed with some report -is this the norm for this editor or could it be for a specific reason?
Both yes
so i guess -save. Alot !
Yea as you guys noticed the bootcamp video is out.
I hope it will help you in general and resolve some basic questions how to do stuff with AI.
that was really interesting - i was sweating until the end when they didnt know why the AI wouldnt loot from the ground. I think a great example video would be showing AI needing to Loot AT weaponry with incoming armor - always a disappointing aspect of Arma but here it would be harrowing/exciting
To me copy > past in bt editor is the main crash reason.
So if you use it make sure to always save prior to it.
There are other crashes as well but compared to copy > past they are minor.
B.t.w.: If i use breakpoint debug in the bt editor i can not continue.
Only way is to kill reforger in the task manager and restart it...
how to help AI spawn inside buildings and their hold/combat performance inside buiding
Have you ran the NavMesh for your scenario?
you mean regenerate it at the location of custom added building?
Just Regen it all so the AI can see the building, stairs, doors etc.
which function can I use to check if a group is idle? could AI be idle when it has waypoints on list?
SCR_AIGroupInfoComponent::GetGroupControlMode()
No, if a group is IDLE and has waypoints, it will immediately switch to FOLLOWING_WAYPOINT
Is navmesh modification for placed structures automatic now?
I remember there was some regenerate partial navmesh component or something for compositions
Wasn't this in the Editable Entity component or something like that?
I dont remember 😦
Check there, or search for the method that regenerates the navmesh
RequestNavmeshRebuild or something
I think you still have to do a nav mesh override. In world editor there's a button near the top in the middle that looks like a mouse pointer called the nav mesh tool.
Hey, what i need to tweak if the AI will not follow the road well, while driving my vehicle? Most time they drive to much on the right or left of the road and also on the wrong side.
You have to set up points every 30-40 meters on a path for them to drive well
Do we know what on the LAV's gun causes the AI to not aim directly onto AI with their Autocannons? I.E attempting to "Suppress" them instead?
Is there built in filter for type of target? I want this particular AI only to target helicopters for example, or at least only vehicles
In SCR_AICombatComponent there is m_WeaponTargetSelector.SelectWeaponAgainstUnitTypeAndDistance() methode.
proto external bool SelectWeaponAgainstUnitTypeAndDistance(EAIUnitType targetUnitType, float distance, bool preferDirectAttackWeapon, bool useCompartmentWeapons, array<int> weaponTypesWhitelist = null, array<int> weaponTypesBlacklist = null, array<int> minMagCountSpec = null);
You can set targetUnitType to:
enum EAIUnitType
{
UnitType_Infantry,
UnitType_VehicleUnarmored,
UnitType_VehicleMedium,
UnitType_VehicleHeavy,
UnitType_Aircraft,
UnitType_Fortification,
UnitType_Count,
}
I still see A.I. shooting quite a lot into their cover at times.
Mainly happens whenever A.I. is still able to see the target but the barrel of the weapon is right in front of the cover.
Maybe if there would be some kind of weapon barrel check?
I know using trace is bad but maybe something else to determine if they are actually really able to hit the position and nothing is blocking it.
Hello
Hi. Can anyone help please? I want to spawn a vehicle with an AI character in the driver's seat. However when I do the character spawns standing on the seat. How do I get him to spawn seated? Thanks.
Yeah but
Engine side code
Gimme a "get target of type"
If there is none in vanilla you can make one yourself.
Damn, you're a genius
There is the FindTargetToLookAt or something in the Soldier.bt which they use to detect targets.
You can use this and simply add the TargetUnitType check to it i guess.
is it safe to despawn its vehicle when AI group got all agent killed in onAgentRemoved function? or How can I safely despawn the vehicle after ai group killed.
Another question: How can I despawn the vehicle when AI group is not activated and restore both the vehicle and AI when AI activated and get them in the vehicle.
Ok that was relatively simple to implement
things like that can happen when something goes wrong with putting characters into the compartment, e. g. when it tries to put in two characters almost at once
not sure what the issue is in your case, would need more info
Lol my problem with AI not being able to hit me when I fly a helicopter was AI LOD
I set max lod distance to 3000 for the agent and my AA gun obliterates me almost every time
I only have one unit that I am trying to put into the vehicle. Maybe I am going about it all wrong. Do you know the correct way to spawn a vehicle with an AI driver inside? Thanks.
here's a generalized config i wrote some time ago, which can spawn a given crew in any combination of compartments of a vehicle
https://github.com/Til-Weimann/tilw-mission-framework/blob/main/scripts/game/TILW_CrewConfig.c
it's probably a lot more complex than what you need, but you can look at the relevant parts i guess
all that is really just a fancy way to call BaseCompartmentSlot::SpawnCharacterInCompartment(ResourceName, AIGroup)
Great, thank you. I'll give it a try.
What is Waypoint Defend_CP? it defends around a control point? and if so does this only work on conflict mode where there are control points? or can I use them in other game modes like SF?
Is there an easy way to prevent AI from jumping down from a high place?
Works in SF
And yes it makes them attack anybody that comes in the area radius I believe
I think that's related to the navmesh so you may have to generate a custom section. Only way I've gotten that to work is to use two coordinates to designate a box to regenerate.
oof
Was just playtesting Chernarus and was shocked how AI were NOT going kamikazee off the castle walls like they did in Arma 2
anyone know if the reforger ai use machine learning/neural networks in any way currently?
We don't use it.
thx for the info
Hey ViktorP do you know of some easy way to make a building that the AI doesnt bother jumping down from?
I think the pathfinding makes it so when I place a GM object
It doesnt update the navmesh
And the AI thinks it's on the ground or something?
Maybe a video would help and debug view of soldier navmesh on top so we know it's there or not
But it almost seems you have missing navmesh on top.
In vanila it works fine
It's a building that's placed via GM is my point
This is what it looks like, I just want AI to stay on top
Wait ok vanilla AI doesnt jump down from the tower but my AI does, I wonder what to check for this
OK it's my climbing over obstacles AI task doing it I think yep
I want to edit my characters loadout to add more ammo but I want it to change all the ai placed already too. Do I need to replace all the AI I placed after I edit the loadout?
If you change the prefab and they are all placed using a prefab then it should be fine
If I want to change which characters my fire teams pull from do I need to override my fireteam group under faction manager?
Does the game create cover points automatically for user made objects like yours or do you have to set them by yourself?
I think so as I didnt do it
Nice.
Never thought of this case.
Maybe there is some detection stuff done during navmesh generation.
Always thought they are kinda pre-defined on the objects.
In c class SCR_AIStaticArtilleryActivity constructor, ```c
SetIsUniqueInActionQueue(false); // Otherwise it will fail if a second one is added, which causes waypoint to be completed, which we don't want
well, technically it doesnt prevent a second attack, it just changes the target from the first attack to the second waypoint when the second attack is started, so they both attack the second waypoint instead of attacking their individually assigned AIWaypoint_ArtillerySupport.et.
some detection stuff done during navmesh generation
yes
Seems to prevent more than one artillery attack from AI
I'm not sure from top of my head how exactly this activity is made but
SetIsUniqueInActionQueue(false);
This do the posit - it will allow multiple action of this type in queue as it sets unique to false.
As far as I remember normal attack is unique as otherwise you would have huge queue of actions in brain of every AI in even medium fight which most of them would be irrelevant as those enemies would die before related attack action would be executed.
However I'm not sure about details how artillery action is handled and you should be able to override or create your own if you want freely.
Would be nice if there would be a way to set/change the "AutoOrientation" of the move node by script.
Or to somehow force/override the look position/direction while moving.
I've tryed with m_UtilityComponent.m_LookAction.LookAt(coverPosition, 15.0); but the agent keeps looking to where he moved.
Sometimes i like to quickly change movement of the A.I. to make hime sprint to a position instead of run & aiming all the way.
So kind of dynamic run/sprint switching but he keeps looking at the aim ( AutoOrientation ) direction when set/changed from run to sprint.
Back in the days they had one attack behaviors for each enemy in the queue. 😅
Switching back and forth between them all the time.
Still not sure why there isn't just one single attack behavior and target switching is done inside of this one attack behavior instead of init/create a new attack behavior whenever target switches.
I mean all the nodes will be re-initialized every time a target switches.
Guess there is a reason but still would be much better perfromance wise to do it once only.
Still much better compared to how it was pre 1.1.
Just found MoveLookParametersToNode.
Maybe exactly what i'm looking for!
⚰️
@random owl Is it currently possible to create a path only on water/ocean? Because if i only select the "Swim" tag on the AiPathfindingComp, it will not create any path.
Any good ai spawners on workshop? Not ones that are tied to RHS or anything like that.
Hello everyone,
In my scenario, I’m spawning an AI group next to a vehicle. They’re supposed to get in using a getInNearest waypoint, and then follow a series of move waypoints.(the waypoints have hierarchy)
However, I don’t understand why the AI units are randomly spawning on the waypoints instead of at the designated spawn point.
Could someone help me figure out what’s going wrong?
Thx
Did you set FastINIT on the WP`?
is it possible to make AI build antenna automatically after captured a base?
Anyone know why swapping the audio files here doesn’t work? It keeps playing the original sounds. Looks like it’s still linked to other assets, maybe pulling from Reforger’s default banks. I’m trying to do a full AI voice overhaul, and I’ve been able to replace some individual voices, but this “Shared Bank” won’t budge. Open to any insight.
None of my ambient patrols are spawning in my scenario I posted on workshop. Can anyone help?
When I test in workbench they spawn.
did you test without mods
no because the AI im using are the taliban mod
As a dependency ?
Yes
So in the workbench the taliban AI spawns?
Yes
and you aren't using any other mods that aren't a dependency to test?
That has all my dependencies I’m going to take off the vehicles. And the others I need as dependencies of the taliban mods and the map mod.
I also tried Adding gramps AiLimitFix as you could probably see but that didn’t seem to do anything. So I could be using that wrong I’m not sure.
Do you mean like do I have any mods enabled on the game while I’m playing other than my dependencies?
Like not on workbench
Was this happening with ambient patrols?
i figured it out a while ago the videos i was watching told me to disable their spawns it was the ones on the objective tents
What does it mean when some entities movement diags point to 0 position?
AI always seems to be aiming above me when using a launcher with generated ballistic tables for the ammo
With rifles this doesnt happen
But the launcher projectiles always go above my head
No i didn’t
hmmm indeed that's not possible
problem is that water has also walkable flag
So when I leave in AiPathfindingComp just swim (as there are ignore flags not include) than it won't swim at all
but the green thingie isn't path right? I'm not sure what it even is tbh
tbh no clue it should work? at least it works in vanilla right? 😅
Can we have a new Tag only for water/ocean?
I think coresponding fix is not mark water by walkable 😉
Than it should work as intended
Can you check internaly?
will try to push it but no promises when it would get into build
Thanks
Its one of the movement diags I forgot which one
Where do I set if AI is recruitable? I've seen it before but can't find it rn
Character entity attributes I think
Does this work?
I set threshold to 10 and they aim at the target directly and it fails
it does work but most likely in different manner than you are using it.
It's decorator which allows execution when aim is in given limit. It doesn't say where or with which precision to shoot neither to aim actually.
Where to aim is done by "aim model" - it picks aimpoint on target and than calculates spread wia some Gaus distribution.
Aim itself is invoked by CharacterAim in parallel.
When this decorator become true - it goes into short wait for stabilization (you know it become true short while before you pin point where you want actualy to shoot) and than it trigger Fire(if condition of Aiming decorator wasn't invalidated e.g. by rapid movement of target).
So this room with the two windows is pretty common in Everon with the red checkered curtains. Theres a bug in pathfinding in which that AI sniper you see there will never, ever be able to leave that room as long as he is on the other side of that open door that leaves that wing of the house. Ive tested extensively, and if i spawn in as another character and close the door, he will then be able to Open it himself and Exit -but only after i intervene
Another issue I see with Interiors is that the AI somehow know or have an inkling enough to aim at every other Ai in the House. You'll see them constantly target those enemy AI markers which are both above and below them. Sometimes even when they are in a firefight on their own floor. I think their sensitivity needs to be turned down -im guessing its supposed to represent an Audio detection
Why AI aim at me but never fire gun?
Maybe the door state is wrong/broken and the moment you close/open it will get the proper state.
So even if the door is open at first its state will return closed so the A.I. will not walk through it.
The moment you intervene it will switch the state to open thus the A.I. will get out.
In general this stuff just like A.I. jump action seems to be a bit broken or just not always working 100% correctly.
I hear what you're saying but i dont think thats it. Reason being i generally start 2-3 Ai in that room. Now i always put enemies right outside on the courtside street below so its basically a firefight from the Go (2nd story Windows vs Street). Theres generally 1 (sometimes) 2 AI that will head towards those back 2 rooms (left side of Exit door and picture) and kind of cycle move but never come close to the windows nor past that door again. Meaning they are stuck in the left hand side of the picture permanently. Any AI that made it out the door early on may even come back in and use a window as well as enemy AI will come into the room but also not cross that invisible barrier. Thats kind of what that open door creates -a type of barrier in which anyone to the Left of it is sealed there, anyone to the Right of it (windows side) can freely come and go as well as exit . Hope that makes sense. Maybe i should make a demo video
Yes little hard to follow/understand.
I'm not the most experianced when it comes to in door A.I. stuff so the door state thing was the first thing which came to mind in this case of how i understood it.
So yeah if you can make a video would be nice. 👍
Hmm, i feel stupid as as soon as i recreated it to film -all actors moved as they should. I must note I disabled all mods first so perhaps something was casuing it. Apologies i should have known better. Maybe I should delete these posts
lol its always like this. 😅
Can't tell how often i already was about to make a video about some A.I. stuff cuz i thought they do pretty well and the moment i hit record they get totally nuts doing all kind of crap.
Just after i removed all my recording stuff they kept doing pretty well again... 😅
Already happened numerouse times to me.
*You have to somehow record it secretly so the A.I. does not notice. 😉
When you record, you took a chunk of AI brainpower, so they can't perform at full potential. Also they got nervous being watched 🤣
You need to record your monitor with your smartphone, that way, they can't notice they are being watched 🤣
That's exactly what i thought. 😎
The AI on my PC facing and looking in the eyes of the AI in my phone.....worlds colliding....!
I have a projectile that can be fired directly and indirectly, and I want to restricting the turret minimum angle to 45 degrees. When I do that, AI doesnt know how to use the turret as I suppose it tries to direct fire but the turret does not have enough depression to then return success when aiming.
Not quite sure what exactly you try to do or what the problem is but somehow i feel like you could try to increase the aim tolerance of the turret?
So he will fire even if he isn't able to fully aim at the target.
I know AI is mostly a transitional project from Reforger to Arma 4 and not sure if you've hired the AI dev for 4 yet or not but i liked to stress one point. First off I think the navmesh is great and appreciate how houses, and interiors generally have more space to move around in. A house or small town filled with Insurgents defending from windows should be a harrowing experience for invading force (granted taking away artillery/drones etc/Air Support). The House defenders SHOULD generally speaking have the advantage as someone on a 2nd floor window who only needs a slight peek should have the advantage against (especially) unaware safely marching invaders on the street below. Yet if i set up a scenario in which almost every 2nd floor window is manned with a gunner, and some unaware invader force walking into town (even numbers) i find more often than not, the street level invaders win. This should be a fundamental litmus test as to whether urban AI is working properly or not. Now granted -the windowed AI are doing better than arma2/3, but i think theres still alot of work to be done. Especially as concerning AI units crouch height position and window frames (cant hit enemies close to building due to sharp angle), parts of the window frame being impenetrable, and Street Ai having too good of vision spotting interior AI. Please forward to the next AI guy as well as house model design team. )
Right now vanilla A.I. ( combat ) behavior is very generic and mainly focused on most common case combat scenarios.
However they already improved A.I. a lot and switching to behavior trees + object oriented programming offers a lot of potential to create some very dedicated A.I. behaviors.
It's still quite some time to A4 and even during A4 i guess they will keep improving and expanding vanilla A.I. overall.
Not sure what their plans are but from looking at what they already did there is a very good chance to see some more dedicated and in depth A.I. behaviors at some point in the future.
What exactly does those do?
m_CoverQueryProps.m_fScoreWeightDirection = 2.0;
m_CoverQueryProps.m_fScoreWeightDistance = 1.0;
There is some description but it's a little hard to fully understand.
Esp.m_fScoreWeightDirectionis sometimes 1.0 sometimes 2.0 and sometimes 10.0.
What is the max. and how exactly does it affect the cover search?
Hi, I have been following along with Boot Camp number 12 for the Behavior Editor. I can't find an option in my debug menu. Apparently there's an option AI->AI Script->Open debug panel but it doesn't appear in my workspace
Has it been moved? or have I set somethign up wrong in my scenario?
Also, could I get advice on something. I'm trying to setup a GetInNearest waypoint then a Move waypoint. But, if the group is separated, then only the nearby characters board the vehicle and all of the group members travel towards the move mark. (So the characters separated from the group leader are traveling to the move mark on foot.)
I've been editing the default behavior trees for WP_GetInNearest and WP_Move. So, I have the GetIn waypoint completing when nearby characters have boarded, but the move waypoint seems to cause the group to wait for everybody to enter the car. Would anyone know what I should look out for? I've done a fair bit of scripting but I'm new to behavior trees.
Sure I understand all this -basically trying to plant seeds and keep reminder high that its better to remember things like building structures, landscapes, windows heights and accessibility (remember the half shuttered ones in Arma3?) before hand (meaning Arma 4) than after the fact. Again I do see alot of the all new fresh approach and appreciate it.
@shy lake Hi, do you know, we talked about Civilians take over static LMGs. I now set UseTurrets to false, but the CIVs still joining a turret until the enemy is dead.
We did?
Nope sorry i can't remember.
But anyways why does CIVs use turrets?
You have a feature to make A.I. use static weapons?
They should not do this on their own let alone CIVs.
But anyways why does CIVs use turrets?... this is the question 😄 They have loiter WP which is SCR_Defend. So i change the UseTurret bool to false. But still they always using static turrets.
Oh okay.
Yeah defend wp does this.
I never tryed it with civilians nor does i use it a lot.
Maybe the bool is just a place holder without any linked functionality like many other vanilla settings.
You could mod the node in the .bt with a m_UtilityComponent.IsMilitary() check to prevent them from doing this.
Or if the UseTurret setting is not implemented yet, you could implement the check which may would be the easyer thing to do.
look like the bool will not handle by the node. Maybe placeholder. I fixed it with this:
modded class SCR_AIAllocateActionsForDefendActivity: AITaskScripted
{
override protected bool OccupyTurret(AIAgent who, BaseCompartmentSlot slot, bool teleport)
{
SCR_ChimeraCharacter agentCHar = SCR_ChimeraCharacter.Cast(who.GetControlledEntity());
if(agentCHar && agentCHar.GetFactionKey() == "CIV") return true;
return super.OccupyTurret(who, slot, teleport);
}
}
That bool works for me, but I think I also added a hierarchy component to the defend waypoint as well?
Look for the completion type in the waypoint
I heard from various other fellow scenario/game mode creators that you can lock AI units in vehicles so they don't jump ship on smallest malfunction of their vehicle or when they're stuck on obstacle. How it could be achieved? 🐸
I use the scripted part of the SCR_AIGetOutVehicle behavior.
You could expand the void OnActionSelected() part of the class with some custome conditions to check and if they should stay inside of the vehicle cancell the behavior by using Fail(); or Complete(); so they will never execute it.
Thanks for the info, I'll take a look!
I still believe that vanilla behaviours regarding this should be tweaked by BI themselves though, they jump ship too frequently to the point only 2-3 vehicles out of 10 could reach the destination even when having the roads to it (usually they stuck in the tree on near some steep country road turn, and after multitude of attempts to drive vehicle out of stuck they jump out and try to reach waypoint by feet, not only the passengers but the crew too).
Yeah i too hope this is still being worked on and improve at some point in time.
I dont need to worry about that since with my custom AI behavior they dont know how to

How to drive or how to get out?
how to get in and how to get out lol
but I would love if I could make my tank not drive over friendly units
With vanilla behavior, they stop and honk the horn until they're out of the way.
Wonder what controls that
SCR_AIDangerReaction_Vehicle and SCR_AIDangerReaction_VehicleHorn.
That would be for agents to move out of the way of a vehicle yes? Not for vehicle stopping before it drives someone over, or am I wrong
SCR_AIDangerReaction_VehicleHorn is using SCR_AIMoveFromVehicleHornBehavior.
Hmm... Yeah now i'm not sure...
Well the moment he uses the horn SCR_AIDangerReaction_VehicleHorn get's triggered.
But yeah probaply just another/alternative car avoidance behavior?
No clue where they do the honk.
Never knew tanks had horns. Gives me a great idea for new Food Delivery Service -Cuisine Armour' - We are never, ever late
if player adds an AI agent to his group, will the AI agent still be managed by the AI group?
Can AI really not see guardrails? I just watched one in workbench on everon ram into one over and over again trying to get on the road.
He will get in a sub/slave group.
If i got this part right.
His main original group will remain the master group.
Slave/Master like in HDDs.
So if I add an agent in my group, while his original group has waypoint updated recurrently, the agent will still get waypoint from his master group?
If you recruted him i don't think he will.
Would kinda break the whole recruit thing if he still would follow his original group orders.
But in-game not sure what his behavior will be or how far they have taken this into account when it comes to the recruit feature.
okay. Thanks for your info. I will test it in game.
Yeah guess that's the best thing to do to tell for sure. 👍
Why would an ambient patrol that is not paused and is active with a waypoint, spawn into idle state and not move at all? This typically happens near Morton on Everon. How can I force them to not be idle and go to their assigned waypoint?
I know I can use GM to do this, but I'd prefer to automate it, with scripting if needed.
I've got to be missing a simple move to waypoint command somewhere.
Im now able to detect that a group is in idle mode, and have managed to add a move action, but i cant seem to get them to actually move to the waypoint they are related to.
Maybe a navmesh problem if you can tell it happens at a specific location?
yeah Its just NW of Morton, Morton Valley along Morton Stream. Maybe I can regenerate that area with an override!?
welp, I think that kinda worked! They still get stuck on those little wooden fences, but I dont think theres anything I can really do about that.
Yeah jumping over stuff, opening doors and using ladders all have a chance to fail/not work.
Sometimes they do after A.I. tryed couple times but sometimes they simply don't work at all.
i get a certain thrill when AI successfully vault a fence. Its an old Arma thang..
Could they ever vault something in any previouse vanilla Arma?
I can't remember...
hey guys, how dose the "indirect target type" option in ammo prefab work?
It is used for fire when target is not seen. Must generate ballistic tables including indirect. My robot howitzers use it.
Is there a function that returns all AIGroup?
AIWorld::GetAIAgents, you'll have to filter for group agents
Depending on the use case, it can make more sense to insert groups into a system on creation and process them that way
Oh heck no, it was always the next logical progression after Fence crawl under in Arma 2. Eventually mods created player vault and then BI followed. VCOM then kinda Hackeyed got AI to occasionally Wall Vault but it was rare.
Is the perceived faction setting broken because when i dress as another faction AI still shoot at me. Isnt the point of being perceived as that faction is so they dont shoot at us
The A.I. part is disabled by default.
You can enable it manually in "GameMode > PerceivedFactionManagerComponent > AI Settings".
still havent solved how to make my AI agents aim at the target instead of 1 meter above the heads of enemies or 1 meter to the right
custom ai agents + custom weapons
Like bro just take the gun and point it at the target this shouldnt be this hard
Try searching for LookAt? I use something like that to orient artillery emplacements toward the target, maybe it can be used for what you're doing, idk.
No they do aim just with a weird offset
yeah thats weird -should be center Mass. is this their version of Bullet Dispersion?
Would be pretty cool if the "ChimeraCoverManagerComponent > GetBestCover" methode would return all covers found within set angle/radius as well.
The "m_bCheckVisibility = false" and "m_bUseCoverSearchDirectivity = false" doesn't seem to help much to make A.I. to just move to any cover point.
There is still some restriction to cover search.
So what i'm looking for is to make A.I. to move to any found cover point without checking anything so to speak.
The "Cover System" is such a nice piece of work but the lack of additional parameters in and out is still restricting it in many ways.
Does anyone know why when I upload my map and place AI down they dont move when I set a waypoint? Only time they move is if I have CRX in and they only run South. Struggling here if anyone can help. Thanks
Navmesh
Okay I’ll give that a try thank you
Okay I’ll try that as well thank you
you got to generate all three. One is for character, one is for vehicles and last one is for other two to work
Okay, I see it. Thank you 🔥
Is there something i can do to help A.I. to find and use any cover point ( position ) without all the cover search conditions met?
Like can i change anything here to get this done?
query.m_fScoreWeightDistance = 1.0; const float NAVMESH_AREA_COST_SCALE = 1/3.0; const vector NEAREST_POLY_HALF_EXTEND = "1.0 2.0 1.0";
NEAREST_POLY_HALF_EXTEND = "1.0 2.0 1.0"; what does it even do? Offset?
AI seems to ignore the speed settings of character aiming components
Snaps to target instantly
Why would adding an action to a door stop the ai from opening the door?
How can i debug this?
WORLD : UpdateEntities
WORLD : Frame
SCRIPT : <0x00000261A2A00EF0> SCR_AIGroup: Move failed with result STUCK
SCRIPT : <0x00000261A2A00EF0> SCR_AIGroup: Move failed with result STUCK from <2966.394287,108.566940,6148.577637> to location <2971.354248,107.633392,6160.964844>, failing action.
Action order?
not sure what you mean? The actual action priority? Changing that does nothing
I tried messing with SCR_AIOpenDoor but no luck. Nothing even prints out for any actions
Hey, i'm running into an issue in my gamemode with AI, Basically they do not see me as hostile which is annoying. I've added a SCR_AIworld entity to the map but all they do is run away from me and take cover if they get shot at, however they do not ever aggro me. which is a bit annoying.
Anyone know if there is a config regarding that ?(in the faction manager my faction and the AI are not friendly)
sounds like you are missing perception manager entity in the world
Use debug stuff and check what faction they are and the player is in runtime
Oh wait.
I remember now. It was because they didn't have ammo on them, or they couldn't access the ammo they had on them.
Thanks a lot
Is it possible to slow down how fast AI turns and aims?
character modifiers from weapon dont do anything to AI
also stuck teleport is not a thing in movement component 😦
@shy lake Do you know where in the vanilla behavior trees are danger reactions processed? I want to hook a few vanilla danger reactions into my custom agents
Is it this thing?
The event based reactions like WeaponFired etc?
I think they are in the SCR_AIConfigComponent.
If they use a behavior tree like for example move yes this is where the behavior tree will be selected and executed.
Alr thanks
Most important part of AI if you ask me. What point is there getting the first bead on an enemy thru tactics if their reaction times aren’t realistic
Why does the AI take like 5sec after spawn to react to the waypoint that I also set right after spawn?
There always is a short delay from move order till they start moving.
Not sure if its 5 sec. but at least 3 sec.
Guess its done to allow individual A.I. of the group to get back to their formation bevor the group starts moving.
At least thats the only good reason i came up with related to this move delay behavior.
Do you know where and if you can remove that delay?
I think i've seen it in one of the group behavior trees like PlanMovement.bt or whatever it was called.
There should be a Idle node somewhere.
I can check and tell you a little later when i'm at the PC.
I will check too, thanks for the help 
Was there a change to AI LOD in recent game update? It seems in conflict AI might be active even without players on the server?
It has begun .........
I think i have seen them being active pretty far away too.
I did not pay much attention, thought i'm may still within their LOD distance but now that you noticed as well.
ActivityMove.bt.
The RunOnce > Talk node will delay the move order.
Maybe you can change something in the Talk node parameters to make it return SUCCESS instantly instead of RUNNING.
At least if you disconnect this part they will move immediately.
whats a destructible flag vs hard destructible
in pathfinding component
also wat do navmesh colors mean
in navmesh tool preview
preventMaxLOD() function
I didnt see anything about this in the changelog
I'v tried to make AI faction fight with eachother on server without players
with preventMaxLOD for both groups and agents
So all AI in the game now uses this so they never deactivate?
No sure about how they act exactly. But the conflict is not stop after I left the server. Base captured numbers and AI amounts are changing based on your server state mod.
I think you misunderstood my earlier question
They can even take back captured base from enemy back and forth
I have no idea when it is bring into the game tbh
You mean a global method?
I find similar setting inside vanilla scenario framework slots, which is usable to longrange patrol with vehicle
Hey i am so sorry but i am too dumb, i have a testmap for ai etc. everything works fine but when i want to transfer it to a map like "Arland" my ai doesnt recognize the opposite faction as enemy anymore. Even with just factionmanager setting up as the same as in my testmap and only 1 ai soldier it plain dont work. I cant get my head around what i am missing.
I have aiworld, factionmanager, game mode inside the map
perception manager?
are you using the prefab?
you should always use prefabs from the resource browser instead of entities from the create tab, they usually come with everything configured already
yeah that was my bad
So is there no solution to make AI aim at the character without it shooting 2 meters above the target with a custom weapon and bullet? I've lost count how many times I regenerated ballistic tables
Only works on short distances
Nvm figured it out it was the scale of the character/weapon quadrupling speed of the projectile
Is there a sequence node that runs everything one by one even if they return fail?
You can use Force Node Result to make the branches always return Success.
If the branches are independent, you can also use Parallel instead of Sequence.
Is parallel actually parallel
in a way that all branches will be simulated at same frame - no there is no splitting work to different threads. But it shouldn't concern you that much I would say. Running int problems of shared resources in both branches would seem as somtheing wrong with deisgn of given BT more than anything else.
Okay so it does not wait until lefthand task finishes is what I wanted to know
Yes, everything connected to the parallel will be executed immediately.
internaly somehow yes but realy it's wrong to construct a tree which would rely on that.
That was my point that it runs all things in one branche and than follows to enxt one but inside of one simulation frame.
Parallel is super useful for aiming and firing at the "same" time
like if you would change value of some variable and than you read it in next branch you will read already changed value not the value on beggining of the simulation frame
If you dont put aiming and firing under parallel then your AI will miss moving targets a lot
yea one of few instances where it realy make snse to use it otherwise most of the time selector with decorators are much better aproach
Anyone know if there’s any docs about the perception system?
Hello hello!!! Quick question:
Does anyone know how AI works when it comes to decisions and secondary weapons? For example, the standard AT bloke will generally shoot at you with his rifle, but if you drive up to him in a vehicle, will switch to his RPG and aimbot you into oblivion
But then I have created my own AI guy with an RPG secondary and M16 primary - he will happily shoot you with the pew pew but absolutely refuses to switch to his RPG and use that, any ideas?
I don't think there's documentation for it. What do you want to know?
True.
Well what i meant was more about the general behavior of the parallel.
Like each branch connected to it can kinda run on its own so it does not have to wait for left branch to complete.
Ofc if variables are used they can affect other connected branches.
But lets say if 3 idle notes with 1 sec. delay are connected the 3 branches will just be ( looped ) executed without waiting for the left hand idle.
If this makes sense.
Thanks, it was nothing in particular I just wanted to have a read about it. I shall dig through the code instead!
Most perception related things are not in script, so you can't read how it works.
The perception component on AI characters has some info tooltips though IIRC.
Anybody know where the mortar AI behavior is handled or where I could look to see it?
You can check the scripts of ArtillerySupportWaypoint prefab.
Then you can find how the waypoint interacts with AI mortar active module.
cheers ty
You can also find the behavior trees by using the "Behavior Tree Editor".
They should be in "AI\Chimera\Soldier".
Will look there as well, ty!
Still having a hard time finding what I am looking for. Specifically I want to find how the AI calculates its firing solution for mortars
Actually I think I found it: SCR_AIGetArtilleryAimDistanceCompensation
SCRIPT : Mortar Pos: <2040.845337,51.929089,2100.509766>
SCRIPT : Target Pos: <1500.000000,60.000000,1500.000000>
SCRIPT : Horiz: 808.162 | Vert: 8.07091
SCRIPT : GetResourceName 'scripts/Game/Components/Gadgets/SCR_MortarShellGadgetComponent.c,46'
SCRIPT : GetResourceName 'scripts/GameCode/Components/BallisticCalculatorComponent.c,39'
SCRIPT : Using charge ring 1 with speed coef 1.321
SCRIPT : === Mortar Fire Solution ===
SCRIPT : Elevation: 1008.75 mils
SCRIPT : Azimuth: 3946.8 mils
SCRIPT : Flight Time: 16.2969 sec
Really getting somewhere with this I think
Does perception only work on server? Cause my perceptionComp.GetTargetsList(targets, ETargetCategory.ENEMY); seems to only works on server
yes, do you also know about ```c
class SCR_AIStaticArtilleryActivity
I did, I think I found all I need. Managed to reuse and reimplement much of the AI logic to use for a mortar ballistic calculator
very cool! 😎
Now I need to figure out how to implement it UI wise haha but thank you for the leads
hahah good luck with that! 👍
Is there a way to make AI shoot at certain props?
Like for example i have a custom drone where would I even start on getting the AI to shoot at it.
perceivable component perhaps
I have a VehicleFactionAffiliationComponent set to US and a vehicle perception component and no dice
AI perceives other ai but not the drone, there is no characters in the drone either so it might as well be an empty prop
is there no faction assigned maybe?
typically the faction is assigned when a character eneters the vehicle
Try what @halcyon bridge said, perceivable component. Also try to setup aimpoints
I'm using the vehicle variants so I think the hiccup is that a vehicles factions gets reset to neutral with no one in it. Guessing if I just manually set this it'll work?
Just a heads up, I believe Everon could use a navmesh update. I was having a problem of AI that would spawn in and just stand there idle when they should be moving to a defend waypoint. I regenerated these specific areas and it fixed the problem. Also, if theres any way you guys can prevent the AI from getting stuck on little wooden fences that are waist high, that would be awesome. They just stand there on the fence and dont even try to get around another way, nor try to hop over it.
bro they get stuck on the tiniest thing and it annoys me
Given the SCR_ChimeraCharacter (character) I used to do c SCR_EditableCharacterComponent m_ECComp = SCR_EditableCharacterComponent.Cast(character.FindComponent(SCR_EditableCharacterComponent)); AIAgent agent = m_ECComp.GetAgent();
to get the agent in an action (in CanBeShownScript), however now this is only called on the server. How do I get the agent this action is attached to now? GetOwner doesnt seem to work, neither does GetAIAgent() from the AIControlComponent.
From my MP testing the agent will always be null on client.
The closest i could get on a client was the AIControlComponent.
I've tryed many things to get the agent on a client but no success so far.
I ended up having everything i really needed in the SCR_ChimeraCharacter. I have an action on the prefab so I can just Cast from GetOwner() to get the character. I was using the method I posted above for a while now so IDK why it suddenly stopped working a couple of updates ago. 🤷♂️
Yeah its a bit strange we can not do this from the client at least the way it was in RV where the A.I. variable was marked with ( Remote ) but we were able to get something to work with.
how does vanilla AI movement component check if its blocked by a door or something? for example using pathfinding component on non-character entity it will just phase through doors
even when they get stuck, if I move them to where they wont be stuck anymore in GM, its like their brains are just shut off and they still wont move even if theres nothing around them anymore.
@wise pebble How are Random Flags called? I am searching your documentation, but I don't see them mentioned! Is it just 'Random Flags'?
This is not AI related, I will answer in #1378020860329459852.
I actually did need to remove the agent from the group from a client action, so I ended up doing it under PerformAction which is executed on both the client and server. Given the character, I used this: ```c
if(Replication.IsServer())
{
AIControlComponent AICComp = character.GetAIControlComponent();
AIAgent agent = AIAgent.Cast(AICComp.GetControlAIAgent());
AIGroup group = AIGroup.Cast(agent.GetParentGroup());
group.RemoveAgent(agent);
}
not sure if these are essential to make this possible, but thought I should also note that I did use both these: ```c
override bool HasLocalEffectOnlyScript()
{
return false;
}
override bool CanBroadcastScript()
{
return true;
}
Hi, can someone tell me how to put bots in the BRDM? I tried using "AIWaypointGetIn" - the order is ignored, I tried using "E_AIWaypointgetin" - the server crashes with the error "JIP_Error". I would be grateful for help
I don't care how, either by team or immediately in the vehicle the bots would spawn
In the waypoint did you set the vehicle as well?
If using groups best way I found was to just add the vehicle to the group as "spawned vehicles" or something, can't remember the exact name - works well for cycling vehicle patrols
Is it possible to add additional voice cue for soldier (in same voice event pool as “suppressing fire!”, “I’m under fire!” etc) and play it via script code or BT node?
we need a basic ground-level movement component
it took me unreasonable amounts of time to create one
I dont want anyone else to have to go through this
Anyone know how to set up individual ai?
You can make a group with only one AI character.
Groups are essential for the functioning of the vanilla AI.
Is there any guides or videos on how to do so? Can’t find any
Place a group and put an AI character into its array
Ima going to try that now💪
@wise pebble you’re MVP of the day my guy😂‼️was trying to figure that out for HOURS
it worked^
Hello. anyone knows if a player stops being a player when they die and become a regular character instead like the AI?
Not sure what you mean by this, can you add some more context?
@random owl Hi Viktor, question: Is it necessary that an AiPatrol Vehicle is stopping on each Waypoint? Would it not better to calculate the path to the next one if we get close to the current, so the vehicle not need to stop?
Any1 know any mods or scenarios with an ai commander, Like Alive Or NR6 from arma 3
Is there any way to check if AI group is in combat (or calm)?
upd: apparently, it's possible to grab highest threat state from group SCR_AIInfoComponent
protected void UpdateThreatState()
{
// Exit if no agents
float count = m_aInfoComponents.Count();
if (count == 0)
return;
EAIThreatState highestThreat = EAIThreatState.SAFE;
foreach (SCR_AIInfoComponent infoComp : m_aInfoComponents)
{
EAIThreatState currentThreat = infoComp.GetThreatSystem().GetState();
if (currentThreat > highestThreat)
{
highestThreat = currentThreat;
}
}
m_eThreatState = highestThreat;
}
Well principally it could be done somehow. But it would be quiet big feature right now so not much viable to push trough.
SCR_AIInfoComponent.GetThreatSystem().GetState()
Ah sorry I just now noticed you said group
How does game master do the little indicator?
On the group icon
group utility comp grabs threat level in same way (by polling states of each soldier in group and getting the highest value as group threat measure score) , so I did it the same way for state
wow is that efficient
well, I don't know, but it's the BI way ¯_(ツ)_/¯
in SCR_AIGroupUtilityComponentClass.EvaluateActivity, this func is called periodically (every second) to update threat measures, suppression clusters and illumination flare usage eval
One more thing to turn off for my zombies 
so I just overrode UpdateThreatMeasure and added threat state grab there too, so at least it's not got much worse than before 🫠
I needed evaluation mechanism for support calls in escapists (so soldiers could call for mortar barrage if they felt that shit hit the fan), and seems that it's the most convinient way without messing too much with AI goals and activities
yeah, zombies could benefit from lightweight group utility component, it probably would allow to field more zombies simultaneously
btw, what's the name of your zombie mod? I want to do zombie escape one day 🐸
bacon zombies, the AI is already quite simple, one zombie is half of vanilla character in terms of compute cost on server
biggest fps drain is the visuals and ragdoll physics
wonder if there will be some more lighter vanilla character entity, similar to A3's agent
I guess you already removed everything unnecessary (inventory comes to mind), also they probably could use MatPBRBasic materials wherever possible and clothing done as single slot (so no separate pants, shirt, headwear etc)
being able to change LOD, animation LOD would also help
I simplified ragdolls by removing some ragdoll colliders also
scripting ai question: #enfusion_scripting message
Hi, this might be an annoying question, can I have a group which is spread out, to all move to a waypoint separately? Normally they take really long to join together first, to get into formation, then move to the waypoint. In my recent attempts I've been overriding the WP_Move.bt behavior tree on a move waypoint. Idk if that's how I should be getting to the solution.
@random owl i have the same question. How can i add an waypoint to an single agent in a group? I only found AddWaypoint for the whole AiGroup. Thanks and have a nice weekend.
Anyone know how to configure a turret for AI to be very fast at aiming it with no overshoot etc
i think Ai using the max. turret speed from the config.
Yeah idk if this is even possible with PID system
Is it impossible to make AI character not rotate 180 degrees in a single frame?
They completely disregard character aiming components having a max aiming speed that works fine when player controlled
I don't think you can use waypoints with an individual A.I. agent of a group.
Rn waypoints are a group task only.
You would probably need to create a new waypoint + behavior for the individual A.I. to move but still encounter problems due to the system was not build with individual A.I. waypoints in mind.
However if you just need a individual A.I. to move from A to B you could use/execute the "SCR_AIMoveIndividually" behavior.
Maybe this can already help you to make them move instantly instead of moving back into formation first.
#enfusion_ai message
Its so refreshing to be able to put AI on Takistan balconies and they can move around firing without just walking off anymores. What would it take to be able to get AI to "Hard reach aim" a target right below them? Kinda like skyrim guards can literally lean real hard to fire just below them when up on a fort. New animations or a config?
is there a way to force AI to load in to a vehicle gunner seat at the start of a scenario? i know i can command them to Get In, but I want them to spawn inside the gunner seat at the start of the mission, even with no driver in the vehicle. If anyone has any advice on how to do this, would greatly appreciate it 🙂
yea waypoints are meant to be a group thing something what whole squad is supposed to do.
My problem was based on a Commanding Unit (Slave). If you add a member on runtime, it does not get the current wayoint. But i scripted it now.
this is definitly possible. Only if you do it like this you will lose the ability to have the original behavior. So I would suggest to create a new waypoint which would be done in similiar fashion.
That's difficult to say without all the changes you have on it. I was convinced that current turrets are "fast enough". If potential is it possible to speed it up - no clue unless some nontrivial investigations.
I think that this part of character controller is "little bit" problematic. I don't have have unfortunately much how to help with it.
It's fine with slow turrets, but with turrets that rotate fast they overshoot constantly unless I lower the PID values but in that case they are no different than slow turrets
the AI aiming and AI movement components have PID I think but it does nothing
AI head aiming does not expose options
something like that
if you give the AI a weapon that has an aim modifier that slows down aiming they still act like counter strike 1.6 aimbot hackers
I think that was one way I did it but it worked for players
aha
I think tuning PID should be the option for fixing the overshoot.
Basically I think you need to decrease integral part (Y part of setup).
X is proportional part - that basically says how fast it will be.
OK I also need fast turret acceleration and deceleration then it's a bit better
AI Commanding woes
i have a problem with the ai and mortar, every time i want to use the SCR_AIWaypointArtillerySupport i get the error: SCR_AIStaticArtilleryActivity: FAILED, noone can shoot at the target position: %1, or there is no ammo.
the ai says no ammo everytime but there is the ammo box and they cant use it? is there a way that they use them or something 

I believe it costs supplies for each round they take. I gave the operator a backpack and spawn more mortars in it every few shots.
The supplies cost are disabled in gamemode.et :c
I also get that same error when I delete the group operating the mortar emplacement
For future reference, for anyone who gets the error of "Unable to open navmesh file "
I solved it by saving the mesh files directly in the primary terrain folder for the world. I used the auto generator, and it generated the SCR_AIWorld in the sub instance. I also moved that into the default folder of the primary instance. I'm sure there's other combos that would work, but this is what I did.
The main title name is hidden.
can a decorator under parallel node not cancel the rest of the children under the parallel node?
Depends on AbortType of that decorator. If you have one of AbortFurtherChildren than it does it.
OK gotcha
Hi, what i need to change when my AI is driving to slow in my Vehicle? I set CruiseSpeed to 60 and maxSpeed to 80.. but they only drive 40 km/h
Is that vehicle capable of that speed? are you trying it on flat terrain like airfield? It should be just that. Check if you changed prefab and not just instance maybe?
There is a coefficient which is used for predictions - which if would be changed could decrease predicted speed to such low speed also.
Or actually it could happen to you that you have somewhere script tweaking the speed void SetCruiseSpeed(float speedKmH);