Moved alternative mods to the Difficulty mod page:

v 6.1 Built a new Desperation section. When the mech is cored or legged and cored (lights) they enter new behaviors. These behaviors are determined by the new system I built that detects faction and skill level. Those 2 characteristics combine to modify the base random chance they will choose a behavior. The chances also vary by Hit&Run, Ranged, or Indirect. New behaviors are:

1. Kamikazi: The pilot charges either the leader (player) or combat target and detonates their fusion core trying to inflict damage. Highest chance Kurita. This is based on the lore and the novels, I am not trying to offend anyone.

2. Heroic charge: The pilot charges while continuing to fire into close quarters trying to finish off the opponent while making no attempt to dodge. highest chances Kurita an Steiner.

3. Eject: Pilot panics and ejects from the mech. Most likely with rookies and pirates

4. Flee: Pilot runs to fight another day. Once 800m from the player will despawn. Don't complain if you chase a fast fleeing mech. If you give up they will vanish. Highest chances Liao, Pirate, and Rookie

5. Peek a Boo: Pilot will go very defensive and move in and out of cover to fire then immediately retreat. This is the default of none of the others are selected.



TableTopRulez AI MODThis 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 increased for AI, so if you want lore-based jumps try not to use for >2seconds.**********************************************************************************MOD INSTALLATION:Unzip the Mod file. And copy the TTRulez_AI folder to MW5Mercs/MW5Mercs/ModsSTRONGLY RECOMMEND USING THE Either NAVID or TTRulez Rescale mod (MercTech friendly). It makes the AI perform better in cities.STRONGLY RECOMMEND USING TTRulez Sensor Mod or Advanced Sensor Mod: Makes the AI use ranged correctly.Optimized to work best with MercTechhttps://www.nexusmods.com/mechwarrior5mercenaries/mods/112Do NOT install with another JJ mod it will conflict and not work.--Advanced sensor mod, Vehicle AI mod, etc...***************************************I was surprised how simplistic the algorithms were for this game when I looked behind the curtain. They are well programmed, just not very sophisticated. General the AI senses a combat target and enters a selection tree called BTService_PickCombatTactic. This pathway evaluates the mechs weight and engagement ranges. Generally lights default to Hit&Run. If not Hit&Run the game queries the optimal weapon range of the mech (Averages the weapons). If optimal range is >/= 180m the AI checks if the mech has LRMs only. If the mech has LRMs only then the mech defaults to Indirect AI. Otherwise the tactic is set as Ranged AI. If the optimal engagement range is <180m the system check the mech weight class. If the mech is medium it selects Mobile AI. If heavy or assaults it select Tank AI. This is fairly elegant. Unfortunately the vanilla AI routines were circles set around the AI and not the target and basically create circling at close range regardless of the algorithm--this makes the AI basic and similar to older MW titles. I altered EQS files to adjust situation pathfinding behavior (AI vision focus basically), along with increasing AI branching logic probably a 100x vanilla. Then based on my custom scoring systems the AI assigns locations a numerical score and the AI moves to the best scored location. However, behavior is hard to predict in game so refinement will take time. Please feel free to post any errors you see on the NexusModPage. Please also post suggested AI behaviors you would like to see improved or would consider realistic. I have already made many updates based on prior suggestions.******************************************v 4.0 Added additional mech features. Including sensing target damage levels and weight class to adjust attack routines. Slow JJ mechs using JJ to skim towards target. Lights aggressively engaging lights and will skim if outside range from badly damaged assaults.v5.0 Adds LancemateAI role specific behaviors to the enemy works with or without MercTech (best with Merctech). Should make them behave more like their TT counterparts. If any issues revert to v4. New heat management for MercTech. New damage detection and response system.v6.0 New Indirect Fire (LRM) AI system to avoid wandering off and turning their backs************************************************JUMPJET UPDATES: DOESN'T WORK WITH OTHER JJ MODS************************************************1. Jumpjet accelerations in both the horizontal and vertical axis are now true to tabletop and much more rapid (occuring over 2 seconds instead of 3). This makes them more defensive.2. Old system was dumped in 3.3. It now uses a virtual velocimeter to detect falling velocity. Like a human the AI now senses if it is falling too fast and fires JJs until its decent slows. This conserves JJ use and hopefully eradicates fall damage. Also removes skipping on the ground. I tested them falling from 230m and they didn't take leg damage so hopefully will work out in game.3. JJ EQS sensor system. Now avoids jumping off heights of >70m and should also avoid jumping into buildings. Should improve realistic JJ use.4. NEW 4.5: Mechs GETTING STUCK on the landscape should now be fixed. I found another flaw in my old system. Completely redisigned and in 5 instant actions no stuck mechs. Also a stupid error with lights that caused them to get in a loop. Now fixed.5. NEW 4.5: PGI set gravity in the game to 25m/s2 earth is 9.8m/s2. This was smart because it creates the illusion of 10m tall mechs falling at the visual rates relative to the horizon the same as a person. However, this is not realistic and also makes it much easier for them to suffer leg damage. The mechs now set their personal g force to 1g (9.8m/s2). This lets them have good leg damage avoidance even at decent heights without massively increasing JJ burn time. I think this is the final hurdle to removing leg damage except from extreme falls. They do look a bit more floaty coming down. The rescale mod helps with this. Lancemates will not have G changed until I update that system.6. NEW 4.6: Error on light mechs JJ that had them get stuck. Now fixed. Thanks KnightCole and Yrrot7. NEW 5.93: Finally fixed the doublejump error on the JJ. I had to build a new JJ node and quit using PGI version for 4.6 to fix the errors in my old system. If aborted a branch during a jump the JJ could get stuck in the on position. Thanks to Yrrot explanation on abort nodes I built a fix to turn them off if aborting. Appears to now be a thing of the past. Light mech behavior looks much better now and they get stuck less. Alot of the other mechs jumps don't look as impressive now but are more true to lore.***********************************HitAndRun UPDATES:***********************************Default Light mech behavior (HitAndRun) had no AI behavior for defensive use of jumpjets or dodging--only 2 behavior nodes. It would run a query for allies within 300m and then try to move to them and circle them. Or if no allies were close it would query the target and run straight at them, and then stay in the classic circle of death. PGI had an abandoned strategy for true hit and run, that was left in the blueprint. I used their basic idea and now I have it functional and expanded. My general approach is to have 2 paths one that uses jumpjets to find cover and disengage, and another for mechs without jumpjets that puts a premium on quickly getting out of weapon range in the least number of moves to minimize damage taken.1) AI queries the target and moves to engage them as per vanilla, if shot during approach they now dodge if no jumpjets (as per feedback from prior version), or use their jumpjets to dodge incoming fire. This behavior is randomized.2) If they get to too close to the target they will use jumpjets to jump behind the target, or if they have no jumpjets run away in a vector behind the target looking for cover or getting in the rear arch--similar to fighter jet doctrines.3) They will then reengage the target preferentially in the rear quadrants for another pass4) If they are heavily damaged they will prefer to seek cover and exit weapon envelopes before reengaging from another angle.5) AI assess if a heavy or Assault ally is engaged within 1400m. If this is true they make shorter attack runs and will dodge fire less--more aggressive. Thanks to Trenchbird for the feedback.6) Made it so slower light mechs like the urbamech and panther now default to the Ranged AI and do not use Hit and Run.7) There was a loop where the AI would keep trying to run away until you killed them if you were chasing in a faster mech--too easy. I built a new sensor so they can tell if they are being chased for too long and will turn and fight.8) NEW 4.0: If allies are near Light mechs detect the enemy mechs weight class. 2 things may happen.--If it is a Light they will attack very aggressively to keep them away from allies unless severely damaged. They should keep lights off the heavies now.--If it is a Heavy or Assault who has no center torso or no armor on both legs they will target and aggressively attack unless severely damaged.9) NEW 4.0: If a Light mech is legged and can't run any more and are below a critical structural level of damage they will eject.10) NEW 4.0: If a Light mech is below a critical level of structural damage and is not legged they will run away and try to get out of sight. Once further than 1200m they will cease to exist--ran away so no salvage.11) NEW 4.5: Found egregious error where I didn't hook something up. And 2 other errors where there was no off switch causing loops. Lights getting stuck should be much better now.12) NEW 4.5: Found error in detecting damage to flee where it was supposed to require both legs to be damaged or for ejections both legs destroyed (MerTech)...used OR and not AND by mistake. Now fixed. Should be less ejections.13) NEW 4.91: Set behavior so when allies are near light mechs try to regroup after jumping. Should keep enemies from getting too distanced to support each other.14) NEW 5.0: Roles introduced. Strikers will try to flank and hit your back. Skirmishers will try to focus on your light mechs.*************************************************************************************RANGED UPDATES: THIS WAS THE REALLY BUGGY PART OF 3.1 and 3.2. NOW PROPERLY DEBUGGED*************************************************************************************RANGED was oddly designed. It defaulted a circle around the AI mech and not the AI mechs combat target, which made them rush into a circle fight. There was no consideration of actual engagment range. I moved the circle to be centered on the combat target not the AI mech. The AI now circles around its target trying to reach a perpindicular firing solution while maintaining LOS. There are 3 engagement branches (ranges) determined by the AI mechs loadout (LRM mechs now go to another tree) that keeps them at their optimal engagement ranges. Mechs also now jump away to maintain distance and get cover (Even heavies or assaults). When close only Mediums will jump away, heavies will duke it out knowing they can't flee.1) Cicada and other fast mediums now default to hit and run and do not use ranged. For now phoenix hawk and other fairly fast mediums remain in this group.2) Moved all the catapults and arrows out of the RANGED path and onto the INDIRECT ALGORITHM. Before only the one catapult with LRM only was using that pathway. Archers, Trebuchets, and Catapults use different behaviors as fire support.3) The AI will attempt to dodge and use cover if fired upon. Using JJ if needed.4) Heavier mechs will use peek-a-boo tactics to fire on you if taking damage.5) The AI will try to circle at a range based on its weapons. If the player starts to come too close they will attempt to reestablish range.a) Short range: 600m and less weapons(AC10, AC20, Med laser, Short laser, SRM); circles at optimal range of 270mb) Medium ranged: 601-700m (UAC5, AC5, Large laser, Gauss); circles at optimal range of 450mc) Long ranged: 700m + (PPC, AC2); circles at optimal range of 550m6) At a critical range where maintaining range is not possible, fast mechs will engage in hit and run, while slow mechs will close the remaining range and duke it out.7) Close engagments are less lame circle and more circle with burst to try to get in rear arch. More chaotic and unpredectable now.8) Slow mechs that have JJs but only short range weapons (AC10 and down) will not slowly trod forward while you blast them or try to get cover but are too slow. They now use a new JJ system to skim the ground at high speed until within their weapon range.9) The AI now work to maintain LOS (thanks to Sean Lang for calling my attention to this issue).10) NEW 4.0: Ranged mechs now detect if the enemy is almost cored. If so they close range to use more of their weapons unless their own structure is significantly damaged. Should make fights more intense against ranged.11) NEW 4.5: People were complaining the Ranged mechs were rushing in. Played out multiple AI on AI fights and watched both in group and single. People were right. Tweaked ranges and some loops to close distance. Now it looks right in AI on AI fights.12) NEW 4.5: Other people complained the AI was too far away. People were right. I found a bad error where they could run through 3 levels finding cover/retreating. I forgot the inverse decorators. Now fixed. In AI on AI I don't see anyone running away.13) NEW 5.0: Added mech roles to enemies. Juggernauts will march on your. Firesupport will support them. Brawlers and Skirmishers use the old system. Strikers will try to flank you and attack your back.****************************************************************INDIRECT UPDATES (LRM VARIANT MECHS CATAPULT, ARROW, TREBUCHET):****************************************************************Indirect missile mech AI was odd and ran towards the player. That is now fixed and they should work in a support role1) Indirect (LRM mainly) mechs will try to maintain maximal LRM distance by walking backwards at an angle if you approach firing2) Once you get to intermediate range they will cease to backup and turn and run, utilizing jumpjets if they have them, spin in the air, and fire LRM at you as they try to escape. Its pretty effective.3) They now try to maintain LOS (at least until I can get the AI to communicate targets like the player)4) If an allied heavy or assault mech is nearby, these mechs form up and follow them in their rear arch as far from the enemy as possible. Once too close to the enemy this behavior aborts and they try to reestablish range to supply support fire for the engaged heavy/assualt.5) New 6.0: Replaced support system with Lancemate support system. This should prevent 2 LRM mechs for tagging off each other and wandering off6) New 6.0: Realized Archers were turning their backs to maintain range. Now fixed.7) New 6.0: To avoid wandering off changed system to detect distance from player and if >750m will move to within 500m******************************************FUTURE WORK:Sense missiles incoming and engage dodging behavior.New targeting and aggro system. Framework for Lights prefering Light mechs, Tanks, and VTOL to make them more useful. Still need to create a new aggro system from scratch. Long term project.********************************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.