nkenny 1057 Posted September 8, 2019 LAMBS Improved Danger.fsmby nkenny / diwako / joko Current version: 2.5.3 I am very happy to announce the release of a new AI improvement mod. At its core it is a considerable expansion of vanilla Danger.fsm. Added are features which extend the enemy response and reaction to fire. The overall goal is to make buildings part of the AI's available terrain. The AI will dynamically enter and clear buildings holding enemy soldiers. The nature of the the danger.fsm does not make these features a replacement for dedicated scripts and clever use of waypoints-- instead the mod should work seamlessly with existing missions. It puts no special demands on mission makers, nor does it add universal game mechanics with strategic implications. With the mod enabled the AI is a significantly more active combatant. The biggest changes is that the AI is now able to view buildings and structures as part of the tactical terrain. The AI will search through buildings, hide and garrison within, as well as provide suppressive fire against suspected enemy positions. In addition AI reactions to fire, even when the origin is unknown is expanded. The AI will also communicate threats to nearby allies. Armoured and tracked vehicles receive new custom behaviour which will see them always try to turn towards known enemies and hammer suspected locations of enemy forces. Features * AI will move inside buildings * Perform suppressive fire (Vehicles will dismantle buildings) * Panic, with special effects * React, even when exact enemy position is unknown * React by hiding in the presence of powerful vehicles when without equipment to deal with it * Check dead bodies, rearms when possible * Tanks will react by rotating towards threats * Improved civilian reactions, hiding in buildings and checking dead bodies * A special Close Quarter Battle mode when DELTA or FILE formation are used (formation can be configured) Some limitations of this implementation are twofold. For one, the Danger.fsm only triggers when the enemy feels threatened. Which makes the actions always purely reactive. This means that you should not expect pro-active searching through buildings, or changes in stance or formation based on terrain. Such things are simply governed elsewhere. Second limitation is myself. I am by education a philosopher, not a coder or computer developer. Please excuse my bumbling attempts. I intend to develop the mod further. In a sense it is already outdated based on my future plans. That said I wanted to release something now in a public sphere to gain more experience, feedback and perhaps garner more interest in FSM level modifications to AI behaviour. I see a lot of opportunities to add or fix annoying aspects of AI behaviour. I write that this release in a sense already outdated, because I intend to redo the current FSM flow structure; which is currently an expanded version of the Bohemia variant, which itself appears to have remained basically untouched since Arma2. Video Here is a (rather clumsily made) demonstrations video. The scenario consists of eight Spetsnaz soldiers assaulting three buildings held by 10 looters. The looters are garrisoned using CBAs taskDefend module. The attackers are given a single MOVE and SEARCH AND DESTROY waypoint. Their formation is set to DELTA/DIAMOND-- which triggers a special CQC mode. The attackers defeat all defenders and suffer zero casualties. No other special mods or scripts are in play. --- STEAM Workshop ---GitHub --- Development Discord 35 17 Share this post Link to post Share on other sites
nkenny 1057 Posted September 8, 2019 Closely related to the above mod are two other co developments. The LAMBS Suppression mod and LAMBS RPG7 tweak. Both extend AI in interesting manners. LAMBS Suppression increases the AI's susceptibility to suppression. The AI will remain suppressed for a longer time. This in turn has a great effect on game play. Firefights are extended while retaining the dangers of assaulting prepared troops. For a closer look please check the Github or look to the Steam Workshop. LAMBS RPG7 is a simple mod which makes the AI fire the RPG7 more indiscriminately at infantry, vehicle and air targets. As I have argued exhaustively elsewhere, this is a natural extensions of Arma3 small arms tactics. The AI is configured in such a manner that it may prefer the RPG to the carried rifle. Links to Github and Steam Workshop. Thank you for reading, Ken 5 6 Share this post Link to post Share on other sites
froggyluv 2135 Posted September 9, 2019 Nice one man - trying to get the AI to fight even remotely intelligently indoors is like trying to change the trajectory of a river -a salute! problem is they really need to be fixed or attended to at engine level -like the way they just slowly rotate in place aiming at walls (guess because they're tracking), occupying the same space in 3d world (as other AI) and their inability to know to aim at likely pathways/Windows. Spent forever myself trying to get them to do more interesting things when buildings are involved but finally threw my hands up and just picked up Swat 4 again - literally a masterpiece of AI. Anyways best of luck man, its all worthwhile trying to advance this area and hopefully the Devs take notice and realize this series simply cant advance without addressing this issue 2 Share this post Link to post Share on other sites
.kju 3244 Posted September 9, 2019 feature list reads impressive already 👍 do you mind posting an image of the FSM layout in the thread please too bad all the research info from our experience documented in the CIT is lost some is still found in the BIKI as you probably already know (https://community.bistudio.com/wiki/Arma_2:_FSM_Danger_Causes and https://community.bistudio.com/wiki/Talk:Arma_2:_FSM_Danger_Causes) - so only for reference for others how much do you use knowsAbout/reveal/forgetTarget or even targetKnowledge, targetsQuery, and such - like how do you balance currently performance/frequency of checks? do you make use of disableAI, especially AUTOCOMBAT? tried use of enableAIFeature yet? how do you check / analyze situation clear vs threats nearby? medic heal/revive is generally useful, but hard to implement. danger.fsm could set triggers/variables when AI should not try to do it at least you may want to check SRRS Sickboy and me made for BI back then (it was rather basic still as BI didnt want more complexity) - (parts) might be useful: https://community.bistudio.com/wiki/Surrender > React by hiding in the presence of powerful vehicles how do you do that/determine "safe" positions? > Tanks will react by rotating towards threats Found something better than setDir or some doMove craze? Thanks a lot for your work here! Share this post Link to post Share on other sites
nkenny 1057 Posted September 9, 2019 Thank you for your kind words. I am living out of a backpack for the next few days, which curtails my ability to respond with full detail (and links) The BIKI posts proved very useful when developing the mod! Thank you for yours and others work. I delved into all I could find on the topic. It was interesting to Find a fsm discussion from 2004-2005, predating the ability to setVariable on units (groups, buildings and logics for that matter), which suggested that such a feature would be ideal for use with the danger.fsm-- precisely the technique which I have adopted. The variables I track are: LastAction, lastGesture and isPanicked, on individual units. And isCQB on the group. (No variable is written or checked until needed) -- One of the key decisions was to recognise that the danger.fam is only part of the whole story. The AI seems to be governed by at least three other subsystems which are not immediately available: basic pathfinding, bounding manoeuvres (shooting and covering-- the formations class in CfgFSMs), and what I assume is some group level tactical decision-making AI. In this respect I tried to focus on features that expanded the available REACTIONs to danger, rather than proactive, tactical modes of behaviour. One such exception is the CQB mode -- toggled by File or Delta formation. I suspect this mode would ideally be handled elsewhere, but functions well enough here. -- With this in mind I leave many aspects of AI unchanged, instead relying on the built in features of pathfinding and target priorities. I generally use knowsAbout as a simple check for knowledge, but getHideFrom when more accuracy is required. The former command apparently being part of a series of Hidden and Hide commands developed simultaneously with the danger.fsm, but never fully completed. I try not to toggle AI features, because my solution is intended to be universal and not overrule existing scripts. I have unfortunately not gotten enableAIFeature to return useful information (in accordance with what is posted on the wiki)-- it would be super useful. Because the danger.fsm is only concerned with immediate survival, I have not written any detailed analytic system for the AI. Instead simple checks of vehicle types and available weapons are performed. I suspect that AI healing and reviving is better handled on another level of fsm, and have therefore not explored it. I will definitely check that module. There is a reason why I keep Arma2 still installed. 🙂 -- The current actual implementation of finding safe positions is comparably dumb-- but early in development. I simply find nearby building positions (or failing that a position located away from the threat). I then rely on the (reasonably good) threat and movement evaluations present in vanilla. Haha, indeed turning vehicles is still sorted by doMove shenanigans. Thanks Nathalie. -- I will post a new picture of the fsm flow chart once I return to my PC. For now there should be a comparison on the Steam workshop 🙂 -k 1 Share this post Link to post Share on other sites
vafana 110 Posted September 9, 2019 10 hours ago, nkenny said: LAMBS RPG7 is a simple mod which makes the AI fire the RPG7 more indiscriminately at infantry, vehicle and air targets. As I have argued exhaustively elsewhere, this is a natural extensions of Arma3 small arms tactics. The AI is configured in such a manner that it may prefer the RPG to the carried rifle. Links to Github and Steam Workshop. First of all, impressive work, thank you. I wonder if it is possible for you to include in "LAMBS RPG7" the RPG-42, MAAWS, PCML, because I think that they can be used in the same way as RPG7. Share this post Link to post Share on other sites
Lucasam 27 Posted September 9, 2019 This only needs to run on the server correct? Can't wait to try it! 1 Share this post Link to post Share on other sites
db2 0 Posted September 10, 2019 class Player_or__not_l { itemno = 0; priority = 12.000000; to="End"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"{!local _this || {isPlayer _this} || {!alive _this}"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; The part of condition, looks like an error, {!local _this || {isPlayer _this} || {!alive _this}, lost a '}' ? Share this post Link to post Share on other sites
nkenny 1057 Posted September 10, 2019 @db2 Good catch! Throwing an error message? Haven't seen it on my end. @Lucasam I haven't thought about that, but yes. Put on headless clients and servers and it will work 🙂 Share this post Link to post Share on other sites
nkenny 1057 Posted September 10, 2019 @vafana I'll look into it. Especially the RPG42 is a good candidate. I am afraid that if the AI start shooting MAAWs at helicopters they will quickly become annoying. 1 Share this post Link to post Share on other sites
Tankbuster 1744 Posted September 10, 2019 This looks very interesting! My mission has a lot of AI in buildings, I'd be very interested to see how this changes things. One question, how will this effect units in setBehaviour "SAFE"? I use it frequently for airdrop pilots, units in dofollow, units I want to stay put or ignore combat etc etc. 1 Share this post Link to post Share on other sites
nkenny 1057 Posted September 10, 2019 @Tankbuster It doesn't 🙂 Only units that are in a 'danger' mode are affected. Units which are 'stopped' are not given movement orders either. I studiously avoid altering formations or preexisting waypoints. I never touch enableAI/disableAI features either. The only change to look out for is that by default, the 'DIAMOND' and 'FILE' formations trigger a CQB mode. The CQB mode makes the AI clear building positions in a organised manner-- until all known enemies are killed. 1 Share this post Link to post Share on other sites
LSValmont 789 Posted September 12, 2019 Amazing work nkenny! May I ask for another LAMBS version if possible. LAMBS TURRETS The idea is to reduce the super accuracy, terminator reaction times and cero deviation/recoil the Ai exhibits when manning and firing most vehicle and deployable turrets. It is enough of an advantage that most turrets in Arma 3 turn insanely fast but when handled by the Ai, the Ai is also identifying and shooting small targets such as foot soldiers in mere micro seconds. Because of this unrealistic behaviour I pretty much had to remove most armed vehicles from my combined operations missions and/or had to set the Ai to the lowest so my player's survivability is at least somewhat above 5% when coming into contact with such Ai manned assets at any distance. It is even funnier that you can hide under an enemy APC and the turret will still track you down perfectly as if it had cameras under it. If for any diabolical reason your mission demands you to put a c4 on an enemy APC and you somehow manage to pull a perfect sneak approach behind it it will still spot you magically as soon as you put the explosive down and then lock on you like if it had omnipresence and if run away for just one second you are more dead than Osama Bin Laden. Whoever designed this behavior certainly and clearly didn't care for playability, gameplay options nor realistic turret behavior as it is a lot harder to operate and even acquire positive targets specially once they are extremely close to the vehicle without the turret endangering the vehicle itself. As many times scripters and modders have come up to the community's aid when it comes to fixing those incredible errors and weird choices of design I ask of you to lead this Ai fix that will turn so many missions far more enjoyable for all of us. 7 Share this post Link to post Share on other sites
nkenny 1057 Posted September 15, 2019 This post outlines some of the updates and improvements. With are descriptions of two new mods, and the latter part considers the future and potential of FSM editing. Feel free to add your voice to the technical or feature request discussion. LAMBS Danger has been updated. - Improved civilian behavior.fsm - Fixed all known bugs - Added server key This is the last update before rewriting the FSM from ground up. Links in Original post. LAMBS RPG7 updated to encompass additional weapons as per requests: - Added support for RPG32 and MAAWS - Added server key @LSValmont Added LAMBS Turrets. I like the idea. This is a first pass experiment which explores some of the config options available. It works by tweaking the accuracy of most Coax and mounted machine guns. It also more strictly forces the AI to remain shooting until the burst is complete. Some of the turreted behaviour appears to be hard coded-- especially in how targets are quickly determined dead and cycled. The effect on game play is present, but more for longer ranges. I am still exploring options to deal with close in fighting. The mod is available on my Github or through Steam Workshop. --- LAMBS Ork AI Make boyz more stompier. This is an AI extension for the Warhammer 40k mod There is Only War mod for Arma3. It adds a number of features related to ORK behaviour and AI.Features - Adds custom FSM for Ork behaviour - Makes Ork prefer close combat (and will enter buildings) - Ork vehicles will hammer suspected enemy positions - Adds Mob formation - Adds information sharing - Adds WAAAGH mode - Adds Panic state - Adds routines for looting - Adds occasional suppression DAKKA-DAKKA fire.Mob mentality Orks disregard all formations in favour of the mob. The mob is strong, tight and fast.Praise Mork and Gork Orks that experience personal kills may experience the true blessing of Waaagh. A waaaghing ork becomes permanently immune to suppression, gains increased skills and experience, and heals all wounds. If one ork has it, more do; Waaagh! spreads to all group members within 20 meters.Panic Orks in big mobs are resistant to panic. Once their numbers dwindle, things change. The panic stage makes the ork (and nearby ones) static and hesitant to grab for the glory that is war. --- Steam Workshop --- Technology It is the technical aspects of this mod which were the prime motivator for doing this mod. It features a custom danger.fsm and customised formation.fsm -- based of the civilian formationC.fsm. In many ways it is a showcase for how and what AI modifications can affect in Arma3. Bearing in mind that many of the core AI features are opaque at best of times-- or beholden to an arcane formula of weapon and unit configs. One of the chief difficulties in working with AI is that many of the features are hard to grasp or debug. Especially the base soldier fsmFormation,contains links to functions which I have yet to find. Leaving me to suspect they are related to engine features. Incidentally according to the biki it, fsmFormation, cannot be edited-- which I have done successfully here. Within these difficulties are an interesting promise! Not only is the danger.fsm very powerful. The fact that fsmFormation can be edited makes it possible to write some custom behaviours for vehicle crew. Perhaps it will be possible to remove the more self destructive WW2 bomber style helicopter attack patterns or make devilishly shifty tanks. For mods and conversions that explore specific settings, like TIOW, fsm editing has powerful potential, because it is possible to customise behaviour suitable to each faction. Next step is to explore a bit. Then rewrite the core danger.fsm to allow for more clearly defined stages and states. The ORK AI linked above being a template for that. - Investigating - Assaulting (also in CQC) - Skirmishing or patrolling - Panicked or hiding - Looting or rearming Link to overview picture of current Ork danger fsm : LINK -k 1 4 Share this post Link to post Share on other sites
ziegler62 2 Posted September 15, 2019 Hi, I really liked your work on the behavior of bots. But it’s more suitable for me to use scripts and not a mod, please, make a mission mission with a script. thank Share this post Link to post Share on other sites
Adam Noble 5 Posted September 15, 2019 Thank you very much to the mod author, I really liked playing with this mod, the game became different, much more interesting, my whole gameplay turned into survival, I have not experienced excitement in the game for a long time. My personal opinion is that this mod should be beautiful and the best. Share this post Link to post Share on other sites
AirShark 147 Posted September 15, 2019 this mod gives the ai some player feelings during combat, especially during CQBs well done carry on ^ ^ however i have a feature request if you allow that of course, the Ai hearing skill in arma 3 is very high despite the ai is blind most of the time his hearing capabilities from accuracy to distance is very phenomenal and odd, if you can add some tweaking to it, it may be a huge change to the game, like reducing it when there is fire exchange, suppression fire , explosions nearby or wind effects and rain (rough weather)....etc most of time i play as sniper and therefore i wait for the right moment to shoot my lucky bullet, the right moment is when other sounds will play in the back like thunder sounds, animal sounds, fire shots and explosions sounds...etc to avoid being spotted so my fire shot sounds will be covered by other sounds, but in arma it is useless despite everything the ai can hear from long distances and with huge hearing accuracy always gets me even without LOS like behind walls and buildings, because hearing feature is huge issue, when the ai hear bullet coming he will know the exact position/direction/source/enemy location like he can actually seeing it : p 2 Share this post Link to post Share on other sites
froggyluv 2135 Posted September 15, 2019 Audio camo mod ^^^ I worked on once, things like heavy trucks and tanks moving by as well as rain lessening the chance an enemy could hear you. Good stuff 2 Share this post Link to post Share on other sites
Jagdgeschwader 22 Posted September 15, 2019 Certainly something can be done in that department. I see your turrets mod was released, I'm glad you find such value in this task. The AI are important to every person's experience. While many disregard AI changes as unimportant, when I've introduced friends to great projects, they generally agree the new experience brought new life. Your mods have created that as well in their opinion. I'm especially interested to see what you can do about tank and helicopter AI. If formation AI for tanks can be renovated, you will bring so many more mission possibilities that weren't viable before. Your work is great. Keep it up, we're rooting for you. Share this post Link to post Share on other sites
Adam Noble 5 Posted September 16, 2019 I’ve been testing LAMBS_Danger Arma all day, it’s different in a good way, it’s fun to play even 5 opponents can create problems for long hours. I really liked the gameplay with this mod. 2 Share this post Link to post Share on other sites
rainbow47 20 Posted September 17, 2019 Thank you for this mod. I just started to test it with DRO and a small AI squad. I need to do more testing but I felt like CQB has changed materially. For example, I have sent my four AI squad members to attack an enemy in a village via Engage At Will. While I was clearing the town, the AI did the same and I was surprised to see that after minutes of fighting all AI members survived. One of them cleared a house with 5 enemies which I just realised later. I don’t know if it was just luck or if the Mod was the driver for the big success. It almost felt like my AI members have much better survivability and act more carefully. One question which I have it, if the Mod is also impacting AI behaviours in stealth mode? Or is it just active in Danger mode? 2 Share this post Link to post Share on other sites
Tankbuster 1744 Posted September 17, 2019 On 9/15/2019 at 3:45 PM, ziegler62 said: Hi, I really liked your work on the behavior of bots. But it’s more suitable for me to use scripts and not a mod, please, make a mission mission with a script. thank It cant be done in script. If I understand this right, it has to use a mod because it overwrites behaviours and changes the actual AI. Share this post Link to post Share on other sites
nkenny 1057 Posted September 18, 2019 Thanks for the kind words everyone. @ziegler62 Unfortunately as @Tankbuster says, it is to my knowledge impossible. I will however be releasing some standalone AI scripts in the near future. @AirShark That is a interesting prospect! Certainly worth investigating further. Is there perhaps a simple AI hearing range parameter? It would in that case be trivial to tweak while the danger.fsm is active. @rainbow47 The mod only affects AI whom are currently in combat mode. Any changes to Stealth mode are added only because the behaviours are so related. --- A new version of LAMBS Danger.fsm has been released. Current version is 1.31 - Added scripted Waypoints to force various AI behaviour: Patrols, Garrison, Check buildings, Clear buildings (CQB), Rush, Stalk/creep, and Long ranged Hunt - Added Dynamic Artillery system - Improved vehicle suppression system - Improved reaction to hits, explosions and bullets passing nearby - Improved low level information sharing between groups - Misc. performance enhancements While the danger.fsm is purely reactive in nature. There have been requests for ways to trigger more aggressive behaviours. This release handles some of that. The big thing is of course the newly added Waypoints. These work in a simple manner, simply assign them to the group in question and enjoy the show. The waypoint completion radius determines the area within which a unit will perform its waypoint. Of special note are the Rush, Creep and Hunt-- these are different ways of setting up aggressive AI which will hunt down players, ranging from fast to slower and more passive. The dynamic artillery system adds the option of AI calling for fire support. The operation is simple. Place the artillery in eden and add the new Register Artillery waypoint. Now any unit from that faction can call on that artillery unit if certain parameters are met. Enemy forces must be at a certain distance. The AI must have time to communicate. Must know about enemy location. And must remain alive during the barrage. There are time delays for both acquiring targets and reloading (becoming ready to support). Artillery must be registered through the waypoint (or directly added to the array) in order to function in this manner. Initial mapping of the new FSM is underway. This update includes increased responsiveness to the initial barrage of enemy fire. Some fruitful discussion with AnAngrySalad of the Arma group UKSF, has brought iwth it additional perspectives which will aim to increase the realism and immersion of upcoming releases. --- To demonstrate the use of the mod I have created some additional videos: ~ Demonstrates Improvements to AI reaction to fire. 5 Share this post Link to post Share on other sites
Dallas Medina 50 Posted September 18, 2019 Does this mod give the AI some kind of "flanking" waypoints or a retreat order when in combat? I was doing some testing (IFA3 WW2 mod) with two German squads attacking a Soviet sandbag bunker position, I gave them simple move and hold waypoints advancing across open ground, and halfway there they turned around and ran off in the opposite direction, I kept going and lost sight of them, they seemed like they were retreating. I couldn't tell what they were doing. They never did assault the bunker. They stayed far away from it. Share this post Link to post Share on other sites