Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to Xbox Chaos: Modding Evolved

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0
ReteroX

Modding
AI Minimum Combat Distance

5 posts in this topic

Hey people!

I'm sure I'm missing something, but I've been playing around with AI behaviours (char) and I can't find a way to make certain enemies like Elites or Grunts keep their damn distance.

In one of my mods I have made the AI far more capable at ranged combat, but they keep walking into melee range, becoming easy kills.

What I want is to define a minimum range at which point they will back off and continue ranged combat.

I hope someone has figured this out, it's really bugging me because I feel like it should just be a single variable.

Share this post


Link to post
Share on other sites

It sounds like you have already gotten into some of these values, so I apologize if I'm going over stuff you already know, but mainly I'd suggest:

  • start with the char tag "ai/generic", as most AI inherits behaviors from there
  • within AI/generic, check the weapon properties for every weapon that the AI in question commonly uses (i.e. for grunts: PP/Needler)
  • increase the "Normal Combat Range min" value to the distance you want the AI to try staying away
  • 1 Halo unit is 2 meters, so 7.5u = 15m / 49ft / the radius of your radar, in theory this should be more than enough
  • increase the "Normal Combat Range max" to at least 50u (I use 150+), so the AI will start trying to kill you well before reaching their minimum distance
  • for some enemies (i.e. Grunt Ultra, base Jackals) you will have to repeat these changes in their own char tag, because they have their own weapon properties which override the generic

At least for campaign maps, I have found the changes above to be pretty effective. I have the Normal Combat Range max set to 300+ meters, so on outdoor maps, they mostly hang back and shoot from afar.

For Firefight, the AI's entire directive is to hunt you down, so it's harder to make them keep their distance. The changes above will help, but ultimately they will almost always try to close in for the kill at some point. Indoor campaign maps also tend to increase the number of situations where the AI won't see or shoot at you till it's already close range. Plus, many enemies can't actually run fast enough to stay away if the player is rushing them full bore.

For all these reasons, part of the key to creating more ranged combat with the AI is (counter-intuitively) to make sure they lay down enough fire at close range to deter the player from staying close.

  • The AI often try to fire the needler and PR in single shots at a rate comparable to the DMR, which makes them terrible at fending off close range attacks because they just sit their going "pew...pew...pew". To change that, you have to go into the Firing Pattern Properties in the char tags, and set the Rate Of Fire values to match the actual rates of fire in the weapons tags (i.e. around 8 for the PR, 11 for the Needler)
  • It also helps to set all PP fire rates to 7-8
  • most AI are operating at 75% base damage, so you might want to set Weapon Damage Modifier to "1" for everything
  • there are various accuracy values in Firing Pattern Properties which can be improved as needed (Projectile Error being an easy place to start)

Once you do this, gangs of grunts and jackals alone will create a hail of gunfire that's much more painful to go charging into, which results in both you and the enemy maintaining longer combat distances.

ReteroX likes this

Share this post


Link to post
Share on other sites

Fantastic, thanks for the information!

I've already got firing patterns down (default are so bad) but the range variables are incredibly useful to me.

I really appreciate the help! 

Share this post


Link to post
Share on other sites

Hey, you may have already noticed, but the latest version of Assembly adds tooltip explanations for a tons of parameters. Lots of stuff in the weapon properties and firing patterns which wasn't previously clear is fully explained, so it may give you more ideas on how to get the behavior you want.

The thing that made the most biggest instantaneous difference for me was having the per-difficulty velocity scaling spelled out. Pretty much all projectiles are gimped in speed on all difficulties for AI, so changing/removing those values makes it a whole different ball game.

Edited by h3r3t1c
ReteroX likes this

Share this post


Link to post
Share on other sites

I'm still using the "user compiled" version of Assembly, maybe it's time to make the switch; thanks for the heads up!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0