Skip to content

mr-shade/megathon-widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Megathon Widget Collection

StreamElements overlay widgets for YouTube and Twitch streams. This collection includes multiple interactive widgets for subathons, progress tracking, milestones, and surprise quests.

๐Ÿ“ฆ Widgets Included

โฑ๏ธ Subathon Timer

A countdown/countup timer for subathon streams with:

  • Configurable time values for different event types (subs, bits, tips, etc.)
  • Powerup mode for temporary multipliers
  • Sleep mode with reduced multiplier
  • Timer cap and lock features
  • Ko-fi integration
  • Confetti effects on milestones
  • Audio feedback

๐Ÿ“Š Progress Bar

An animated progress bar that tracks points/goals:

  • Real-time progress tracking
  • Customizable point values per event
  • Stack or wide display styles
  • Milestone-based or custom data tracking
  • Manual point adjustments via commands

๐ŸŽฏ Milestone Goals

Display and track milestone goals with rewards:

  • Up to 50 configurable milestones
  • Mystery/revealed goal modes
  • Particle effects on completion
  • Auto-scrolling goal display
  • Stretch goals support

โœจ Surprise Quest

Random timed challenges for viewer engagement:

  • Random quest selection from pool
  • Countdown timer with warnings
  • Point-based completion tracking
  • Success/failure states with effects
  • Configurable quest pool and timings

๐Ÿš€ Quick Start - StreamElements Deployment

Step 1: Access StreamElements Overlay Editor

Visit your StreamElements overlay editor:

Step 2: Add Custom Widget

  1. Click "Add Widget" in the overlay editor
  2. Select "Custom Widget" from the widgets list
  3. Choose the widget you want to add

Step 3: Configure Widget Files

For each widget folder (e.g., subathon-timer/):

  1. HTML Tab: Copy contents from widget.html
  2. CSS Tab: Copy contents from widget.css
  3. JS Tab: Copy contents from widget.js
  4. Fields Tab: Copy contents from fields.json
  5. Settings Tab: Configure widget settings as needed

Step 4: Save and Position

  • Click "Save" in the overlay editor
  • Position and resize the widget on your overlay
  • Test with StreamElements test events

๐Ÿ’ป Local Development Preview

Prerequisites

  • Modern web browser (Chrome, Firefox, Edge recommended)
  • Local web server (or use Live Server extension in VS Code)

Setup Local Preview

  1. Clone the repository:

    git clone https://github.com/mr-shade/megathon-widget.git
    cd megathon-widget
  2. Open the preview:

    • Navigate to the preview/ folder
    • Open index.html in a browser (via local server)

    Option A - Using Python:

    python3 -m http.server 8000
    # Then visit http://localhost:8000/preview/

    Option B - Using Node.js:

    npx http-server -p 8000
    # Then visit http://localhost:8000/preview/

    Option C - VS Code Live Server:

    • Install "Live Server" extension
    • Right-click preview/index.html โ†’ "Open with Live Server"
  3. Use the preview:

    • Select a widget from the dropdown
    • Use the Event Simulator to test events
    • Check browser console for debug logs
    • Storage is persisted in localStorage

Preview Features

  • โœ… Widget selector (all 4 widgets)
  • โœ… Mock StreamElements API (SE_API)
  • โœ… Event simulator (subs, bits, tips, follows, raids)
  • โœ… Local storage persistence
  • โœ… Reload/clear storage controls
  • โœ… Theme toggle for testing on different backgrounds

๐Ÿ”ง Widget Configuration

Common Settings Across Widgets

Event Values

Configure time/point values for different event types:

  • Twitch: Subscribers (T1/T2/T3), Gift subs, Bits, Tips, Follows, Raids
  • YouTube: Memberships, Superchats
  • Ko-fi: Tips and Subscriptions

Commands

Most widgets support chat commands for control:

  • Timer: !resume, !pause, !add [time], !subtract [time], !lock, !unlock
  • Progress: !addpoints [n], !subtractpoints [n], !setpoints [n], !resetpoints
  • Milestones: !addgoal [number] [reward], !removegoal [number], !resetgoals
  • Quests: !questson, !questsoff

Permissions

Configure who can use commands:

  • Broadcaster (always allowed)
  • Moderators (toggle)
  • Specific users (whitelist)

๐Ÿ“ Project Structure

megathon-widget/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ preview/
โ”‚   โ”œโ”€โ”€ index.html          # Local preview interface
โ”‚   โ””โ”€โ”€ mock-se-api.js      # Mock StreamElements API
โ”œโ”€โ”€ subathon-timer/
โ”‚   โ”œโ”€โ”€ fields.json         # Widget configuration fields
โ”‚   โ”œโ”€โ”€ widget.html         # Widget HTML structure
โ”‚   โ”œโ”€โ”€ widget.css          # Widget styles
โ”‚   โ””โ”€โ”€ widget.js           # Widget logic
โ”œโ”€โ”€ progress-bar/
โ”‚   โ”œโ”€โ”€ fields.json
โ”‚   โ”œโ”€โ”€ widget.html
โ”‚   โ”œโ”€โ”€ widget.css
โ”‚   โ””โ”€โ”€ widget.js
โ”œโ”€โ”€ milestone-goals/
โ”‚   โ”œโ”€โ”€ fields.json
โ”‚   โ”œโ”€โ”€ widget.html
โ”‚   โ”œโ”€โ”€ widget.css
โ”‚   โ””โ”€โ”€ widget.js
โ””โ”€โ”€ suprise-quest/
    โ”œโ”€โ”€ fields.json
    โ”œโ”€โ”€ widget.html
    โ”œโ”€โ”€ widget.css
    โ””โ”€โ”€ widget.js

๐Ÿ”— External Dependencies

All widgets use these external libraries (loaded via CDN):

๐ŸŽจ Customization Tips

Changing Colors

Edit the CSS file for each widget:

  • Timer: .timer, .bubble, .status classes
  • Progress: .progress-belt, .bar, .count classes
  • Milestones: .reward, .bubble classes
  • Quest: .quest, .quest-title classes

Modifying Event Values

Use the StreamElements overlay editor's "Settings" tab or edit fields.json:

  • Find the value field (e.g., valuesSubsTier1)
  • Change the default value property
  • Time format: "60s", "5m", "1h"
  • Point format: integer numbers

Adding Custom Audio

Update audio paths in fields.json or settings:

  • Upload audio files to a public URL
  • Update the audio path fields
  • Supported formats: MP3, WAV, OGG

๐Ÿ› Troubleshooting

Widget Not Appearing

  • Check browser console for errors
  • Verify all external scripts are loading
  • Ensure StreamElements overlay is set to the correct size
  • Check widget CSS display and opacity properties

Events Not Triggering

  • Verify StreamElements test events are working
  • Check if widget has loaded fully
  • Look for JavaScript errors in console
  • Ensure SE_API is available

Storage Not Persisting

  • Clear browser cache and reload
  • Check localStorage permissions
  • Verify StreamElements store API calls in console

Local Preview Issues

  • Make sure you're using a local server (not file://)
  • Check that external CDN scripts can load
  • Verify mock-se-api.js loads before widget scripts

๐Ÿค Contributing

Feel free to submit issues and enhancement requests!

๐Ÿ“„ License

This project is provided as-is for StreamElements overlay use.

๐Ÿ”— Links


Made with โค๏ธ for the streaming community

About

Streamelements Widget

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published