The purpose of this thread is to serve as a reference point for modders to discuss ways of removing the melee bug.
As we are well aware, CA has, at least somewhat, removed the melee bug. However, as we are also painfully aware, it still at times shows its unwelcome face.
Given how much 'fun' musket fights are to watch and listen to with the news graphics, the new lethality of muskets, and that the AI will fair better if it finally just stands and shoots, and given that bayonets fights were hardly ever seen during the time, here is a source Bayonet Fights, let's see if we can discern how to further remove the probability of the constant charge on the part of the AI.
As noted by Darth, the AI seems to use its skimishers is a more sensible manner than its line infantry, and the melee bug itself seems to be triggered by units 'touching.' To remedy this I have tried increasing the range of muskets to 110 (a more historic value anyway if taken in meters), and I have also set my line infantry to 'Skirmishers/Light Infantry' class. However, I have not seen any real signifigance in this lessening the likelihood of massed AI charges, though I have notcied slightly more 'sensible' AI behavior.
Another suggestion I might make is removing 'Fire and Advance.' The seems to use this at every available junction. This botches AI spacing, leading to the 'touching' that may trigger AI charges. I have removed this not only have I noticed better AI spacing, but this did seem to lessen the likelihood of melees.