super-truite 54 Posted April 12, 2013 I would like to increase the maximum spot distance of some AI units. In particular it is ridiculous how blind the marksmans are! They can't spot a target at 400 meters in the middle of the day! I tried to set manually their spot distance using setskill ["spotdistance",1]: https://community.bistudio.com/wiki/setSkill_array, but I suspect that I am doing nothing better than setting the skill to 1 with that (I guess it sets all the options 'spotdistance', 'aimingaccuracy' ect. to 1)... Is there a simple way to go over the setskill = 1 limit or should I wait for mods like ZEUSAI? Share this post Link to post Share on other sites
Rydygier 1317 Posted April 13, 2013 (edited) Simpliest I know would be a script with constant loop, that cyclically checks for all units, if there is any enemy in given radius around (or just checks distancies between each possible pair of opposite units present on map). If so, then is applied "knowsAbout" factor in any preferred way - simply, or sophisiticated, counting many factors like distance, movement, weather, daytime, LOS, kind, size, health, skill, background and such. Somewhere I have test version of such code for A2 - it is heavy. Max possible distance would be viewDistance set in video settings. Edited April 13, 2013 by Rydygier Share this post Link to post Share on other sites
killzone_kid 1333 Posted April 13, 2013 ai with spotting skill 1 will still have 0.4 spotting probability. you will probably need to overwrite cfgAIskills to make it higher Share this post Link to post Share on other sites
1para{god-father} 105 Posted April 13, 2013 make a function and call it when needed? MYSKILL_fnc_Skill ={ _groupnamed = _this select 0; _leaderguy = leader _groupnamed; _leaderguy setskill 0.55; { _x setskill ["aimingAccuracy",0.55]; _x setskill ["spotDistance",0.85]; _x setskill ["spotTime",0.55]; _x setskill ["courage",0.50]; _x setskill ["commanding",0.60]; _x setskill ["aimingShake",0.60]; _x setskill ["aimingSpeed",0.55]; } foreach units _groupnamed ; }; Share this post Link to post Share on other sites
super-truite 54 Posted April 13, 2013 Thanks for the anwrers. Simpliest I know would be a script with constant loop, that cyclically checks for all units, if there is any enemy in given radius around (or just checks distancies between each possible pair of opposite units present on map). If so, then is applied "knowsAbout" factor in any preferred way - simply, or sophisiticated, counting many factors like distance, movement, weather, daytime, LOS, kind, size, health, skill, background and such. Somewhere I have test version of such code for A2 - it is heavy. Max possible distance would be viewDistance set in video settings. I was afraid I would have to to something like this... I'll try, but I am quite a noob at scripting. ai with spotting skill 1 will still have 0.4 spotting probability. you will probably need to overwrite cfgAIskills to make it higher How do you modify cfgAIskill? The wiki page is quite obscure: http://community.bistudio.com/wiki/CfgAISkill @Psviali, I think I won't do better than setting the skill manually to 1 by using your function. My goal is to go over the maximal value allowed (at least for the spotting distance). Share this post Link to post Share on other sites
killzone_kid 1333 Posted April 13, 2013 I'd imagine you would need to overwrite the class, redefine it again in config.hpp in your mod class CfgAISkill { aimingAccuracy[] = {0,0,1,1}; aimingShake[] = {0,0,1,1}; aimingSpeed[] = {0,0.5,1,1}; commanding[] = {0,0,1,1}; courage[] = {0,0,1,1}; endurance[] = {0,0,1,1}; general[] = {0,0,1,1}; reloadSpeed[] = {0,0,1,1}; spotDistance[] = {0,0.2,1,0.4}; spotTime[] = {0,0,1,0.7}; }; then change spot distance probability to min 1 max 1 regardless of skill just to see if it's working spotDistance[] = {0,1,1,1}; Share this post Link to post Share on other sites
super-truite 54 Posted April 13, 2013 OK, for what I need it will be enough to reveal the unit I want to the marksman when the unit enter a trigger. Put _marksman reveal _unit in the trigger activation. 1 Share this post Link to post Share on other sites
super-truite 54 Posted April 13, 2013 By the way, this has just been released: http://www.armaholic.com/page.php?id=20002 You can't choose which unit will be affected though. Share this post Link to post Share on other sites