Respackopts/docs/filerpo/MultipleFileSelection.md

53 lines
1.4 KiB
Markdown
Raw Normal View History

2021-09-15 15:17:32 +02:00
# Select one of multiple files
2021-08-30 14:38:03 +02:00
This Allows you to pick between multiple files (3 or more files) using similar logic to [Toggle Files](./ToggleFiles.md)
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
2022-08-30 13:31:08 +02:00
if you have not, see [Main Config](../setup/MainConfig.md) on how to do so.
2021-08-30 14:38:03 +02:00
<br>
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).
2021-08-30 14:38:03 +02:00
<br>
### Examples:
`texture.png` would be `texture.png.rpo`<br>
`some_recipe.json` would be `some_recipe.json.rpo`<br>
2021-08-30 14:38:03 +02:00
### `.rpo` explanation :
2022-12-08 19:00:41 +01:00
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...
2021-08-30 14:38:03 +02:00
### Layout:
This is your first `.rpo` with your first file:
2021-08-30 14:38:03 +02:00
```json
{
condition: "<your entry>",
fallback: "path/to/second.json/.png"
2021-08-30 14:38:03 +02:00
}
```
This is your second `.rpo` with your second file:
2021-08-30 14:38:03 +02:00
```json
{
condition: "<your entry>",
fallback: "path/to/thirdfile.json/.png"
2021-08-30 14:38:03 +02:00
}
```
### Example:
2021-08-30 14:38:03 +02:00
```json
{
condition: "option_one",
fallback: "path/to/secondfile.json"
2021-08-30 14:38:03 +02:00
}
```
```json
{
condition: "option_two",
fallback: "path/to/thirdfile.json"
2021-08-30 14:38:03 +02:00
}
```