Maybe he's found a better way to do it than what I tried when I was modding, but I found tracking which clothing was being worn and displaying the correct image with the correct item of clothing on to be surprisingly tedious. In my case, I used conditional switch statements in my image definitions to automagically use the right clothing for each scene instead of dealing with if/then or some other method in the body of the code for each scene.
The problem is that meant I had to actually define all of my images, so that amounted to hundreds of image definitions and conditional switch statements. If I was only using 1 clothing item per scene then I wouldn't have needed any of that code. No conditional switch statements and zero image definitions. Doesn't sound like a big deal but I found myself constantly dealing with broken image links. It also does require significantly more render time, although I believe he saves some time by rendering the background separately and then overlaying a smaller image focusing on the characters on top of the background image.
Make two globals for each character: charclothvar and prevcharclothvar.
In your clothing change sub, have it set prevcharclothvar to charclothvar, and then set charclothvar to the variable that is being passed to it. So the clothing change sub will be like clothingchange(charvar, newsuit, charclothvar) and then have whatever flavor of tree you want pairing the suit with the correct charclothvar based on the passed charvar.
Then call the images by affixing the global to it.
So if we need "Alice" in "Swimwear1" our image is called Alice_Swimwear1 and the image is called as "Alice_" + aliceclothvar; we put that into a try, and in the exception catch for file not found, clothingchange(alice, prevaliceclothvar, default) and does "Alice_" + aliceclothvar again. Failing that would again trigger the clothingchange(alice, prevaliceclothvar, default), which would end up setting both her current and previous suits to default. If she doesn't have an image for her default suit for the scene, it'll enter an infinite loop.
This allows you to change costumes for specific scenes, and then lets your image request function handle changing people back into whatever they were previously wearing when they move into content that doesn't have that special suit and isn't setting its own.