• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Hello!
Just saying:
1.4.0 leads to extremely funky difficulty-nullifying behaviour in my case...the AI is so obsessed with not showing its weak torso, sprinting into cover and building evasion that it forgets attacking: over half(!) of all AI actions are pure movement. I feel like I'm doing skeet shooting, not fighting soldiers.
In 1.3.3. it was just the occasional swift tank that showed 'odd' behaviour.

I should note that I do play with overall lower hit rates (short-med-long range tiers being a thing), resulting in the average shot being 10~15% harder than in vanilla. I did adjust the hit rate thresholds required for the AI to consider all out attacks and conservative shots to compensate, and *if* it attacks it also does generally fire as expected. Still, it could be messing up the AI logic - I'm just surprised that it didn't have this weird effect in 1.3.3 or before.

If anyone else uses similar balance changes concerning to-hit ratios together with this, can anyone confirm similar behaviour?

Thanks for the report! I was getting that kind of action with Better AI 1.3.3 in the post 1.3 BT environment and was trying to adjust for it with 1.4. So you find that in general it's actually worse than 1.3.3? This might be linked to a lowering of "Float_PreferHigherExpectedDamageToHostileFactorWeight" in the global.json. Try kicking that one back up to anywhere between 3.5 and 4.0 (the old value) and see if that fixes it for you. It possible I tuned that down too far to adjust for the far more necessary need to be in cover post 1.3.

How are scouts acting compared to beefier units? They got a significant boost to their "Bravery" (suicidal really) and their Float_PreferHigherExpectedDamageToHostileFactorWeight went up instead of down. if those seem to be acting better (given, they are still very weak units with low armor) that value is probably the cause.

ModTek 5.0 just released with a ton of new features, I want to put out a 1.4.1 to use this and can roll some tuning adjustments in if you let me know what works.
 
Hello!
Just saying:
1.4.0 leads to extremely funky difficulty-nullifying behaviour in my case...the AI is so obsessed with not showing its weak torso, sprinting into cover and building evasion that it forgets attacking: over half(!) of all AI actions are pure movement. I feel like I'm doing skeet shooting, not fighting soldiers.
In 1.3.3. it was just the occasional swift tank that showed 'odd' behaviour.

I should note that I do play with overall lower hit rates (short-med-long range tiers being a thing), resulting in the average shot being 10~15% harder than in vanilla. I did adjust the hit rate thresholds required for the AI to consider all out attacks and conservative shots to compensate, and *if* it attacks it also does generally fire as expected. Still, it could be messing up the AI logic - I'm just surprised that it didn't have this weird effect in 1.3.3 or before.

If anyone else uses similar balance changes concerning to-hit ratios together with this, can anyone confirm similar behaviour?
Hmm... I've seen what may be similar effects, though I haven't played enough with my current settings to know how common it is.

I had forgotten, but I did fiddle with to-hit numbers just a little. The to-hit adjustments for weight classes did not satisfy my inner OCD child, so I changed them. IIRC, I'm playing with 0 for assaults, -1 for heavies, -2 for mediums, and -3 for lights, while vehicles are 2 points easier to hit than mechs of the same weight class and turrets another 2 points easier on top of that. (Using negative numbers for harder to hit in my description, regardless of whether or not the actual numbers in the file use the correct sign.) Don't recall offhand how much of a change that is from unmodded, though.
 
Hello!
Just saying:
1.4.0 leads to extremely funky difficulty-nullifying behaviour in my case...the AI is so obsessed with not showing its weak torso, sprinting into cover and building evasion that it forgets attacking: over half(!) of all AI actions are pure movement. I feel like I'm doing skeet shooting, not fighting soldiers.
In 1.3.3. it was just the occasional swift tank that showed 'odd' behaviour.

I should note that I do play with overall lower hit rates (short-med-long range tiers being a thing), resulting in the average shot being 10~15% harder than in vanilla. I did adjust the hit rate thresholds required for the AI to consider all out attacks and conservative shots to compensate, and *if* it attacks it also does generally fire as expected. Still, it could be messing up the AI logic - I'm just surprised that it didn't have this weird effect in 1.3.3 or before.

If anyone else uses similar balance changes concerning to-hit ratios together with this, can anyone confirm similar behaviour?

I'm getting similar issues sometimes, with what seems to be damaged mechs running off. Note this is all from memory I haven't got a copy of particular circumstances. Perhaps this is because their damage potential has gone down. It's probably more appropriate in these circumstances they make a melee attack.

I'm playing a four locust start so have been doing a lot of half skull missions against lights. I have also noticed is what seems to be a lack of melee attacks from the enemy. Although, admittedly this may also be partly due to me avoiding melee range with my locusts until I can swarm and double turn kill opposing mechs, but it doesn't always work out like that and I feel like the opfor has had the opportunity to take melee attacks against my locusts, which are particularly deadly as the melee attacks ignore evasion.
 
I'm getting similar issues sometimes, with what seems to be damaged mechs running off. Note this is all from memory I haven't got a copy of particular circumstances. Perhaps this is because their damage potential has gone down. It's probably more appropriate in these circumstances they make a melee attack.

I'm playing a four locust start so have been doing a lot of half skull missions against lights. I have also noticed is what seems to be a lack of melee attacks from the enemy. Although, admittedly this may also be partly due to me avoiding melee range with my locusts until I can swarm and double turn kill opposing mechs, but it doesn't always work out like that and I feel like the opfor has had the opportunity to take melee attacks against my locusts, which are particularly deadly as the melee attacks ignore evasion.

Yes, I'm seeing the same kinds of issues as you posted and what was noted above too. I will adjust this mod to use some of the new features in ModTek 5 and then throw on some adjustments to increase aggression. It's been an interesting experiment, people have asked in the suggestions for 'Mechs that are less suicidal or try to stay alive longer. We are seeing here that if that kind of behavior is tuned just a little too strongly, it doesn't make for as fun of a game. Sure, they could be dealing more damage but of course, they are going to their deaths. The up-side to stock's near suicidal units is that the damage gets delivered to the player's Lance and getting past the armor is what matters the most.
 
Yes, I'm seeing the same kinds of issues as you posted and what was noted above too. I will adjust this mod to use some of the new features in ModTek 5 and then throw on some adjustments to increase aggression. It's been an interesting experiment, people have asked in the suggestions for 'Mechs that are less suicidal or try to stay alive longer. We are seeing here that if that kind of behavior is tuned just a little too strongly, it doesn't make for as fun of a game. Sure, they could be dealing more damage but of course, they are going to their deaths. The up-side to stock's near suicidal units is that the damage gets delivered to the player's Lance and getting past the armor is what matters the most.

To put things simply I think you want to maximise the function "Damage Dealt / Damage Taken" where "Damage" is loosely defined accounting for things like a bonus to rear damage etc.

My point is that reducing damage taken by the AI is no use if the AI is not dealing damage, which is the case when they retreat.

Generally speaking, I think the AI should be aggressive, human players will dominate long tactical battles, the only chance the AI has is swarming in numbers and hitting hard and fast, perhaps getting some lucky shots that take out a human mech. Damaged AIs retreating just makes things easier for the human player, it just allows the human player to not have to waste time on finishing them off and they can quickly focus on the next mech. If they hang around and keep meleeing me when they're missing half their torso at least I'll have to finish them off before focusing on the next mech.

That being said, they should try to protect their rear. But I think that should be a secondary condition to dealing damage.
 
To put things simply I think you want to maximise the function "Damage Dealt / Damage Taken" where "Damage" is loosely defined accounting for things like a bonus to rear damage etc.

My point is that reducing damage taken by the AI is no use if the AI is not dealing damage, which is the case when they retreat.

Generally speaking, I think the AI should be aggressive, human players will dominate long tactical battles, the only chance the AI has is swarming in numbers and hitting hard and fast, perhaps getting some lucky shots that take out a human mech. Damaged AIs retreating just makes things easier for the human player, it just allows the human player to not have to waste time on finishing them off and they can quickly focus on the next mech. If they hang around and keep meleeing me when they're missing half their torso at least I'll have to finish them off before focusing on the next mech.

That being said, they should try to protect their rear. But I think that should be a secondary condition to dealing damage.

Yep, oddly your are heading right back to stock behaviors for those reasons. I'm sure HBS hit the same kind of conclusion at some point. Getting that balance is hard and one of those tasks that is never finished. I'll probably try kicking the aggression back up to near 4.0, maybe 3.75 and see if they can keep most of the other defensive adjustments. One thing I don't want to do, is end up just cranking everything to 11 and then the values all end up back to where I was but with a larger number. If I increase aggression by 1, yet also increase defense by 1, I've gone nowhere.
 
Yep, oddly your are heading right back to stock behaviors for those reasons. I'm sure HBS hit the same kind of conclusion at some point. Getting that balance is hard and one of those tasks that is never finished. I'll probably try kicking the aggression back up to near 4.0, maybe 3.75 and see if they can keep most of the other defensive adjustments. One thing I don't want to do, is end up just cranking everything to 11 and then the values all end up back to where I was but with a larger number.

You could maybe think of it as a function from "Aggression" -> "Damage Dealt / Damage Taken". I suspect this is a upside-down curve, with a peak roughly indicating where the most challenge is for the player. I think that's where you want to aim for.

The default settings perhaps are too far on the aggressive side, in the region where extra aggressiveness is largely increasing the AIs vulnerability to damage without increasing it's ability to deal it all that much. On the other hand, the mod might currently be on the too passive side, where the damage dealt is low due to frequent retreating so increases in aggression will relatively speaking, make the AI more challenging, despite increasing their vulnerability to damage. Naturally as you point out there's a balance at some point.

But what I'm finding now is that units retreating doesn't reduce my ability to damage the opfor, as when they retreat I just focus on another mech. This just allows me to pick them off one by one like I'm the hero in a kung-fu movie. I've never had a situation where such a drastic retreat has been a good move for the AI, it's only made my life easier.

If I increase aggression by 1, yet also increase defense by 1, I've gone nowhere.

Are you sure that's the case? Does the game just subtract these two terms? Or does increasing both change behaviour in some way? Like maybe aggression increases the likelyhood for the enemy to move into it's maximum damage range, and defense increases the likelyhood of using cover. In this case increasing both would be a good thing, the AI will then attack but use cover in doing so.
 
Also doing a fair number of half skulls vs lights and have found them reasonable. While they do run away when heavily damaged, they've been good about running behind terrain where I can't focus fire them and then engaging next turn vs part of my forces. I think you've done a stellar job and while there may still be some polish tweaking to do it's in a pretty good place right now.
 
Also doing a fair number of half skulls vs lights and have found them reasonable. While they do run away when heavily damaged, they've been good about running behind terrain where I can't focus fire them and then engaging next turn vs part of my forces. I think you've done a stellar job and while there may still be some polish tweaking to do it's in a pretty good place right now.

Yea, where some people get a really nice session, other see a lot of issues and it probably comes down to how you fight combined with the level of contracts you are taking. Units spawning at 50% - 75% get real scared out the gate but the same action might be reasonable when you go from 100% to 20% remaining in a single turn.

But what I'm finding now is that units retreating doesn't reduce my ability to damage the opfor, as when they retreat I just focus on another mech. This just allows me to pick them off one by one like I'm the hero in a kung-fu movie. I've never had a situation where such a drastic retreat has been a good move for the AI, it's only made my life easier.

Are you sure that's the case? Does the game just subtract these two terms? Or does increasing both change behaviour in some way? Like maybe aggression increases the likelyhood for the enemy to move into it's maximum damage range, and defense increases the likelyhood of using cover. In this case increasing both would be a good thing, the AI will then attack but use cover in doing so.

Try my [Mod Edit: No unapproved links] out and let me know if that is enough of the bump to change things for you. Click the green "Clone or Download" button on the right and select "Download ZIP." This build also requires ModTek 5.0 released a few days ago, make sure to update that as the re-tagging of some 'Mechs uses the new features. Because of the new features, the file structures have changed a little - delete the old Better AI folder and unzip this package in to the Mods folder.

Here's what I changed other than the modtek formatting:

global.json
  • Float_PreferHigherExpectedDamageToHostileFactorWeight 3.75 from 3.25 (was 4.0 in BAI 1.3)
  • Float_MeleeBonusMultiplierWhenAttackingEvasiveTargets 3.0 from 2.5 (Should try to melee high evasive targets a bit more often)
As always, more feedback is needed from as many players as I can get. The variety of playstyles other people use has always shown me where my blind spots are in the AI tuning and I'm grateful for all the help I can get.
 
But what I'm finding now is that units retreating doesn't reduce my ability to damage the opfor, as when they retreat I just focus on another mech. This just allows me to pick them off one by one like I'm the hero in a kung-fu movie. I've never had a situation where such a drastic retreat has been a good move for the AI, it's only made my life easier.
I'd say that points exactly to the biggest weakness of the AI... retreating is an individual decision, since there is no overarching commander role in the code.

Sometimes the best move really is to retreat, but having a single mech retreat out of firing range while the rest of the lance stays in full contact with the enemy is almost never the best move.
 
Try my Daily Test Branch out and let me know if that is enough of the bump to change things for you. Click the green "Clone or Download" button on the right and select "Download ZIP." This build also requires ModTek 5.0 released a few days ago, make sure to update that as the re-tagging of some 'Mechs uses the new features. Because of the new features, the file structures have changed a little - delete the old Better AI folder and unzip this package in to the Mods folder.

Here's what I changed other than the modtek formatting:

global.json
  • Float_PreferHigherExpectedDamageToHostileFactorWeight 3.75 from 3.25 (was 4.0 in BAI 1.3)
  • Float_MeleeBonusMultiplierWhenAttackingEvasiveTargets 3.0 from 2.5 (Should try to melee high evasive targets a bit more often)
As always, more feedback is needed from as many players as I can get. The variety of playstyles other people use has always shown me where my blind spots are in the AI tuning and I'm grateful for all the help I can get.

This seems like an improvement. I don't think it would hurt bumping "PreferHigherExpectedDamageToHostileFactorWeight" back to stock, it's pretty close anyway, I'm still getting some scaredy cat locusts which run even before taking any damage, usually stupidly exposing their rear.

I noticed a few more punches to my locusts, I took a 1.5 star battle (perhaps unwisely) but I figured I was then jumping in the argo so I should give my mechtechs something to do during the trip to the next half star system. Ended up with two dead locusts, one cored and one legless (I'm not playing cored = loss of mech), and two dead pilots, and part of that was caused by mediums punching my locusts and removing torsos, so I think that's a good change. Sounds bad, but after repairs I'm still up 350,000 cbills, and I saved some money on my monthly wage costs! I like to hire "special pilots" only (i.e. backers and ronin) so they were just starter pilots so no big deal.

Anyway great work on the mod. I've actually just got the mod folder as a git repo pointing to your github, so I just bounce it to the test branch head before I start playing.
 
1.4.1 Release for BT 1.4.0
Better AI 1.4.1 - For BATTLETECH 1.4.0

I've been busy making a custom FP and totally missed a proper ModTek 5.0 release and now we're already on ModTek 6.1. @Mpstark and the ModTek crew have implemented a feature request I made to have some mods load after others, but not require those mods to load in the first place. ModTek now has both "Dependency" and "Optional Dependencies" and I've updated Better AI to be loaded after cFixes if it is present. You will not longer need to ensure Better AI loads after cFixes. I've also put in the daily test branch edits to make the AI a little less defensive.

REQUIRES MODTEK 6.1

Instructions:
For older versions - Delete old Better AI folder in BATTLETECH\Mods
Copy BetterAI-1.4.0 in to the BATTLETECH\Mods folder.

Full Change Log:

New ModTek Features:
  • Optional Dependency - Thanks to the ModTek crew for implementing my request for Optional Dependencies. Better AI can now detect if cFixes is in your Mods folder and will automatically load after cFixes has been applied.
  • Advanced JSON Merges - Allows Better AI to replace the single unit_role entries inside the mechdef's unit tags. Previously, the entire array had to be overwritten, causing issues with cFixes and other mods.
global.json
  • Float_PreferHigherExpectedDamageToHostileFactorWeight 3.8 from 3.25 - Less afraid base AI
  • Float_PreferInsideMeleeRangeFactorWeight -1.0 from -1.25 Less afraid of melee ranges
  • Float_MeleeBonusMultiplierWhenAttackingEvasiveTargets - Greater multiplier to attacking evasive units with Melee
global_def.json
  • Float_PreferHigherDistanceFromClosestHostileFactorWeight 1.25 from 1.5 - Less retreating when in defensive mode
role_lastmanstanding.json
  • Float_DFADamageMultiplier 3.0 from 2.75 - Slightly more chance to DFA when all is lost
  • Float_PreferInsideMeleeRangeFactorWeight 0.0 From global -1.0 - Last Man isn't afraid to enter melee
role_sniper.json
  • Float_MeleeDamageMultiplier 0.75 from 0.5 - Slightly more weight to punch, I still want snipers to try and run from close combat
  • Float_DFADamageMultiplier 2.0 from 1.75 - Higher weight to just DFA when rushed in to melee range by player units
role_vehicle.json
  • Float_PreferHigherExpectedDamageToHostileFactorWeight 3.8 from 3.5 - Matches new global
  • Float_OptimalAllyDistance 120.0 from 96.0 - Vee's sticking too closely
  • Float_PreferNotLethalPositionFactorWeight 0.7 from 0.8 - Less afraid Vee's
  • Float_BuddyAloneFiringSolutionPreferenceWeight -1.0 From global -0.8 - Gave them the role_sniper weight for seeking lines of fire
 
I also updated [Mod Edit: no unapproved links please.]

It now should be updated for "forever" in that it just merges the two variables it needs and no longer needs the entire global.json to overwrite. Again, all thanks to the new ModTek features. You shouldn't need to update this one again unless there is a total rewrite of the AI.
 
Last edited:
I also updated [Mod Edit: no unapproved links, please]

It now should for "forever" in that it just merges the two variables it needs and no longer needs the entire global.json to overwrite. Again, all thanks to the new ModTek features. You shouldn't need to update this one again unless there is a total rewrite of the AI.

Thank you sir! I've found I really enjoy playing with the perm evasion add on, and have updated both. I appreciate your continuing support of the community with your AI mod!

Best,

Mad
 
Last edited by a moderator:
Seems like 1.5 hasn't touched the .json files for the AI. The Dynamic Role limits in the 1.5 CombatGameConstants.json now match the values in Better AI! I have no idea if that edit was because of Better AI or they just stumbled on to the same conclcusion I did.

In Stock 1.5, a Lance can now have 3/4 Snipers or 2/3 Snipers with a max sniper setting of "0.75" where before it was limited to 2/4 or 1/3 with "0.5" where "1.0" is a full 4 'Mech Lance. This allows Support Lances to draw one extra "Sniper" role on average and keep their Sniper Tags longer as the Lance is destroyed.

I'll come out with a 1.5 hotfix version of Better AI in a day or so that will be the current version but without the redundant edits thanks to the stock adjustment. Of course, HBS could have made many changes to the AI back-end and I'll take a look at that before I post an updated Better AI.
 
I have no idea if that edit was because of Better AI or they just stumbled on to the same conclusion I did.

tenor.gif
 
1.5.0.1 Release for BT 1.5.0
Better AI 1.5.0.1
[Mod edit:no unapproved links: please no direct linking to nexus/github]
For BATTLETECH 1.5.0

Requires ModTek 0.7.1

Instructions:
For older versions - Delete old Better AI folder in BATTLETECH\Mods
Copy BetterAI-1.5.0.1 in to the BATTLETECH\Mods folder.

Removed settings that are now stock in 1.5.0, adjusted files to standard "mergeDef" format. Moved to JK format versioning to keep pace with game version.

Better AI Permanent Evasion Add On - No update of Add-On required, will work with 1.5.0.1 automatically.

Now that the Dynamic Sniper max adjustment is stock, I removed it from this mod. I also changed the filenames of some stuff to conform to modding standards. No AI variables have been changed from 1.4.1.
 
Last edited by a moderator:
Hi Folks,

I’m not too familiar with this mod, I was intrigued by the line “Better AI Permanent Evasion Add On” and was reminded of the PermanentEvasion.dll by Morphyum. So I downloaded Better AI but didn’t see a dll in there, which leads to the questions:

Does the “Better AI Permanent Evasion Add On” act like the PermanentEvasion.dll and allow you to keep your Evasion pips?
Is the “Better AI Permanent Evasion Add On” a set of edits in behaviorVariables? Or one specific edit?
And is there a behaviorVariables edit that lets you “turn off (or change)” the amount of Evasion pips that AP weapons ignore?

Thanks in advance!
 
Hi Folks,

I’m not too familiar with this mod, I was intrigued by the line “Better AI Permanent Evasion Add On” and was reminded of the PermanentEvasion.dll by Morphyum. So I downloaded Better AI but didn’t see a dll in there, which leads to the questions:

Does the “Better AI Permanent Evasion Add On” act like the PermanentEvasion.dll and allow you to keep your Evasion pips?
Is the “Better AI Permanent Evasion Add On” a set of edits in behaviorVariables? Or one specific edit?
And is there a behaviorVariables edit that lets you “turn off (or change)” the amount of Evasion pips that AP weapons ignore?

Thanks in advance!
Nope, it does none of the above. It's just a setting for the AI to take riskier shots at lower To-Hit odds and lets the AI believe shots don't degrade Pips.

It's just for when people use Perm or semi-perm evasion mods and want the AI to act accordingly. It doesn't change anything about how Evasion is earned or lost.
 
Got a new testing build for anyone who wants to try.

BattletechModders/BetterAI/tree/Daily-Test-Branch on github. Click the green "Clone or Download" and select "Download ZIP"

I've made it to where 2 of any 'Mech Lance has a pilot tuned to the type of 'Mech that Lance has. So Tacticians in scouts and Defenders in tanks. I've also limited what kinds of pilots can be in all vehicles, no more useless Coolant Vent abilities on a Tank that can't use it.

I just made a lot of these in the past few days on my tablet/phone and my in-game testing time is basically 0. If anyone can give some feedback that would be great. So far, I know it doesn't throw any ModTek errors, so it should work.