Yeah, its crude, but I meant it for tutorial purposes rather than a plug-in.

I had no problem with the add-on models rotation so you should compare
both models in MED, and be sure they are 'facing' the same way there?
I had the same problem at first cause the helmets origin-rotation in
MED was a different rotation to the Character model.
Another point to remember, the add-on model's XYZ-origin in MED
is going to be placed at the Bone HINGE location of the character
model when attached. eg upperarm bone hinge is at the shoulder, so
the armor needs its XYZ-origin there, not centered. Get what I mean?
There ARE other things your final function will probably need to do,
but I havent gone into then cause this is your project, and I have my
own projects (and associated problems) to work on.
Remember Im a Noob too.

Other things Ive thought of that this function needs to manage:-
1) Storing to a global pointer so Armor parts can be removed/replaced/modified individually.
2) Rescaling of add-on model to match scaling of character model if there is a difference
Im sure there was more but I cant remember them now...
Please keep us posted on how you go.