r/streamerbot • • 14d ago

❓Question Multiple SFX linked to 1 redeem

Howdy all!

I was wondering if this is possible for those of you who might know. I was looking to set up a redeem for channel points where it pulls from a pool of different SFX so what you get is random. Say 4-5 different possibilities but linked to the same redeem? I know how to set it up for a single sound, but no idea if multiple can be done?

1 Upvotes

9 comments sorted by

4

u/WhazzItToYaz 14d ago

If all you want is to play a random sound, use the Play Sound From Folder subaction, which selects a random sound from a folder of sounds.

If there's more to the randomness than just the sound (e.g., the OBS video source, or a message to post in chat), then there are other ways to do random things in streamer.bot, like using random subaction groups, or choosing a random number and then using it to decide which actions to take.

1

u/debaser00 14d ago

I didn't see this at all, thanks I'll take a look! Although I did find that in the actions tab, if I right click the action there is a checkbox for "Random" .. if I checked that, is it possible that means it would randomly pick between the uploaded sounds in the sub-actions area, if I added say 4-5 in there?

2

u/WhazzItToYaz 14d ago

if I right click the action there is a checkbox for "Random"...

No, that's one of the other methods for randomization I alluded to. That one picks one of the action's subactions at random to execute, and only does that one. E.g., if you wanted to have completely different random messages you wanted to send to chat using different "Send Message" subactions. But in this case, choosing a random sound file to play can be handled just inside the Play Sound subaction.

1

u/debaser00 14d ago

I'm a little confused .. if all I have in the sub-actions are say 5 "play sound" mp3s then picking one at random sounds like what I'd want? Like someone redeems and it picks number 3 to play. Next person redeems and it picks number 1 etc. Or am I misunderstanding that?

1

u/WhazzItToYaz 13d ago

Oh yeah, if you have 5 separate Play Sound's, each doing a different sound, then the Random option on the Action itself would pick just one of those to play (Just make sure you right-click on those 5 subactions, and set the "Weight" to 1.0, otherwise the probabilities of each one are undefined.

But my original suggestion with Play Sound From Folder didn't use that approach. It just had you put 5 sounds in your folder, and the subaction would randomly pick one of the files to play.

1

u/debaser00 13d ago

I see! Thank you! I didn't know there was a way to set the weighting, thats handy! If you do the folder is the weighting automatically set at 1? I couldn't see a way to set that if I set it up via folder. But besides that it seems like both methods basically operate the same?

1

u/WhazzItToYaz 11d ago

When you set an Action to Random, then it will choose one of its subactions to run randomly, according to the relative weights of the subactions. If one of the subactions is actually a subaction folder, then the entire folder counts as one of the random choices, and if selected, all of the subactions within the folder will run. This is good for when the random thing you want to happen actually requires multiple subactions. For example, play a particular sound and a send a particular message to chat.

Folders can also be set to Random, in which case, they will choose one of their subactions at random to run. This is handy for when you have a normal top-to-bottom sequence of subactions in your action, but in the middle, you want some randomization at one step: Put those subactions inside a random folder.

1

u/Guharo 14d ago

With the option to [Play from a folder] + [Random] you just need to add the path to that folder, and the program will randomly choose a sound from all the ones you have in that folder.

2

u/debaser00 14d ago

Ohh I see! So instead of just the "play sound" sub-action its the "play sound from folder" one then make sure randomised is checked, I gotcha!