major-stiffy 274 Posted May 5, 2023 I'll test a bit today but not home over the weekend. Share this post Link to post Share on other sites
major-stiffy 274 Posted May 5, 2023 What I do here is probably more than you bargained for but here it is. Let me know if I've not setup your scripts properly. Player walks into trigger and Act's nul = execVM "scripts\task5bgrp1.sqf"; task5bgrp1.sqf contains (spawns AI via layer) getMissionLayerEntities "tsk5bgrp1" params ["_objects"]; _objects apply { _x enableSimulationGlobal true; _x hideObjectGlobal false; }; initServer.sqf contains: call compile preprocessFileLineNumbers "Herne.sqf"; { [_x,0,-1,60,true] call RYD_CH_Herne; } foreach [task5bgrp1,task5bgrp1z,task5bgrp2,task5bgrp2z,task5bsmasher]; Herne.sqf is beta 3 Error: Spoiler 10:41:41 Error in expression <Destination select 0; if ((_x distance _currentDestination) < 2) then { doStop > 10:41:41 Error position: <_currentDestination) < 2) then { doStop > 10:41:41 Error Undefined variable in expression: _currentdestination 10:41:41 File C:\Users\Marc\Documents\Arma 3 - Other Profiles\Major_Stiffy\mpmissions\hunting_the_hunters.Altis\Herne.sqf..., line 184 Share this post Link to post Share on other sites
Rydygier 1309 Posted May 5, 2023 Right... Added a line, that hopefully should prevent the error, but had no time to test for now... Herne 1.1 Beta3b 1 Share this post Link to post Share on other sites
major-stiffy 274 Posted May 7, 2023 No errors, looks good until I change buildings. Share this post Link to post Share on other sites
alky_lee 278 Posted May 9, 2023 I have found with this script that different groups of enemies are more aggressive than others. I thought that vipers would be most aggressive but it turns out that Spetsnaz are even more aggressive by a significant amount. Trying to defend a tower against 40 Spetsnaz in six hunting groups until support can arrive is very challenging. 2 Share this post Link to post Share on other sites
froggyluv 2133 Posted May 9, 2023 @alky_lee Although I just briefly checked the code I didnt see anything that would make it react differently to different faction's types of units Share this post Link to post Share on other sites
Rydygier 1309 Posted May 9, 2023 On 5/7/2023 at 9:41 PM, major-stiffy said: No errors, looks good until I change buildings. If that scenario is vanilla, I could use it for some tests. Building change wasn't tested so far, also there may be some pathfinding problems. Yes, the code itself doesn't differentiate aggression in any way. Share this post Link to post Share on other sites
alky_lee 278 Posted May 10, 2023 6 hours ago, froggyluv said: @alky_lee Although I just briefly checked the code I didnt see anything that would make it react differently to different faction's types of units It's just the vanilla skill/accuracy settings for different groups of units. I usually find that recon and "speshul" forces groups are more skilful/accurate and more aggressive in their approach to dealing with a threat. They tend to react and manoeuvre more quickly. The Herne script amplifies these differences. I started off with a mix of CSAT and Vipers. The Vipers were always front and centre in climbing and entering the tower. When I replaced them with Spetsnaz, they were almost suicidal in their approach. Whereas I could survive fairly well against CSAT/Vipers, Spetsnaz proved more of a challenge than I expected. Share this post Link to post Share on other sites
froggyluv 2133 Posted May 10, 2023 1 minute ago, alky_lee said: It's just the vanilla skill/accuracy settings for different groups of units. I usually find that recon and "speshul" forces groups are more skilful/accurate and more aggressive in their approach to dealing with a threat. They tend to react and manoeuvre more quickly. The Herne script amplifies these differences. I started off with a mix of CSAT and Vipers. The Vipers were always front and centre in climbing and entering the tower. When I replaced them with Spetsnaz, they were almost suicidal in their approach. Whereas I could survive fairly well against CSAT/Vipers, Spetsnaz proved more of a challenge than I expected. Funny - unless something changed within last few years thats the exact reason I left and/or modded for myself AI skill settings -that being that the game did not favor Spec ops/special forces at all. You needed either an AI Skill mod like ASR or create your own (like I did) to pickup special classes of units and give them a skill advantage. Funny enough the original OFP did a good job of creating proper unit disparity and Spetz Natz with their red Berets were definitely more lethal. I did alot of testing with early Arma 3 and that was never the case so I made my own scripts. Share this post Link to post Share on other sites
alky_lee 278 Posted May 10, 2023 31 minutes ago, froggyluv said: Funny - unless something changed within last few years thats the exact reason I left and/or modded for myself AI skill settings -that being that the game did not favor Spec ops/special forces at all. You needed either an AI Skill mod like ASR or create your own (like I did) to pickup special classes of units and give them a skill advantage. Funny enough the original OFP did a good job of creating proper unit disparity and Spetz Natz with their red Berets were definitely more lethal. I did alot of testing with early Arma 3 and that was never the case so I made my own scripts. To be fair it wasn't very noticeable with the original Arma factions. Recon were a little better but not remarkably so. I too looked for mods to enhance the AI such as bCombat, Vcom, ASR, etc. When the vipers came with the Apex DLC they were another notch up. I thought the Spetsnaz from Contact DLC were on a par with them until I started using Herne. I couldn't really rate the Blufor groups as I haven't played enough Opfor against them and I don't come up against them in Pilgrimage. When I play as Blufor they are all as bad as each other and totally infuriating. Trying to keep them alive during the East Wind campaign was an achievement in itself. I suppose I could reverse the factions using Herne and see how the Blufor groups perform. Share this post Link to post Share on other sites
Rydygier 1309 Posted May 10, 2023 Testing with other vanilla building: and AI pathfinding problems are... impactful there. AI still enters the building and tries to move inside, but it seems way less enthusiastic about it, prone to stuck. Tendency to unitReady return true prematurely indicates fails on finding a path. One should not assume, even vanilla buildings will work OK for AI. Some will while other not so much. It makes Herne in this regard quite unpredictable effect-wise, which is bad and good thing in the same time. Now let's try, how changing the building in between the search works... ... Seems, it works OK, only debug arrows from previous building aren't cleared after building change. It's just debug, but perhaps this can be fixed. Also work equally well, when certain building is native part of the map and when it is placed in EDEN. ... All right, arrows removal should be fixed in the next version. Share this post Link to post Share on other sites
Rydygier 1309 Posted May 10, 2023 1 hour ago, Rydygier said: and AI pathfinding problems are... impactful there. But same building placed in EDEN out of the above context, but in the middle of Almyra salt lake is searched quite nicely. Much better. So it may be not about the building itself, rather whole surrounding context, or something particular about it, that could make path finding capricious. Interesting. Anyway, seems for strictly CQB scenarios, in case of such problems, recommended would be actually to use EDEN placed buildings, in the free, open areas? BTW used hide object modules to hide everything in the area, around and below, except the troublesome building itself - no change. But I know, hidden map objects sometimes stay an invisible, but physical obstacle (game bug). Share this post Link to post Share on other sites
Rydygier 1309 Posted May 10, 2023 Herne 1.1 beta4 - fixed debug arrows removal at building change. Share this post Link to post Share on other sites
major-stiffy 274 Posted May 10, 2023 Pure vanilla setup in VR. initServer.sqf call compile preprocessFileLineNumbers "Herne.sqf"; { [_x,0,-1,60,true] call RYD_CH_Herne; } foreach [hunters]; RYD_Herne_v1_1_beta_4 AI visible and simulated on start. The first time I clicked singleplayer and it started (I was not recording), the AI moved up the guard tower to almost the top. I got out of spectator mode, walked across the plank onto the other building. The AI came back down and properly entered the office building and worked their way up almost to the roof and then I exited. I thought good, it works. Decided to do the same thing again only this time record. Here it is. I did a 3rd test while recording and the result was the same as the recording above. Not sure what else to add. Share this post Link to post Share on other sites
Rydygier 1309 Posted May 10, 2023 Looks like normal Arma AI behavior in such situation. They know all about you now (4), so they seek a position, from where can shoot at you. Seems, they fail to find a path (too long/complex - I saw it earlier, so this is likely) from where they are straight up to the roof where you are (purple arrow is on your position here - expected, when the knowledge is 4). In case of path finding fail they immediately become "unitReady" (movement considered "completed"), hence they take normal orders from their TL. As long they do not know all about you, they do not try to reach you directly, but rather start the search from the bottom, where it is possible to calculate the path (shorter/less complex). In total, the result kind of makes sense. Since they know about you being exposed on the roof and can reach you from outside, they try to do so. As for potential remedy - not sure, if effective one is possible. Since they know all about you, they shouldn't normally search the building in order to find you, but to engage you directly. Perhaps one could somehow calculate intermediate navpoints to shorten the path to calculate... 1 Share this post Link to post Share on other sites
Rydygier 1309 Posted May 11, 2023 19 hours ago, Rydygier said: Perhaps one could somehow calculate intermediate navpoints to shorten the path to calculate... Of course, it is more complicated, than that. In beta 5 I made quite a serious changes in order to fix/workaround/mitigate few problems encountered and it seems better now, but if hunters have full knowledge about you before they get to you from inside, results become very mixed/chaotic. Which sometimes generate quite interesting results, like some units trying to reach you from outside while other from inside. But sometimes it is just like half of a group stops to move somewhere inside while other half do that vanilla maneuver with running far from the building to get a clear shot from afar or sometimes they do who knows what frankly, just running back and forth around the building. The full knowledge about some near enemy turns AI's brain into strawberry jelly and so far I didn't find any reliable way to enforce my iron will upon that jelly. Anyway, enjoy the chaos: Herne 1.1 beta 5 1 2 Share this post Link to post Share on other sites
major-stiffy 274 Posted May 11, 2023 A bit long but hopefully you see what you're looking for. RYD_Herne_v1_1_beta_5 1 Share this post Link to post Share on other sites
Rydygier 1309 Posted May 11, 2023 Yup, looks like in my tests in general. Further improvement would require finding a reliable way to protect the AI from entering strawberry jelly mode if the prey is known in advance (as it happened also here once they finally find out, who is toying with them 🙂 ). Currently in use: _group setCombatMode "RED"; _group setCombatBehaviour "CARELESS"; This is not very intuitive though, as group behaviour and group member's behavior aren't the same. Here second line sets careless for the group, but not to the group members. Similar with combat mode, I believe. There's still room for experiments but only by trial and error, since this stuff lacks coprehesive documentation, AFAIK (especially group setting versus group member setting comparison). 2 Share this post Link to post Share on other sites
pierremgi 4831 Posted May 11, 2023 I gave up a while ago, trying to optimize searching paths in buildings, just because AIs were mad in combat situation (some of them committed suicide, jumping from the tower). I'll have a look at AI group in careless but red mode. Share this post Link to post Share on other sites
major-stiffy 274 Posted May 12, 2023 So how do I remove debugMode? Assuming you're done. Share this post Link to post Share on other sites
Rydygier 1309 Posted May 12, 2023 4 hours ago, major-stiffy said: So how do I remove debugMode? Assuming you're done. In this line: [_x,0,-1,60,true] call RYD_CH_Herne; The last parameter, "true", is debug mode switch. Turn it off either by: [_x,0,-1,60,false] call RYD_CH_Herne; or just: [_x,0,-1,60] call RYD_CH_Herne; As this is false by default. 11 hours ago, pierremgi said: I gave up a while ago, trying to optimize searching paths in buildings, just because AIs were mad in combat situation (some of them committed suicide, jumping from the tower). I'll have a look at AI group in careless but red mode. I started this endevour knowing, other was here before me. Still, I'm curious, how far I can push it before I stuck hopelessly. Not much time for it, but I guess, I'll experiment with various alchemical mixtures of behaviour, combat mode, maybe even disableAI and other. Share this post Link to post Share on other sites
Rydygier 1309 Posted May 12, 2023 So far my very scientific approach shown such mix being optimal of all tested as for preventing strawberry jelly syndrome: { _x setUnitCombatMode "YELLOW";//seems meaningless - group's combat mode is the one, that actually makes a change, it seems. Just picked one with "keep formation" to avoid potential "pursue" behaviors. _x setCombatBehaviour "STEALTH";//no yelling, possibly bit less pointless aiming at known target through the walls (?). CARELESS loooks wierd in this mix (frequent looking at the target through the walls while weapon lowered looks silly) _x setUnitPos "UP";//essential, does what supposed _x disableAI "TARGET";//essential. Prevents sending group members with weird maneuver orders that overwrite doMove. _x disableAI "COVER";//prevents interferences with "find cover" behaviors. Improives fluidness of movement - less weird stops or temporary moving towards "covers" _x disableAI "AUTOCOMBAT";//may prevent indivudal units changing set behavior to COMBAT, but seems unnecessary } foreach _units; _group setSpeedMode "FULL";//not sure, if makes any differfence, but may prevent interferences with occasional "return to formation" stuff _group setCombatMode "YELLOW";//probably anything but BLUE works samey. Just picked one with "keep formation" to avoid potential "pursue" behaviors. _group setCombatBehaviour "STEALTH";//seems pointless, group's behavior turns COMBAT when enemy detected even, if this is set to CARELESS Tested scenario was target on the roof of the large building revealed with 4 to the hunting group being outside. Crucial: reveal must occur after above changes are applied. Otherwise there's no salvation. Probably I'll try other scenarios, and if confirmed working aswell, that may be for actual 1.1 update even. Share this post Link to post Share on other sites
major-stiffy 274 Posted May 12, 2023 (edited) Disregard!!! Edited May 12, 2023 by major-stiffy Used wrong initServer 1 Share this post Link to post Share on other sites
Rydygier 1309 Posted May 12, 2023 Thanks for reporting. Not bound with the debug though. Could happen, if hunters were in different building, than their prey. Share this post Link to post Share on other sites
major-stiffy 274 Posted May 12, 2023 Ok Since I deleted my above post and corrected initServer.sqf, still got this error 8:27:10 Error in expression <est) }; case (not (isNull _myBld) and {_farFromEntrance}) : { private _entranc> 8:27:10 Error position: <_farFromEntrance}) : { private _entranc> 8:27:10 Error Type Number, expected Bool 8:27:10 File C:\Users\Marc\Documents\Arma 3 - Other Profiles\Major_Stiffy\mpmissions\hunting_the_hunters.Altis\Herne.sqf..., line 515 8:27:10 Error in expression <est) }; Looks like you saw it before I deleted it. Share this post Link to post Share on other sites