Skip to main content

UI Pages

The Lootbags system includes several Hytale-native UI pages for players and administrators.


Reveal Page

The reveal page is displayed when a player opens a lootbag (right-click). It shows the received items with a rarity-themed visual frame.

Appearance

  • Rarity Frame: A unique visual frame is shown based on the lootbag's rarity tier:

    • Common -- #LbFrameCommon (grey tones)
    • Uncommon -- #LbFrameUncommon (green tones)
    • Rare -- #LbFrameRare (blue tones)
    • Epic -- #LbFrameEpic (purple tones)
    • Legendary -- #LbFrameLegendary (gold tones)
  • Item Slots: Up to 8 items are displayed with their icons. Each slot shows:

    • The item icon
    • A tooltip with the item's display name (and amount if greater than 1, e.g., "Bread x5")
    • A stack count label (e.g., "x5") for items with amount > 1
  • Unused Slots: Any slots beyond the actual item count are hidden

Controls

ElementDescription
OKCloses the reveal page. Items have already been added to inventory (or dropped on the ground if inventory is full).

Behavior

  1. When the player right-clicks a lootbag item, the lootbag contents are resolved and granted immediately
  2. If the reveal page is enabled (globally and per player), the page opens showing the received items
  3. Items that cannot fit in the inventory are dropped at the player's feet with a notification
  4. Clicking "OK" or pressing Escape closes the page
  5. The reveal page lifetime is CanDismissOrCloseThroughInteraction -- the player can dismiss it by pressing Escape or clicking away

Direct Mode

Players can disable the reveal animation via /kslootbags settings animation off. When disabled:

  • No UI page is shown
  • Items are added directly to inventory
  • A chat summary is displayed:
    --- Golden Lootbag ---
    10x Gold Ingot [OK]
    5x Gold Nugget [OK]
    1x Diamond [FULL]
    --- 2/3 items ---
  • [OK] means the item was added to inventory
  • [FULL] means the item was dropped on the ground

The global revealPageEnabled toggle in config.json can force direct mode for all players.


Showcase Page

A read-only catalog page for browse-only servers. Registered via CoreAPI.registerNpcPageOpener("showcase_lootbag", ...) and opened when a player interacts with a configured NPC.

Layout

ElementDescription
Title"Lootbag Catalog"
Rarity Filter ButtonsAll, Common, Uncommon, Rare, Epic, Legendary
Filter InfoShows the count and active filter (e.g., "Showing 120, All")
Entry List10 entries per page, each showing icon, name (rarity-colored), rarity badge, and content info
Page NavigationBack/Next buttons with page indicator
Close ButtonCloses the showcase page

Entry Details

Each lootbag entry displays:

FieldDescription
IconThe item icon
NameDisplay name, colored by rarity
Rarity BadgeUppercase rarity label in brackets, e.g., [LEGENDARY]
Content InfoSummary line, e.g., "3 guaranteed + 2 random" or "5 guaranteed items"

Behavior

  • The showcase page is read-only -- players cannot edit or give lootbags
  • Rarity filters update the list instantly and reset to page 1
  • Any player who interacts with the configured NPC can view the catalog (no permission required)
Core Dependency

The showcase page requires KyuubiSoft Core to be installed, since it uses CoreAPI.registerNpcPageOpener(). If Core is not loaded, the showcase integration is silently disabled.


Dynamic Tooltips

When DynamicTooltipsLib is installed, all lootbag items display enhanced tooltips on hover.

Tooltip Content

LineDescription
Rarity LabelColor-coded rarity in brackets, e.g., [Legendary] in gold
DescriptionThe lootbag's description text (if defined)
Content InfoItem count summary, e.g., "3 guaranteed + 2 random"
Hint"Right-click to open" in yellow

Example Tooltip

[Legendary]
An ancient chest of immense power
5 guaranteed + 4 random
Right-click to open

The tooltip provider is registered under the ID kyuubisoft:lootbag at default priority. Tooltip data is cached using a hash of the item ID and rarity for performance.