Skip to main content

Mount Scrolls

Every mount has a scroll: a consumable item that teaches the player to ride it. Using the scroll gives the player the mount's permission, so the mount shows up in their menu and wheel from then on.

Scrolls are a way to hand out mounts in game without touching permissions by hand: as quest rewards, shop items, dungeon loot or event prizes.

Using a Scroll​

Hold the scroll and click (left or right). The player:

  • learns the mount and gets "You learned to ride Horse! It's now in your mounts menu (/mountale).";
  • sees the summon particles in the mount's rarity color and hears the vanilla Memories unlock sound;
  • loses one scroll.

If the player can already ride that mount, by their own permission, a group or a wildcard, the scroll isn't used up. They get "You already know how to ride Horse."

What They Look Like​

Scrolls use the vanilla recipe scroll model. The icon is the scroll with the mount's icon in front.

  • Name — Mount Scroll: Horse, in the language of each player's game client (see Translations).
  • Description — What it teaches, the mount's speed and its description.
  • Frame and label — Each rarity gets its own item quality, Mountale_<Rarity>. It uses the vanilla frames closest to the rarity's color, with the color and name of the rarity, so a Legendary scroll looks like the Legendary tab of the menu.
  • Stack — Up to 10 per slot.

Item IDs​

Each scroll's id is Mountale_Scroll_ followed by the mount id, with every word capitalized:

Mount idScroll item id
horseMountale_Scroll_Horse
red_raptorMountale_Scroll_Red_Raptor
goblin_motorbikeMountale_Scroll_Goblin_Motorbike

Use these ids anywhere the game or another plugin takes an item: the vanilla /give, loot tables, shops or quest rewards.

Giving Scrolls​

/mountale give <player> <mount> [--amount N]

Gives scrolls of that mount to an online player (1 by default, up to 100). It takes the mount id, not the item id. It needs mountale.admin. If the player's inventory is full, the command says how many didn't fit. See Commands.

To unlock a mount without an item, use /mountale unlock <player> <mount>.

How It Works​

On every start, Mountale writes a small asset pack (HaporeLab:Mountale_Items, in generated-items/) with:

  • one scroll per mount in mounts/;
  • one item quality per rarity in config.json;
  • one Server/Languages/<language>/mountale.lang per game language with the names and descriptions.

The scroll runs the same chain as the vanilla recipe items: Mountale's Mountale_LearnMount interaction, then ModifyInventory to use one up. If learning fails, the chain stops there and the scroll stays.

Restart for new mounts

Scrolls are created when the server starts. A mount added to mounts/ gets its scroll on the next restart, not with /mountale reload. The same goes for changes to names, rarities or scroll texts.

Translations​

Item names are shown by each player's game client, so scrolls follow the language of the player's game, not Language in config.json. For each language the game ships, Mountale writes a mountale.lang from its own language files in lang/, edits included:

Game languageTaken from
English (en-US)lang/en-US.json
Spanish (es-ES)lang/es-PY.json
Portuguese (pt-BR)lang/pt-BR.json
Any otherA lang/ file of that language if you add one (for example fr-FR.json); if not, the game shows the English text

A game language uses the lang/ file with the same name, or else one of the same language (es-ES takes es-PY). The texts used are item.scroll.name, item.scroll.description, ui.mount_speed and the rarity names. Mount names and descriptions come from each mount's file and are the same in every language.

The chat messages you get when using a scroll are in the language of config.json, like the rest of Mountale's chat.

The permission is written to the server's first permission provider: the game's own, or the permission plugin that registered itself first.

Icons for Your Own Mounts​

The default mounts ship with scroll icons. A mount you add uses its own icon (Icon in its file) as the scroll icon. To get a scroll-style icon, add Common/Icons/ItemsGenerated/Mountale/Scroll_<IconName>.png (64×64) to the asset pack in mods/ that holds your mount, where <IconName> is the file name of the mount's icon (Scroll_IronBoar.png for Mountale/Icons/IronBoar.png). Mountale's art/mount_scroll_icons.py builds these icons from the vanilla scroll.