UI Pages
UI Pages
Section titled “UI Pages”ShopBrowsePage (customer view)
Section titled “ShopBrowsePage (customer view)”Opens when a non-owner F-keys a shop NPC, or via /ksshop visit.
- Native 9x5 ItemGrid (45 slots)
- BUY / SELL mode toggle (only shown if both are configured for the shop)
- Items render at the exact slot position the owner placed them in the editor (slot 10 stays in slot 10)
- Tooltip per slot: item name, price (gold), stock (color-graded by quantity), click hint
- Click confirms quantity via slider, then commits the transaction
- Header shows shop name, owner, rating
- Returns chat confirmation:
Bought 1x Bread for 5 Gold/Sold 10x Stone for 50 Gold
Closed shops
Section titled “Closed shops”Non-owners F-keying a closed shop get a Shop is closed chat message instead of the browse view. The NPC stays visible with a [CLOSED] nameplate suffix.
ShopEditPage (owner view)
Section titled “ShopEditPage (owner view)”Opens when the owner F-keys their own shop NPC, or via /ksshop edit.
Three drag-and-drop grids: shop staging (top), your inventory (middle), your hotbar (bottom). Drag freely between all three.
Sub-tabs
Section titled “Sub-tabs”Settings:
- Shop name + description
- Category dropdown (from config)
- Shop icon picker (24-tile grid for the directory card)
- NPC skin field (PlayerDB username) + Apply Skin button
- Nameplate toggle (show/hide shop name above NPC)
- Directory listing block: status line (“Listed for 5d 14h” / “Rental: 6d 22h remaining” for rental-backed shops), days slider 1..30, live cost label, BUY/EXTEND button
- Pickup Shop button (red-tinted - packs the shop into a token, mails items + balance, NPC despawns)
Pricing: select a slot in the staging grid, then edit:
- Buy price + Sell price (separate fields)
- Daily quota (0 = unlimited)
- Stock cap
- Mode: Buy / Sell / Both
Revenue: total revenue, tax paid, mailbox status (unclaimed mails count).
History: transaction log paginated.
For rental-backed shops the Settings listing block reads:
Rental: 6d 22h remainingbecause the listing window is tied to the rental window. Reads from the slot’s rented_until (source of truth), not the shop mirror.
ShopDirectoryPage
Section titled “ShopDirectoryPage”Opens via /ksshop browse, /ksshop search <query>, or /ksshop myshops.
Card grid
Section titled “Card grid”8 cards per page, pagination (prev/next).
Per card:
- Avatar icon (configurable per shop)
- Shop name + owner name (or “Admin Shop” badge)
- Rating (stars + numeric average + count)
- Item count + listing remaining time (
5 items - Listed 3d 0h) - Distance from player
- Status badge (visibility-toggle: OPEN green / CLOSED red / FEATURED gold)
- Category tag
Click a card -> opens browse view of that shop.
Filters
Section titled “Filters”- Tabs: ALL / PLAYER / ADMIN / FEATURED
- Category dropdown
- Rating filter (min stars)
- Sort by: Rating / Sales / Recent
Item search mode
Section titled “Item search mode”/ksshop search <query> opens the directory in item-search mode: a 9x5 grid showing matching items across all listed shops. Tooltip carries the source shop name + owner + price. Click to open that shop.
myshops mode
Section titled “myshops mode”/ksshop myshops opens the same UI but with onlyOwnerUuid = self. Shows your shops regardless of listing state so you can find a delisted shop to extend.
ShopAdminPage
Section titled “ShopAdminPage”Opens via /kssa admin. Tabs: Shops, Players, Transactions, Rentals.
See Admin Panel for full breakdown.
RentalRentConfirmPage
Section titled “RentalRentConfirmPage”Opens when a player F-keys a vacant FIXED-mode rental slot.
- Header: slot display name +
FIXED PRICEbadge - Read-only rows: price/day, max days, your active rentals counter (
X / Yfromks.rental.limit.Nor config default) - Days slider 1..maxDays
- Live total cost:
days * pricePerDay - RENT (green) / CANCEL (grey) buttons
On RENT: validates funds + perm + cap, withdraws cost, creates a renter ShopData, despawns the vacant shell NPC, spawns the renter’s NPC.
RentalBidPage
Section titled “RentalBidPage”Opens when a player F-keys a vacant AUCTION-mode slot.
Top block (auction state)
Section titled “Top block (auction state)”- Time Remaining: live countdown, refreshes every 2s
- Current High Bid: amount + bidder name (or
-- no bids yet --) - High Bidder: name (or empty)
- Your Status:
You are the high bidder!/You have been outbid/No bid placed yet - Rental Period:
7 day(s) if you win(fromslot.maxDays) - tells bidders what they’re competing for
Auction state messages
Section titled “Auction state messages”auction_ends_at == 0-> Time Remaining readsAuction not active(between rounds)auction_ends_at <= now-> readsClosing...(will finalise within next 60s tick)
Middle block (bid history)
Section titled “Middle block (bid history)”Last 6 bids: bidder, amount, relative time (2m ago).
Bottom block (place a bid)
Section titled “Bottom block (place a bid)”- Minimum bid: current high + bidIncrement
- Slider min..max(
min*10, 10000) - Your balance label (green if affordable, red otherwise)
- PLACE BID (gold) / CLOSE (grey) buttons
Bids are NOT charged at bid time. Only the auction winner pays at finalisation.
Anti-sniping
Section titled “Anti-sniping”A bid arriving in the last auctionAntiSnipingSeconds seconds extends the round by that many seconds, with a chat broadcast to watching bidders.
MyRentalsPage
Section titled “MyRentalsPage”Opens via /ksshop myrentals. Self-service for active renters.
- 6 row max
- Per row: slot name, world/position, expires-in (live), revenue earned, item count
- Actions per row:
- OPEN EDITOR — routes to
/ksshop editfor that shop - EXTEND — opens RentConfirmPage in extend mode (adds days, clamped to
extendMaxDays) - RELEASE EARLY — confirm overlay; items mail back, gold refund per
releaseEarlyGoldRefundFraction
- OPEN EDITOR — routes to
Empty state: “You have no active rentals. Visit a station to rent a slot.” + BROWSE STATIONS button.
RentalStationPage
Section titled “RentalStationPage”Opens via /ksshop rentalstations. Multi-slot browse for the current world.
- Header: “Rental Slots in
” - Tabs: ALL / VACANT / AUCTION / RENTED
- Slot cards (4x2 = 8 per page, pagination)
Per card:
- Slot display name (white bold)
- Mode badge (FIXED green / AUCTION gold)
- State line:
- Vacant ->
Available - click to rent - Rented ->
Rented by <Name>+ remaining time - Auction open ->
High bid: X Gold+Ends in mm:ss
- Vacant ->
- Action button: RENT / BID / OCCUPIED (disabled)
Clicking a card opens the matching page (RentConfirm / BidPage) for that slot.
Live countdown updates every 2s for all visible cards.