Respackopts/docs/filerpo/MultipleFileSelection.md

1.4 KiB

Select one of multiple files

This Allows you to pick between multiple files (3 or more files) using similar logic to Toggle Files But this requires multiple .rpo files to achieve the desired goal. You will need the PackID and EntryName from your respackopts.json5 that you created earlier if you have not, see Main Config on how to do so.

You will need to navigate to the file you would like to toggle inside your resource, and create a .rpo file for it in the same folder (directory).

Examples:

texture.png would be texture.png.rpo
some_recipe.json would be some_recipe.json.rpo

.rpo explanation :

You need a .rpo file per texture (except for the last one in your list) if you have 3 files to select between then you will need 2 .rpo files, if you have 4 files to select between then you will need 3 .rpo files and so on etc...

Layout:

This is your first .rpo with your first file:

{
    condition: "<your entry>",
    fallback: "path/to/second.json/.png"
}

This is your second .rpo with your second file:

{
    condition: "<your entry>",
    fallback: "path/to/thirdfile.json/.png"
}

Example:

{
    condition: "option_one",
    fallback: "path/to/secondfile.json"
}
{
    condition: "option_two",
    fallback: "path/to/thirdfile.json"
}