Insurgency: Sandstorm

Improved AI (v2.3.1c) for Insurgency: Sandstorm

Released (updated ago). Ranked 19 of 407 with 165,617 (423 today) downloads

Published by Circleus (mod ID: 93636)

improvedai.png

Note: This mod is for the server only, because its a mutator. Please do not subscribe to it on your client-side.

The goal of this mod is to improve the AI to make the coop has better experience and better gameplay.

You will be able to fully customize the configs and settings of this mod. We will see if we can change the AI and improve them like making them peek while they are behind the cover. They will know how to change their position and give themselves a better position to target the player. They will know when to use grenade at the right time and call for support and such.


Mutator Name:
- ImprovedAI


All configs will go in your game.ini and under the line [/ImprovedAI/Mutators/ImprovedAI.ImprovedAI_C]
You do not have to put all the configs. Only use the config you want to change the default value to something you want. The configs that aren't present in your game.ini file, it will be automatic use the default value below.




Configuring BotSkillCfg

The BotSkillCfg is originally part of the game but we weren't able to fully config it to the way we want it to be. With this mod, you will able to modify the config to the way you want without changing it in the theater. If you are not an advanced user then I suggest you look at other mod that changes bot skill config.
This BotSkillCfg will not work with any mod that changes the bot skill config in the theater file like Tactical Bots. If the theater file only changes player slot, class, weapon, or other stuff without changing the bot skill then it will work. This whole BotSkillCfg is made using blueprint nodes.

Regardless if BotSkillCfg gets override by other mod or not, other features like custom bot behavior and custom bot name in this mod will still work.


General

;Use BotSkillCfg from this mod instead of default from base game
;If you are using a mod that override BotSkillCfg, then this option is useless
bEnableBotSkillCfg=True


Hearing

;Distance from this sound that we confirm our target is an enemy
HearAwareDistanceRadial=3000.0
HearAwareDistanceGunshot=5000.0
HearAwareDistanceSprintFootstep=2000.0

;Distance from this sound that we can hear the target
HearDistanceFootstepsSprinting=3500.0
HearDistanceFootstepsRunning=2000.0


Vision

SightRangeAlert=20000.0
SightRangeIdle=5000.0
SightRangeWithinSmokeGrenade=1500.0
SightRangeWithinSmokeGrenadeEye=250.0
SightRangeSmokeEyeFrac=0.8


Reactions

TurnSpeedMaxAngleThreshold=90.0
TurnSpeedMinAngleThreshold=5.0

;Speed this AI turns at
TurnSpeedMaxAngle=30.0
TurnSpeedMinAngle=60.0

;Time before we start attacking at close targets
AttackDelayClose=0.2

;Time before we start attacking at distant targets
AttackDelayDistant=0.8

;Range we consider to be maximum distance for spot checks
DistanceRange=15000.0

;Range we consider to be close range for spot checks
CloseRange=500.0

;Multiplier applied to spotting chance
ChanceSprintMultiplier=2.0
ChangeMovingMultiplier=1.25


Accuracy

;The higher, the more accurate. 1.0 is easy, 4.0 is hard
AccuracyMultiplier=1.25

;Multiply our spread by this much when fully suppressed
SuppressionAccuracyMultiplier=0.1



;Change weapon type config for bot like changing the accuracy for that weapon and such

;List of weapon types
;Launcher
;MarksmanRifle
;BoltRifle
;Shotgun
;LightMachineGun
;HeavyMachineGun
;SubmachineGun
;AssaultRifle
;Carbine
;Pistol

;Weapon configs type
;MaxDistance (Distance we can shoot at, otherwise we try to get closer)
;MinAttackDegrees (Start attacking when our aim on the target by this much)
;MinAttackDegreesClose
;MaxAttackDegrees (Stop attacking when our aim off the target by this much)
;ProjectileSpreadZeroTimeFar (How fast we zero in on the target when target is far)
;ProjectileSpreadZeroTimeClose (How fast we zero in on the target when target is close)
;BloatBoxMin (Our bloat box after zeroing) (Require X and Y)
;BloatBoxMax (Our bloat box at first sight) (Require X and Y)

WeaponCategoryConfigs=((Launcher, (MinAttackDegrees=1.000000, MaxAttackDegrees=2.000000, ProjectileSpreadZeroTimeFar=0.000000, ProjectileSpreadZeroTimeClose=0.000000, BloatBoxMax=(X=200.000000,Y=100.000000))), (MarksmanRifle, (MinAttackDegreesClose=10.000000, ProjectileSpreadZeroTimeFar=8.000000, BloatBoxMin=(X=50.000000,Y=50.000000), BloatBoxMax=(X=150.000000,Y=100.000000))), (BoltRifle, (MinAttackDegreesClose=10.000000, MaxAttackDegrees=0.500000, BloatBoxMin=(X=25.000000,Y=25.000000), BloatBoxMax=(X=150.000000,Y=80.000000))), (Shotgun, (MinAttackDegrees=1.000000, MaxAttackDegrees=2.000000, ProjectileSpreadZeroTimeFar=5.000000, ProjectileSpreadZeroTimeClose=2.500000, BloatBoxMin=(X=75.000000,Y=75.000000), BloatBoxMax=(X=150.000000,Y=150.000000))), (LightMachineGun, (MinAttackDegrees=2.000000, MaxAttackDegrees=3.000000, ProjectileSpreadZeroTimeFar=8.000000, BloatBoxMin=(X=75.000000,Y=75.000000), BloatBoxMax=(X=150.000000,Y=150.000000))), (HeavyMachineGun, (MinAttackDegrees=2.000000, MaxAttackDegrees=3.000000, BloatBoxMin=(X=75.000000,Y=75.000000), BloatBoxMax=(X=200.000000,Y=150.000000))), (SubmachineGun, (MinAttackDegrees=1.000000, MaxAttackDegrees=2.000000, ProjectileSpreadZeroTimeFar=5.000000, ProjectileSpreadZeroTimeClose=1.500000, BloatBoxMin=(X=25.000000,Y=25.000000), BloatBoxMax=(X=100.000000,Y=75.000000))))

;The default config for all weapons that isn't in WeaponCategoryConfigs
DefaultCategoryConfig=(MaxDistance=30000.000000, MinAttackDegrees=1.000000, MinAttackDegreesClose=20.000000, MaxAttackDegrees=2.000000, ProjectileSpreadZeroTimeFar=4.000000, ProjectileSpreadZeroTimeClose=1.500000, BloatBoxMin=(X=25.000000,Y=25.000000), BloatBoxMax=(X=175.000000,Y=100.000000))


Reactions for specific stance (Standing, Crouched, and Prone)

;Chance of spotting in percentage
ChanceAtDistanceStanding=5.0
ChanceAtCloseRangeStanding=100.0

ChanceAtDistanceCrounched=2.0
ChanceAtCloseRangeCrouched=50.0

ChanceAtDistanceProne=0.0
ChangeAtCloseRangeProne=20.0


Behaviors

;Changing the bot behaviour. Allowing them what kind of behaviour they can be use in game
;Make sure you include the class, the path, and don't miss a single quotation
ValidBehaviors=(Class'"/Script/Insurgency.BotBehavior_FollowSquadLeader"',Class'"/Script/Insurgency.BotBehavior_MoveToObjective"',Class'"/Script/Insurgency.BotBehavior_Wander"',Class'"/Script/Insurgency.BotBehavior_ThrowBackGrenade"',Class'"/Script/Insurgency.BotBehavior_AttackRanged"',Class'"/Script/Insurgency.BotBehavior_ThrowGrenade"',Class'"/Script/Insurgency.BotBehavior_ThrowSmokeGrenade"',Class'"/Script/Insurgency.BotBehavior_ThrowGrenadeAtWindows"',Class'"/Script/Insurgency.BotBehavior_FireRocket"',Class'"/Script/Insurgency.BotBehavior_FlushTarget"',Class'"/Script/Insurgency.BotBehavior_SuppressTarget"',Class'"/Script/Insurgency.BotBehavior_FleeGrenade"',Class'"/Script/Insurgency.BotBehavior_AttackMelee"',Class'"/Script/Insurgency.BotBehavior_Retreat"',Class'"/Script/Insurgency.BotBehavior_RequestFireSupport"',Class'"/Script/Insurgency.BotBehavior_Ambush"',Class'"/Script/Insurgency.BotBehavior_Pursue"',Class'"/Script/Insurgency.BotBehavior_Investigate"',Class'"/Script/Insurgency.BotBehavior_Vehicle"',Class'"/Script/Insurgency.BotBehavior_MoveToSeat"',Class'"/Script/Insurgency.BotBehavior_DestroyObjective"',Class'"/Script/Insurgency.BotBehavior_UseSmartActor"')

;List of behaviours
;BotBehavior_FollowSquadLeader
;BotBehavior_MoveToObjective
;BotBehavior_Wander
;BotBehavior_ThrowBackGrenade
;BotBehavior_AttackRanged
;BotBehavior_ThrowGrenade
;BotBehavior_ThrowSmokeGrenade
;BotBehavior_ThrowGrenadeAtWindows
;BotBehavior_FireRocket
;BotBehavior_FlushTarget
;BotBehavior_SuppressTarget
;BotBehavior_FleeGrenade
;BotBehavior_AttackMelee
;BotBehavior_Retreat
;BotBehavior_RequestFireSupport
;BotBehavior_Ambush
;BotBehavior_Pursue
;BotBehavior_Investigate
;BotBehavior_Vehicle
;BotBehavior_MoveToSeat
;BotBehavior_DestroyObjective
;BotBehavior_UseSmartActor
;BotBehavior_Blink


Behavior (Misc)

;Distance from our enemy we need to be to door breach
DoorBreachAwareDistance=3000.0


Grenades

;When throwing a grenade, try to give this much time before it detonates after impact (so bots don't throw aiburst grenades)
FragGrenadeMinDetonateTime=1.5

;Only throw grenades at unreachable targets (used in Frenzy)
bOnlyGrenadeUnreachable=False

;Grenade Inaccuracy Max Distance
GrenadeInaccuracyMaxDistance=1500.0

;Only throw grenades once every N seconds per squad
SquadGrenadeCooldown=45.0

;X and Y location where the grenade will land around that area. If X=1.0 and Y=1.0 then grenade will be really accurate.
GrenadeInaccuracyMax=(X=225.0,Y=175.0)


Difficulty

ZeroTimeMultiplierEasy=1.25
ZeroTimeMultiplierHard=0.5
BloatBoxMultiplierEasy=1.25
BloatBoxMultiplierHard=0.5
BloatBoxMultiplierDistance=2.0
BloatBoxMultiplierMaxDistance=10000.0
BloatBoxMultiplierMinDistance=2000.0


Misc

bBotIgnoresDamage=False
bBotHasInfiniteAmmo=False
bBotUsesVehicles=True


Cover

;If we are in cover and have > this suppression, get lower (While firing at a target)
CoverSuppressionToCowerCombat=0.1

;If we are in cover and have > this suppression, get lower
CoverSuppressionToCower=0.0

;If we are in cover and have <= this suppression, stand back up
CoverSuppressionToRecover=0.0

;Minimum time we should stay in cover after cowering to avoid flip flopping
CoverCowerMinTime=2.5


Ambush

;Apply ambush bonuses when our target is within this distance
AmbushBonusDistance=2000.0

;The higher this is, the faster bots react to targets when ambushing
AmbushReactionTimeMultiplier=2.2

;The higher this is, the more accurate bots are when ambushing
AmbushAccuracyMultiplier=1.6

;The higher this is, the faster bots turn when ambushing
AmbushTurnSpeedMultiplier=1.8


Morale

;Time fully restore morale when shattered
MoraleRestoreTime=10.0

;Morale lost when a nearby teammate is headshot
MoraleLostOnHeadShot=50.0

;Morale lost when a nearby teammate is killed
MoraleLostOnDeath=15.0

;Morale lost when a nearby teammate is killed in a gruesome way (burning, chemicals etc.)
MoraleLostOnGruesomeDeath=35.0

;Morale < than this means the bot will start to retreat
MoraleToRetreat=10.0

;Morale > than this means the bot can fight again after retreating
MoraleToRecover=90.0




Custom Bot Behavior Configs

These are custom bot behavior I made using the blueprints that we have. It can change how bot behaves. It still needs more work and testing. If you do not wish to use these, you can disable them. These bot behaviors will not change BotSkillCfg. It just another behavior on top of it.

Aim at Closest Target

;Amount of second delay before finding another closest target
AimDelay=0.5

;Enable bot to aim at the closest target base on the distance
bForceAimAtClosestTarget=True

;Line of sight check for bot (Disabling this will just make bot target the closest target without LOS)
bLOS=True

;Aim at target base on the priority type
;Example for Sprint, it will only aim at the target if they are sprinting and the rest that are on top of Sprint (Idle, Interesting, LastSeenThreat, and Footsteps)
AimPriority=Forced

;List of Priority Type
;Idle
;Interesting
;LastSeenThreat
;Footsteps
;Sprint
;Gunshot
;Enemy
;Forced

Note: Aiming at the target doesn't mean they will shoot at them. BotSkillCfg will before the one trigger the weapon fire and the accuracy or you can use the Force Firing behavior I made.


Find Cover

;Enable to force bot to find the closest area to cover
bFindCover=True

;Amount of X seconds before looking for new cover
;Having least seconds will make bot keep trying to moving from cover to cover instead of shooting their target
CoverTick=5.0

;Also find cover right away when bot is taking damage but didn't die yet
bFindCoverWhenShotAt=True

;Bot will only stay in cover when bot's morale is less than or equal to this value after getting a new cover
;No morale at all = 0.0 Thats when bot is taking a lot of damage and teammate is dying a lot
;Max morale = 100.0
CoverMoraleValue=20.0

Note: This cover behavior is just to force the bot to find a new hiding area. The base game cover will still apply to this. BotSkillCfg cover will be the one changing the bot stance like prone. Using this behavior will make the game longer because bot tends to stay in cover more.


Misc

;Strafing is from UE4
;It allow the bot to run and slide and shoot at the same time
;This is disabled by default. Enable it will make game pace faster and the bot will run and gun at you more often
bStrafe=True


Force Firing

;Force bot to fire at player
;Require bLOS and from bForceAimAtClosestTarget from Aim at closest target config
bForceFiring=True

;Chance to trigger when bForceFiring is enabled, every X second base on AimDelay
;Default 10%
FiringChance=0.1

Note: Force Firing is base on Aim at Closest Target. It will only fire if the closest target is found. If that feature is disabled then this force firing will not work.



Custom Bot Names

This feature will work regardless if you are using another mod that is replacing the BotSkillCfg or not. This is made using blueprints/nodes.
All bot names are randomly picked and you have to set them in BotNameList. If bot amount exceeds the bot name list then bot name won't be changed.
The bot names will be automatic updates with new bot joins or leaves. If a bot is using a player name and that player left the game. That bot name will be replaced.
Remember if you have a duplicated bot name on the list, it will only appear once.


;Enable the custom bot names feature
;If you don't like custom bot names and you want to use other feature from the mutator then you can disable this
bCustomBotNames=True

;Enable prefix tag for the bot name
bUseBotTag=False

;The prefix tag to display for bot
;Give your own space if you want a space between bot tag and bot name
BotPrefixTag=[BOT] 

;Bot also use player name and add it to the bot name list only if the player is present in game
bUsePlayerName=True

;List of bot names
BotNameList=Mikee,Arc,DaraDef,AniCator,Guinevere,sswires,Circleus,John Doe,Jeroen,fatherHank





If something isn't working, please report it so I can fix it. All feedbacks are welcome!

If you like my mod and you want to support me, you can make a donation in my profile.

Releases

FilenameSizeVersionAddedOptions
filedata.22.zip15.85kb2.3.1c

filedata.21.zip15.91kb2.3.1b

filedata.20.zip15.88kb2.3.1a

filedata.19.zip2.82kb2.3.1

filedata.18.zip15.86kb2.3.0

filedata.17.zip15.86kb2.2.3

filedata.16.zip1.43mb2.2.2

filedata.15.zip1.43mb2.2.1c

filedata.14.zip1.42mb2.2.1b

filedata.13.zip1.42mb2.2.1a

filedata.12.zip1.42mb2.2.1

filedata.11.zip1.42mb2.2.0

filedata.10.zip1.42mb2.1.0a

filedata.9.zip1.42mb2.1.0

filedata.8.zip1.42mb2.0.2b

filedata.7.zip1.22mb2.0.2a

filedata.4.zip1.22mb2.0.2

filedata.3.zip1.15mb2.0.1a

filedata.1.zip1.15mb2.0.1

filedata.2.zip1.15mb2.0.0a

filedata.zip1.14mb2.0.0

filedata.6.zip1.01mb1.0.4

filedata.5.zip1.01mb1.0.3d

127 comments

Join the community or sign in with your gaming account to join the conversation:

GE
germanc4 @germanc4

how do you set the Difficulty, by adding all these commands to game.ini and just changing the values?
ZeroTimeMultiplierEasy=1.25
ZeroTimeMultiplierHard=0.5
BloatBoxMultiplierEasy=1.25
BloatBoxMultiplierHard=0.5
BloatBoxMultiplierDistance=2.0
BloatBoxMultiplierMaxDistance=10000.0
BloatBoxMultiplierMinDistance=2000.0
higher value means more difficult? sorry for the ignorance

Circleus
Circleus @circleus

Each value in there is something else. The zero time is the amount of time to zero in the target. By multiplying the zero time will increase the amount of time to zero in the target. If you don't know what is zeroing then should google up what is scope zeroing.

The bloatbox is basically like strike zone for baseball. The bot will only shoot everything in that box. The bigger the bloat box is the bigger the area that the bot has to shoot. The bot will shoot randomly in that area. It is not a guarantee that the bot will be 100% hit on the target. The smaller the bloatbox is the less random area they have to shoot, which will also increase their accuracy since the hit area is smaller. However, if the bloatbox too small, the bot will have a problem trying to recognize the target. The target has to be within the bloatbox in order for the bot to recognize them and shoot them.

If you are talking about the bot difficulty then it has nothing to do with this mod. There is AIDifficulty config from the base game.

GE
germanc4 @germanc4

thanks for the reply. what im trying to do is change values so that bots dont kill you the second they spot you from a mile away, so i will play with these options and see if i can change that. thanks again for the explanation.

Circleus
Circleus @circleus

You should disable bForceAimAtClosestTarget. That is just a custom behavior I made to snap aim at anyone that is closer. You should also mess around with the default AIDifficulty from the base game. Don't forget to take a look at the vision section configuration too.

[BG]Nomy61
[BG]Nomy61 @bgnomy61

When I use this mod my server does not start up any ideas guys ??

Circleus
Circleus @circleus

Delete your mod folder on the server and have them redownload them

[BG]Nomy61
[BG]Nomy61 @bgnomy61

will u b updating this to 1.71 Circleus ?

Rover_Redback_Admin
Rover_Redback_Admin @rover-redback-admin

New file size is correct, old files were bloated from old versions... as many will know, for now, unsubscribe to all mods, and maps, this should get mads, and custom maps working, until NWI pulls there finger out, and comes up with a solution.

Facknrite
Facknrite @facknrite

Circleus, bot names not working anymore. They worked once after the update and not working anymore.

Facknrite
Facknrite @facknrite

I see the file size went from 1.43mb to 15.86kb, something broke on the mod tools

Brengun
Brengun @brengun

It seems as though NWI have made it so the bots don't interact with the environment correctly now.
Example is Ministry as Security, you hear bots shooting from areas where they can't see you and they keep firing at walls where you are on nowhere near them. Seems to be based on the bot thinking it can see you.

Noticed it especially in the 1st objective and 3rd objective on that map.

I will guess there will be other maps with the same issue.
NWI have really stuffed this update up. Seems to be a backwards step.

(ALP)Krod
(ALP)Krod @alpkrod

Hi Mr. @Circleus. The new version 1.7.1 broke your mod (and all others) as you can see in known issues "Backwards compatibility of mods has been broken and mods need to be recooked", could you rebuild this mod? We use it in our custom server. Thx.

Ref: Store.steampowered.com

SnazzLAN
SnazzLAN @snazz1586875538

Does this improve the Frenzy AI as well?

JustDoItSH
JustDoItSH @justdoitsh

Is there a parameter that allows the AI to always shoot without reloading ammunition?

Circleus
Circleus @circleus

Not sure but you can try to give them infinite ammo in the BotSkillCfg misc section.

JustDoItSH
JustDoItSH @justdoitsh

Are there parameters to adjust the AI ​​weapon selection?

Circleus
Circleus @circleus

The weapon they use is random but you can give them specific weapon by creating ur own theater mod. Then you set the weapon they are going to use base on the specific class.

JustDoItSH
JustDoItSH @justdoitsh

Okay thank you

ParrotFace[Majmar]
ParrotFace[Majmar] @parrotfacemajmar

Which setting leave the bots blind to flashlights in the night? They see just not flash lights. Walk right next to them shining that sucker in their peepers.

Circleus
Circleus @circleus

There is no option for that. I might able to make it though when I have time.

-Zhourias-
-Zhourias- @zhourias

Did the mod alter the bots sight, they seem to be spotting players like they would on day maps in night maps. They also seem to see through walls every now and again

Circleus
Circleus @circleus

If you are using my custom bot behavior then they will spot u 360 degrees and regardless of the distance. You can disable that in the configs and just use the base game BotSkillCfg.

If you already disabled my custom bot behaviors and you are using the BotSkillCfg, then you probably have to mess around with the BotSkillCfg settings more. If you did that and bot is still doing it then I can't really help you. That probably part of the game.

-Zhourias-
-Zhourias- @zhourias

if i removed your sight/hearing overrides and used the base games ai perception components would would that override your mod? or is it going to use base values from your mod?

Circleus
Circleus @circleus

Anything in the BotSkillCfg is base game. If you talking about the UE4 ai perception, I don't think NWI uses them.
Whatever you change, the BotSkillCfg will always run because all AI in sandstorm use it and its part of the base game.

-Zhourias-
-Zhourias- @zhourias

When using the ai perception settings on my server i was able to find that limiting their field of view worked. Just wanted to know if your settings completely override the perception settings but if its all base game it should work? Ill get back to you after some further testing

Circleus
Circleus @circleus

I'm not sure about the AI perception settings from UE4 but BotSkillCfg is part of the base game. You have to know the difference between the base game and the UE4 core. If they use the AI perception settings from UE4 then you can configure the AI perception but it will not remove the BotSkillCfg at all. It will just be an extra setting that runs along with BotSkillCfg. Sandstorm has its own AI system and BotSkillCfg is part of it. You cannot remove the BotSkillCfg. Regardless if you use it not, it will still run the default value without this mod. It just this mod just lets you customize your configuration for BotSkillCfg from the base game in the game.ini file instead of relying on someone BotSkillCfg in their theater mod.