Rooms & Base Customization

This document details the Room building system, the refining and crafting pipelines, and the mechanics of swapping active rooms on a stream’s overlay.


🏰 Room Slots & Swapping Mechanics

A streamer’s base consists of a limited number of Room Slots (e.g., 3 to 5 active slots on the right side of the screen).

  • The Virtual Vault: A streamer can unlock and upgrade many more rooms than they have slots. Unplaced rooms reside in their virtual database vault.
  • Streamer Customization: The streamer can drag-and-drop rooms into active slots from their web dashboard.
  • Viewer Channel Point Redeems: If enabled by the streamer, viewers can redeem Twitch Channel Points or execute commands (e.g., !swap Tavern Smelter) to swap rooms in real-time.
    • Tactical Use: During a heavy boss fight, chat can redeem points to swap out a passive Smelter for a defensive Guard Tower or healing Shrine.

🔨 The Refining & Crafting Pipeline

Rooms are categorized by their function in the material and equipment progression loops:

graph TD
    subgraph Raw Materials
        RW[Raw Wood]
        RS[Raw Stone]
        RO[Iron Ore]
        RH[Mana Herbs]
        WH[Wheat]
    end

    subgraph Refining Rooms
        RW -->|Sawmill| P[Planks]
        RS -->|Masonry| SB[Stone Blocks]
        RO -->|Smelter| IB[Iron Bars]
        WH -->|Windmill| FL[Flour]
    end

    subgraph Crafting Rooms
        P -->|Fletcher| W1[Bows / Staves]
        IB -->|Forge| W2[Swords / Heavy Armor]
        RH -->|Alchemy Lab| PO[Potions / Flasks]
        RH -->|Scribe Library| SC[Spell Scrolls]
        FL -->|Bakery| BR[Bread / Food]
    end

1. Refining Rooms (Raw Processed)

These rooms refine materials gathered by viewers. Viewers with appropriate non-combat professions can work in these rooms to speed up production.

  • 🪚 Sawmill:
    • Inputs: Raw Wood Outputs: Planks.
    • Profession: Lumberjack (increases refining speed).
  • 🪨 Masonry / Stonecutter:
    • Inputs: Raw Stone Outputs: Stone Blocks / Slabs.
    • Profession: Mason (increases refining speed).
  • 🔥 Smelter:
    • Inputs: Iron Ore Outputs: Iron Bars.
    • Profession: Miner (increases refining speed).
  • 🌾 Windmill (Bakery Path):
    • Inputs: Wheat Outputs: Flour.
    • Visuals: A large, animated windmill that spins when active.
    • Profession: Farmer.

2. Crafting Rooms (Processed Equipment/Consumables)

Refined materials are brought here to craft gear and consumable buffs for the viewers’ persistent characters.

  • ⚒️ Blacksmith Forge:
    • Inputs: Iron Bars Outputs: Metal Swords, Shields, and Plate Armor.
    • Profession: Blacksmith.
  • 🎯 Fletcher / Bowyer:
    • Inputs: Planks Outputs: Bows, Crossbows, and Quarterstaves.
    • Profession: Fletcher.
  • 🧪 Alchemy Lab:
    • Inputs: Mana Herbs Outputs: Health/Mana Potions, defensive flasks, and combat buffs.
    • Profession: Alchemist.
  • 📜 Scribe Library:
    • Inputs: Herbs + Paper/Essence Outputs: Spell Scrolls (for consumable active spells) and Mage Tomes.
    • Profession: Scribe.
  • 🍞 Bakery (Bakery Path):
    • Inputs: Flour + Yeast/Water Outputs: Bread, Pies, and Pastries.
    • Buffs: Food items are consumed to boost character stats, health recovery, or rest stamina.
    • Profession: Baker.

🛡️ Utility, Passive, & Entertainment Rooms

These rooms do not produce items, but offer support, defense, or interactive systems during the stream.

  • 🍺 The Tavern:
    • Use Case: Resting area. Resting characters regenerate energy/stamina faster and receive a passive +10% stream XP buff.
    • Twitch Bits Integration (“Buy a Round”): When a viewer cheers with Bits (or sends a direct tip), the Tavern barkeep slides a mug of beer to all avatars currently resting in the Tavern, granting them a temporary stat boost (e.g. +25% attack speed) and a fun drinking emote.
  • 🏹 Guard Tower:
    • Use Case: Automated defense. Periodically shoots arrows or cannonballs at waves.
    • Archer Range Boost: Player avatars with the Archer class can enter/climb the Guard Tower, which increases their combat range (+50%) and safety from ground-melee monsters.
  • ⛩️ Shrine / Temple:
    • Use Case: Healing and buffs. Provides passive HP regeneration to all active defenders on screen and doubles the power of healing spells.
  • 🏦 Bank / Treasury:
    • Use Case: Shared resource vault. Increases the local gold cap and allows viewers to store resources in a shared “Streamer Pool” for upgrades.
  • 🌀 Portal Room:
    • Use Case: Fast travel. Reduces the cooldown timer required for viewers to hop their character from one streamer’s overlay to another.
  • 🎣 Fish Pond:
    • Use Case: Entertainment and resources. Viewers can idle here to fish.
    • Fishing Minigame: Supports active or passive fishing. Returns raw fish of various species (e.g. trout, salmon, legendary golden koi) and recorded weights/sizes (stored in the global player leaderboard records). Raw fish can be processed in the Bakery/Kitchen for food buffs.
  • 🎲 Mini-Game Arcade:
    • Use Case: Entertainment. Unlocks advanced mini-games (e.g., Roulette, Trivia) and increases payouts of the streamer’s unique resource.
  • 🏆 Trophy / Custom Hall:
    • Use Case: Branding. Displays custom images, text, sub-goals, or Twitch event trophies using the streamer’s unique resource.

🎨 Procedural Visual Randomization (Prop Pools)

To prevent streams from looking identical, rooms feature randomized interior decorations (props). The server only stores the global state (e.g., Tavern Level 2), while the client handles visual rendering variations locally.

How it Works (Client-Side Rendering):

  1. Anchor Points: Every Room scene in Godot contains designated Marker2D nodes representing anchor slots (e.g., wall_decor_1, table_prop_left, floor_prop_center).
  2. Prop Pools (By Level): Each room level defines a pool of possible visual assets (textures or packed mini-scenes) that are larger than the number of available anchors.
  3. Randomized Selection: When the overlay loads or upgrades a room, the Godot client:
    • Queries the room level.
    • Randomly selects unique items from that level’s pool.
    • Instantiates and positions them on the anchor markers.

Prop Pool Examples:

Room LevelDecoration Pool (Examples)Active AnchorsResult
Tavern Level 1[Broken stool, cobwebs, candle, dirt patches, crude wooden mug]3 SlotsLooks like a dusty, rundown tavern. Items are randomly selected.
Tavern Level 2[Polished stool, dartboard, banner, fine glass mug, small rug, framed painting]4 SlotsUpgraded, cleaner look. Still unique to each loading instance.
Tavern Level 3[Golden goblet, royal crest, stone hearth, luxury velvet curtain, grand chandelier]5 SlotsHigh-tier fantasy tavern look.

Technical Benefits:

  • No Database Clutter: The server does not need to store positions or item IDs for every stool or mug. It only tracks one integer: room_level.
  • Zero Network Overhead: WebSockets only transmit the upgrade trigger event. The heavy lifting of instantiating and decorating is offloaded to the client.