To really test that you'd want to switch back and forth between the melee and ranged AI packages and see the effects. Remember that the "default" CS will typically put them onto ranged, so you'll want to use the melee package to primarily see what you've got. Also, you'd want to shut down the game and restart it and load a save where you're sure the follower is sitting in the melee-specific AI package, and then have it engage in combat right away, and see if it uses that melee weapon without having to do anything to the follower to trigger it.
The drawing of melee weapons during combat search behavior is embedded in the guts of the game. I'm unable to prevent it by any means (and I can prevent a LOT) so, just ignore that.
Ok, I added two more packages - melee follow, melee wait, and quest variables and dialog to control and switch the packages between ranged and melee. I took the NPC through Tepid Sewers about a dozen times and took some notes. The settings are preserved across game saves. My theory on the game save is that when an NPC is loaded on starting the game, the AI package is applied last, so the CS in it will override the CS in both the NPC object and a script command that was done previously. An AI package CS definitely has a effect but it won't replace scripting and weapons control through scripts, IMHO.
Here's my notes from last night:
Melee Package enabled - starting with a knife and assault rife/ammo in inventory
Mirelurks outside of Tepid sewers - fired ranged weapon until getting within melee distance, then used melee weapon only
Enclave eyebot near Dukov's place - fired ranged weapon at it
Enclave soldiers near Dukov's place - used melee weapon until rendered unconscious
Inside Tepid sewers:
Molerats - used melee weapon only
Turret - always used ranged weapon at it.
raiders - used melee weapon only, when close to them - after turret was taken out with ranged weapon - the NPC did not appear to shoot at the raiders with it.
NPC seemed to use the more powerful ranged weapon during combat search behavior or from a distance if too many/too powerful enemies, then get closer and draw melee weapon. Saw it use the ranged
weapon on a raider that was fleeing (but there were a group of three raiders in this case) the NPC took them all out with the ranged weapon.
With lone raiders, or just two, like Rocksalt, would always rush all the way to them with melee weapon
Quicksave/fullsave/exitgame/restartgame several times - maintained melee behavior
Melee Package enabled - starting with knife only in inventory
Inside Tepid sewers:
Would loot raiders for a ranged weapon to use on the turret. When there wasn't any to be found, whould perform combat search behavior with melee weapon until attacked by the turret. Npc would
then fall back and take cover where I was at, seem to lose the target, and repeat the search behavior. (combat alert is turned off in the package) I placed a 10mm pistol and some ammo in a dead
raider and the NPC promptly looted it and attacked the turret with it. It then returned to the same melee behavior on the molerats and raiders as above.
If I took out the turret, the NPC would not loot a ranged weapon no matter how many enemies it faced further on and would attack them with the knife until rendered unconscious.
Quicksave/fullsave/exitgame/restartgame several times - maintained melee behavior
Melee Package enabled - starting with Assault rifle/ammo only in inventory
Inside Tepid sewers:
Would use the assault rifle on the first molerats and would promptly loot a knife from a container in the storeroom to the left (NPC would open the door to get to it.) or the first room to the
right. Would then perform the same behavior as the first scenario.
Ranged Package enabled - Same behavior as the my previous test in vault 87a. This time I verified that the ranged behavior is preserved across game saves.