UI Pages
UI Pages
Section titled “UI Pages”The Lootbags system includes several Hytale-native UI pages for players and administrators.
Reveal Page
Section titled “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
Section titled “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)
- Common —
-
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
Section titled “Controls”| Element | Description |
|---|---|
| OK | Closes the reveal page. Items have already been added to inventory (or dropped on the ground if inventory is full). |
Behavior
Section titled “Behavior”- When the player right-clicks a lootbag item, the lootbag contents are resolved and granted immediately
- If the reveal page is enabled (globally and per player), the page opens showing the received items
- Items that cannot fit in the inventory are dropped at the player’s feet with a notification
- Clicking “OK” or pressing Escape closes the page
- The reveal page lifetime is
CanDismissOrCloseThroughInteraction— the player can dismiss it by pressing Escape or clicking away
Direct Mode
Section titled “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
Section titled “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
Section titled “Layout”| Element | Description |
|---|---|
| Title | ”Lootbag Catalog” |
| Rarity Filter Buttons | All, Common, Uncommon, Rare, Epic, Legendary |
| Filter Info | Shows the count and active filter (e.g., “Showing 120, All”) |
| Entry List | 10 entries per page, each showing icon, name (rarity-colored), rarity badge, and content info |
| Page Navigation | Back/Next buttons with page indicator |
| Close Button | Closes the showcase page |
Entry Details
Section titled “Entry Details”Each lootbag entry displays:
| Field | Description |
|---|---|
| Icon | The item icon |
| Name | Display name, colored by rarity |
| Rarity Badge | Uppercase rarity label in brackets, e.g., [LEGENDARY] |
| Content Info | Summary line, e.g., “3 guaranteed + 2 random” or “5 guaranteed items” |
Behavior
Section titled “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)
:::info 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
Section titled “Dynamic Tooltips”When DynamicTooltipsLib is installed, all lootbag items display enhanced tooltips on hover.
Tooltip Content
Section titled “Tooltip Content”| Line | Description |
|---|---|
| Rarity Label | Color-coded rarity in brackets, e.g., [Legendary] in gold |
| Description | The lootbag’s description text (if defined) |
| Content Info | Item count summary, e.g., “3 guaranteed + 2 random” |
| Hint | ”Right-click to open” in yellow |
Example Tooltip
Section titled “Example Tooltip”[Legendary]An ancient chest of immense power5 guaranteed + 4 randomRight-click to openThe 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.