2021-09-15 15:17:32 +02:00
|
|
|
# Toggle Files
|
2022-06-04 19:43:49 +02:00
|
|
|
A condition can be looked at like an `IF` statement simply returning true/false to configure whether the texture/file should be loaded into the pack.
|
2021-08-30 14:38:03 +02:00
|
|
|
(Turns the texture "on" or "off").
|
2021-08-30 15:03:33 +02:00
|
|
|
You will need the `Pack ID` and `Entry Name` from your `/assets/respackopts/conf.json` that you created earlier
|
2021-08-30 14:38:03 +02:00
|
|
|
if you have not, see [Main Config](./MainConfig.md) on how to do so.
|
|
|
|
<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).
|
|
|
|
<br>
|
|
|
|
|
|
|
|
### Examples:
|
|
|
|
`texture.png` would be `texture.png.rpo`<br>
|
2021-08-30 15:03:33 +02:00
|
|
|
`recipe.json` would be `recipe.json.rpo`
|
2021-08-30 14:38:03 +02:00
|
|
|
<br>
|
|
|
|
|
|
|
|
### Layout:
|
|
|
|
```json
|
|
|
|
{
|
2022-06-07 23:23:14 +02:00
|
|
|
condition: "<entry name>"
|
2021-08-30 14:38:03 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
### Example:
|
|
|
|
```json
|
|
|
|
{
|
2022-06-07 23:23:14 +02:00
|
|
|
condition: "someTexture"
|
2021-08-30 14:38:03 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-02-19 15:10:53 +01:00
|
|
|
For more information on conditions, [read this](./AdvancedConditions.md)
|
2021-11-19 16:29:01 +01:00
|
|
|
|
2022-02-19 15:10:53 +01:00
|
|
|
### Toggle Directories
|
|
|
|
Directories ("Folders") can also be toggled without toggling individual files.
|
|
|
|
To do this, create a file in the directory you want to toggle titled `.rpo` (no file name).
|
|
|
|
Both conditions and fallbacks work like they do on files, however, specifying multiple fallbacks
|
|
|
|
for a directory will not work. In some cases, you may need to add `"DirFilterAdditive"`
|
2022-06-07 23:23:14 +02:00
|
|
|
to your `capabilities` inside your conf.json for fallbacks to work as expected.
|
2022-02-19 15:10:53 +01:00
|
|
|
Please be aware that you should NOT specify it unless you are SURE you need it, as it will worsen performance.
|
2021-11-19 16:29:01 +01:00
|
|
|
|
2021-09-15 15:17:32 +02:00
|
|
|
See [Switch between two files](./ToggleFilesWithFallback.md) to see how to swap textures out with each other (alternate Options)
|