I've listed every single variable in the behaviorVariables folder along with HBS's comments and arranged the active and inactive files beside the default global.json and unused.json. Feel free to copy or download this file for your own AI modding needs. I plan to use it by inserting a new column for a modded global.json next to the stock so I can easily compare my changes to the default and any other files.



global.json + global_def.json

unused.json

This is a listing of unused variables that can be pasted in to the global, or another valid behavior file and once set to a non-zero value, become an active weight in the system. I'd like to thank HBS for including these as it greatly expands our modding potential.



role_XXXX.json



There are at least 6 active dynamic 'Mech role files in the game, each with its own defensive mood file ending in "_def" which is a blank file. These roles can be adjusted on the fly, changing as needed based on the unit_role_xxxx tag. Each mechdef contains just one role, and all units can pull brawler if others are filled. The Brawler role is effectively the default role of the AI and the global.json has been setup to reflect the Brawler fighting style with wanting to enter melee range and other adjustments. This ensures in a fallback situation, the AI will hunt down the players units and engage.

role_brawler (blank)

role_scout

role_sniper

role_meleeonly

role_noncombatant (blank)

role_lastmanstanding (blank)

The role_flanker, role_spotter and role_suppression have been flagged as depreciated. Most of them like role_meleeonly, activate when you would expect. In that, case it takes over from the 'Mechs previous role when it has no more ranged weapons, including support weapons. The role_lastmanstanding overwrites all other roles when the 'Mech is the last of its Lance, even with other Lances in play, but is currently blank. Turrets and vehicles do not have a dynamic role but are assigned static ones appropriately. The turrets file is blank, and honestly I can't find anything I'd change in one anyway. Role_noncombatant is found on the various APC vehicles but the AI file is blank.



For example, in the Atlas' mechdef there is a listing of its tags:



"MechTags": {

"items": [

"unit_indirectFire",

"unit_mech",

"unit_assault",

"unit_release",

"unit_ready",

"unit_lance_tank",

"unit_role_brawler"

],



The "unit_role_brawler" is the tag to let the game know to use the role_brawler.json to before default values. In this case, the file is blank. The default global.json is effectively the brawler role and brawler is also the default role mechs fall back to. Some roles also have a limit to how many units may pull a certain role. For Brawlers and Snipers, this is found at the end of the CombatGameConstants.json:



"DynamicAIRoleConstants":

{

"hysteresis": 0.1,

"brawlerMinAbs": 0,

"brawlerMaxFrac": 1.0,

"brawlerTagMultiplier": 2.0,

"sniperMinAbs": 0,

"sniperMaxFrac": 0.75,

"sniperTagMultiplier": 2.0

}



We can see that anything tagged brawler or sniper has those tag weights doubled, where the "scout" role isn't managed by this multiplier system. The min/max should mean that no more than 3/4 of an enemy force can be using role_sniper.json at any one time. This means even if the entire enemy force is GRF-1N's, they won't all jump away and PPC snipe you forever, as one of them will pull brawler and close to contact.



The scout role emphasizes skirting the edges and surrounding the enemy, while lowering the values for melee related variables. The sniper role emphasizes staying put and shooting targets over the default closing to melee range. You can have up to 3 Scouts in a Lance, but 4 will force them all in to Brawlers and almost never return.

AI PERSONALITY + FACTION

These AIPersonality .jsons seem to be active but unused at this time. All faction files are empty and I do not know the variable needed to declare them. The AI Personality variable can been seen in the pilotdefs:



"AIPersonality": "Undefined",



I have not done any testing with either factions or personalities. I'd expect personalities to work if declared.

AI MOODS

The five moods are:

Aggressive

Defensive

Sensor Lock

Undefined

Ruthless (1.1 addition)

Aggressive is the default mood and will use the normal .json files. Defensive will trigger the use of the .jsons ending in _def like "global_def.json" before the default global. The individual role_def are all blank and global_def.json is basically the entirety of the defensive mood. The global_sensorlock.json is used when the AI has the right ability and chooses to Lock a target. It's mainly concerned with where to move the unit that is going to Lock. The Ruthless mood is new to 1.1 and it removes most terrain and self preservation weights to focus on dealing damage to the single priority target. I don't know if this is used at this time in certain missions, likely a WIP.

The global.json describes the default decision weights for all AI. When the AI is in a defensive mood (see moods below) it will pull on the global_def changes before the base global.json. Below in the spoiler field are my notes on the variables in beta, while the values have been changed and a lot have been removed, most of this still applies.