Skip to content

Charm Slots

Traverse-Joe edited this page Dec 3, 2026 · 1 revision

A slot type is a named kind of slot, such as Ring, with a count, an icon and a position in the charm column. Orbis Charms ships nine standard slot types, all disabled until a mod enables them.

Enabling slots

From JSON

Server/OrbisCharms/EnabledSlots/<YourMod>.json:

{
  "Slots": { "Necklace": 1, "Ring": 2 }
}

From Java

In your plugin's setup():

OrbisCharms.enableSlotType("Necklace");
OrbisCharms.enableSlotType("Ring", 2);

The one-argument form uses the slot type's default count. A count you give replaces the default, so enableSlotType("Ring", 1) gives one ring slot even though the default is two.

When several mods enable the same type, players get the highest count requested, not the sum. A player's slots update the next time they join.

Adding a slot type

From JSON

Add Server/OrbisCharms/SlotTypes/<SlotId>.json to your asset pack. The file name is the slot ID.

{
  "Name": "server.mymod.slot.pocket",
  "Icon": "MyMod/Slots/Pocket.png",
  "Count": 1,
  "Order": 95,
  "AnyCharm": false
}
Field Type Default What it does
Name translation key none Display name for the slot type. Stored for future use; the UI currently shows the slot ID.
Icon path none Placeholder icon shown in empty slots, relative to Common/UI/Custom/.
Count integer 1 How many slots of this type a player gets.
Order integer 0 Position in the charm column; lower comes first. The standard types use 10 to 90.
AnyCharm boolean false Accept every charm, not only charms tagged for this slot.
Enabled boolean true Set false to define the type without showing it until a mod enables it.

Slot types you define are enabled by default. Set "Enabled": false if you're defining a type for other mods to opt into, the way the standard types ship.

To change a standard slot type, for example its icon or default count, ship a file with the same name (Ring.json).

From Java

OrbisCharms.registerSlotType("Pocket", 1);
OrbisCharms.registerSlotType("Pocket", 1, "MyMod/Slots/Pocket.png");
OrbisCharms.registerSlotType("Pocket", 1, "MyMod/Slots/Pocket.png", true);

The arguments are the ID, the count, the icon, and whether it accepts any charm. A slot type registered from Java is enabled straight away and appears after the asset-defined types. Registering an existing ID replaces it.

Slot icons

Icons follow Hytale's UI conventions:

  • Put them under Common/UI/Custom/ in your asset pack, for example Common/UI/Custom/MyMod/Slots/Pocket@2x.png.
  • Ship the @2x file at 128×128 pixels, and reference it without the @2x: "Icon": "MyMod/Slots/Pocket.png".
  • Match the vanilla armor slot icons: a flat silhouette in a muted blue-grey (#293646) on a transparent background.

What happens to items when slots change

If a slot type is removed, disabled, or its count lowered, charms already in those slots aren't deleted. They move to extra locked slots at the end of the column. Players can take them out, but nothing new can go in.

Clone this wiki locally