Adjust volume of a custom Boombox tape

I added a custom boombox tape with the help of this guide: https://docs.ficsit.app/satisfactory-modding/latest/Development/Satisfactory/Audio.html
It works, but music plays at maximum volume and doesn't react to the volume slider. So i set up an audio bus, assigned my songs to this bus, created an RTPC parameter, linked bus' volume to that parameter and created an AK Game Parameter in Unreal for that RTPC. Then in GameWorld Module i used Bind on BPFunction on BPW Boom Box Player widget blueprint and in its PreConstruct event i subscribed to OnVolumeChanged event. It works and when i move volume slider i receive float values from 0 to 1. But now what? How do i send those float values to RTPC? In the guide it simply says "now you can update RTPC using blueprints" and on screenshot (second attached image) it shows SetRTPC node that accepts some Ak object. Is Ak a play event? But i don't manage play events directly, boombox does, i only placed references to my play events in the tape blueprint. And i don't see Set RTPCValue node, i have Set Global RTPC Value and Set Actor RTPC Value. I tried using Set Global RTPC Value (first attached image), but that didn't work. What am i doing wrong and what is the proper way to control volume of custom tapes?
Audio :: Satisfactory Modding Documentation
This page is a work in progress. Adding sound effects and music via mods can really help bring them to life. Coffee Stain uses the Wwi...
No description
No description
14 Replies
Robb
Robb2w ago
I'm not sure anyone has tried this yet so you may be breaking new ground I think you need to copy the rpc bus setting value from the base game to your own setting whenever is changes, not just when the slider within the boom box widget itself is adjusted. Or there might be multiple settings affecting the volume. For example, the equipment volume category, and the boom box volume, and that slider you're already using might be a per boombox instance setting?
SerGreen
SerGreenOP7d ago
That's a valid point. Tested it and boombox slider is indeed per boombox instance, so what i was trying to do is not the right way. Additionally, boombox volume should be affected by audio settings Effects Volume > Equipment Volume > Boombox Volume. None of which affect modded music by default. Okay, then i guess i should try adding RTPC voice volume for each individual music track instead of a bus, and then bind to something in the equipable boombox blueprint to be able to access currently playing AK event and adjust RTPC from there.
Robb
Robb7d ago
Correct, modded sound does not obey any of the vanilla sliders by default. Both Wwise and stock unreal I'm not sure I follow exactly what you're saying, but I think you should only need one bus for your mod, code to set that bus volume by combining the settings of the relevant vanilla stuff, then the final stage of the specific boombox instance's slider
SerGreen
SerGreenOP7d ago
Got it working. I couldn't figure out how to set volume of a bus, but setting up Voice Volume RTCP on each track has worked for me. So, here's my solution to adjusting volume of a custom tape: 1. Create Game Parameter in Wwise and set up RTCP Voice Volume for each audio track. 2. In Unreal use Bind on BPFunction node to bind to Construct event of the BPW_BoomBox widget blueprint. 3. BPW_BoomBox has a reference to BPW_BoomBox_Player that has volume controls. Bind event to OnVolumeChanged of the player - that's where you change the volume. 4. BPW_BoomBox has a reference to its boombox instance mBoomBox. Use Set Actor RTCP Value node to update volume and pass mBoomBox instance as an actor. 5. You also want to update RTCP value once in Construct event, otherwise tape will play silently until you adjust the volume slider.
No description
No description
SerGreen
SerGreenOP7d ago
This approach has an issue, though, where after changing Audio Settings (volume of sound effects, equipment, boombox), volume of the custom tape won't update until you touch the volume slider of a boombox or reload a save. Which is not that big of a deal imo.
Robb
Robb7d ago
hmm, I wonder if there is a way to listen for changes to the base game settings, otherwise you could work around it with a timer running in the background or something @Archengius if I recall correctly you suggested the approach of reading the base game volume settings since we can't reuse the vanilla busses directly. is there a way to subscribe to base game option changes?
Archengius
Archengius7d ago
Yes, through option system delegates The same way you subscribe to session settings or AGS
SerGreen
SerGreenOP6d ago
My solution has a multiplayer issue. In single player it works fine, but in multiplayer other players don't hear modded music until they touch that boombox instance (open boombox's menu and close it). Unequipping into inventory and re-equipping the boombox makes other players 'forget' it and stop hearing its music. Walking away too far from a playing boombox also makes you 'forget' about it, and after coming back you won't hear it play until you touch it again. It only affects songs that have Voice Volume linked to an RTCP, songs without volume control always work for all players. I suspect it's connected to this point i made:
5. You also want to update RTCP value once in Construct event, otherwise tape will play silently until you adjust the volume slider.
I suspect that RTCP value defaults to 0 (even though i made sure to make default value 1 in Wwise) and all songs play with volume 0 until you update RTCP with a value from a slider. Here i suggested doing it in Construct event of BPW_BoomBox in order to initialize RTCP, but i guess in multiplayer this event does not fire for other clients? What can i do to make sure a RTCP initializes on all clients?
SerGreen
SerGreenOP6d ago
I can't figure out what object has the appropriate event dispatcher for me to subscribe. Is it OnGameUserSettingUINeedsUpdate from FGGameUserSettings or is there an event specifically for changing volume sliders somewhere?
No description
Archengius
Archengius6d ago
SubscribeToDynamicOptionUpdate on FGGameUserSettings volume slider options start with RTPC. prefix for full names check option IDs in their assets in the modding project
SerGreen
SerGreenOP6d ago
Got it, thank you
Robb
Robb6d ago
Good stuff. Hopefully when we have the structure to allow Wwise files in the starter project we can have an example audio bus following what you've found here Did the dynamic subscription fix this issue or is that still open?
SerGreen
SerGreenOP6d ago
SubscribeToDynamicOptionUpdate allowed me to update volume on the fly when dragging sliders in Audio Settings, that is resolved and is working nicely.
But the issue with the multiplayer is still open. Events for a Boombox instance seem not to fire on clients that didn't interact with this specific instance. I tried binding on Construct, AudioVolumeChanged, PlaybackStateChanged, etc. - none print to the log of the second player until they open this Boombox's UI. After second player touches the Boombox, the first player can pick it up and any event will now fire for the second player too.
Robb
Robb6d ago
the boombox actor probably isn't considered network relevant by the client player until they interact with it... hmm...

Did you find this page helpful?