Jump to content

Recommended Posts

The commented (prepended by // or between /* and */) variable assignments also represent the default values.

Simply un-commenting them does not change anything.

If you want to change settings, un-comment and modify to new values.

Share this post


Link to post
Share on other sites

CHANGELOG

================

1.5 | 31 MAY 2011

AI spotting distance is reduced at night (and restored at day). Spotting distance coeficient can be

changed in userconfig (asr_ai_sys_aiskill_nightspotting = 0.5 default, which means half spotting

range at night). Setting this to 1 effectively disables this feature.

If you want a really quick and dirty way to determine whether it is day or night, simply use the selectBestPlaces command. One of the variables one can check for within this command's expression is night, so one can write a function like this:

/*
   Detect Night Function

   Author:
   Make Love Not War

   Description:
   Returns night or day time.
   Value of 1 indicates sun is below the horizon; values less than 1 indicate sun is above horizon.

   Know Issues:
   Does not differentiate between twilight and dusk (when there is still a lot of ambient light present) versus full night.

   Parameters:
   None 
*/

private ["_night"];

_night = selectBestPlaces [
  [0,0,0],        // sample position (can be any position in this case)
  1,            // radius
  "night",        // expression
  1,             // precision
  1            // sourcesCount
];
_night = (_night select 0) select 1;

_night

Actually, Carl Gustaffa's sun elevation function has one significant advantages over this one.

Namely, it allows us to detect dusk/twilight hours. We can very simply define this by checking for a relatively small negative sun angle (haven't tested this to any exactitude, but, for argument's sake, let's say sun angle < 0 and > -25 indicates twilight). We can then use this additional information to make finer and more accurate adjustments to the ai spotting abilities during these times, if we are so inclined.

Also, another thing we can check for (using either of these functions) is a low sun in the morning and evening hours and perhaps adjust AI spotting values when they are attempting to spot targets into the sun? Although this might be much more problematic as the setSkill command adjusts an AI's global skill. What we need is for the AI's spotting skill to be adjusted by a multiplication factor of, say, 0.8 (just throwing some numbers out there) when attempting to detect targets that are located in the direction of the rising or setting sun, but have the AI retain its base spotting skill (multiplication factor of 1) versus targets located at other angles. Hmm, now that I think about it some more, not sure if there is a good, practical solution to such a problem given the commands available within the SQF language. :/

Also, I'm thinking it should be possible to write a function that returns the moon position and phase, no? With this information we'd pretty much have all that we needed to determine the actual ambient light values at night which would allow for some even better adjustments to the AI night spotting skill. Or would we still be missing some critical piece of the puzzle?

Anyway, hope that these various musings might be of some service and/or food for thought.

Share this post


Link to post
Share on other sites
All features are enabled by default. You can leave the userconfig alone or you can go disabling/tweaking stuff.

Thanks

---------- Post added at 08:00 AM ---------- Previous post was at 07:57 AM ----------

Hi!

Aren´t the Features of ASR AI Skills disabled (commented) by Default in the Userconfig, Robalo?

I have made an interesting Discover. I have done a similar Test as aeggwards1 did.

I´ve put a BLUFOR and OPFOR Sniper on both Ends of the Runway. One as Player and the other Playable. No Init Commands used. First, i look with the Player Sniper through the Scope without shooting, so i can only see the other. Then i switch to the playable Sniper and do the same. Both start to Fire over long distance. The Problem seems to be that the Snipers from the Start only looking over their Rifle. Since they´re looked through their Scope and see the Enemy, the Firefight begins.

I found something similar with testing. If I leave the sniper in aware or combat without a waypoint he sees nothing until I am only a couple of hundred meters away but if I give him a waypoint 20 meters away he can see me over 700m away.

It looks like it is as Humvee28 says, they start even in combat mode looking over the rifle instead of through the scope. Whereas if you give them a waypoint and they need to move they bring the scope up as they move.

Share this post


Link to post
Share on other sites
If you want a really quick and dirty way to determine whether it is day or night, simply use the selectBestPlaces command. One of the variables one can check for within this command's expression is night, so one can write a function like this:

That's a clever solution, thanks for sharing it. I'm using Carl Gustaffa's sun angle function, simply checking for >0 for now.

Nice reading all the findings and suggestions, keep 'em coming, they'll be helpful.

Share this post


Link to post
Share on other sites

Hi,

For some reason, your new mod doesn't work for me. I use SLX/GL3 and my team won't rearm (even though the mod initialize correct on top right of the screen).

It's odd because when I use your previous mod the AI go for weapons no matter what.

Any idea ?

Share this post


Link to post
Share on other sites

Robalo_AS Thanks for mod I used it in missions in UNSUNG mod changed skill levels, to be at war on became much comfortable and is realistic, AI does not see the enemy and the player so is far as in the original game.I hope ,all it will turn out with in mod night function

Share this post


Link to post
Share on other sites
Hi,

For some reason, your new mod doesn't work for me. I use SLX/GL3 and my team won't rearm (even though the mod initialize correct on top right of the screen).

It's odd because when I use your previous mod the AI go for weapons no matter what.

Any idea ?

Can you verify it works without SLX/GL3 ? Please upload the .RPT somewhere and post a link, might figure out from it what's wrong.

Share this post


Link to post
Share on other sites

I tried without any mod yesterday. It doesn't work neither.

I really don't understand.

Cause I'm stubborn, I opened the pbo and played with the scripts, forced the triggers without any results.

But with Victor Farbau's version, it works. I'm not skilled enough to isolate why.

Share this post


Link to post
Share on other sites

@NikoTeen: are you running with @CBA as required ? Also see my previous post about RPT

Share this post


Link to post
Share on other sites

Yes I'm running lastest CBA (anyway it prompt me when I doesn't).

I will provide you my RPT soon, thanks.

Share this post


Link to post
Share on other sites

Robalo, ever considered a drop-in module for setting a unit's percentage chance of retreat based on unit type?

Share this post


Link to post
Share on other sites
Robalo, ever considered a drop-in module for setting a unit's percentage chance of retreat based on unit type?

Not really, but feel free to elaborate, share your ideas. Enhancing the existing BIS module I guess ?

Share this post


Link to post
Share on other sites

Updated in first post.

1.6 | 29 JUN 2011

- AI are better able to detect gunshots. Default distance is half the range defined for shooter's weapon sound range.

Coefficient can be set in userconfig. Sound mods have effect over this, but the range is verified on the machine where the hearing AI unit belongs (for example, most AI lives on the dedicated server in a coop game so it doesn't matter if a player has some wacky sound mod configs).

- Added configs to correctly assign skills to the CWR2 mod units.

- If using the ACE mod and when AI have weapons with both IR and flashlight, at night they will select IR if using NVG, otherwise switch to flashlight.

- Reduced default AI comms range (for target sharing between groups) from 700 to 500 meters (can be set in userconfig).

- Reduced AI dispersion coefficient (all units are slightly more accurate by default).

New userconfig entry:

	/* Gunshot hearing range coeficient (applied to shooter's weapon sound range)
Set to 0 to disable this feature */
//asr_ai_sys_aiskill_gunshothearing = 0.5;

Share this post


Link to post
Share on other sites
Hey Robalo, any update on that ACE group link ticket?

Nope. I'm not exactly sure what you're asking for there, at first I thought you wanted what I made here, perhaps you can add more details.

Share this post


Link to post
Share on other sites

Thanks for the update Rob - great to see this mod continue to be developed and refined.

Share this post


Link to post
Share on other sites

How do the modifications to accuracy and precision in this mod interact with the same settings in the player configuration? Are the effects cumulative, multiplicative, or does this mod override the configuration values?

Thanks. I always appreciate the time and effort of modders like yourself.

Share this post


Link to post
Share on other sites
How do the modifications to accuracy and precision in this mod interact with the same settings in the player configuration? Are the effects cumulative, multiplicative, or does this mod override the configuration values?

Yes I'm keen to understand this as well.

Also just to expand upon the question, does this mod override the skill settings set via the skill slider in the mission editor?

Share this post


Link to post
Share on other sites

Robalo_AS

We discovered last night that if a single player is armed with a Machine Gun (SAW, M240 etc) then he will always be engaged first by ASR AI. This is to the point where players can run around in front of the ASR AI and as long as the MG gunner is still up then they will not be engaged.

We will test this a mission other than using VTS in case that affected things (this was with version 1.5)

Still one hell of a fight running this mod, good work mate !

Share this post


Link to post
Share on other sites

@Foxhound: Thanks !

@Nick, Munger:

The difficulty skill settings still have effect, that's actually how you can do the fine-tuning to reach a good balance based on the mix of mods you're running.

For example, we're always running ACE + ASR_AI for our coop games at AlphaSquad and these are the settings that work great for difficulty on our servers:

		skillFriendly=0.75;
	skillEnemy=0.75;
	precisionFriendly=0.5;
	precisionEnemy=0.5;

About the skill slider, it still has some effect, although it's less because ASR_AI will take over the granular skills. Some of the skills are not covered by ASR_AI, at least not by default. See reference here - you can see which ones I'm setting by looking at the userconfig.

@Ugly: Officers and snipers are even more attractive targets :) Pretty sure it's not this mod changing that, that's rather default game's AI behaviour, they evaluate threat and cost config for each unit type and based on that decide in what order to engage. I'm actually considering leveling them, because often players do not stick with the weapon for their class, while they're still evaluated as higher threats because of the unit type config (stock BIS settings).

Edited by Robalo_AS

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

×