Arma 3
AI Pathfinder Improvement (DEV BRANCH AVAILABLE!)
77 Comments
ImmortalTheOwl  [author] 18 Jul @ 9:29pm 
@Free Placing multiple waypoints across bridges with water on them tends to resolve the issue (May have to adjust the height of the waypoints to match the bridge level for the ai to recognise em). It's what I've been testing with the obstacle avoidance stuff for vehicles. I've not tested this on non vanilla vehicles so their behaviour may vary.
Free 18 Jul @ 7:51pm 
(Rhs vehicles kinda work to they just take a little time to cross the bridge)
Free 18 Jul @ 7:50pm 
(Also sometimes is based on specific vehicles like the ww2 vehicles have this issue but not the vanilla vehicles)
Free 18 Jul @ 7:48pm 
Is it possible you can fix the "bridge" issue with ai going over a bridge with water or in general its weird because sometimes they cross the bridge other times they just sit there or they end up trying to reroute their path into the bridge wall and stay stuck there forever this is one of the biggest issues with arma and makes some maps unplayable
ImmortalTheOwl  [author] 14 Jul @ 12:51pm 
@Nefil͡imP͠L̀ It can be ran on client side, however I do recommend the mod being run on server side.
Nefil͡imP͠L̀ 14 Jul @ 12:05pm 
can this be used as client side for only units controlled via player as team leader? or server needs it to?
ImmortalTheOwl  [author] 6 Jul @ 8:01am 
@Brilian & @Hitman As long as the mod doesn't affect the pathfinding abilities of the mod like what sog and IFA3 does then it should not conflict with eachother. Worse case scenario it starts throwing script errors your way.
Brilian 6 Jul @ 5:51am 
does this work on antistasi ultimate?
Hitman 3 Jul @ 7:09am 
работает вместе с модом HumanBots Only AI?
_mickey_ 27 Jun @ 1:46pm 
@ImmortalTheOwl

thank you for your work! I will try and inform you about problems
_mickey_ 27 Jun @ 1:43pm 
@user2g I am sure that with a lot of desire (we saw what @Dedmen did, he rewrote more than a million lines of multithreading code) the problem can be solved without significant performance costs, especially now, after the 2.20 update!

Another thing is that this should be done by professional ai-programmers, but not individual enthusiasts. I am very sorry that @BIS dropped AI support for Arma3
_mickey_ 27 Jun @ 1:39pm 
@user2g I tested (for a long time) the "AntiWallGlitch" mod and it had zero impact on performance. The problem with this mod was different - The mod made the AI ​​(some units) exit from formation and stop forever. And second - blocking ai-penetration into walls, did not work stably. I constantly continued to see how the AI ​​goes through walls and objects, although to a lesser extent. For a long time I contacted the author of this mod and asked him to fix it, but he could not. In the end, I abandoned this mod, because it did not work stably and stopped the AI ​​units forever. In essence, it turned out to be meaningless.
ImmortalTheOwl  [author] 26 Jun @ 1:39pm 
Alrighty, the DEV branch has now gone public, you can visit it here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3485487020

Or look it up however you please. [DEV] AI Pathfinder Improvement

I've completely reworked some of the functions in the mod, even trying out something called dia_log format which is suppose to be a debugging tool for writing log files according to the wiki, I don't know how well it works but it's worth a shot.

For the smartdrive, I tried to include as many types of object classes as I could, but there are bound to be problems no doubt.

So far I have the following functions:
- initSmartPathing
- smartMove
- smartDrive
- dynamicPath
- groupPathMonitor

All feedback and scripting tips are greatly appreciated, and I wanna thank you all again for your patience while I get this working.
user2g 20 Jun @ 4:13pm 
@_mickey_ The 1. Is a Engine/Feature issue a failsafe if you so will for the AI to ensure they get to a pathing or destination, so that can never truly be fixed, he can attempt to get the AI to reroute upon contact with a object but that can be performance demanding as the prevent ai through walls mod has attempted to do.
ImmortalTheOwl  [author] 20 Jun @ 2:36pm 
I'll get SmartMove/Drive, dynamicPath, and the monitor script on the DEV branch which should take me a few days at least and then I'll make the branch public.
_mickey_ 20 Jun @ 3:34am 
For future updates. The main pains in the ass of AI pathfinding for me personally is as follows:

1. when infantry goes through walls and objects
2. when AI infantry gets stuck inside a rock or falls under the floor (then will be stuck there forever) of a building where the first floor is high
3. when vehicles crush their own infantry
4. when vehicles can't get around an obstacle in their path and stubbornly continues to press the gas (forward and forward!) getting stuck forever.

If you can overcome at least some of these problems, then I will be happy.
ImmortalTheOwl  [author] 20 Jun @ 2:48am 
Awesome, I appreciate it. When the DEV Branch goes public I'll announce it here.
_mickey_ 20 Jun @ 2:13am 
"Would you be interested in testing out the DEV branch when I make it public?"

Of course! I'll do the tests, I'm ready to help you bro
ImmortalTheOwl  [author] 20 Jun @ 12:45am 
@user2g Exactly.

@_mickey_ I'm in the process of reworking all the scripts thanks to recent events and the 2.20 update, it'll take me a while due to my irl job, hence why I offered to open up my DEV branch. Would you be interested in testing out the DEV branch when I make it public?

@Maddy although the mod can be ran client side I recommend running it on the server just to be on the safe side.
user2g 19 Jun @ 4:48pm 
@ImmortalTheOwl Public Dev branches allow faster testing to a wider audience using a large range of diff PC specs and mods allowing bugs to be found faster and may allow you to squash them before a stable release more effectively.
_mickey_ 19 Jun @ 3:07pm 
or this

23:18:11 File AIPathfinderImprovement\scripts\fn_smartMove.sqf..., line 2
23:18:11 Error in expression <ist, 2] call API_fnc_dynamicPath;

_veh setWaypoints _finalRoute;
_veh setCurren>
23:18:11 Error position: <setWaypoints _finalRoute;
_veh setCurren>
23:18:11 Error Missing ;
23:18:11 File AIPathfinderImprovement\scripts\fn_smartDrive.sqf..., line 10
23:18:11 Error in expression <ist, 2] call API_fnc_dynamicPath;
_mickey_ 19 Jun @ 3:07pm 
@ImmortalTheOwl Dude, your mod sounds promising, but I don't understand how it can be used without crazy bug spawns. As soon as i connect it and run my missions i get this:

23:18:11 Error Missing ;
23:18:11 File AIPathfinderImprovement\scripts\fn_dynamicPath.sqf..., line 37
23:18:11 Error in expression < = _x;
private _leader = groupLeader _grp;
private _wps = waypointsGroup>
23:18:11 Error position: <_grp;
private _wps = waypointsGroup>

23:18:11 Error Missing ;
23:18:11 File AIPathfinderImprovement\scripts\fn_autoAttach.sqf..., line 3
23:18:11 Error in expression < = _x;
private _leader = groupLeader _grp;
private _wps = waypointsGroup>
23:18:11 Error position: <_grp;
private _wps = waypointsGroup>
Maddy 19 Jun @ 2:12pm 
Should this mod be loaded on all clients or just the server?
ImmortalTheOwl  [author] 19 Jun @ 12:45pm 
Hello everyone,

Significant progress on the AI Pathfinding Improvement mod!

I'm pleased to report that fn_smartDrive (for vehicle pathing) and the new fn_groupPathMonitor are now functional (Not in the current update mind you). The fn_groupPathMonitor completely replaces fn_autoAttach, which previously used an addAction menu on squad leaders which didn't really work nor was that my intention anyway. The mod's new design ensures AI groups will now utilize improved pathfinding proactively, without any player intervention.

All development and testing are currently taking place on a private DEV branch. If there community interest, I can make this DEV branch public. This will allow you to provide direct feedback, report and contribute to correcting any discrepancies in the scripts before I release it to the main branch. Your feedback and insights will be incredibly valuable during the testing phase.

Thank you for your patience and continued support.
ImmortalTheOwl  [author] 17 Jun @ 1:52pm 
on*
ImmortalTheOwl  [author] 17 Jun @ 1:51pm 
I don't get the errors often no, which is why I kind assumed they worked at the time.
The game sure lets me know when a script fails to load but not the usual little black box that appears telling me what the error is and what line it's one.
_mickey_ 17 Jun @ 1:29pm 
@ImmortalTheOwl I just suggested, Seems to me you can't disrupt them. I've been using Lambs for a long time and as far as I can see they only focus on suppression and combat maneuvers of AI, they are not doing anything else, while additional AI nuances like AI-pathfinding could significantly complement them.

What about the error? You don't get such error message?
ImmortalTheOwl  [author] 17 Jun @ 12:46pm 
@_mickey_ I suppose it wouldn't hurt to ask but I don't want to feel like I'm disrupting them in any way.
But yeah, all the scripts in the mod will have to be redone anyways due to the update. Not just because of what happened.
_mickey_ 17 Jun @ 11:31am 
@ImmortalTheOwl Hey dude, if your former companion left you, then (as I can assume) you should team up with @diwako and @nkenny, together you can create more useful things for Arma AI.
_mickey_ 17 Jun @ 11:26am 
Probably after 2.20 update, I have message error

21:20:03 File AIPathfinderImprovement\scripts\fn_autoAttach.sqf..., line 3
21:20:03 Error in expression < = _x;
private _leader = groupLeader _grp;
private _wps = waypointsGroup>
ImmortalTheOwl  [author] 17 Jun @ 8:49am 
@diwako I did get a message back after waiting patiently for 2 days. And it turns out that the person who was helping me out with updates on the scripts, said that he used ChatGPT to make updated parts of the code without my knowledge or consent. Which explains all the other unknown functions and sqf commands etc.

This came as a complete surprise to me. You can imagine how incredibly disappointed I was by this, and now the guy is no longer working with me and I'm in the process of rewriting all the scripts myself to make sure that all functions I had visioned works as intended. This will take a significant amount of time and work to redo no doubt.

But my goal remains to deliver a quality AI pathfinding improvement mod. I wanna thank you again for bringing this to my attention.

With that said, I think it's time I made a FAQ section of the mod as I'm noticing repeated questions. Hopefully that'll clear things up.
ImmortalTheOwl  [author] 17 Jun @ 6:15am 
The whole mod is designed to be as lightweight as possible using as much Vanilla AI stuff as possible. So in theory it should work with all AI mods besides a few like IFA3 and SOG which seem to have their own AI overhaul which might conflict with pathfinding in general.
Kazuma-San 15 Jun @ 4:52am 
@SahaPuhicka2006 it is, it's a nice combo.
Maddy 15 Jun @ 1:43am 
Is this Clientside or Serverside? Like Should everyone run this? or just the server?
SahaPuhicka2006 14 Jun @ 1:58pm 
Hello, is your mod compatible with another mod called DCO Soldier FSM?
ImmortalTheOwl  [author] 14 Jun @ 10:07am 
@diwako Oh hey, fancy seeing you here. This is my first full-blown mod and I’ve mostly only done little scenario scripty bits here 'n' there in the units I'm in, so I really appreciate you pointing out the rough edges.

I definitely got carried away assuming these functions would just work, turns out they aren’t exposed the way I thought. I’ll reach out to the person who helped me put together these scripts and see if he used anything to create the scripts.

I appreciate the heads up.
diwako 14 Jun @ 7:48am 
Gotta ask. was chatgpt used for this? Multiple unknown sqf commands and functions, out of all functions in this mod only one compiles.

setWaypoints
groupLeader
waypointsGroup
getCBASetting
BIS_fnc_selectBestPath
BIS_fnc_Astar

on top of several wrong syntax usage of existing sqf commands. The postInit does not wproperly Ofire either. The post init function only attaches some addAction to groups placed in the editor and does not add anything dynamically to spawned groups afterwards.

Is this intended?
Ruca 13 Jun @ 9:42am 
please sign this brother, its great:steamhappy:
Sir Knight 13 Jun @ 7:07am 
Seems to work nicely in RIS with Lambs Rpg Supression and Turrets. Will feedback more in a few days
Lufian 12 Jun @ 12:39pm 
Righto, I'll give it a try this week and let you know
ImmortalTheOwl  [author] 12 Jun @ 12:32pm 
@Lufian It should play nicely with Lambs. AI Pathfinder Improvement only hooks into Arma’s built-in pathfinder, then issues optimized MOVE commands to your units. It doesn’t override or conflict with any of Lambs’ behavior tweaks. If you spot any weird interactions, let me know and I'll look into it.
Lufian 12 Jun @ 11:50am 
Would this be compatible with lambs?
ImmortalTheOwl  [author] 1 Jun @ 5:47pm 
@BlackKnight Been working on some big new additions lately which will be coming soon, hopefully it'll help the issue you've been having.
BlackKnight 30 May @ 1:22am 
hi, i used this mod and i feel it is very good. However AI doesn't really want to go into the house, except they are ordered to do it or with a specific garrison script . If they can find the way go into the house willingly without order to clean the house, it would be the best for defending scenario
Brim 27 May @ 9:27am 
@ImmortalTheOwl Understood, it's a cool concept so I look forward to seeing how it progresses!
ImmortalTheOwl  [author] 27 May @ 7:55am 
@TTV SakuraBunVR Should do now, however in the discussion section, I just mentioned that the function only auto‐attaches on mission start at the moment, so anything that spawns after init won’t pick up the Smart Route action unless you trigger it yourself. A simple workaround for now is to manually input [] call API_fnc_autoAttach; into the debug console or the exec code module in zeus. That will walk through all live squad-leaders and add the Smart Route entry.

I'm working on an update to make it more automated so that even after mission start it'll pick up on dynamically/newly spawned AI. Until then, a one-liner in your late-spawn logic is the easiest workaround.

@Brim Same as above, plus I'll be making screenshots and a video showcase soon, just keep in mind that this Mod is still in it's prototype stage so I can't guarantee that it'll work flawlessly all the time.
TTV AkumaNoxVR 26 May @ 8:58pm 
Will this work now with the zuse enhanced?
Brim 26 May @ 4:57pm 
@ImmortalTheOwl I saw the update and tested, no errors but I'm not entirely sure it's working. Smart Route addaction I don't see being applied as a point of reference with just this mod loaded. I have also tried looking for pathing differences with this mod loaded and unloaded and I couldn't identify any points at which the AI were pathing differently. It would help to see an example video maybe demonstrating the effect of the mod or maybe it is not working for some reason still?
ImmortalTheOwl  [author] 26 May @ 9:06am 
@Brim Something tells me I must have been using old alias's, in that case then I appreciate you pointing them out. I'll switch over the outdated alias and replace them with the correct SQF commands and then I'll update the mod's dev branch for testing. When the update releases to the main branch, give it another go and let me know if you spot anything else. Thanks.
Brim 26 May @ 8:23am 
@ImmortalTheOwl I'm a little confused as to where you got some of the native functions that you're using? I'm going through error checking it and there's tons of function calls in here that don't actually exist, "groupLeader _x" "_x getPosition" "surfaceHeight _x" are all not valid functions that you're using. groupLeader should just be 'leader', getPosition should be getPos, and the correct one for surfaceHeight depends on what you're using it for but I imagine you're looking for getPosAGL.