User Tools

Site Tools


waffleiron

This is an old revision of the document!


Waffle Iron

Waffle Iron is a raffle system designed to select an active chatter at random in order to award them in some way. The most recent incarnation is web based, and consists of up to 4 separate but connected web pages.

It is important to note that the data is not stored on the server, that the controller expects all used pages to be open before operation, and that refreshing any of these pages can result in desync or loss of data (especially the controller), though efforts have been made to sync data at important points. As such, any pages used in OBS browser sources should disable both “Shutdown source when not visible” and “Refresh browser when scene becomes active”.

Pages

The URL scheme of the various pages is fairly simple, using a unique key that is consistent across all the URLs to instruct the server pass information to the proper pages. The [unique key] shown in each URL below should be exactly the same. Keep in mind that this unique key does not prevent multiple copies of the pages, so be sure to use a value that is unlikely to be used by others, and it is advisable to use one that is difficult to guess.

The Controller page will also generate buttons to copy the corresponding URLs, however these buttons are hidden if the window size is too small (such as mobile devices).

  • Controller -
    https://www.rgltv.com/raffle/[unique_key]
  • Output -
    https://www.rgltv.com/raffle/[unique_key]/output
  • Game name -
    https://www.rgltv.com/raffle/[unique_key]/gametext
  • Timer -
    https://www.rgltv.com/raffle/[unique_key]/timer

Controller

The controller is what operates the raffles and handles data. If this page is refreshed, all data will be reset to it's initial state; clearing bans, silent bans, past winners, alarm settings, etc.

The basic flow of a raffle goes as follows:

  1. Click “Accept entries” to start accepting entries. This will also change the display text of the output page to reflect that entries are open, and that sending a chat message will enter them into the raffle. The “Accept entries” button will now display “Spin”.
  2. As chatters enter the raffle, their names will appear in the “Raffle entries” box. Clicking the “x” next to their name in this box will remove them from entries and put them into the “Ban” box. Additionally, the total number of entries will be shown above the “Raffle entries” box.
  3. After waiting an arbitrary amount of time, click the button that is now labelled “Spin”. The winner will immediately show next to the “Winner chat messages” box, but be aware that the output page will take longer to display this information, via an animation of spinning through the names to choose said winner. If you clicked “Spin” as a mistake, you can click the “Undo” button that has appeared. This will return the output page to it's slow scroll state with all entries retained.
  4. As soon as a winner is chosen, all chat messages from the winner will appear in the “Winner chat messages” box. This will make it easier to see their response.
  5. Highlighting text within the “Winner chat messages” box will populate the “Game name” text input. This text input can also be manually entered/adjusted. Clicking the “Post game name” button will push this text to the “Game name” page for display via OBS browser source.
  6. If the winner is a subscriber, it will be displayed next to their name on the “Winner chat messages” box. The subscriber status will also properly alter the “Set timer” button. Clicking this button will start the appropriate countdown on the timer page.
  7. Clicking the button that is now labelled “Reset” will clear raffle entries and winner chat, as well as returning the raffles to the closed state. The button will go back to displaying “Accepting entries”.
  8. Repeat from the top as needed

Timer alarm sound can also be set via this page. The default is a random sound, but you can set a specific sound via the dropdown. Additionally, clicking the play icon next to a chosen sound in the dropdown will preview that sound.

Lastly, all links to the corresponding pages involved with this specific raffle controller id can be copied via their respective “Copy link” buttons, for easy pasting into OBS. These copy buttons are hidden on mobile/small browser windows.

Output

The output page is intended to be shown as an OBS browser source, directly to the audience. It should be loaded before attempting to operate the raffle via the controller. It is recommended to set the browser source to “Control audio via OBS” or make sure that the default audio device is being captured by OBS.

Game name

The game name page is initially blank, but will display text pushed via the “Post game name” button, from the “Game name” text input. You can populate this text field by highlighting text in the “Winner chat messages” box, or by directly typing.

This is intended to be shown as an OBS browser source. The text will center and wrap automatically. Be sure to set the width and height in the browser source properties in order to define this centering and wrapping to fit your layout. No audio is played by this page.

Timer

The timer page will count down from 15 or 20 minutes, depending on the subscription status of the winner. The timer will start when you click the “Set timer” button. If you have an alarm sound set, it will play when the timer reaches 00:00. There this page should also be shown as an OBS browser source, set to “Control audio via OBS” or have OBS capture the default sound device.

waffleiron.1735702165.txt.gz · Last modified: 2025/01/01 03:29 by kavoc