Author: nkenny
Author Website: https://github.com/nk3nny/LambsDanger

Requirements: No addons required

Version: 2.4.4
Signed: Yes, serverkey included

Short description: adds extra features which extend the enemy response and reaction to fire.

Date: 2020-06-07 10:31


Comments: (3)
Rating:



 







LAMBS_Danger.fsm

by
nkenny


Description:
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.

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 commnunicate threats to nearby allies.

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 if possible)
* Tanks will react by rotating towards threats
* Improved civilian reactions, hiding in buildings and checking dead bodies


Installation:
To install LAMBS_Danger.fsm you should use modfolders to keep it seperate from the official game content to prevent issues.
With Arma 3 you can use different ways to set up your modfolders to use custom content you have downloaded.
Please visit the Arma 3 Mod install instructions page for more information about using custom mods and addons in Arma 3.


Included files:
lambs_danger.pbo


Usage:
The mod runs automatically for all factions, including RHS and CUP. To double check that the mod is runing, enable one of the debug variables.

Compatibility
The mod is fully compatible with VCOM, but unfortunately not with ASR.

Development
Check the gitHub for development variables to toggle or tweak gameplay features.


Media:



Armaholic.com has its own Youtube channel where we will cover the Community made releases.
Subscribe to the Armaholic.com Youtube channel


Notes:
https://discord.gg/tWWy3ru


Changelog:
2.4.4
Fixed taskReset module not working properly in Zeus
Fixed some debug messages in taskArtillery

2.4.3
Added context_menu actions support to the Zeus Enhanced mod
Added configurable setting for ‘combat mode’ sharing distance
Added patrol option to taskGarrison and taskCamp (default is disabled)
Improved taskAssault (more reliable)
Improved taskRush with dynamic cycle times
Fixed random suppressive fire in taskCQB and improved house selection routines
Fixed vehicles suppressing through terrain and high flying aircraft
Fixed units will more reliable man static weapons in taskGarrison and taskCamp
Fixed units will more reliably deploy static weapons from modded content
Fixed units with LAMBS AI disabled will no longer be forced into combat mode by information sharing
Fixed artillery registration issue
Fixed in Zeus, moduleCQB and moduleAssault would always delete the logic even when asked not to.
Fixed various issues in Eden and Zeus modules
This version fixes and improves many small aspects of the mod related to task modules and group level behaviour. For players using the Zeus Enhanced (ZEN) mod, we’ve also connected the modules to the contextual menu for ease of use.
From the team
diwako / joko / nkenny

2.4.2
Fixed AI getting stuck in Garrison State
Fixed AI getting stuck in Fleeing mode
Fixed vehicle AI would sometimes spam shareInformation
Changed Investigation path removed from vehicle FSM (was unused)
Thanks to Couls for Finding and Fixing the issue.
From the team
diwako / joko / nkenny

2.4.1
Added None to Task Garrison Exit Triggers (option prevents units from breaking garrison)
Added Increased Flare/Illumination usage on Contact State
Fixed Key Signature issues on Dedicated Server

2.4.0
Requires: CBA_A3 3.15.0 or later
Added Port all Strings over to Stringtables so that they can get Localized
Added Vanilla EventHandler wrapper for all current Events
Added Nearby friendly fire check for Suppression with configurable setting
Added Nearby friendly fire check for vehicle suppression and assault functions
Added Maximum Reveal value setting
Added CBA Version dependency
Added Player only setting for Task Creep/Hunt/Rush (these modules can now hunt enemy AI)
Added SortByHeight, Teleport and Exit Condition setting to TaskGarrison
Added Teleport setting to TaskCamp
Added Remote compatibility to Task Assault/CQB/Camp/Creep/Garrison/Hunt/Patrol/Reset/Rush Zeus and Editor Modules
Added Rewrite of Task Artillery to make it multiplayer compatible
Added Various performance optimizations to danger FSM
Added Immediate Action state
Added fnc_immediateAction with smarter movement routines to avoiding fire
Added fnc_indoor to only recognize buildings
Added Units with ACE3 medical AI enabled will exit FSM
Added Tweaks to fine-adjust suppression position
Added Improvements to re-manning static weapons
Added fnc_leaderAssault, fnc_leaderFlank, fnc_leaderSuppress, and fnc_leaderGarrison*
Added fnc_leaderStaticDeploy, fnc_leaderStaticPack and fnc_leaderStaticFind (units will now dynamically deploy static weapons and more reliably man nearby ones)
Added fnc_doSmoke, fnc_doUGL (functions to throw smoke and shoot flares respectively)
Added FSM fix to prevent units from reacting to allied weapon fire
Added FSM reaction state will now only trigger on dangerous events**
Added FSM better support for ACE3 medical AI by delaying healing when unit is threatened by nearby gunfire or forced movement
Added FSM faster and more aggressive movement when 'forceMove' variable is enabled
Added units which call artillery will now attempt to use binoculars and stay in position to direct fire
Added settings to disable dynamic weapon deployment and remanning
Changed All number edit boxes in ZEUS Modules to sliders
Changed Module Artillery Dropdown to Side Selector
Changed Make use of CBA_fnc_getPos from CBA 3.15.0 update
Changed Moved various settings such as speed and search range from FSM to function for easier editing
Changed Increased threshold for doing suppression while suppressed from 0.5 to 0.75
Changed FSM priorities for bulletClose increased from 3 to 6
Changed fnc_fsmExitVariables to use fnc_isAlive
Changed Default settings for CQB range from 50 to 60
Changed Radio minimum range settings from 200 to 20 based on user input
Changed Gestures used to indicate initial reaction (from 'cease fire' to 'freeze')
Changed fnc_hideInside, reduced range units without cover would retreat from 45-110m to 10-55m
Changed Debug information variables are now global if `Debug Functions` setting is enabled
Fixed An issue with ShareInformation
Fixed That Task Creep/Rush didn't use user set Cycle Times
Fixed Error in fnc_vehicleSuppress (vehicles would fail to engage)
Fixed Assaulting units from occasionally looking into the ceiling
Fixed Global variable in suppression part of FSM (timeout)
Fixed Increased APC dismount range from 180 to 250 meters
Fixed Tightened range which units check for CQB buildings in CQB mode (No need to check out to 250 meters)
Fixed fnc_react - reaction state stances were reversed
Fixed fnc_suppress - override setting would also override intelligent target adjustment based on visibility
Fixed fnc_zoneMarker - marker is now created local only
Fixed FSM issues with doWatch and doLook
Fixed FSM leader state Contact! Now uses distinct gesture and collects troops better
Fixed FSM improved performance, moved more code to functions, and clarified priorities
Fixed move command in fnc_leaderFlank would override the current waypoint
Fixed Floating Waypoint in TaskGarrison
Fixed A possible issue with group counts overflowing max group limit with some taskX Modules/Waypoints
Removed fnc_leaderManoevure replaced by fnc_leaderFlank
A big addition in this release is the introduction of a more extensive set of group-level actions. These are called when the AI assesses that enemies are holding in garrisoned buildings or in otherwise weak tactical positions. The unit can respond in four ways: Flanking, suppressing, assaulting, or attempting to garrison it's own or enemy building. The exact tactic being employed depends on the unit's own combat mode, available cover and distance to the target. These new states replace the more limited fnc_leaderManoevure.
The second major overhaul is how the AI will enter the reaction state: Units that expect enemy contact are less likely to flinch. By default they will now only enter a reaction state when the unit is hit, unit spots a new enemy, nearby explosion or bullet impact, seeing unit from their own group killed, hearing another unit being hit, or bullet whizzing by. Units set to FULL speed mode or STEALTH behaviour will not trigger reaction and hiding responses.
The team would like to extend thanks to BadGuy for help with adding User Interface elements, R3voA3 for the German translations and madrussian for spotting an error with waypoints being deleted.
From the team
diwako / joko / nkenny

2.3.3
Fixed error with Zeus module
Fixed taskCamp animations in some cases not resetting

2.3.2
Fixed Script Error in moduleReset
Fixed some locality issues with eventhandlers in taskCamp and taskGarrison

2.3.1
Added TaskReset Module
Added Hide Area when moduleTaskArtilleryRegister is Synced to Object
Added TaskArtillery now uses ETA time for check round distance
Added FiredNear EventHandler to TaskCamp to Improve Reaction on Enemy Contact
Added Voice callouts to more functions
Fixed Issue with Modded Voices
Fixed Possible Scripting Errors in TaskArtillery
Fixed Scripting Errors in danger.fsm
Fixed Possible Scripting Error in assaultBuilding
Fixed Issue with taskCamp where units would occasionally get stuck in an animation
Fixed Reduced AI leaders reaction to hostile air and tank vehicles
Fixed Ability to break out of taskAssault/Retreat
Fixed TaskAssault waypoint in retreat mode
Fixed Callout ranges and speakers across some functions
Fixed Suppression was using bad positions
Changed Some small background performance Improvements
Changed remove some Duplicated Config Data
From the team:
diwako / nkenny / joko

2.3.0
Added TaskCamp ~ scripted camp behaviour
Added TaskArtillery, TaskArtilleryRegister, TaskAssault, TaskCamp, TaskCQB, TaskCreep, TaskGarrison, TaskPatrol, and TaskRush Zeus and Editor modules
Added Target Module for Zeus Task modules
Added Ability to define Areas in TaskArtilleryRegister, TaskAssault, TaskCQB, TaskCreep, TaskGarrison, TaskPatrol and TaskRush
Added Parameter in TaskArtillery to skip adjusting rounds
Added Parameter to TaskAssault and TaskCQB to use dynamic (target) module position
Added Smarter distance-based sorting to TaskCQB
Added Parameter to TaskPatrol to move waypoints randomly after patrol cycle is finished
Added Parameter to TaskPatrol for Waypoint Count
Added 3DEN Setting on vehicles to mark units as pre-registered artillery
Added Share information will share to all friendly sides
Added Option to disable enhanced fleeing function
Added Improved position analysis to Suppression, Vehicle Suppression, and Vehicle Assaults functions
Added APC assault routine for armoured vehicles (keeps infantry mounted)
Fixed Issue that TaskX functions get called from the wrong environment
Fixed TaskPatrol did not Loop Waypoints
Fixed Issue that Zeus Module window did not Open
Fixed Share information MP compatible
Fixed Enhanced fleeing function is much less intrusive
Fixed Issue with taskArtillery when weapon out of ammunition
Fixed A race condition in taskArtillery
Tweaked HideInside to be more defensive
Tweaked Callouts so contact shouts are not always run through formation leaders
Tweaked ShareInformation default range
Tweaked Civilian priorities in civilian.fsm
Changed Moved Automatic Artillery Registration to WP module
The biggest new addition is the new MODULE system. This adds an easy way to use and configure the enhanced AI waypoints and scripts available the mod. The modules integrate seamlessly to both ZEUS and 3DEN. The module system supersedes and enhances the original waypoints.
Another new feature is the TaskCamp module. This script makes the group appear safe and dismissed and is perfect for camps or having troops just sitting around. Units set to taskCamp will occasionally garrison buildings and man static weapons. If the group is large enough a small patrol will check the nearby area.
From the team:
diwako / joko / nkenny

2.2.1
- Fixed script errors relating to fn_taskCQB.sqf
- Fixed errors in fn_taskAssault.sqf
Sorry guys! Fixed some small errors relating to Waypoints!
The team

2.2.0
Added AI unit voice callouts
Added setting to disable unit gestures
Added setting to disable unit Immediate Reactions
Added verbosity to debug messages
Added side configured colours to 3d debug helpers
Added debug messages recorded to RPT
Added visual checks to suppression to make function more reliable
Added ability to hot-configure fsm lambs danger priorities in variable "lambs_danger_fsmPriorities"
Fixed reverted CfgFSM settings to increase unit cohesion
Fixed added more time to check body events
Fixed tweaks to unit speed and distance check in CQB to add more fluid combatant
Fixed reduced building search range on reaction phase -- makes for more responsive AI
Fixed enhanced fleeing state intelligence
Fixed prevents squad vehicles from being drawn into movement
Fixed refined FSM danger priorities -- increased importance of canShoot
Fixed various aspects of taskGarrison and taskPatrol and taskCQB
Fixed taskAssault and Retreat will now allow users to move waypoint actively
Fixed incapacitated units would sometime speak or give orders
Fixed issues with LAMBS Zeus modules deleting units
Fixed additional checks when selecting artillery
Changed default suppression fire minimum from 25 to 20 meters
Optimize fnc_findClosestTarget (Thanks to Dedmen)
Optimize fnc_findBuildings (Thanks to Dedmen)
Optimize fnc_findOverWatch (Thanks to Dedmen)
Shout out to groups that have played with LAMBS Danger fsm and given feedback -- or simply have had us listen in on their troubles!
Pori Brigade, Gruppe W, CNTO, Special Forces Group, and nopryl.no
From the team:
diwako / joko / nkenny

2.1.0
- Added ZEUS modules 'set radio', 'disable unit AI', 'configure group AI'
- Added CBA configurable settings for many features - hiding from tanks or aircraft, autonomous group manoevures, disabling all information sharing
- Added ability to configure which formations count as CQC ones
- Added setting to automatically add all artillery
- Added ability for fleeing infantry to abandon vehicles
- Added new FSM state an variable, "lambs_Danger_forceMove" to have a FSM level force move option
- Added new FSM forceMove mode to contact and manoevure leadershipe states
- Added groups to exit CQC mode by changing formation
- Added fn_assaultSpeed to adjust movement speed based on ROE and distance to target.
- Added support for old variable (will be decrepitated)
- Added isolated squad leaders will try to regroup
- Added maximum knowsAbout while sharing information to prevent instant combat mode
- Added new 3d helpers for fn_assault to debug
- Added new debug markers for shareInformation
- Added configurable settings for Explosions EventHandler
- Fixed changes to suppression speed to prevent units from becoming stuck
- Fixed siginifant flaws in vehicle suppression. Vehicles would occasionally target nearby buildings to themselves rather than enemy.
- Fixed Prevents busy AI from being ordered to man static weapons
- Fixed occassionally players being force to do animations
- Fixed Units set to assault a position will now complete the assault even if target is killed
- Fixed Speed levels to allow shooting while moving in close combat
- Fixed leaders in reaction state will now be slower and more static
- Fixed LAMBS mod naming scheme the same as CBA and ACE3
- Changed made suppression function more reliable
- Changed made infantry less suceptible to cowardly behaviour for gameplay reasons
- Changed added more time for Suppresison in FSM (prevents spam)
- Changed group assessment and reorganisation phase
- Changed manoeuvre phase by balancing distance and suppresison
- Changed Fleeing state. Units will now prefer running to standing
- Changed Leaders assigning buildings for CQC will now only pick buildings between them and the enemy.
- Changed various fn_assault and fn_building settings to make for better close combat fighter
- Changed aggression in FSM movement. Increased mobility.
- Changed changed wording on debugDraw expected destination to something smaller
- Removed "lambs_danger_dangerAI" group variable. Replaced with "lambs_danger_disableGroupAI", a boolean expression.
Important change:
Based on input and sheer sensibility one of the variables has been changed. The old variable remains functional, but will eventually be decrepitated. To disable group level assessments and manoevures, either toggle the relevant CBA option, or set this variable for that particular group:
<group> setVariable ["lambs_danger_disableGroupAI", true];
Thanks, Ryko.
To disable all FSM enhancements made by LAMBS danger AI you have two options:
<unit> setVariable ["lambs_danger_disableAI", true];
<unit> disableAI "FSM";
Cheers,
nkenny, Diwako, and Johoko

2.0.2
- Fix for Server key issues -- shout out to the guys developing HEMTT
- Possible fix for play stance change problem described by Defunkt and CJ
I'm watching the key issues closely. If they persist I will abandon the automated HEMTT solution and generate them manually. Please give servers and clients time to update however. Cheers.
- nkenny and the team

2.0.1
- Fixed BIKey error -- old version of hemtt.
- Fixed Debug panel not showing up
Thanks for you patience everyone!

2.0
- Full rewrite of many systems; significant cleanup to the code
- Full CBA integration
- Added CBA configurable settings for most features
- Added CBA eventhandler backend
- Added keyboard for player led groups
- Added extensive debug interface
- Improved FSM performance
- Improved vehicle to infantry interaction
- Improved infantry CQB modules
- Improved all waypoints and performance
- Improved AI squad leader analysis and responses
- Improved individual AI movement skills : seeking cover and fire while moving
- Improved wheeled APC vehicle tactics
- Improved turreted vehicles predictive fire solutions
- Improved AI information sharing routines and configuration options
- Improved AI gesture usage
- Added custom AI fleeing state
- Added the ability for AI to man and abandon static weapons
- Added taskAssault and taskRetreat waypoints
- Added innumerable performance improvements
- Added two authors: Diwako and Jokoho482
- All known bugs fixed
Note: This release will repalce some of the existing variables and waypoints from older releases. It will also update the bikey. Finally it comes with a hard CBA requirement. A legacy version will be made available shortly.
Special thanks goes out to Diwako and Jokoho. This release would have been impossible without them. To members of nopryl for feedback and feature requests. To Clarke for testing and video feedback. To AnAngrySalad for bouncing ideas and testing. To any others that I forgot at the time of writing.

1.43 *HOTFIX*
- Added increased CQC aggression and use of suppression for machineguns
- Added Wheeled APCs to 'armoured vehicle' AI
- Added configurable paramters for share information ranges*
- Added Unique reaction to nearby explosions
- Fixed bugs related to AI artillery (Virtual and actual)
- Fixed Players will no longer play gestures
- Tweaked Investigate dead body ranges
- Improved WP text descriptions
- Minor WP tweaks (generally increased default ranges)
- Misc. Performance tweaks
*This tweaks introduces configurable Share information radio ranges. This feature will be handled by CBA user interface in the next full version. Variable names may change for version 2.0
Relevant variables are:
lambs_danger_radio_shout = 50;
lambs_danger_radio_WEST = 1000;
lambs_danger_radio_EAST = 1000;
lambs_danger_radio_GUER = 1000;
lambs_danger_radio_backpack = 2000;
Range is modified by height above sea level. (Higher means longer comms). Shout and backpack variables are universal. Backpack is added to default range. When a share information check is called the group leader will check all team members. He will pick the best suitable unit to share information:
A unit qualifes as wearing a backpack if:
- The unit has the variable "dangerRadio" is set to TRUE (i.e., <this> setVariable ["dangerRadio",true];)
- The unit is wearing any vanilla radio backpack
- The unit is seated aboard a vehicle
- The unit is wearing any TFAR configured backpack.
The configurable radio ranges make it easy to set up a variety of scenarios. For mission makers that want instantly broadcast information about enemy forces-- simply set Shout range to something extreme. The system will be hooked into the dynamic artillery system in version 2.0. Together with CBA eventHandlers this system can easily accomodate unique scripting. More on that when 2.0 releases.
Cheers,
The team

1.42 *HOTFIX*
- Fix Prevents combat information from being shared with units set to CARELESS
- Adds unit value to disable the danger FSM for a specific unit*
- Misc performance tweaks
*This release introduces the variable "dangerAIEnabled" which is attached directly to units to disable the danger.fsm from running:
<unit> setVariable ["dangerAIEnabled",true]; <-- enabled
<unit> setVariable ["dangerAIEnabled",false]; <-- disabled
This can be done mid combat, but may in certain states take a few seconds to initiate. Combined with disableAI settings for "COVER" or "AUTOCOMBAT" you can create a nearly fearless AI with few scruples for personal safety.
**This hotfix represents a code branch of version 1.5. The author cannot guarantee that the variable names will remain the same in function or naming scheme for the proper 1.5 release version. Expect the functionality to remain the same or improved however.

1.41 *HOTFIX*
- Improved Infantry suppression with machineguns
- Improved vehicle behaviour to close infantry forces
- Improved Hide function by jokoho48
- Fixed Ending CQC mode with player led groups
- Refined infantry engagement ranges
- Tweaked AI OODA loop
- Fixed all known bugs
- Misc. performance tweaks
Special thanks to Diwako and Jokoho48

1.4
- Rewritten FSM
- Added group Actions: Rally, Hide, Manoeuvre, check buildings.
- Added 'dangerMode', 'dangerFormation', and 'dangerCode' group variables
- Added utilising available static weapons
- Added vehicle danger avoidance routines
- Added 'first shot' Reaction state for infantry
- Added tactical dismounts and investigation state for vehicles
- Added more state visualisation through gestures
- Improved infantry panic state -- cleaner implementation
- Improved vehicle rotation routines
- Improved CQC combat mode in DELTA and FILE formations
- Improved Vehicle and infantry suppression
- Improved dynamic artillery module
- Improved debug feedback
- Minor fixes to danger Waypoints
- Minor improvements to civilian danger.fsm
- Minor performance enhancements to core scripts

1.31 *HOTFIX*
- Fixed AI aggression
- Misc. performance fixes

1.3
- 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

1.2
- Improved civilian behavior.FSM
- Fixed all known bugs
- Added bikeys

1.1
- Public release


Forum topic:
- BI forums


Steam Workshop:
- Subscribe




Enable javascript to be able to download from Armaholic please!