MrBeam-TwitchChatSpawner icon

TwitchChatSpawner

Physical control-panel, Twitch, and Steam-friend friendly, enemy, armor, and boss spawning for H3VR 1.0.

By MrBeam
Last updated 14 hours ago
Total downloads 7
Total rating 0 
Categories Tweaks
Dependency string MrBeam-TwitchChatSpawner-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

nrgill28-Sodalite-1.5.1 icon
nrgill28-Sodalite

Modding API and tools for H3VR code plugins

Preferred version: 1.5.1
BepInEx-BepInExPack_H3VR-5.4.1700 icon
BepInEx-BepInExPack_H3VR

BepInEx pack for H3VR. Preconfigured and ready to use.

Preferred version: 5.4.1700

README

Twitch Chat Spawner

This is the original 2023 JediSpawner content upgraded in place with Twitch viewer spawning, a physical control panel, wrist-menu controls, armor selection, streamer protection, and chat bosses. The preferred TwitchChatSpawner bundle and Twitch Chat Spawner prefab names and the original JediSpawner and Jedit'sSpawner names are all accepted at runtime.

It can also use names from the player's local Steam friends list, so Twitch is optional.

Every spawned ally, enemy, and boss receives a nameplate above its head. The name comes from the matching chat file first, then the local Steam-friends fallback. If neither source provides a name, the mod chooses a built-in random name. A chat file left populated by LioranBoard is still treated as active input; clear or remove the file when switching fully to fallback names.

Spawn and movement destinations are sampled from H3VR's navigation mesh. Before issuing a movement order, the mod verifies that the destination has a complete navigation path. A Sosig that has not moved for three seconds while separated from the player receives a fresh reachable destination, with an alternate approach angle used when the direct path is disconnected.

In-game control panel

For armor switching, choose TCS: Open Armor Panel in the Sodalite wrist menu. The panel appears in your opposite hand and can be pinned with its lock icon. Point at a button and pull the trigger.

  • Use the left/right buttons to browse friendly outfits, enemy types, and enemy outfits. Changing enemy type resets its outfit selection.
  • Selections are shared with the main control panel and used by subsequent chat spawns. Bosses use the selected enemy outfit.
  • APPLY TO LIVING FRIENDLIES changes existing chat allies. APPLY TO LIVING ENEMIES + BOSSES changes existing chat enemies, including bosses. These buttons replace their current wearables.
  • The panel uses outfits already assigned to the spawner's friendly and enemy templates; add armor profiles to those templates in Unity to expand the choices.
  • The spawn buttons let you try the selected outfits immediately.

RANDOM T&H ARMOR is ON by default. Each friendly, enemy, or boss independently chooses a complete outfit from the game's registered Sosig enemy templates, including custom templates registered by installed mods. This is the shared runtime outfit catalog, not a filter limited to the active T&H character. Duplicate outfit references and outfits without wearable options are excluded. The outfit's normal accessory choices and spawn chances are respected; some outfits are clothing rather than protective armor. This works outside T&H as well.

With random armor enabled, the Apply buttons draw a separate outfit for each living Sosig. Failed replacements retain their previous armor. Switch random armor OFF to use the manual outfit arrows again; enemy type selection remains available in both modes. The mode is saved in Armor > Random T&H armor in the BepInEx configuration. If the runtime catalog is not ready, new spawns use their template outfit and Apply retains current armor.

The armor tablet follows ArpyTrooper LAMBDA's panel system: a Sodalite LockablePanel supplies the physical tablet, and its stock canvas is replaced with a bundled custom UniversalModPanel prefab. Native Sodalite pointable buttons handle the VR controls. Home and Back navigate between the home page and armor page.

Chat Spawner Armor Panel.prefab is editable in Unity. ArmorSwitchPanel binds the buttons and selection labels to the chat spawner. The editor tool Tools > Twitch Chat Spawner > Create Armor Panel generates the default prefab if it is missing, assigns it to the spawner, and preserves an existing customized panel. It also runs automatically after script import if the panel is absent. The spawner's ArmorPanelPrefab reference includes the panel as a bundle dependency. Build with the existing MeatKit build profile, then use TCS: Open Armor Panel in game.

Wrist-menu controls

Sodalite adds one entry to the H3VR wrist menu: TCS: Open Armor Panel. Use the custom tablet for friendly/enemy spawning and armor selection or application.

Keyboard shortcuts default to P for a friendly, Keypad 7 for an enemy, and B for a boss. All shortcuts can be changed in the BepInEx configuration.

Chat files

The following BepInEx settings are file-path values (not generic text settings). Existing configured paths continue to work:

  • Friendly name file
  • Enemy name file
  • Boss name file

By default they point to BepInEx/config/TwitchChatSpawner/friendly.txt, enemy.txt, and boss.txt. Absolute paths, paths relative to BepInEx/config, quoted paths, and environment variables such as %USERPROFILE% are supported. The files are opened with sharing enabled, so the mod can read them while LioranBoard has them open.

Each file may contain a plain viewer name:

ExampleViewer

It may also contain JSON:

{"name":"ExampleViewer"}

Or an INI file using Name, Username, Viewer, ViewerName, Chatter, DisplayName, TwitchName, or User:

[Spawn]
Name=ExampleViewer

Enable the matching Auto-spawn option to spawn whenever the file changes. When LioranBoard sends a spawn key instead, leave auto-spawn disabled to prevent duplicate spawns.

The enemy file also recognizes these boss commands:

!boss ExampleViewer
boss: ExampleViewer
boss ExampleViewer

A Twitch chat bridge or companion program must write the viewer name or command into these files. Twitch credentials should remain in that companion program rather than inside the H3VR mod.

Steam friends mode

When a chat file is missing or empty, the mod cycles through Steam friend display names. The friendly, enemy, and boss keyboard shortcuts and the armor-panel spawn buttons work normally, so no Twitch account or companion program is required.

Steam support is enabled by default. Its BepInEx settings can disable the fallback, limit it to online friends, or change the refresh interval. The list refreshes automatically at the configured interval. Names are read locally through H3VR's existing Steam connection; Steam IDs and friend data are not uploaded by this mod.

Boss system

Only one boss is allowed by default. A boss uses the currently selected enemy type and receives:

  • a BOSS: nameplate;
  • six times normal link integrity;
  • 1.25 times normal scale;
  • 1.1 times normal movement speed;
  • increased stun and bleed resistance.

The limits and multipliers are configurable under the Boss section. When the boss dies, the plugin reports that the streamer defeated the chat boss.

Streamer protection

Friendly Sosigs always use the player's current IFF. While protection is enabled, friendly guns pause when the streamer enters their firing lane and a blocked friendly repositions after one second. The mod also records shots fired by its registered allies and rejects matching bullet damage at the player's hitboxes. Enemy damage and shots fired by the streamer are unchanged. Damage whose source cannot be identified by H3VR, such as some indirect explosions, may still get through.

Take and Hold persistence

Living chat-spawned allies, enemies, and bosses are protected from the normal Sosig cleanup that runs when a hold starts. Ordinary Take and Hold enemies are unaffected, and chat Sosigs clean up normally after they die. This behavior is enabled by default and can be disabled with Preserve chat Sosigs during Take and Hold cleanup in the Safety section of the BepInEx configuration.

Building

Use Unity 5.6.7f1 and MeatKit. Build the project's chat-spawner build profile (Twitch Chat Spawner Build Profile.asset, or Jedispawner Build Profile.asset in projects that retain the original asset name). The runtime accepts both the current and legacy bundle names.

This version targets H3VR 1.0 / Update 120 and declares these Thunderstore requirements:

  • Sodalite 1.5.1;
  • BepInExPack H3VR 5.4.1700.

The scripts and H3VR API calls were compile-checked against the game assemblies imported from the current public H3VR 1.0 Patch 3 installation. After building, launch the game through your mod manager and test one friendly (P), one enemy (Keypad 7), one boss (B), and the wrist-menu controls before distributing the package.