Switchy
Play multiple characters in one world! Opt-in, customizable player profiles for hotseat multiplayer, lets plays, plural systems, RP servers, or just for fun!
Switchy
<!--suppress HtmlDeprecatedTag, XmlDeprecatedElement --> <center><img alt="mod preview" src="https://cdn.modrinth.com/data/ss0QuCRx/images/0fd2d9d7ccb66e457f7604e09803c1b6457418c6.png"/></center>
<center> Serverside player profiles for hotseat multiplayer, adventure maps, and plural systems.<br/> <b>Requires <a href="https://modrinth.com/mod/connector">Connector</a> and <a href="https://modrinth.com/mod/forgified-fabric-api">FFAPI</a> on (neo)forge.<br/></b> </center>
---
player profiles allows players to create and switch between player profiles, which save part of their player data.
This is both player-customizable and player-customizable. Here's a profile with %%MD1%% and %%MD2%% (+%%MD3%%):</br> player-customizable<br/> Support is also built-in (via data) for %%MD4%%, %%MD5%%/%%MD6%%, %%MD7%% (width/height), and %%MD8%%.
You can even fluently chat using the display names of other profiles, just like PluralKit:<br/>
</br> This is fully compatible with well-behaved chat bridges, like our cantilever fork!
Usage
> %%MD0%%: All mods that manipulate player data have a save corruption risk!<br/> Always take backups of your worlds, especially when updating mods.
Just run `/switchy` and follow the hints! This covers renaming, toggling components, and making new profiles.
After this, you can freely switch profiles via `/switch <name>` or by clicking `<switch>` in the profile list.<br/> Switching into a profile restores component data to the state it was in was when the profile was last used.<br/> So to change e.g. a fabric tailor skin for a profile, switch into the profile first, set the skin, and switch out.
You can use `/switchy say` to send a chat message as if you were switched into a specific profile.<br/> Use `/switchy edit <name> tag <prefix>text<suffix>` to match regular chat messages based on a pattern.<br/> Display names look slightly different to styled nicknames/chat, so just adjust their configs to match.
Profiles are per-world, so speed things up by running `/switchy export` to get your name/skin data to save to a .json file.<br/> To import, upload the file (e.g. to tmpfiles.org) and paste the link into `/switchy import all <url>`.<br/> You can also import from PK (and import from / export to Utter) - use `/switchy import <member/group>` to filter imports.
Compatibility
> Note: If Switchy crashes your 1.20 modpack, set `fastSingleplayerReconnect` to `false` in `config/switchy.toml`
For compatibility with new mods, components are defined like so:
```json5 // data/minecraft/switchy_components/inventory/ender_chest.json (minecraft:inventory/ender_chest) { "enabled": true, // whether to load the component at all. use this instead of deleting default files, as they'll regenerate. "codec": "inventory", // which codec (from the registry in SwitchyComponentTypes) to use to deserialize the data. defaults to "nbt" (passthrough) "path": "EnderItems", // NBT path targeting the part of player.dat to load from / modify to "preview": "inventory", // which text previewer (from the registry in SwitchyComponentTypes) to use in chat. null = toString(), use "trunc" for long data. Start with $ to use an NBT path for passthrough components. "prefix": "👁 ", // a prefix to add to the text preview, for glanceability "emptyChecker": "inventory", // which empty checker (from the registry in SwitchyComponentTypes) to use to prevent profile deletion for precious data. Start with $ to use an NBT path for passthrough components. "group": "inventory", // components with a matching group ID will be previewed and toggled as if they're one component "default": [], // default value. JSON serialized. set to "$copy" to copy the value from previous. set to null or omit to delete the key from player data as the initial value. "hidden": false // hides the component preview in the profiles list (still shown in the components list) } ```
Feel free to PR components (and previewers/etc with no dependencies) into the main mod - see no dependencies.
Switching data outside player NBT requires an addon. API TBD - Interested addon devs can hit up the issues page.
Afterword
If you're a plural system (or a friend to one) and appreciate our work, please consider reading and sharing sys.guide, our plurality handbook.
Switchy was our first original minecraft mod, made during the mod jam ModFest: Singularity.<br/> Since making it, the minecraft modding community has given us friendship, mentorship,<br/> endless favours, an outlet for self-expression, and reinforced our passion for software as an art.<br/> Everyone who's been a part of that - and you should know who you are - thank you.