World Control

World Control

1M Downloads

Multiple Custom Alarm Sounds

34486 opened this issue ยท 16 comments

commented

Hello, I have followed the format given by the wiki, and was able to get one sound to work, but the others I have do not work.
The code follows as this:
{ sound here }
{ sound here }

I have opening and closing. Its like everything added after the first sound doesn't work. I was able to get all the sounds to work individually, so it is actually able to play it, it just wont let me play multiple of them.

1.12.2 2846.

Thank you very much!

commented

what's the code?

commented

Yeah I think you're suppose to do something more like

{
"alarm-fusion": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-fusion", "stream": true}]},
"alarm-me": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-me", "stream": true}]},
"alarm-power": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-power", "stream": true}]},
"alarm-power2": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-power2", "stream": true}]},
"alarm-water": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-water", "stream": true}]}
commented

sounds.txt

It is a .json for the real config, I had to change it to .txt to upload.

The first sound I put in the first line works, but anything after it will not. I am probably missing something obvious.

commented

I had tried that before, but I put your code in, and none of my sounds work again. Only the two default swhen I select fusion and me.

commented

well i guess something isn't working

commented

Hello,
Sorry for the wait, but I need some more data.
Can you post your worldcontrol.cfg file?

commented

wc.zip

wouldnt let me upload as cfg and i dont want formatting to break in .txt so there it is in a .zip

Thank you!
Also, I have not tried yet, would be be possible for me to make recipes for this mod using something like minetweaker, or is it not supported?

commented

Having the same problem as well. I tried first with multiple alarms but spent an hour trying different things and can't get any to work.
sounds.json
worldcontrol.cfg
sound files

commented

Yeah I think you're suppose to do something more like

{
"alarm-fusion": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-fusion", "stream": true}]},
"alarm-me": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-me", "stream": true}]},
"alarm-power": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-power", "stream": true}]},
"alarm-power2": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-power2", "stream": true}]},
"alarm-water": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-water", "stream": true}]}

I'm definitely not an expert here, but it looks like the issue is that it's missing a closing bracket. Going on that logic, 34486's original file only read the first sound [because it was enclosed in its own curly bracket] and ignored the rest for a similar reason.
Could be wrong though.

To get it to work, I'm guessing you do

{
"alarm-fusion": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-fusion", "stream": true}]},
"alarm-me": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-me", "stream": true}]},
"alarm-power": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-power", "stream": true}]},
"alarm-power2": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-power2", "stream": true}]},
"alarm-water": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-water", "stream": true}]}
}

EDIT: it seems that configuration does not work either.

commented

Nah, I'm just busy. Something will come, eventually

commented

;o Awesome! No rush though!!!

commented

Yeah idk. The only fix might be in an update, which probably will not come, as I beleive they have said they are not going to release anything new or something like that, and that people should do a fork or something, but I am not skilled or smart enough to be able to do anything bout it. I guess I would have to wait it out or deal with it lol.

commented

JellyDoge, I copied your setup directly, you need to reformat your JSON file, as follows:

{
  "alarm-4min": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-4min", "stream": true}]},
  "alarm-1min": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-1min", "stream": true}]},
  "alarm-10sec": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-10sec", "stream": true}]},
  "alarm-lockdown": {"category": "master", "sounds": [{"name": "worldcontrol:alarm-lockdown", "stream": true}]}
}
commented

@34486 If you have a chance, can you join our discord? I want to fix this issue, but need to be a bit more hands on, seeing as I can't replicate it in dev

commented

Yes, I will try your setup that you reformatted of JellyDoge's as well.

commented

Hey, works now, server side and client side! The configuration that JellyDoge made and youi reformatted works! Thank you!