About this mod
Updates the AI of both enemy mechs and your Lancemates AI to perform better in combat. New behaviors and logic to seem more human, and jumpjets enabled. No more circle of death. This combines both the prior EnemyAI and LancemateAI mods into a more efficient less bug prone package.
- Permissions and credits
- Changelogs
This mod alters the AI for the game to better approximate battletech TT and Strategy computer game. It now includes both Light, Medium, Ranged, and LRM boat combat AI upgrades. All mechs will now use their jumpjets and human like strategies that are based off of speed, JJ, and weapon loadout. Be aware jumpjet burntime is increased for AI, so if you want lore-based jumps try not to use for >2seconds (2 seconds gives TT rules distances).
THIS MOD COMBINES THE PRIOR ENEMY AI, LANCEMATE AI, SENSOR, ADVANCED DIFFICULTY AND OTHER AI MODS INTO ONE SYSTEM
Unfortunately the system was breaking down and too complicated to test. This is much easier to bugfix and see how the AI interacts.
**********************************************************************************
MOD INSTALLATION:
Unzip the Mod file. And copy the TTRulez_AI folder to MW5Mercs/MW5Mercs/Mods
Optimized to work best with MercTech, if used with MercTech needs the compatability mod installed.
Recommend using rescale V2 in MT
YOU DO NOT NEED MERCTECH TO USE THIS MOD IT CHECKS IF MERCTECH IS INSTALLED
MercTech: MercTech at MechWarrior 5: Mercenaries Nexus - Mods and community (nexusmods.com)
Compatability Mod: MW5 Mod Compatibility Pack at MechWarrior 5: Mercenaries Nexus - Mods and community (nexusmods.com)
--MerTech allows you to set your mechs roles (scout, brawler, etc... in other version it is set based on lore chassis description)
Do NOT USE with any TTRulez Mods other than Warzone...They have all been worked into this mod
v2.0: Updated for DLC. No new behaviors. Hopefully bug free. Roles added for all new mechs. Will not work with MercTech. I had to strip merctech stuff out to get it to work. Once merctech is updated I will add its special behaviors back in. Check the MechRoles XL they have been updated.
v2.1: Bug fix for accidentally loading lancemateAI on enemies who then can't shoot in certain situations. Improved logic to get dervishes to behave properly.
v2.2: Numerous bug fixes. New node from PGI broke senses so sometimes mechs would run around but wouldn't fire. The AI should be much more dangerous now. Fixed assassin fighting wrong. Fixed several wrong connectors on Missileboats and Skirmisher that would make them freeze.
* I heard the complaints and fixed the issue where the AI would ignore the player wailing on them if using specialty targeting. They now have a more complex algorithm that evaluates the amount of damage they are receiving from an enemy, its proximity, and if it is behind them (custom aggro system). Should look much more realistic now.
* Fixed a torso twist issue where they would twist while firing. Should now look better. Also decreased twist time so they will maintain fire longer (more enemy damage output)
v2.3: MercTech compatibility added back in.
v2.4: Adjusted JJ height from 10m/JJ to 8m/JJ should reduce spider hang time by reducing apex by 16m. Not much change for less JJ equipped mechs. All mechs still have the same forward travel (adjusted to compensate).
v2.5: Fixed bug making lancemates lockup after killing attack my target. After DLC updates had a boolean checkbox wrong.
v2.6: Fixed LRM mech bug and follow me bug. Added new VTOL logic hopefully will be harder to kill, but not crash into objects.
**************************************
ENEMY AI CHANGES:
Introduces Lance level behavior for drops of 3 or more mechs. Unfortunately the engine isn't really setup for this so you may see this behavior only rarely but this is a setup for the DLC which will hopefully improve drops and heavier mech numbers. When using this logic they use a FingerFour engagement profile until sending units to deploy. This should be very CPU friendly as the logic is run only by the lead mech periodically (every 8-10 seconds). Lead issues simple commands to his lancemates that then sets them on their behavior.
--They analyze if their overall lance is Longer range or shorter range than the opponent or similar range by comparing all weapons profiles or units
--Longer range: They will try to maintain distance and deploy mechs to intercept light harassers and will send their short range weapon allies to engage closing heavy mechs
--Shorter range: They will aggressively move to intercept their opponent. Deploying light mechs to either pick up other lights or to flank the enemy.
Enemy skill levels:
--The AI accuracy, overheat, and targeting locations are now consistent with TT and not vanilla. The AI is more accurate at long range(nerfed in vanilla) but should be less accurate on targeting a specific damaged part (blowing off limbs). AI now also gets less damage reduction and damage boost so it is more like TT.
Enemy Logic:
The vanilla game only had simple circling mechanics and minimal JJ usage. There are now several logic trees for them and they will use JJ to close distances or escape weapon fire.
Ambusher: Use JJ to move in and out of cover firing and then retreating usually in urban environments
Scouts: Lightly armored light mechs. Will target vehicles and then light mechs before engaging heavier units.
Skirmishers: Faster more heavily armored mechs than scouts. They distract the enemy and fight off light mechs. Will focus on fighting light mechs or fast medium mechs before engaging heavier targets.
Striker: Fast mechs with light armor but heavy close in weapons. Will flank the enemy and then unload their weapons at close range trying to force the enemy to focus on them and turn their back on a more heavily armed ally.
Brawler: Heavier armored mechs with slower speed but long range weapons. Will engage based on weapon ranges maintaining firing distance\
Juggernaut: Most heavily armored mechs usually with close in weapons. Will advance on a target firing continuously
Sniper/FireSupport: Mechs will form on a slower brawler or juggernaut and move with them firing on their target.
Missileboat: Missile based mechs. Will target VTOL and tanks otherwise form on brawlers or juggernauts (but further back) to concentrate firesupport
Anti-aircraft: Will target VTOL then tanks. If no such targets functions as firesupport (Rifleman is a classic example)
Hit and run: If no above logic triggered light mechs will attack the target by rushing in attacking then using JJ or speed to get out of firing parameters.
Ranged: If no above logic triggered medium and heavy mechs will attack at optimal range for their weapons.
Dodge: Based an frequency and amount of damage may seek cover (using JJ if available)
HeatManagement: New logic to seek cover and hold fire if at risk of cooking off ammo (mainly for MercTech new heat system)
TorsoTwist: The AI will "see" incoming PPC or other heavy weapon fire and twist torso to avoid taking center torso hits.
Being chased: The AI will "see" if an enemy is trailing them while they try to flee and turn to fight if they clearly aren't escaping.
Stealth: Adjusted field of view for AI and scouting routines so it is possible to sneak up on enemy mechs. Improved scouting logic so they will search the area in a realistic fashion.
Panic system: Currently on hold until after the update as was confusing players.
JumpJet changes:
Default game used MWO JJ rules designed to nerf JJ. TT JJ values are restored. The mechs can jump forward the distance listed in TT (about 30m/JJ) and have current TT JJ heights based on a 2 second burn rate. This makes mechs jump higher and faster than ever. Because AI targeting is reduced by the speed of the enemy this makes JJ using mechs harder to hit for the AI so they are defensive. I also reset the games gravity to 1g from 2.5g which PGI used to make large objects fall at the same perceived rate as a human. Appears a bit odd at first but is real world accurate and avoids unnecessary leg damage. Player JJ should be more fun and useful as a result.
--Post v2.4 JJ give 8m/JJ height (down from 10m/JJ) and 30m/JJ forward distance.
LANCEMATE AI CHANGES:
Lancemate AI is completely overhauled from vanilla to fix some issues with the existing system.
AI skill level: You lancemate's skill gave a damage boost in vanilla but didn't make them better shots. Now that is fixed. They don't get a damage boost for their weapon skill but it can make a significant difference in their chance to hit the enemy with their shots. Elite pilots now have elite accuracy (before all I had the same chance to hit). Their skill with heat determines overheating chances as well.
Move to location: The AI will now move the location and set it as guard location. If no enemies they will patrol realistically around this zone. If engaged by enemies will move to maintain optimal LOS and firing but will return if they wander too far off. Should not have wandering lancemates anymore.
Follow me: The AI will now stay with you and will not wander off. They will move around to maintain optimal firing ranges once the enemy is within 500m but still stay around their formation location. There are also specialty behaviors:
--Scout: Detects tanks, VTOL, or light mechs/fast mediums within 200m of the player and move to drive them off. Stops once >500m from the player.
--Skirmisher: Detects light mechs or fast mediums within 200m of the player and will move to drive them off. Stops once >600m from player
--Firesupport/Sniper: Mechs will move with the player and focus on their targets
--Missileboat & Antiaircraft: Targets nearby VTOL or Tanks. Otherwise will focus on the players targets.
Attack my target: The AI will engage the target you selected and try to destroy them. Once they are destroyed returns to formation.
--Ambusher: Will use JJ to move in and out of cover attacking the enemy
--Scout: Will use JJ to close to target and engage. If tanks or VTOL are set will be direct. If heavier mechs will use hit and run style tactics
--Skirmisher: Will use JJ to close with target and engage. If light mechs/fast medium will stay aggressive until destroyed. If a heavier slower mech will actually skirmish similar to classic military style. Will move in attack and then fall back to player distracting and drawing the enemy into firing range.
--Striker: Will use JJ or speed to move to a position to the side and back of the target then attack their rear armor (flank the enemy)
--Brawler: If slow use vanilla attack my target logic. If fast will use Hit and run tactics to close with heavier enemies.
--Juggernaut: Aggressively moves to attack the enemy
Raid and Demolition logic (NEW)
--If your lance including yourself all have a speed of >90kph and the mission type is raid or demolition there is new follow me behavior. The AI will change formation to a wedge. They will run with you at maximum speed staying in formation and targeting nearby mechs and structures but will not wander off. This allows you to move from point to point without micomanaging them. If you jumpjet they will detect this and use their own JJ to stay in formation. So try to use all JJ units if that is your strategy to cover the map quickly. Attack my target and move to location work the same as above so you can still have other behaviors but this allows coordinated movement with your lancemates.
********************************
Thanks to AlexGarden at PGI for his blueprint suggestions. Thanks for Trenchbird Atreyuh CommanderHunter and others for feedback on the mod. Thanks to NGNG for posting videos with my mod so I could see what was broken and giving feedback. Thanks to Magnum for MercTech support. Thanks to Yyrot for multiple assists especially the efficiency changes for this version.