Works in singleplayer and on server-side.
Switchy lets you use commands make presets that are stored with your player data.
Switchy will load modules that tell presets what to store.
When you switch presets, that data is saved to the old preset, then loaded from the new one.
Most modules provide inter-compatibility with other mods - be sure to follow the links.
You can hotswap these features out-of-the box by installing their relevant mods:
- Player Nicknames/Pronouns with either of:
- Drogtor The Nickinator
- Styled Nicknames (Note: Switchy force-allows nickname self-assignment)
- Player Skin with Fabric Tailor
- Player Origin with Origins (includes all layers, e.g. Statures)
- [Contributed by MerchantPug] Apoli power state - e.g. Origin power inventories, cooldowns
- Player height and size with Pehkui
- Detailed player profiles for conventions with Lanyard
More functionality can be added with these Addons:
- Switchy Inventories - separate inventories, ender chests, and trinkets (all disabled by default)
- Switchy Teleport - separate player position and spawn points (all disabled by default)
- SwitchyKit - import presets with nicknames (as above) with colours, pronouns and system tags - directly from Pluralkit or Tupperbox.
- Switchy Resource Packs - separate enabled resource packs per preset.
- Switchy Proxy - single-message nickname switching with custom patterns using either nickname mod.
These mods have Switchy support built-in:
- RPGStats - All 6 stats can be kept per-preset
Remember, switching does nothing on its own! Make sure you install a mod from above.
-
Use
/switchy listto see your current presets -
use
/switchy rename default [name]to give your starting preset a name -
/switchy new [name]will create and switch to a new preset -
/switchy set [name]or/switch [name]will switch between existing presets
When a module is Enabled, it makes things "switch" (load and save) per-preset.
/switchy module enable/disable [name] will toggle this for your presets.
/switchy module help will tell you about a preset, and what enabling it does.
These commands require switchy to also be installed on the client.
/switchy_client export will export all of your presets and modules to a file.
You can then move to another server or singleplayer world.
/switchy_client import [filename] will import all allowed modules (see below).
/switchy_client import [filename] [exclude] [operator] will import all allowed modules, except modules in [exclude], plus any modules in [operator] if you have OP level 2. You can use ~ to specify no modules.
Switchy doesn't and will not support permissions on its basic commands, and has no way to enable or disable modules server-wide.
However, you can minorly configure which players can import module data in /config/switchy/config.toml
Modules will be listed with one of four import settings:
ALLOWED: Importable by any player - can be changed toOPERATOR(e.g. origins)OPERATOR: Importable by operators when specified - can be changed toALLOWED(e.g. inventories)ALWAYS_ALLOWED: Importable by any player - can't be changed (e.g. nicknames/skins)NEVER: Can't be imported due to technical limitations - can't be changed
Switchy can be added to your project using modCompileOnly "folk.sisby:switchy-core:x.x.x" and this repo:
maven { // Switchy
url = 'https://maven.proxyfox.dev/'
content {
includeGroup 'folk.sisby'
}
}
If you want to test with switchy locally, add modLocalRuntime.
if you're making an addon, just use modImplementation.
In both cases, add these repos:
maven { // Lib39
url 'https://repo.sleeping.town'
content {
includeGroup 'com.unascribed'
}
}
maven { // Server Translations API
url 'https://maven.nucleoid.xyz/'
content {
includeGroup 'fr.catcore'
}
}
switchy-core includes commands and the API.
switchy-client enables import/export commands and a client API.
switchy-ui provides the client-side switch and manage screens, and module-displaying API.
switchy-cardinal provides data-driven CCA switchy modules and an API.
switchy-compat provides the built-in modules for drogtor etc.
switchy-compat-ui adds ui support to compat.
Adding new Modules allows more data to be switched per-preset. They only need to:
- Load and Save their data using NBT.
- Save their data from the player
- Load their data to the player
Just implement SwitchyModule and register it with SwitchyModuleRegistry using SwitchyEvents.Init - See Switchy Inventories for an example.
Switchy also includes am API for all its basic operations, as well as an events API for tracking switches and the current preset.
If your mod uses the Cardinal Components API to store its player/entity data, you can instead register a module using an instance of CardinalSerializerModule.
If your component performs all of its necessary sync logic within writeToNbt/readFromNbt (or has none) - you can instead use the static register method or even define the module in data.
Any data matching data/*/switchy_cca_modules/*.json will be loaded like so:
- File namespace and name - module namespace and path.
default: boolean, module is enabled for players by default.editable: See import configuration above.ifModsLoaded: mod IDs to check before trying to register the module.components: the cardinal components to swap.
This mod is primarily motivated by improving accessibility for plural systems.
Check out Plural Respect.
Switchy is inescapably a plural mod. It's motivated and maintained by a plural system.
Unlike the Quilt development community, the fabric development community is not safe for plural systems. Try moving your modlist to Quilt/QSL!
All mods are built on the work of many others.
We made this mod (up to v1.2.1) for Modfest: Singularity! However, we intend to maintain this mod into the future.
This mod is included in Tinkerer's Quilt - our modpack about ease of play and self-expression.
We're open to suggestions for how to implement stuff better - if you see something wonky and have an idea - let us know.
