.kju 3244 Posted December 18, 2018 @haleks did you try these yet? https://community.bistudio.com/wiki/setUnitPosWeak https://community.bistudio.com/wiki/setUnitPos 1 Share this post Link to post Share on other sites
.kju 3244 Posted December 18, 2018 @Larrow did you manage to sort it out yet? Share this post Link to post Share on other sites
Larrow 2820 Posted December 18, 2018 53 minutes ago, .kju said: @Larrow did you manage to sort it out yet? No, I have currently moved on to other projects, I like to swap and change when I'm feeling stumped/burnt out on a project, its usually those times where you get a eureka moment for something else :D. When I revisit it I'm thinking I may just have to hard code a range of screen sizes of known pixelGrid values for people to test their designs in. 2 1 Share this post Link to post Share on other sites
haleks 8212 Posted December 18, 2018 2 hours ago, .kju said: @haleks did you try these yet? https://community.bistudio.com/wiki/setUnitPosWeak https://community.bistudio.com/wiki/setUnitPos Yes, they do work but they limit the AI to the one same position. I could always write a loop forcing the AI to a random position other than prone, but well, I don't see meself doing that each time I work on a mission with AIs. :/ I reckon I might take a look at the FSM and include an optional edit to either my Ravage mod or the Discipline mod... Share this post Link to post Share on other sites
.kju 3244 Posted December 18, 2018 @haleks what about these config tweak options? class cfgVehicles class Man: Land lyingLimitSpeedHiding = 0.8; crouchProbabilityHiding = 0.8; lyingLimitSpeedCombat = 1.8; crouchProbabilityCombat = 0.4; crouchProbabilityEngage = 0.75; lyingLimitSpeedStealth = 2; class CfgSurfaces class Default /// = 0 - current state, see https://jira.bistudio.com/browse/AIII-30049 /// = 1 - avoid prone (unless stealth or suppressed or ^) /// = 2 - never prone (unless ^) /// = 3 - don't know yet AIAvoidStance = 0; 1 2 Share this post Link to post Share on other sites
haleks 8212 Posted December 18, 2018 56 minutes ago, .kju said: @haleks what about these config tweak options? class cfgVehicles class Man: Land lyingLimitSpeedHiding = 0.8; crouchProbabilityHiding = 0.8; lyingLimitSpeedCombat = 1.8; crouchProbabilityCombat = 0.4; crouchProbabilityEngage = 0.75; lyingLimitSpeedStealth = 2; class CfgSurfaces class Default /// = 0 - current state, see https://jira.bistudio.com/browse/AIII-30049 /// = 1 - avoid prone (unless stealth or suppressed or ^) /// = 2 - never prone (unless ^) /// = 3 - don't know yet AIAvoidStance = 0; Holy smoke - I never thought about checking the configs! Thanks .Kju! I'll give those a try. 2 Share this post Link to post Share on other sites
haleks 8212 Posted December 18, 2018 @.kju: The AIAvoidStance setting works great, it makes a real difference - and it doesn't alter the AI behaviour too much. It doesn't seem to impact how quickly they move, I assumed a lot of the pauses were caused by the lying animations but that's not the case (good news for scenarios relying on close movement timing). They do seem to better react to their surroundings though, probably because they have clearer LoS. Thanks again. ;) 1 1 Share this post Link to post Share on other sites
.kju 3244 Posted December 18, 2018 Make sure to share your config tweak mod as others will surely appreciate it as well 1 Share this post Link to post Share on other sites
haleks 8212 Posted December 18, 2018 Right now it's just that single change : class CfgSurfaces { class Default { AIAvoidStance = 2; }; }; I'll apply it to Ravage and add it as an optional PBO for Discipline (I reckon people who still use it will enjoy another little immersion tweak). 1 Share this post Link to post Share on other sites
.kju 3244 Posted December 18, 2018 This is the default setup: https://pastebin.ubuntu.com/p/Y833kmHWH9/ 1 1 Share this post Link to post Share on other sites
haleks 8212 Posted December 18, 2018 2 minutes ago, .kju said: This is the default setup: https://pastebin.ubuntu.com/p/Y833kmHWH9/ Oh sir, you're awesome. ^^ That's gonna help a lot to fine-tune this thing. Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted February 6, 2019 On 12/18/2018 at 9:04 PM, .kju said: @haleks what about these config tweak options? class cfgVehicles class Man: Land lyingLimitSpeedHiding = 0.8; crouchProbabilityHiding = 0.8; lyingLimitSpeedCombat = 1.8; crouchProbabilityCombat = 0.4; crouchProbabilityEngage = 0.75; lyingLimitSpeedStealth = 2; class CfgSurfaces class Default /// = 0 - current state, see https://jira.bistudio.com/browse/AIII-30049 /// = 1 - avoid prone (unless stealth or suppressed or ^) /// = 2 - never prone (unless ^) /// = 3 - don't know yet AIAvoidStance = 0; do we even have write access on those configs? 1 Share this post Link to post Share on other sites
reyhard 2082 Posted February 7, 2019 20 hours ago, fn_Quiksilver said: do we even have write access on those configs? Yes, cfgSurfaces can be changed/expanded without issues Share this post Link to post Share on other sites
Dedmen 2696 Posted February 12, 2019 In the light of https://feedback.bistudio.com/T135718 we want people to switch away from using call compile to parse things. But sadly parseSimpleArray is so limited that it's very hard to use with anything that was input by a user. Because users put spaces after comma's. Allowing whitespace in there would make it MUCH more useful and wouldn't make it noticeably slower. Just skip spaces only after commas or at start/end. Please, I just want to get rid of all the call compile's that really should be parseSimpleArray but can't be because of this one simple thing. 1 1 Share this post Link to post Share on other sites
pierremgi 4850 Posted February 14, 2019 If I understand, it's preferable to use some Fn_function = {code}; then later, parameters call/spawn fn_function; rather than fn_Function = compile "stringed code"; then later, parameters call/spawn fn_Function; Especially if used in an on each frame or frequent EH (like animChanged) So what about my habit: Fn_function = compileFinal "stringed code"; then later, parameters call/spawn fn_Function; I know it's possible to add the function into the cfgFunction, but usually there are plenty of repetitive small scripts inside other scripts. Not sure they worth an entry class for that. I discovered today, the future alternate syntax of compile. I'm not sure to understand when I should apply compile , compile (forceDisableCache) or compileFinal. Any tuto insight? Share this post Link to post Share on other sites
Dedmen 2696 Posted February 14, 2019 5 hours ago, pierremgi said: Especially if used in an on each frame or frequent EH (like animChanged) Eventhandlers are stored as strings and recompiled before every execution, so it doesn't matter if you pass precompiled code or just a string to it. 5 hours ago, pierremgi said: compileFinal Is EXACTLY the same as a normal compile. With the one difference that it sets a "readOnly" flag on every variable that you move the returned value into. Meaning you cannot overwrite that variable anymore, till it's deleted by the engine, which happens at mission end for missionNamespace. That's also why "call compileFinal.." is absolute nonsense, if you never store it in a variable it does nothing different. The new alternative syntax is aimed to counteract the memory leak associated with compiling functions. You should use the forceDisableCache whenever you input something dynamic into compile, for example data returned by a Extension or any place where "compile format [...]" is used. Still hoping for a better solution from BI though. This won't help that much with the memory leak. 1 Share this post Link to post Share on other sites
nomisum 129 Posted February 20, 2019 Would be really handy to have a command to get current index of setDriveOnPath path the vehicle is driving on. This would enable taking vehicles off the path to perform actions and go on their merry way afterwards. 2 Share this post Link to post Share on other sites
pierremgi 4850 Posted March 19, 2019 A new command for allUnits could increase performance. allUnits is returning too many units, for example disabled dynamic simulation ones, hidden ones... This command is one of the most used in loops, for many scripts where these units must be updated. Note: It returns also some weird things like: HQs (created by modules like supports or added in 3den), but also HQ entities (BI module: moduleHQ_F), and if you need a reliable result, you need to filter at least by: _HQs = [missionNamespace getVariable ["BIS_SUPP_HQ_WEST",objNull],missionNamespace getVariable ["BIS_SUPP_HQ_EAST" ,objNull], missionNamespace getVariable ["BIS_SUPP_HQ_GUER",objNull]]; allUnits select {_x isKindOf "CAManBase" && !(_x in _HQs)}; Here the "CAManBase" filter is in case of HQ entities. **I don't know another reason, but it's often added in shared scripts. But, the most useless in many cases is the returned units which simulation disabled (dynamic or not) or hidden ones. Could you create a new command like allDynUnits which could return only dynamic bipeds (as you write in example1 with "brains"). On my mind the UAV/UGV/auto turrets crew should not be added here, but discussion is open. ** Just tested in warlords: (allunits select { !(_x isKindOf "CAManBase") }) apply {(typeOf _x)} can returns: ["Logic","Logic","Logic","Logic","Logic","Logic","Logic","Logic","Logic","Logic","Logic"] while gaming. Seems to be civilian units C... not L... as logic. Share this post Link to post Share on other sites
killzone_kid 1330 Posted March 19, 2019 allUnits does not return sideLogic, those must be class Logic entities created on non-Logic side for some reason 1 Share this post Link to post Share on other sites
pierremgi 4850 Posted March 19, 2019 1 hour ago, killzone_kid said: allUnits does not return sideLogic, those must be class Logic entities created on non-Logic side for some reason You're right. Fortunately on civilian side, so that doesn't impact most of missions. If something can be done for hidden/disabled simulation units of all sides, this could be an improvement as a lighter return array. anyway, scripters should keep the choice to script for allUnits (even hidden/dyn sim disabled), as now, or script for "animated & visible" units only, as I suggest. For example, a counter for remaining enemies can take into account "all possible enemies on map" (allUnits is rather fine) or "actual active enemies" (you need to add some filters which could be on engine side). Share this post Link to post Share on other sites
winse 22 Posted March 21, 2019 Sometimes artillery AI hangs and ignores the commandArtilleryFire. The situation: Multiplayer AI Sochor is located at Altis, [5176.66,20690.2,0] and handled by a remote machine The vehicle ammo is full, canFire and inRangeOfArtillery return true The target is at [11065.1,14966.7,0] I open debug console and issue the following command: ([5176.66,20690.2,0] nearestObject "Tank") commandArtilleryFire [[11065.1,14966.7,0], "32Rnd_155mm_Mo_shells_O", 5] Hit "Execute global" Nothing happens, No errors in logs My question is - how can I find out what's wrong here? Share this post Link to post Share on other sites
pierremgi 4850 Posted March 21, 2019 46 minutes ago, winse said: Sometimes artillery AI hangs and ignores the commandArtilleryFire. The situation: Multiplayer AI Sochor is located at Altis, [5176.66,20690.2,0] and handled by a remote machine The vehicle ammo is full, canFire and inRangeOfArtillery return true The target is at [11065.1,14966.7,0] I open debug console and issue the following command: ([5176.66,20690.2,0] nearestObject "Tank") commandArtilleryFire [[11065.1,14966.7,0], "32Rnd_155mm_Mo_shells_O", 5] Hit "Execute global" Nothing happens, No errors in logs My question is - how can I find out what's wrong here? If Sochor not on server and not local, I'd try with: if (local ([5176.66,20690.2,0] nearestObject "Tank") ) then {....}; and execute global You're not on the right section, btw. Post here. Share this post Link to post Share on other sites
winse 22 Posted March 21, 2019 I think locality is not the case. When I run the command globally, it is executed also on the machine Sochor is local at. The other machines are highly likely to make a locality-check and ignore the command at Arma level. I started those experiments with console because at some points of time, artillery stops executing commands a local script issues. From the birds-eye view the issue looks the following way: artillery spawns follows my script commands for some time then stops responding both the script commands and console ones I don't know the exact conditions of how to reproduce that, but it happens on a regular basis every day. Share this post Link to post Share on other sites
pierremgi 4850 Posted March 22, 2019 Do you run several heavy scripts? Perhaps a scheduler issue. Share this post Link to post Share on other sites
winse 22 Posted March 22, 2019 1 hour ago, pierremgi said: Do you run several heavy scripts? Perhaps a scheduler issue. Yep, a lot. Normally the machine which operates the artillety is pretty heavily loaded. I hoped there would be a way to trace such kinds of AI issues. Share this post Link to post Share on other sites