Trying to display a character CG with multiple variables

I'm trying to create a Show Picture command that can be adjusted by three different variables. I want to have the character's CG change depending on the value of each variable. For example:

ShowPicture 1 Protagonist/Protag[variable1]_[variable2]_[variable3]

So depending on the variables the game will pull the character CG with the number code corresponding to each variable like this:

ShowPicture 1 Protagonist/Protag[5]_[1]_[2]

I have Gimmer_FolderPictures plugin installed so I can set up different folders for different characters, so 'Protagonist' is the folder in the above examples. I also have extremely poor javascript skills so really baby me through whatever solution you come up with. I'm a very visual person so I can get my head around RPG Maker MV well enough but I have repeatedly failed to grasp the basics of various coding languages. Any insight would be greatly appreciated
You can show a picture with a script and make up the name using variables:

// Show picture 1, pic.png, at 100% scale centred on (50, 50)
$gameScreen.showPicture(1, 'pic', 1, 50, 50, 100, 100, 255, 0);

For example if I set the value of game variable 11 to "black" and game variable 12 to "box", the following will show the picture: blackbox.png

$gameScreen.showPicture(1, $gameVariables.value(11)+$gameVariables.value(12), 1, 50, 50, 100, 100, 255, 0);
The vision is to have three moving parts to more effectively pull the image I need rather than having a hundred lines of conditional branches.

Capture.JPG


I need to change this so '0' is instead for example 'variable1-value0', and I want to do that for the first three numbers after the picture name.

Test.png


The result is that if the hair changes for example but nothing else changes, I'll only need to change the first variable to pull the image I need but I can ask for a specific version of the image by mixing and matching all three variables to pull an image with a different hairstyle, outfit, and condition without too much effort.

How would I write that in RPG Maker?
Did you try the method that was already given to you?

I don't see any reason that you can't reference folders in the filename if you're using the direct script call for it - that's all that the plugin is doing, internally. The plugin and its commands should be unnecessary.
The vision is to have three moving parts to more effectively pull the image I need rather than having a hundred lines of conditional branches.

View attachment 303893

I need to change this so '0' is instead for example 'variable1-value0', and I want to do that for the first three numbers after the picture name.

View attachment 303894

The result is that if the hair changes for example but nothing else changes, I'll only need to change the first variable to pull the image I need but I can ask for a specific version of the image by mixing and matching all three variables to pull an image with a different hairstyle, outfit, and condition without too much effort.

How would I write that in RPG Maker?
The plugin allows you to specify "var:" so you should be able to just use a game variable. Here is some of the code for the filename in the plugin you listed (around line 98):
JavaScript:
if (args[1].includes("var:")){
    filename = $gameVariables.value(args[1].replace("var:",""));
} else {
    filename = args[1];
}
Which means you should be able to just use the script call:
JavaScript:
$gameVariables.setValue(1, "Protagonist/Protag0_1_1");
and then the plugin command:
Code:
ShowPicture 1 var:1 RIGHT 525 40 75 75 255 0

Because of how the plugin is, you could use game variable 2 as an array and then plug it into variable 1 since the plugin command seems limited.
JavaScript:
const v = $gameVariables._data;
v[2] = [0, 1, 1];
v[1] = "Protagonist/Protag" + v[2][0] + "_" + v[2][1] + "_" + v[2][2];

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-display-a-character-cg-with-multiple-variables.168252/