Problem description:
So I want to make all the NPCs have 1 base icon and just add clothing to them when the world starts, instead of having a ton of different icons. I've gotten the base icon to show in-game and I can dress them all in one clothing icon, but I can't seem to randomly generate clothing to them so they aren't all wearing the same thing. I'm fairly new at coding still, but if you can't direct me in the right place I would love that :D. I just don't know what to look up T.T.
Well, first you should show what you've got working so we can help you expand on that.

But to start you'd likely want to either define your clothing as object types under one parent, then you could randomly pick from typesof() to get randomized clothing sets, or store a list of icons that can be used and pick() from that.
Well I currently have clothing sets defined as objects. And so far I have nothing really working. Everything I've tried didn't work in-game so I'm just at square one T.T. I mean I'll do the research I don't mind I just need someone to point me to where. Although how do I randomize typesof()? I've never seen that before o.o.
var/selected_type = pick(typesof(/obj/clothing)-/obj/clothing)
Ohhhh alright. God you guys are so good at this stuff T.T. Thank you!
layer change the icon state when the backpack moves south and north
In response to Torchiwacco
If the layer is subject to change, then you should use vis_contents instead of an overlay. Of course another option is two overlays: one with an icon that layers in front and one that layers in back, each with different directions.