Integration

PolyPop

Control PolyPop VTuber avatars and alert systems with full support for animations, scene management, property control, and event integration.

Overview

PolyPop is a powerful VTuber avatar and alert system that enables streamers to create engaging visual content. FaustBot connects to PolyPop to provide seamless control over:

Alert Triggering

Trigger custom alerts with messages and dynamic data.

Animation Control

Play, stop, and customize avatar animations.

Scene Management

Switch scenes with customizable transitions.

Property Control

Set and animate overlay properties in real-time.

Source Visibility

Show, hide, and toggle overlay sources.

Event Integration

Subscribe to PolyPop events for reactive automation.

Setup

Connect to PolyPop

FaustBot connects to PolyPop via its WebSocket API. Ensure PolyPop is running and has its API enabled before connecting.

1

Enable PolyPop API

In PolyPop, open Settings and navigate to the API section. Enable the WebSocket API and note the port number (default: 8080).

2

Configure FaustBot

In FaustBot, go to Integrations → PolyPop in the sidebar. Enter the host (usually localhost) and port number from PolyPop.

3

Connect and Verify

Click Connect to establish the connection. Once connected, FaustBot will automatically discover available animations, scenes, and sources.

Auto-Connect

Enable Auto-Connect to automatically connect when FaustBot starts. Ensure PolyPop is launched before FaustBot for automatic connection to succeed.

Effects

Alert Effects

Trigger Alert

Display a custom alert with message.

Trigger Timed Alert

Display alert for a specific duration.

Animation Effects

Play Animation

Start an avatar animation.

Stop Animation

Stop a running animation.

Trigger Custom Animation

Execute custom animation triggers.

Scene Effects

Switch Scene

Change to a different scene.

Transition Scene

Switch with custom transition.

Property Effects

Set Property

Set an overlay property value.

Animate Property

Smoothly animate a property change.

Show Source

Make a source visible.

Hide Source

Make a source invisible.

Toggle Source

Toggle source visibility.

Scripting API

Control PolyPop from your scripts using the CPH API:

Alert Triggering

Trigger alerts with custom messages and optional parameters for duration and styling.

Alert triggering
# Trigger a simple alert
CPH.PolyPopTriggerAlert("welcome_alert", "Hello World!")

# Trigger alert with duration (in ms)
CPH.PolyPopTriggerAlert("sub_alert", "New subscriber!", 5000)

# Trigger alert with custom data
custom_data = {"color": "#FF5500", "size": "large"}
CPH.PolyPopTriggerAlert("custom_alert", "Special event!", 3000, custom_data)

Animation Control

Play and control avatar animations with speed, looping, blend times, and layer control.

Animation control
# Play an animation
CPH.PolyPopPlayAnimation("wave")

# Play with custom speed and looping
CPH.PolyPopPlayAnimation("dance", speed=1.5, loop=True)

# Play with blend time and layer
CPH.PolyPopPlayAnimation("idle", speed=1.0, loop=True, blendTime=0.5, layer=1)

# Stop a specific animation
CPH.PolyPopStopAnimation("dance")

# Stop all animations
CPH.PolyPopStopAnimation("", stopAll=True)

# Get available animations
animations = CPH.PolyPopGetAnimations()
for anim in animations:
    CPH.Log(f"Animation: {anim['name']}, Duration: {anim['duration']}")

Scene Management

Switch between scenes and retrieve scene information for dynamic content management.

Scene management
# Get current scene
current = CPH.PolyPopGetCurrentScene()
CPH.Log(f"Current scene: {current}")

# Get all available scenes
scenes = CPH.PolyPopGetScenes()
for scene in scenes:
    CPH.Log(f"Scene: {scene['name']}, Active: {scene['active']}")

# Switch to a scene with default transition
CPH.PolyPopSwitchScene("gaming_scene")

# Switch with custom transition
CPH.PolyPopSwitchScene("just_chatting", "fade", 500)

# Get scene properties
props = CPH.PolyPopGetSceneProperties("gaming_scene")

Property and Source Control

Manipulate overlay properties and source visibility with instant or animated changes.

Property and source control
# Get a property value
opacity = CPH.PolyPopGetProperty("opacity", "avatar")

# Set a property instantly
CPH.PolyPopSetProperty("opacity", 1.0, "avatar")
CPH.PolyPopSetProperty("scale", 1.5, "logo_overlay")

# Set property with animation
CPH.PolyPopSetPropertyAnimated("opacity", 0.5, 1000, "easeInOut", "avatar")
CPH.PolyPopSetPropertyAnimated("rotation", 360, 2000, "linear", "spinner")

# Control source visibility
CPH.PolyPopSetSourceVisibility("webcam", True)
CPH.PolyPopToggleSourceVisibility("chat_overlay")

# Set source-specific property
CPH.PolyPopSetSourceProperty("text_box", "text", "Hello Stream!")

Connection Status

Use CPH.PolyPopIsConnected() to check if PolyPop is connected before making API calls. Use CPH.PolyPopGetConnectionInfo() to retrieve connection details including host and port.

See the full API reference for all available PolyPop methods.