Probably the best way to do it is to have a protect command (with a two-way agreement like escort) where one person is able to protect another. It should persist if the two characters are moving around.
I think the ideal way to do it would be to test the attacker's weapon skill/stats against the protector's weapon skill/stats on every attack, similar to the way human shields work, but possibly favoring the attacker a bit more. Having a bodyguard should be helpful but not as sure of a thing. If the attacker fails their roll to get past the bodyguard, then their attack is calculated against the bodyguard instead of the target for that round, and so on.
Someone suggested using evasion in the calculation but some builds that make perfect sense for bodyguards won't be as good at that skill. Someone else suggested multiple bodyguards but that sounds like a coding nightmare.
The bodyguard's pose should be set to make it clear who they are protecting so that any potential attacker knows what they might have to contend with. Bodyguards probably should need to be unstealthed as the job is kind of the opposite of stealth.
The person being protected should probably not be able to attack. They're relying on their bodyguard to intercede and trying to stay out of the fight. If they choose to jump in it should break the protection status.
Weapon type (gun, shovel, etc) should offer no particular benefits beyond what they already have. Bodyguards should be able to block snipers.
thank you and god bless