help with different fallbacks #2

Closed
opened 2023-09-15 00:18:25 +02:00 by spaghettube · 1 comment

Hey there! Im using respackopts and so far ive had no issues - following the wiki you provided has been easy - however there is one thing i dont understand.

Respackopts supports specifying multiple possible fallbacks when configuring single files. You can use this functionality as follows:

{
    condition: "<entry name>",
    fallbacks: [
      "location/of/the/file",
      "assets/minecraft/textures/example/alternate.png"
    ]
}
{
    condition: "someTexture"
}

Here you state that multiple fallbacks can be set but i dont understand how they can.
Ive used the fallback function to change in between the original sounds.json and an alternate one which was functional and with no issues. I then wanted to do the same but have another different fallback alternative which would be chooseable by the user, but i cant seem to understand how.
Using a single sounds.json.rpo with the example above all together in one file would obviously not work because a double object entry is invalid.
Please let me know if I wasnt clear enough with my explanation of my issue and thanks!

Hey there! Im using respackopts and so far ive had no issues - following the wiki you provided has been easy - however there *is* one thing i dont understand. ```Another way to do this: Respackopts supports specifying multiple possible fallbacks when configuring single files. You can use this functionality as follows: { condition: "<entry name>", fallbacks: [ "location/of/the/file", "assets/minecraft/textures/example/alternate.png" ] } { condition: "someTexture" } ``` Here you state that multiple fallbacks can be set but i dont understand *how* they can. Ive used the fallback function to change in between the original sounds.json and an alternate one which was functional and with no issues. I then wanted to do the same but have another different fallback alternative which would be chooseable by the user, but i cant seem to understand how. Using a single sounds.json.rpo with the example above all together in one file would obviously not work because a double object entry is invalid. Please let me know if I wasnt clear enough with my explanation of my issue and thanks!
Owner
  1. Create a .rpo file for the original options that contains a condition and the two fallbacks
  2. Create a .rpo file for the first fallback that only contains a condition

If the condition on the original file is met, it is used. If it is not met and the condition on the first fallback is met, that is used. Else, the second fallback is used.

1. Create a .rpo file for the original options that contains a condition and the two fallbacks 2. Create a .rpo file for the first fallback that only contains a condition If the condition on the original file is met, it is used. If it is not met and the condition on the first fallback is met, that is used. Else, the second fallback is used.
Comment
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: JfMods/Respackopts#2
No description provided.