Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
ValheimTwitch
Twitch interacts with Valheim through Streamer.bot: on-screen notifications, mob & item spawning with viewer-named enemies, native raid events, in-game /request item requests, and Twitch viewer portrait build pieces.
By CodeWithTD
CHANGELOG
Changelog
All notable changes to ValheimTwitch are documented here.
0.5.0
- Portraits reworked around one blank piece + per-piece viewer selection
(fixes placed portraits being invisible on Valheim 1.0 / Unity 6, where
the old per-viewer prefab activation no longer worked):
- One generic VT Portrait piece in the hammer's furniture menu. Place it blank, then press E on it to open the viewer picker and click a registered viewer; the piece immediately shows their avatar.
- The assignment is stored on the piece's own networked ZDO (vanilla
ZNetView.LoadFieldspersistence), so it survives reloads and syncs to every player with the mod; any player with the mod can reassign it. viewer_portraitnow registers/refreshes a viewer in the picker list (name + avatar URL) instead of creating a per-viewer build piece;viewer_portrait_removedrops a viewer from the list. Placed portraits keep showing their assigned viewer until reassigned or removed.[Portraits] MaxPortraitsnow caps the picker list (registered viewers), not build pieces.- The piece has a configurable build cost via
[Portraits] Cost(defaultWood:2, LeatherScraps:2, Raspberry:1, Mushroom:1, Blueberries:1); materials are refunded when removing it with the hammer. - The piece looks like a wooden tile (vanilla wood material, ItemDrawers style) with the avatar shown on the front; the viewer picker is styled after XPortal's panel (woodpanel, AveriaSerif, ValheimOrange header, dark dropdown-style rows).
- Diagnostics: placement, restore and avatar-download events are logged.
- Note: portrait pieces placed with 0.4.0 (per-viewer prefabs) will not restore in worlds saved with that version; remove them with the hammer before updating (they were invisible anyway on 1.0).
0.4.0
- Viewer-named enemies: optional
"viewer"field onmob_spawn/enemy_spawnwrites the viewer's name to the vanilla synced hover-name override (the tamed-pet name field), so every player sees e.g. "Andilippi's Troll" above the enemy's health bar. Rich-text characters are stripped from viewer names. - Twitch viewer portraits as buildable pieces:
viewer_portraitcommand ("name"+"url", https only): registers a framed "VT Portrait: <viewer>" piece in the hammer's furniture menu (free to build, rotates like any piece). The avatar is downloaded from the URL (e.g. the Twitch CDN image from Streamer.bot's Get User Info sub-action) and applied to the shared material.- Placed portraits are networked ZDOs, so they persist with the world;
the list of portrait pieces is kept in
BepInEx/config/CodeWithTD.ValheimTwitch.portraits.jsonand restored on world load. Remove placed copies with the hammer, andviewer_portrait_removedrops a viewer's piece from the menu. [Portraits] Enabled(default on) and[Portraits] MaxPortraits(default 10) config; portraits show for the host (co-op clients without the mod cannot resolve the custom prefab).
0.3.0
- Native Valheim raid events (host/server only; raids are shared world state
driven by the game's own
RandEventSystem, so HUD messages, music, spawners, durations and network sync are all vanilla behavior):raid_startcommand: a random native raid (the game's own roll, respecting biome/base/progression conditions) or a forced specific raid by name; rejected while another raid is in progress.raid_stopcommand: stops the raid currently in progress.[Raids] Enabledconfig gate.
- In-game
/request <item>chat command: resolves the item (multi-word requests like "fine wood" work), looks up a full stack size, and triggers a Streamer.bot action by name (WebSocketDoActionrequest) with the arguments%item%,%amount%and%player%- bind channel point costs, cooldowns, item granting, etc. in Streamer.bot. Action name is configured via[Requests] ActionName; no mod-side rate limit by design. - Root README.md restored (it had been overwritten with SPAWNS.md content).
0.2.0
- Manifest metadata refresh for Thunderstore.
0.1.0
- Initial Phase 1 baseline.
- Streamer.bot WebSocket client (Hello handshake, OBS-style challenge authentication, event subscriptions, auto-reconnect, graceful shutdown).
- Notifications through Valheim's own MessageHud (local player only, the
game's own font, position and timing):
show_messagecommand: top-left general text (title + message).show_notificationcommand: large yellow center-screen message.
- Automatic top-left notifications for Twitch follows, cheers, subs, resubs, gifted subs, gift bombs, raids and channel point redemptions.
- Spawning, executed only with host/server authority so spawned entities are
networked for all players:
mob_spawncommand: mob types (e.g. Greydwarf covers greylings, greydwarfs, shamans and brutes), variants and mixed levels rolled per creature, optional level ceiling.enemy_spawncommand: one specific enemy prefab, optional level.item_spawncommand: items into the inventory or dropped on the ground.
- Curated vanilla prefab catalog (bosses excluded); unknown names rejected, amounts clamped to configured limits.
- Configuration for WebSocket connection settings, spawning limits and debug logging.
- Thunderstore packaging (
package.ps1), with direct Mod Manager profile deploy for testing.
Not implemented yet
- Spawn and raid commands on a pure client (requires a server-side component and an RPC protocol; currently rejected by design).
- Bosses in the spawn catalog.