Jump to content

Recommended Posts

Is there any way to tell whether a unit is located in a forested part of the map, defined as the green-shaded area? What about being in shadows or not?

Share this post


Link to post
Share on other sites
Is there any way to tell whether a unit is located in a forested part of the map, defined as the green-shaded area? What about being in shadows or not?

Well, there must be something because it doesn't rain on a player under a tree. But I think this might be prohibitive for general AI use :) if I were to try it I might have a 5-second monitor loop to count nearby trees or something, and adjust settings based on that. But it's an expensive business, you basically have to return all objects & compare them to a list of all trees.

Share this post


Link to post
Share on other sites

I guess this function would work, have not tested it yet:

private ["_inforest","_sbp"];
_inforest = false;
_sbp = selectBestPlaces [(getPosASL _this),5,"forest",1,1];
if (count _sbp > 0) then {
_inforest = true;
};
_inforest

Problem is, as DMarkwick pointed out, when to call it. A unit can get in and out of the forest quickly, so there would be a lot of checks.

Another compromising idea would be to just add some optional map-based spotting coefficient, so you could go with lower overall spotting in Chernarus and higher in Takistan etc.

Edited by Robalo

Share this post


Link to post
Share on other sites
Problem is, as DMarkwick pointed out, when to call it. A unit can get in and out of the forest quickly, so there would be a lot of checks.

Another compromising idea would be to just add some optional map-based spotting coefficient, so you could go with lower overall spotting in Chernarus and higher in Takistan etc.

Thinking about it pragmatically... I guess a low-frequency check would be appropriate for any unit not already "in forest", and a high frequency check for units that are "in forest".

The logic being that if you're not in forest then it's logical that if you were to run into one you'd still be susceptible to spotting & tracking by AI until you're quite a way in, and if you are in forest then obviously you'd like to use forests and treelines etc to good effect for as long as you decide to remain in one.

Share this post


Link to post
Share on other sites
ATOC on Trees and Grass actually makes it easier for YOU to see thru the leaves and grass. It has no bearing on AI. Not sure what is going on with your described action?

As for "super acurate AI" with latest Beta etall, I dont see it. Must be a carry over from some Faction settings or you where playing on a High Skill setting for the mission?

As always Rob great work.

Have to disagree. ATOC only allows you to see through the grass to some extent; or at least that's the case for me. But trees and other bush become almost twice as thick. I don't see how that makes it easier for you to see. This is especially the case at longer distances, where grass is not much of an issue. With ATOC off I can easily see the forest floor from far away, where as with ATOC for trees all I see are a bunch of trees (which feels more realistic to me).

@Robalo: Yeah I suspected it was not going to be easy, but I thought there would be no harm in asking. It's just that sometimes the AI seems to see amazingly well in woods compared to the player (ATOC on for trees just adds to that). Just yesterday I was patrolling the woods with my AI squad mates and I could see barely more than 50 meters in front (thick bush), yet all of a sudden my squad-mate yells, "ENEMY APC 500 METERS FRONT" and I just couldn't understand how he saw that. I moved to his position, looked/listened as hard as I could, but I still couldn't see more than 50 meters away, let alone an enemy APC 500 meters away! Or is that because of the AI radio feature?

Anyway I think I'm making too much of a fuss out of this. Honestly I am really happy with what your mod does and will continue to enjoy using it. I just thought I point this issue out on the low chance that there may actually be an easy fix for it.

Thank you for the awesome work!

Share this post


Link to post
Share on other sites
I guess this function would work, have not tested it yet:

private ["_inforest","_sbp"];
_inforest = false;
_sbp = selectBestPlaces [(getPosASL _this),5,"forest",1,1];
if (count _sbp > 0) then {
_inforest = true;
};
_inforest

Problem is, as DMarkwick pointed out, when to call it. A unit can get in and out of the forest quickly, so there would be a lot of checks.

Another compromising idea would be to just add some optional map-based spotting coefficient, so you could go with lower overall spotting in Chernarus and higher in Takistan etc.

SelectBestplaces will do the job, rawly worked for me. It's one of the most useful commands we get in the Armaverse.

It needs a bit of tuning though, "forest" alone as pattern may not suffice.

About number of checks: i've developed a small framework that does almost real time checking (= 1 execution per second, per unit) based on this as well as other stuff (checks for LOS, night/day, camouflage, speed, unit stance and FOV , threats, ...) with barely noticeable overhead on my lappy. I rarely play with more than 1 hundred units on the battlefield though ...

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

fabrizio_T,

That framework sounds very interesting, are you going to release it soon ?

Thanks!

Share this post


Link to post
Share on other sites
fabrizio_T,

That framework sounds very interesting, are you going to release it soon ?

Thanks!

Well, it's something i've written 1 year ago as a component for FlexAI (which proved to be a too ambitious project for my spare time), i'd like to purge, repackage and release it as standalone, the same way i did for bDetect.

No ETA at the moment, my idea is to strip a "bCombat" fully configurable framework, designed to graciously sit on top of bDetect.

At first it would feature improvements for AI in 3 key areas: situational awareness, morale, suppressive fire.

I already have 70% of the code done by quite some time, what i lack is the time to tune and finalize it.

Share this post


Link to post
Share on other sites

Looking forward to it.

Fully configurable sound really good, hopefully a library that can be used in the way TPW used your bDetect :thumbsup:

Share this post


Link to post
Share on other sites
Looking forward to it.

Fully configurable sound really good, hopefully a library that can be used in the way TPW used your bDetect :thumbsup:

Yes, something like that.

Share this post


Link to post
Share on other sites
I guess you're talking about the game's profile difficulty settings ? I would guess skillEnemy should apply to US forces in your scenario. But that's a damn good question. How would the server know whos friendly and who's enemy ? Hmm, guess you should set skillFriendly value to what you have for skillEnemy and see if that fixes your problem.

UltraAI = 1 perhaps ? Make sure it's 0.

P.S. If you keep calling me Robaldo I'm gonna call you Fugly :D

Robalo, as you may not be bald, I will miss out the extra d :)

I will do a test on the skillEnemy, skillFriendly see if its either

a. skillopfor skillblufor,

or

b. player side relevant.

Share this post


Link to post
Share on other sites

When I tried latest version (1.16) I found out that there is something wrong. When I fired up UNSUNG base defense mission I heard my HD go crazy like when script dosent work, I checked RTP and it is spammed by this:

 Error position: <asr_ai_sys_aiskill_feature == 1;
_grp = >
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_sys_aiskill_feature
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc
Error in expression <_dangerCausedBy call asr_ai_main_fnc_isUnc>
 Error position: <asr_ai_main_fnc_isUnc>
 Error Nieokreślona zmienna w wyrażeniu: asr_ai_main_fnc_isunc

Nieokreślona zmienna w wyrażeniu = Undefined variable in expresion

There is more, but i cant upload RPT.

EDIT: I reverted back to1.15.1 and problem is gone.

Edited by Taro8

Share this post


Link to post
Share on other sites

Taro8, sounds like you might be missing the CBA mod.

Share this post


Link to post
Share on other sites

I have ACE installed and running without any problems and it requires CBA as well.

Share this post


Link to post
Share on other sites
I have ACE installed and running without any problems and it requires CBA as well.

Alright, then perhaps a broken/outdated userconfig file. Try copying the provided default asr_ai_settings.hpp to your <gamedir>\userconfig\asr_ai\

Share this post


Link to post
Share on other sites

I reinstalled ASR AI 1.16 after completely removing 1.15.1 (including user config) and problem returned. This is a version I have downloaded from armaholic page. For now I will stay with 1.15.1 at least until I figure out what is wrong or new version is released.

BTW: nightspotting - what is that value: how much sight range is decreased by (decreased by 1/3 with final is 2/3 of normal sight range), or sight range at night (just 1/3 of normal sight range)?

Edited by Taro8

Share this post


Link to post
Share on other sites

hey Robalo, my groups been using ASR AI since the first release and it has really changed arma for the better. Just wanted to take a moment and say thank you for all your work.

Getting good performance on our server has always been a problem (running ace and other mods). But with the "setOwner" (http://community.bistudio.com/wiki/setOwner) command I believe we have found a way out. I have been writing a set of scripts to utilize the functionality this command has given use. After tinkering around with the arma engine it seems that the AI put the hardest strain on the CPU. This problem is made worse by almost everything running through a single thread. So I thought, instead of the dedicated CPU running all the AI lets pool all the AI on the map and had out one group to each client that joins. Of course it wasn't that simple (AI losing waypoints, custom FSM'S, ect ). But after a few days started to get most of the problems worked out.

My question is this. How will client side AI affect ASR? I am guessing that all clients will have to be running ASR. And I will probably need to override client and server configs in the description.ext to ensure similar settings. But what about the AI radio system. For example: If client A's group is calling for help and client B's group is the only one close enough to receive the message, will client B's group come to the aid of client A's?

Think you for your time and keep up the good work.

Edited by anythingbut

Share this post


Link to post
Share on other sites
I reinstalled ASR AI 1.16 after completely removing 1.15.1 (including user config) and problem returned. This is a version I have downloaded from armaholic page. For now I will stay with 1.15.1 at least until I figure out what is wrong or new version is released.

BTW: nightspotting - what is that value: how much sight range is decreased by (decreased by 1/3 with final is 2/3 of normal sight range), or sight range at night (just 1/3 of normal sight range)?

Best to open a ticket with a complete RPT and I'll try to help you fix it. Version 1.16 has been in use for a long time (long beta too) and it does not have such major issues.

Nightspotting is a coefficient. If it's 1/3 you get 1/3 of the normal range.

---------- Post added at 17:37 ---------- Previous post was at 16:39 ----------

hey Robalo, my groups been using ASR AI since the first release and it has really changed arma for the better. Just wanted to take a moment and say thank you for all your work.

Getting good performance on our server has always been a problem (running ace and other mods). But with the "setOwner" (http://community.bistudio.com/wiki/setOwner) command I believe we have found a way out. I have been writing a set of scripts to utilize the functionality this command has given use. After tinkering around with the arma engine it seems that the AI put the hardest strain on the CPU. This problem is made worse by almost everything running through a single thread. So I thought, instead of the dedicated CPU running all the AI lets pool all the AI on the map and had out one group to each client that joins. Of course it wasn't that simple (AI losing waypoints, custom FSM'S, ect ). But after a few days started to get most of the problems worked out.

My question is this. How will client side AI affect ASR? I am guessing that all clients will have to be running ASR. And I will probably need to override client and server configs in the description.ext to ensure similar settings. But what about the AI radio system. For example: If client A's group is calling for help and client B's group is the only one close enough to receive the message, will client B's group come to the aid of client A's?

Think you for your time and keep up the good work.

Some features, like rearming, only run for local AI.

But there's a bunch of code that only runs on the server and it cycles all groups/units regardless of locality, for example to enforce skills set by the server.

No easy answer though, there are a few locality checks that may or may not conflict with your setup, but generally I'd say it should be compatible if you also run the mod on clients.

Interesting idea, I'd be worried though about moving processing from a powerful dedicated server to a weaker machine, need to make sure the client has a spare core to be used for that AI processing, but I don't know if it's possible.

Share this post


Link to post
Share on other sites

Quick question, can this mod be ran on server side only or do all clients need it?

Share this post


Link to post
Share on other sites
Quick question, can this mod be ran on server side only or do all clients need it?

Quick answer: see README :)

Anyway, the 2 most common deployment scenarios are probably these:

- single player

- server-side only in MP

If you play MP and have AI units in your group then you'll probably want to run the mod too, but it's optional.

Edited by Robalo

Share this post


Link to post
Share on other sites

Sweet, now I don't have to beg people to download another mod lol. Thanks man.

Share this post


Link to post
Share on other sites

wow, just wow.

I've been searching for the best mods to play the campaign with. I have for the moment settled with asr_ai, jsrs, tpw_ai_los and twp_ai_suppress and it is unbelievable the change this has made. all ai, my own team and the opfor seem natural and intelligent, and I suspect I have only just begun to work out how to actually use these mods properly! great congratulations, thank you for increasing my enjoyment of this great game. arma 2 really is quite limitless when configured properly.

On with my question, I am having problems prgressing in the campaigns because the AI is actually too good for me now :(

Does the difficulty settings in arma 2 have any effect on the game anymore, or is it solely the userconfigs? I am playing with veteran and aim set to 80% for both team and opfor. I want to have longer firefights, so should I change accuracy in game menu or userconfigs. If I want to reduce aim skill globally what would be the best way?

I also think it is too easy for the player to hit. Can anyone recomment a mod/setting that adds just a little more weapon sway/recoil even when rested/prone?

thanks again

Share this post


Link to post
Share on other sites

Glad you enjoy it :)

I recommend setting skill to about 70% for the enemy, or play at regular difficulty which you can customize to remove any map markers and hud stuff you don't want.

If that still seems too difficult, and firefights too short, try reducing the accuracy in the userconfig a little bit.

For the sway and recoil, I don't know any little mods, just ACE which has a bit more of both than vanilla (but also has the bipod feature).

Share this post


Link to post
Share on other sites

Aye, well we can't claim it is all asr_ai, as I have twp's two other ai mods running too, but they seem to work well together, just wish fights lasted long enough for the suppression to be a factor. I love ACE too, although it has quite a steep learning curve. The problem is it makes the campaign do strange things, so I can't use it for single player :(

Share this post


Link to post
Share on other sites

I keep getting a message every time I load up a mission that ASR_AI User Config is Outdated. Does this mean anything or should I just ignore it?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×