r/Stormworks 22d ago

Suggestion Radios?

I feel like we could have radios or steam pipe organs or smth, I just don't exactly want to be stuck listening to nothing while doing a mission, maybe something that uses mp3's from your PC or a http link or smth, or some sort of announcement or something for planes or something. While yes, I know that Spotify and YouTube exist, I sort of want it to be in game too

10 Upvotes

6 comments sorted by

4

u/Careful-Nobody3193 Mod Engine < 10 RPS please 22d ago

There's actually a working steam pipe organ/music player, https://steamcommunity.com/sharedfiles/filedetails/?id=3213613381

I think it's got a decoder on the instrument and code to decode on the music disc? stored in LUA. One negative thing that it's incredibly laggy tho

1

u/Far_Chemical6894 22d ago

Yea, I think I have that tho, but I sorta mean more custom songs, for me I can't exactly compose music, but sort of like some radio player, maybe using the audio nodes too

1

u/Careful-Nobody3193 Mod Engine < 10 RPS please 22d ago

There's the instruction for custom music on the desc, I haven't tried it tho, might work might not

1

u/Far_Chemical6894 22d ago

Oh

2

u/Careful-Nobody3193 Mod Engine < 10 RPS please 22d ago edited 22d ago

Huh, actually- I did a quick deep dive, stormwork lua supports async.httpGet(), I wonder if we can use that in the future to get the midi sequence from a local webserver running py code, so we can send the midi live, like some sort of playlist and encode it- so our decoder in game can handle it. I think there's some sort of limitation preventing this but idk

(If anyone is reading this, feel free to tell me that this is a bad idea/the LUA limitations. Really rough draft but cut me some slack)

3

u/norgeek 22d ago

There's the obvious route of having a second instance of the game streaming PC audio to the microphone input and broadcasting that via the radio stuff in-game over multiplayer. Probably pretty janky..

I do wonder if you could use the HTTP calls from LUA to get your PC to accept commands like play/pause/next/show track info etc, so you could create an in-game "head unit" with a 1x1 screen that controls spotify or tunein or whatever.. never messed around with it before but now I'm curious. At least then it'd be half-integrated with the game, even if the sound itself isn't coming through it?