Jump to content
brightcandle

CF_BAI - Dynamic AI skill adjustment for better balancing

Recommended Posts

2 hours ago, ampersand38 said:

Should I be able to see changes in an AI's subskills as his surroundings change? Is this a good way to verify that the mod is working correctly?

 

 

 Put this in your debug - it will reveal anyone you point at's skill values

 

player addAction
[
    "Show skills",
    {
        hintsilent format
        [
            "aimingAccuracy %1\n  aimingShake %2\n  aimingSpeed %3\n  spotDistance %4\n  spotTime %5\n  courage %6\n  reloadSpeed %7\n  commanding %8\n  general %9\n",
            cursortarget skillfinal "aimingAccuracy",
            cursortarget skillfinal "aimingShake",
            cursortarget skillfinal "aimingSpeed",
            cursortarget skillfinal "spotDistance",
            cursortarget skillfinal "spotTime",
            cursortarget skillfinal "courage",
            cursortarget skillfinal "reloadSpeed",
            cursortarget skillfinal "commanding",
            cursortarget skillfinal "general"
        ];
    }
];

  • Like 1

Share this post


Link to post
Share on other sites
On 2/22/2019 at 3:50 PM, brightcandle said:

 

Everything is a visionTest, where a visiontest is 2 numbers, the first is the probability (0-1) that the unit will see and the second is how much knowledge they would gain if they did see it (also 0-1 mapped to 0-4 for reveal/knowsAbout purposes).

 

For the environment, the tests are dayNight, rain and fog.

For the player, it is stance, movement and foilage

For the AI, it is awareness, binoculars, optics, nightvision and spotTime

For an AI looking to a player it is existingKnowledge, facing, distance and a ray cast

 

Given that TPWCAS_A3 hasn't been updated for almost 2 years and ASR AI3 for 6 months (whereas BIS have released major major patches for A3), does your clan still use CF_BAI alongside these 2 mods in your regular coop games?

Share this post


Link to post
Share on other sites
On 3/18/2019 at 9:00 AM, domokun said:

Given that TPWCAS_A3 hasn't been updated for almost 2 years and ASR AI3 for 6 months (whereas BIS have released major major patches for A3), does your clan still use CF_BAI alongside these 2 mods in your regular coop games?

 

We replaced TPWCAS_A3 when it broke with 1.88 with the new suppression behavior in CF_BAI 2.0.alpha1. We were never really happy with it because the behaviour changes it contained interfered with ASR_AI and MCC and were very predictable. The suppression system we have made is worse fidelity and shorter range and just overall less complex but also doesn't have the behaviour impact and that does make combat a lot more dynamic. We still use ASR_AI, we did test VCOM AI recently (and I test CF_BAI with it) but it has a mix of micro and macro AI concerns and that clashes with other things where we do it better. Our AI mix is a combination of mods. We run a customized version of MCC with a lot of GAIA enhancements which does our Macro AI, CF_BAI,  ASR_AI, CF_weapons changes a lot of the balance and then CF_woodland impacts the AI as well.

  • Thanks 1

Share this post


Link to post
Share on other sites
20 hours ago, brightcandle said:

 

We replaced TPWCAS_A3 when it broke with 1.88 with the new suppression behavior in CF_BAI 2.0.alpha1. We were never really happy with it because the behaviour changes it contained interfered with ASR_AI and MCC and were very predictable. The suppression system we have made is worse fidelity and shorter range and just overall less complex but also doesn't have the behaviour impact and that does make combat a lot more dynamic. We still use ASR_AI, we did test VCOM AI recently (and I test CF_BAI with it) but it has a mix of micro and macro AI concerns and that clashes with other things where we do it better. Our AI mix is a combination of mods. We run a customized version of MCC with a lot of GAIA enhancements which does our Macro AI, CF_BAI,  ASR_AI, CF_weapons changes a lot of the balance and then CF_woodland impacts the AI as well.

Thanks for such a detailed and candid response.

Our clan dropped TPWCAS a while back and even ASR_AI after it broke the design of a few missions but we're really enjoying CF_BAI and CF_woodland.

BTW what's CF_weapons? I looked on your website and SWS page but found no mention of it.

 

Share this post


Link to post
Share on other sites
1 hour ago, domokun said:

Thanks for such a detailed and candid response.

Our clan dropped TPWCAS a while back and even ASR_AI after it broke the design of a few missions but we're really enjoying CF_BAI and CF_woodland.

BTW what's CF_weapons? I looked on your website and SWS page but found no mention of it.

 

1

 

I am glad the mods are proving useful. I am trying to get some new toys out as soon in CF_BAI as we have 3 major steps to take it out of alpha. Unfortunately other issues (including the 1.90 mess and the doMove bugs) are getting in the way!

 

We haven't published cf_weapons. I am not sure anyone else would want it. Our group focuses the game towards realistic weapon ranges, so M4's are being used at 300-400m and not 600+. Due to the way vision works in the game we end up using mostly red dots. So we end up changing a lot of firing modes to ensure all the weapons have real-world ranges/comparable ranges to a human. Amongst all that we also change a bunch of other stuff like flare lighting and adjusted dispersion values to balance weapons against each other and the appropriate ranges. It depends on ASR_AI so that it can override settings, so it has a bunch of issues with being released since it contains a real mix of stuff and is how we tweak our balance beyond just the skills. Not sure it has much value outside of our group.

  • Like 1

Share this post


Link to post
Share on other sites

When using VCOM do you disable CF_BAI suppression?
I know VCOM has a suppression function and I've noticed AI not being able to hit each other from 10m away, I assume this is the 2 mods suppression just killing the AI accuracy?

Share this post


Link to post
Share on other sites
On 3/31/2019 at 6:31 AM, JD Wang said:

When using VCOM do you disable CF_BAI suppression?
I know VCOM has a suppression function and I've noticed AI not being able to hit each other from 10m away, I assume this is the 2 mods suppression just killing the AI accuracy?

 

Sorry for the late reply, I missed your message somehow.

 

When I looked into this last I found VCOM retrieved the suppression value and did things based on it but it didn't set or adjust skills based on it. So you may just find that the effect from CF_BAI is too harse for your liking and you can just tone down the impact in the settings. The default is very aggressive at 20% and it makes the AI pretty gimped. Try 50% or higher.

  • Thanks 1

Share this post


Link to post
Share on other sites

Released v2.0.0.alpha2

Fixed a bug caused by the latest game release that nerfed the suppression effect.

Fixed a bug in the suppression decay which made it too rapid.

Added the boost module (see the website for details)

 

  • Like 1

Share this post


Link to post
Share on other sites

Many thanks for this mod, my unit appreciates and enjoys what it has to offer.

We're trying to work something out and we're not sure if its either with VCOM or CF_BAI (using both) - latest script version of VCOM and CF_BAI mod.

The issue:  we're getting bumped - on a number of stealth recce's, at night, we've experienced units coming straight for us, like they know exactly were we are... despite it being night and the opfor not having night vision capabilities and in most cases, being tactically aware, using concealment, low profile, etc,. we thought it was perhaps drones that might be spooking the ai and they essentially come looking for us - but we tested last night and that doesn't seem to be the case.

 Here's, albeit, a not great quality vid - how did I get spotted/detected ??? The only dodgy bit is when I crossed the road...but when I crossed and lay prone in a bush, the opfor come for me - I don't think I was in line of sight of any opfor (unless I missed something) - you can where the patrols are from Zeus. I've posted this on the vcom forum as well.  But what you see in this vid, is fairly typical of what we experience at night - we could be on the edge of a jungle or something, keeping a low profile, walking, etc. and then bang! A patrol seems to come straight for us.

Any ideas? Do you expect this is cf_bai related ?  Do you or anyone else experience this ?

Many thanks. 

 

Share this post


Link to post
Share on other sites

Looks like a pretty slick mod. Looking forward to trying it out one day.

Share this post


Link to post
Share on other sites

New release today for 2.0.0.alpha3.

 

Changelog

+ Added getters for suppression, boost and woodland reduction so a nice 0-1 can be returned for how impacted the unit is. See the github for the syntax (or check in the functions listing for CF_BAI).

Share this post


Link to post
Share on other sites

When looking at the settings available in game for CF_BAI Detect, there are two values available for each state.

E.g. Player Visibility - Standing Chance AND Player Visibility - Standing Knowledge

 

Presumably the first of these is how much the player's stance (standing in this case) affects the likelihood of being spotted.

But what does the second value do and how does it affect game play?

 

Many thanks

Share this post


Link to post
Share on other sites
On 10/5/2019 at 11:36 AM, Steve 161st said:

When looking at the settings available in game for CF_BAI Detect, there are two values available for each state.

E.g. Player Visibility - Standing Chance AND Player Visibility - Standing Knowledge 

 

Presumably the first of these is how much the player's stance (standing in this case) affects the likelihood of being spotted.

But what does the second value do and how does it affect game play?

 

Many thanks

The way the mod works is every test brings back a pair of values both of which are between 0 and 1. The first of which is the chance on this test that the unit will spot. So if a test is 10% then 1 out of 10 times the routine runs the unit will be spotted. The second number is the percentage of knowledge that unit would gain. So if the unit was very far away perhaps you can't tell what gear they are wearing or what side they are on so its only 10%. This relates to the knowsAbout command in the game which you can read about in the wiki but basically the AI has a scale of knowledge when it does spot you and this is translated into that. All the different tests deal with those values independently, so some of them the test wouldn't impact knowledge and for others it would. I hope that explains what a vision test is and why the settings tend to come in pairs of chance and knowledge.

  • Like 1

Share this post


Link to post
Share on other sites

I have released 2.0.0alpha4

This includes two changes:

The players situation is now taken into account for the woodland checks, so now the AI or player being in the open will impact the skills improving those edge cases.

 

Added an overall modifier for vision in the detect module so the final probability of being spotted can be tweaked upwards and downwards independent of the individual tests. Finished adding all the parameters so now everything in the detect module can be tweak, AI, player, environment and ai to player.

  • Like 7

Share this post


Link to post
Share on other sites

i downloaded alpha 4 on github but it says alpha 2

*name = "CF_BAI [v2.0.0.alpha2]";
author = "BrightCandle";
actionName = "Website";
action = "http://www.charliefoxtrotops.com";*
 

Share this post


Link to post
Share on other sites

Thanks a lot for this mod, really like it, especially with the recdent update. 

One request if possible, would it be possible to be able to turn off logs which are spamming our server and impacting performance please?

 

 [CF_BAI] (detect) LOG: Vision tests: [[0,0,"distance"]]
 [CF_BAI] (detect) LOG: Original probability 0 adjust probability 0

 

Even just a line of code, we can run manually or something. 

thanks

  • Like 1

Share this post


Link to post
Share on other sites

One thing we've noticed in multi player (and I suspect is also there in single player) is an error which I suspect is relating to the AI spotting.

Here's an extract from the .rpt log:
18:55:21 [CF_BAI] (detect) LOG: Vision tests: [[0,0,"aiFacing"]]

18:55:21 [CF_BAI] (detect) LOG: Original probability 0 adjust probability 0

18:55:21 Error in expression <x select 0; _probability = _probability * _testProb; } forEach _visionTests; pr>

18:55:21 Error position: <* _testProb; } forEach _visionTests; pr>

18:55:21 Error *: Type String, expected Number,Not a Number

18:55:21 File x\CF_BAI\addons\detect\fnc_determineKnowsAbout.sqf..., line 10

18:55:21 [CF_BAI] (detect) LOG: Vision tests: [[0.062381,0.062381,"distance"],[0.223383,0.223383,"aiFacing"],[1,1,"raycast"],[0.5,1,"stance"],[0.5,1,"playerMovement"],[1,1,"playerFoliage"],["CF_BAI_detect_aivision_safe_chance",1,"awareness"],[0.75,0.75,"bino"],[0.5,0.5,"optics"],[0.25,0.25,"nightVision"],[0.44,1,"spotTime"],[0.5,0.5,"dayNight"],[1,1,"rain"],[1,1,"fog"]]

 

Over the course of the evening, the server log gets quite large with repeats of this error. 

 

One other really nasty side effect (other than the large .rpt file,) is that once this error has occurred ACE3 Scopes no longer has any effect. So although the sight barrels still adjust in clicks, the scope always behaves as if it has zero elevation and windage adjustment.

 

We turned the Detection module off on our server this evening and have not had a repeat of the ACE3 Scopes breaking so are fairly convinced this error somehow causes it.

Actually, the only way to stop this error is to remove CF-BAI completely. Disabling the detection module did not fix it.

I will do more testing to see if it is conflicting with other mods or whether just ACE3, CBA and CF_BAI result in this error

Share this post


Link to post
Share on other sites

OK - apologies..... the error statements are not linked to breaking ACE3 scopes. That was part of our own code that happened to run at very similar times to the CF_BAI events.

The errors do stop us from running the detect module though (which is a shame as the concept of it is awesome) due to hideous spamming of the server .rpt file.

Share this post


Link to post
Share on other sites

Hello Mr brightcandle, I was wondering if you discontinued the CF_BAI mod ? 
It was a great mod, but I see it's not available on steam and on your Github.

 

Is there anything we can do to help you bring back the mod ? 

 

Kind regards,

 

Loitho

  • Like 1
  • Sad 2

Share this post


Link to post
Share on other sites
On 5/6/2021 at 7:55 PM, Arwyn said:

If anyone is looking for sources, veteran29 made a fork https://github.com/veteran29/cf_bai

Cheers for this.
I was hoping it was just a temporary glitch on steam's side.

Share this post


Link to post
Share on other sites

Shame to see this go, any reason for it? As it vastly improved our games. 

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

×