Tiskahar 10 Posted February 23, 2014 Hey guys, Since you think this is the appropriate place for this.. I am looking to modify formationC.fsm, formationCDanger.fsm, and possibly formationEntity.fsm, found in the characters_f/scripts folder. My fsm work and the natives are interfering with each other and providing the 'shell shock' look, so I'm looking to integrate the two to provide a smoother flow. I have dug through the config.cpp in the same characters_f.pbo and found very few references to said fsms. The only ones seem to be danger.fsm (which doesn't seem to do much - though I would love to see information relating to _queue) and the pure-text class 'formation'. If you could tell me where these FSMs are compiled and how I can push my changes into them with a cfgPatches update, I would be most appreciative. Also, what is the deal with the 'function = "formationIsLeader"' etc. that I see throughout these FSMs? I asked Lukas for documentation but he wasn't able to get me anything. Finally, any word on when the bug I reported about diagAAR will get fixed? We could use that function. Tiskahar Share this post Link to post Share on other sites
Tiskahar 10 Posted September 6, 2014 (edited) For posterity.. formationEntity.fsm is the standard soldier AI that points to hardcoded behavior. This handles peacetime behavior. I haven't played with editing it yet, but it has another version in cfgFSM called simply 'formation'. formationC and formationCDanger are the Civilian scripts. FormationC simply handles path finding for civilians and adds in a little random jitter (path finding is handled by the engine and relayed to a units expectedDestination. This file sets the current destination to the expected destination to ensure the unit follows the path provided to it by the engine). formationCDanger handles the danger reaction for civilians, which includes their decisions to duck, crouch, run away, and investigate bodies. The formationCDanger is, honestly, bad simulation. AI runs -toward- explosions that have killed other units. These files can be edited by the fsm editor, decent documentation found in the VBS Developer documentation (other tools -> FSM editor). They will be indicated in the FSM by the line 'fsmFormation = ' and 'fsmDanger = '. You can then package up your new FSMs and point to them there. Danger.fsm is the danger script used by soldiers. It is also pretty poor simulation and would be a good start for someone looking to make soldiers smarter about how they react in battle. Since setHideBehind and findCover commands no longer work, a user built find cover routine will be necessary, though not entirely difficult if you've done your reading. The difficulty would mainly in getting it to run inexpensively. The magic variable _queue is provided by the engine but I have yet to find good documentation for it. I've not been able to get solid information out of this variable, but occasionally I get good information by logging _dangerCause. _dangerCause appears to be derived from _queue, so I don't know why this is the case, but there it is. The information it provides is an id number for the type of danger (indicated in the fsm as a comment, but not entirely clear ['DCfire' indicates observed bullet impact]), the position of said danger, and, in some cases, the object that produced the danger. It should be noted that very often the danger fsm is fired -without additional information- and thus the unit will enter into a default state as it finds 'no danger' [because there was no id provided], which in most cases is 'do nothing.' As far as the AAR goes, I fixed the function myself, but as it keeps gigantic arrays of information stored in the profileNameSpace, profile files grow extremely large in a very short period of time. This slows down loading and unloading of all aspects of the game to unacceptable levels, which may be why the function is no longer supported. Edited September 6, 2014 by Tiskahar Share this post Link to post Share on other sites
.kju 3245 Posted September 7, 2014 wrote an analysis back in the day here: https://community.bistudio.com/wiki/Arma_2:_Operation_Arrowhead:_AI_FSM AI issues ticket in the CIT also have more detail and some comments from Suma a few AI mods have modified it like Group Link 4 or bCombat Share this post Link to post Share on other sites
Tiskahar 10 Posted September 7, 2014 That's an interesting read, I hadn't seen that before. Thank you for that! I'll have to look up those mods and the ticket. I'm hoping to do fairly extensive rework. Share this post Link to post Share on other sites