Skip to content

Packwiz extensions

Una edited this page Feb 3, 2023 · 14 revisions

Packwiz extensions

Flavor groups

To provide support for unsup's "flavor groups" in a Packwiz manifest, you can add a structure like the following to a file named unsup.toml:

[flavor_groups.rendering_mod]
name = "Rendering Mod"
description = "Which rendering mod you'd like to use.\nIncreases or decreases performance depending on choices."
side = "client"
[[flavor_groups.rendering_mod.choices]]
id = "no_rendering_mods"
name = "None"
description = "No rendering mods."
[[flavor_groups.rendering_mod.choices]]
id = "sodium"
name = "Sodium"
description = "Installs Sodium and Indium, greatly increasing performance."
[[flavor_groups.rendering_mod.choices]]
id = "iris"
name = "Iris"
description = "Installs Sodium, Indium, and Iris, increasing performance and providing support for OptiFine shaderpacks."
[[flavor_groups.rendering_mod.choices]]
id = "canvas"
name = "Canvas"
description = "Installs Canvas, providing support for Canvas shaderpacks."

[flavor_groups.hard_mode]
name = "Hard Mode"
side = "both"
choices = ["hard_mode_off", "hard_mode_on"]

To inform unsup that an unsup manifest exists, you must add this to the versions section in pack.toml:

unsup = "0.2.0"

Extra data not recognized by packwiz will be deleted when packwiz next modifies the file, so unfortunately this data can't be included inline in metafiles. To specify flavor ownership, you can add something like this to the unsup.toml:

[metafile.sodium]
flavors = ["iris", "sodium"]
[metafile.indium]
flavors = ["iris", "sodium"]
[metafile.iris]
flavors = "iris"
[metafile.canvas]
flavors = "canvas"

The section header is the name of the metafile, without the .pw.toml suffix. Any metafile with a matching name will be affected by this.

Any optional mods that do not have a flavor group assigned will have one automatically generated for them, named after the metafile and with two choices, to turn it on or off. This will render as a checkbox in the GUI.

Note that flavor names are globally unique, and if two flavor groups both specify a choice of the same ID, they will interfere.

If Packwiz adds support for optional mod groups, unsup will gain support for this and this functionality will be deprecated.

Clone this wiki locally