Jump to content

nkenny

Member
  • Content Count

    1275
  • Joined

  • Last visited

  • Medals

Posts posted by nkenny


  1. Barring any critical bugs Version 1.4 is ready and set to be released on Sunday. Prefacing the release I thought I would write a couple of paragraphs detailing the application and thinking behind the implementation. 


    Introducing Group variables
    Version 1.4 begins with a full rewrite of the FSM and a streamlining of the unit variables.  This is done to facilitate a group intelligence. The group leader will periodically assess known threats and may implement group responses. The first group response is Reacting to contact.  The initial shock of combat makes the unit drop down and seek cover (indoor if possible).  When the group leader has a free moment-- he will rally troops and  communicate the groups situation to allied elements. From this point on the group leader will periodically, around every 60 seconds,  assess the situation and seek to match capability to enemies. Killing or suppressing group leaders greatly diminishes the ability of the group to properly rally and respond. 

     

    The groups behaviour and memory nexus is handled in the local group variable DangerMode. It consists of a series of arrays which contain information about the groups current threats and situation. Specifically the break down is: 

      0, Threat type, a list of numbers which indicate priority and triggered events. [ARRAY]
      1, location of threat, a list of objects or positions which have triggered tactical events. [ARRAY]
      2, Reaction status, a true-false value which indicates if the group has seen combat. [BOOL]
      3, Time out,  a time out for when reaction status needs to reset (6 minutes without combat) and the cycle of leadership assessments. [NUMBER]

     

    Two additional group variables are checked. DangerFormation and DangerCodeThese are by default blank, but can be used by mission makers to create pseudo-eventhandlers which are triggered when a group leader calls the first Reaction to contact. CBA and ACE3 developers take note! The FSM is an excellent place to add triggers for more information like this. The dangerFormation is an easy way to trigger formation change on first contact. Perhaps changing to a LINE formation to better face the enemy, or a DIAMOND, to trigger more aggressive CQB checking of every building.  Unsurprisingly, dangerCode, runs code on the first contact.  This can be used in any myriad of scripted situations, limited only by the mission makers creativity. 

     

    Full example wrapped within Spoiler tag. 

     

    Spoiler

     

    
    /*
        dangerFormation [STRING]
    	  Used to change formation on first reaction to contact. 
    */
    
    // Changing to LINE formation on first contact
    group this setVariable ["dangerFormation","LINE"];   
    
    /*
        dangerCode [CODE]
          Used to run code as first reaction to contact
        
          Arguments
          0, group leader [OBJECT]
          1, group members [ARRAY]
    */
    
    // creating a flare on first reaction to contact
    group this setVariable ["dangerCode",{
      params ["_unit","_units"]; 
      _flare = createVehicle ["F_20mm_Red", _unit modelToWorld [0,0,200], [], 25, "NONE"];
      _flare setVelocity [0,0,-0.1];
    }]; 
    
    // running some function on contact
    _code = {(_this select 0) call nk_fnc_fancyScriptHere};
    group this setVariable ["dangerCode",_code]; 

     

     

     

     

     

    Group actions

    As noted above, group leaders can call  tactical responses to certain events. I will give a brief description of these here. There are currently FIVE types added, these are listed in priority (smaller number adds greater priority).  These are all maintained as functions to make them easy to work with and modify. 

     

    Reaction to contact, priority 1

    Triggered by first contact. 

    Response is : Rallies troops and communicates threat to nearby teams 

     

    Hide, priority 2

     Triggered by, facing air or tracked threats. 

      Response is:  Troops without effective weapons seek cover inside buildings 

     

    Manoeuvre, priority 3

      Triggered by, enemy infantry is in a position below own position. 

      Response is:  Half the group suppress target location while the rest rush quickly towards an overwatch position. (BIS_fnc_findOverwatch)

     

    Check houses, priority 5

      Triggered by, enemy infantry is hiding in nearby buildings.  

      Response is: unit will search through nearby buildings

     

    Call Artillery, priority 6

      Triggered by, artillery available and enemy is beyond 300 meters. 

      Response is: call artillery. Artillery module has been rewritten since last video and really deserves its own post. 

     

    Future: 

    Clever readers may have noticed the gap between 3 and 5.  This is because this system is meant to be easy to expand and modify. It strikes me that at the time of writing it is not possible to disable group actions, I may add a variable to that effect in version 1.41.  This is also where responses for factions and units which have particular needs. These will be optional enhancements configured by the mission maker. Examples that I might add in the future: 

    - Untrained militia 

    AI will disregard cover and concealment to simply rush the enemy position. 

     

    - Reconnaissance troops 

    AI will avoid being engaged at all costs. Preferring to withdraw and hide. 

     

    - Insurgents

    AI will  hide weapons, vests and backpacks in nearby buildings and pose as civilians when enemy forces come too close. 

     

     

    FSM design

    Spoiler


    fn1WYSM.png

     

    Shown is the infantry side of the danger fsm.  Follow the link for additional overview shots: 

    Overview of FSM design <-- LINK

     

     

    Wrapped in spoiler tag to save space. 

     

     

    I will end this post with a video of tracked vehicle behaviour in version 1.4.  Thank you for reading. 

     

    Ken 

     

     

    --- 

    ~ Danger.fsm Tracked vehicle behaviour

    • Like 9

  2. So the next update is around 99% finished. The final percent being concerned with tweaking timing variables and settings to a vision of gameplay. Some technical issues combined with a lack of time meant that the larger scale testing I had meant to do will be delayed until the weekend. Full public release is approaching soon.tm 

    @beagle23
    @froggyluv 

    Thank you for your analysis. Indeed, I quite agree with many of the considerations you put forth. I hope to enhance the existing features to create better flowing gameplay-- though my task is not to explicitly make the AI better. The goal is to make the AI more interesting and capable. Interesting in that the AI will communicate, through gestures and stance, more clearly what state the AI is in. More capable in that the AI will have an expanded tactical repertoire. The mod is therefore aimed more towards COOP communities  and single players than it is warfare players. (An AI suitable for strategic play like that would require different design I think!).  I intend to make a few videos where I showcase some of the new features and responses and put these in the perspective of the vanilla AI. 

    Onwards to timings and micro-AI. Lets first point out that the AI is a complicated beast. Especially because the behaviour of the AI is spread across so many places. Some of which are not immediately accessible. Those that are accessible include: 
    - Weapon configurations* 
    - Danger.fsm 
    - Formation.fsm  (which is actually a config file!) 

    The timing perspective I have done some work with. When the AI enters close combat you will see much faster cycles with the new AI.  The vanilla AI will on a shooting event stop and remain static either until the target is dead or 4 to 8 seconds has passed.  This is one reason why the AI sometimes will stop in the middle of crossing the street. A behaviour which is also curtailed. in the new FSM-- not by design, but a happy incidence. The new FSM will trigger a significantly faster, updating targeting and movement every  1 to 4 seconds in CQB and at longer ranges the AI will only stop 1 out of 3 times. Creating a significantly more dynamic AI. 

    In regards to micro-AI: that is exploiting micro-terrain and preconfigured cover positions.  This level of behaviour is actually managed in the formation.fsm.  The functions called are somewhat arcane (to say the least!), but I am exploring various enhancements.  Try my ORK AI to see an AI with the micro-AI removed. For now I am still exploring options. I would like to modify the formation.fsm, but I've run into some questions.  
      1) Currently the formation.fsm is actually a config file.  Is this done for performance reasons?   
      2) Whenever I make my own formation.fsm I loose the micro-terrain interaction. I think it is, sometimes quite good and I am not willing to sacrifice it.  If I can call the existing functions (or better yet, modify them!) I would like to explore various options here. 
      3) Pathfinding. I wonder if it is possible to make improvements or additions to pathfinding engines.  This would probably, definitely be beyond my coding skills, but would be a good start for higher order enhancements. 

    • Like 10

  3. @beagle23
    Feedback is very welcome.  The stated design goal for the Danger.fsm mod is twofold: (1) Make buildings part of the AI's tactical landscape. (2) Add elements of feedback and which creates more clearly defined AI states. Principally, I want to explore options which will fit within the scope of FSM level modifications. Actual examples of this are things such as: Infantry clearing buildings and turreted, tracked, vehicles dismantling and reducing buildings garrisoned by enemies, and more clearly recognizable responses to enemy fire. 

     

    As mentioned in the original post, the mod explicitly aims to settle tactical and not strategic concerns. It is no replacement for waypoints and clever mission design. 

    • Like 3

  4. @domokun
    Yes and no. I decided against heavily involving the various skill settings for a couple of reasons. (1) It makes the initial implementation and proofs of concept easier to achieve. (2) I find that the skill settings are erratically configured in Arma3. The four grades of soldier you've outlined would be superbly useful-- but these do not correspond with any consistently presented values.  (3) Finally, it is my experience from my work on AI accuracy (LINK) that communities configure their AI (both server and on a mission basis) in sometimes drastically different ways.  Add my own mixture to this would do anything but offer standardization. There is also another concern. 

     

    On a more fundamental level the delays and chances I introduce to the danger.fsm are arbitrary. While products of many, many repeated test runs and internal game play concerns and finally with commentary and advice from real world experience, the numbers I add are inventions. Stacking arbitrary numbers on top of other arbitrary numbers may give the appearance of simulation-iz-teh-realz-2k, while in reality being grounded on nothing, and potentially clouding the actual gameplay effect. For these reasons I have avoided tying skill settings too closely to the danger.fsm.  That accounts for the No of the answer.  The Yes comes now. 

    All of this said: The AI is very much affected by skill settings.  Vanilla AI accuracy, information gathering, speed of reaction and suppression resistance is greatly enhanced by skill (LINK). Many of these are tied directly to the danger.fsm by virtue of being vanilla expressions of AI behaviour. There are two particular settings, which are consistent,  which I have linked some of the fundamental new features to.  One of these is Suppression  (getSuppression, setSuppression).  The other is soldier Rank.  Soldier rank will directly tie into the distance which information is propagated and will conceivably be expanded to cover other aspects of supporting fire. 

    A rather lengthy answer to a reasonable suggestion. hashtag philosopher. 

    Kind regards, 

    Ken 

    • Like 5

  5. @froggyluv
    In testing the feature worked on implementation, perhaps things have shifted as features have been added and the complexity of the battle space has increased. That said it makes for a good case study of how the next iteration of the mod handles this feature. 

    In practice both versions utilize the same function that is called on reacting to enemy contact and certain panic states: lambs_danger_fnc_hideInside. This function creates makes an imperative to either hide inside nearby buildings or try to find cover in a direction away from the threat. Hiding inside buildings is given a priority movement order, while "hiding in bushes" is lower on the food chain-- which may be overruled by squad leader commands or certain waypoints. Only foot infantry are affected. 

    In the currently released version this behavior is purely reactive, and purely individual.  Soldiers will enter a hiding state if greatly outnumbered or facing tanks and airplanes, without the weapons to deal with them. At the moment the function only registers the current threat-- which does not necessarily pick out the most dangerous one. Future versions may improve this. 

    As for the next version:  There are three new additions: (1) The Coward state is checked in a more broad set of events (thus may trigger more reliably). (2) If triggered, it will feed a danger state to the groups decision matrix-- which will be evaluated by the squad leader on his next free cycle. This may in turn trigger a group wide hiding response. (3) Soldiers in a cowardly mode will also suffer added suppression levels, which in turn reduces accuracy and reaction times. Tank and tank like vehicles therefore have a suppressing effect on enemy infantry. 

    -k 

    • Like 7

  6. @rainbow47
    Yes.  However one must note that Combat mode is not identical with being in a "danger state".  Hence your unit may be in Stealth-mode and at a "danger state" at the same time. The danger.fsm triggers on any dangerous impetuous, such as bullets, explosions or simply spotting enemies.  It does not run when the unit is set to Combat (sometimes called Danger)-mode. 

     

    @beagle23
    I will look into it at a later stage of development. I agree. It would be super useful.  For now, if your Zeus interface has some sort of execution line interface (most do!)-- then it is possible to run the scripts directly as demonstrated above. :) 

    Kind regards, 

    Ken 


  7. @Explodie

    Thank you for the report. I will look into it. You should require no mods. 

     

    @chrisb
    Not familiar with the zorllia scripts, I'm afraid. Essentially I agree. Best garrison scripts balance having enemies stand still (to be shot) and having them creating dynamic situations. 

     

    @rainbow47

    Unfortunately that is currently outside the scope of the mod. 

    --- 
    Current status
    A the moment I am about 70% done with the rewrite of the FSM. First step is to reincorporate all existing features and expanding and improving them, as well as increasing ease of maintenance. The next version already features increased responsiveness in CQB, refined panic and reaction functions, and a greatly improved suppression module. New features are focused along two lines; (1) improvements to armoured vehicles (evading enemy fire and increased aggression) and (2) the basis of an AI leader decision maker. 

    The second feature could do with some explanation. When the squad enters combat, each soldier works as a sensor. Certain impulses are added to the groups pool of information.. From this the group leader will periodically make assessments and set forth group wide responses. This adds extra incentive to target leaders early and adds depth to infantry tactics and adds predictable stages to AI decision making.  

    These responses will never override existing waypoints, nor change core AI settings. Examples are things such as: Calling artillery, checking nearby buildings,  or hiding in the presence of tanks or helicopters.  The exact nature and conditions which will trigger these responses are currently under development. 

    Future 
    Cautiously, I will propose that the next version should be ready by Wednesday. This is of course subject to the whims of real life and arma.  The release plan looks something like this: 

    1. New version - Release rewritten FSMs
    2. Release WP scripts standalone 
    3. Mid version - Refine and fix bugs of new FSMs
    4. Move to CBA, with all benefits added, and move to an ACE3 code standard*
    5. Release legacy version without CBA requirement

    -k 

    • Like 10
    • Thanks 4

  8. @Tankbuster

    Unless I have gravely misunderstood something, that isn't possible at the current time.  I would be very happy for any directions to set it up.  I plan to release these scripts as standalone. None of them require any mods. It is however possible to call the scripts yourself, with one point of awkwardness-- to tweak the default zone you will need to also attach a waypoint with the completion radius you prefer. 

     

    The scripts all follow the same pattern: 
     

    Arguments

     - Unit   [Group or Object]

     - Position [Array]


    Functions
    - lambs_dangerWP_fnc_taskAttack,  creates three Seek and Destroy waypoints with orders to search buildings (Default range is 25m)
    - lambs_dangerWP_fnc_taskCQB, searches all building positions within a range (default is 50m) 
    - lambs_dangerWP_fnc_taskCreep, cautiously stalks any player unit within AoE (Default is 500m) 
    - lambs_dangerWP_fnc_taskGarrison, Garrisons building and mans static weapons.  (Default is 50m) 
    - lambs_dangerWP_fnc_taskHunt,  Hunts in a patrol like fashion player units within AoE (Default is 500m) 
    - lambs_dangerWP_fnc_taskPatrol, Creates a random patrol within range (Default is 200m) 
    - lambs_dangerWP_fnc_taskRush, Madly rushes towards any playable units with AoE (Default is 500m) 

     

    Example:
    [Officer1,getpos Officer1] call lambs_dangerWP_fnc_taskGarrison
    [group rushers,getpos player] spawn lambs_dangerWP_fnc_taskRush; 

    NB: The Rush, Creep, Hunt and CQB functions require that you spawn rather than call. 

    Cheers. 
    -k 

     

     

    ---

     

    edit: A video I made demonstrating some of the waypoints in use: Creep, Hunt and Rush 

     

    • Like 3
    • Thanks 3

  9. 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. 

     

    • Like 5

  10. 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

     

    ---

    UltxKm4.png

    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

     

    • Like 1
    • Thanks 4

  11. @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. 

    • Thanks 1
×