It's a bit of both, but I think the 'Mech role is determined without considering the pilot ability. In the case of SLock, there is just a global setting for "Should I use SLock?" weighed on how much more potential damage the Lance could do to a target if it was Locked by the unit whos turn it is to move. But, if I put a Tactician in a HBK-4G, that 4G will never pull the Scout role, but it may trigger the Sensor Lock mood when it feels it needs to lock. The AI also seems to know they have Juggernaut or Breach, but each doesn't have an associated .json variable. Ace Pilot does have a specific Skill.json, the only "Skill" defined in the beh.Var folder; "Reckless" and just makes the AI to favor using shoot>move order when it can.Just an observation sir... role assignment based on mech chassis, wont that be affected by the mechwarrior expertise piloting that mech? Like what if an assigned brawler mech is piloted by a tactician?
In my mod, I set the 'Mechs with Scout tags to have a lower trigger for SLock, so Tactician types who are also driving Scout 'Mechs will be more likely to Lock than Tacticians in Brawlers who should probably be firing. That's the idea, but it doesn't always work out in practice. Wish I could figure out how get the AI to Lock "smartly" in that it doesn't lock anything already in sight and flat-footed in addition to the rest of the Lance just not following up on the Locked target. My base Lock trigger is higher, 60 vs 35 dmg and Scouts are at 30. Note that all Turret "Pilots" have the SLock skill and if they can't fire will usually Lock anything in range, even if it's a waste as they got nothing else to do.