OreCruncher / BetterRain

Based on the BetterRain mod from Wirsbo
20 stars 12 forks source link

[Enhancement] Add periodic sound emitter #103

Closed DrakoAlcarus closed 8 years ago

DrakoAlcarus commented 8 years ago

In the 1.7 version I am using, the game keeps clearing the config file of blocked sounds and the config file I made to try to add sounds. It's getting extremely annoying and I even updated the mod today.

Also, the page you linked me doesn't tell me where to add sounds, but I can't find a way to add or run the sounds anyway because of the persistent issue above.

OreCruncher commented 8 years ago

How are you updating the config file? The entry is a Forge config string list where each entry has to be on a separate line. Example:

    S:"Blocked Sounds" <
         dsurround:monstergrowl
     >

This following not work and cause the config file to reset:

    S:"Blocked Sounds" <dsurround:monstergrowl
     >
DrakoAlcarus commented 8 years ago

Oh. My error was that I put the list items in front of the borders. let me try again and see if my current config will operate.

DrakoAlcarus commented 8 years ago

Well, now the list items don'y get removed, but the config I added doesn't seem to be working. Here is my setup:

{ "entries":[ { "biomeName":"Underground", "sounds":[ { "sound":"dsurround:rumble1", "volume":0.3, "spot":true, "weight":100 }, { "sound":"dsurround:rumble2", "volume":0.3, "spot":true, "weight":100 }, { "sound":"dsurround:rumble3", "volume":0.3, "spot":true, "weight":100 }, { "sound":"cave:cave_hit1", "volume":0.3, "spot":true, "weight":25 } { "sound":"cave:cave_hit2", "volume":0.3, "spot":true, "weight":25 } { "sound":"cave:cave_hit3", "volume":0.3, "spot":true, "weight":25 } ] }

The ones without the dsurround part are for a file in the config file for your mod. Even when I put the sounds into your mod file and tried using the string "sound":"dsurround:rumble1" it didn't work.

Also, I have a few other things I need to know how to code. For example, I have sounds for tekkit classic that have the drip sounds, cave rumble, lake birds, tree wind, height wind, underwater loop, getting lit on fire by lava, and fire, with popping embers.

DrakoAlcarus commented 8 years ago

But first I need to know where to put the files.

DrakoAlcarus commented 8 years ago

Real quick, one thing that old matmos did that I want to do with the cave rumbles, is how it continuously loops, but plays the random sound out of the three rumble sounds I have.

OreCruncher commented 8 years ago

Several things:

  1. If what you provided is a copy/paste you are missing some commas and square brackets in the Json. There should be an error showing in the Minecraft/Forge log saying so. Fix up the syntax errors before going further - any behavior after the error is suspect. I recommend using a text editor that understands Json - like Notepad++.
  2. There is no rumble1 sound defined in my mod, so something like "dsurround:rumble1" will not work. Will only work with sounds registered by my mod as defined in the sounds.json.
  3. It looks like you are working on your own sound pack, which is cool. The angle is to make a resourcepack that only contains sounds. It would have an ID, such as "mysounds". Then, in the configuration files you would refer to that sound using something like "mysounds:rumble1". Note that resource packs have a specific structure and can find info on the internet on how to construct.
  4. Random sound - it's one of the purposes of the sounds.json. If you take a look at mine you will see the first entry having a bunch of lines for "sounds". When the sound system is told to play "fs.bluntwood.bluntwood_walk" it will randomly select one of those sounds to play. There are other options that could be set (that I don't use) such as selection weight, volume, pitch, etc. You can do an internet search for this info as well.
DrakoAlcarus commented 8 years ago

Alright, I'm getting to work on that. It's helpful to learn to code, considering I'm eventually going to develop 3 mods.

DrakoAlcarus commented 8 years ago

So here is what I have done:

{
    "entries":[
        {
            "biomeName":"underground",
            "sounds":[
                {
                    "sound":"dsurround:caverumble",
                    "volume":0.3
                },
                {
                    "sound":"dsurround:caveroar",
                    "volume":0.3,
                    "spot":true,
                    "weight":20
                },
            ]
        }
    ]
}
    "caverumble":{
        "category":"ambient",
        "sounds":[
            "oldmatmos/cave/rumble1",
            "oldmatmos/cave/rumble2",
            "oldmatmos/cave/rumble3"
        ]

    },
    "caveroar":{
        "category":"ambient",
        "sounds":[
            "oldmatmos/cave/cave_hit1",
            "oldmatmos/cave/cave_hit3",
            "oldmatmos/cave/cave_hit3"
        ]

    },
    "underwater":{
        "category":"ambient",
        "sounds":[
            "oldmatmos/other/water_underwater_loop"
        ]

    }

Yet, the sounds still don't work.

OreCruncher commented 8 years ago

Don't modify the sounds.json in the Dynamic Surroundings JAR. Make a new sounds.json that is inside your resource pack. This sounds.json will define the sounds are contained in your resource pack.

Based on your information above I am going to assume that your resource pack ID is "oldmatmos". If that is the case then your "entries" list in the Json would look like:

{
    "entries":[
        {
            "biomeName":"Underground",
            "sounds":[
                {
                    "sound":"oldmatmos:caverumble",
                    "volume":0.3
                },
                {
                    "sound":"oldmatmos:caveroar",
                    "volume":0.3,
                    "spot":true,
                    "weight":20
                },
            ]
        }
    ]
}

(The "biomeName" value is case sensitive so you would have to spell it exactly or expand the value to a regex expression that ignores case.)

DrakoAlcarus commented 8 years ago

How do I give the resource pack an id? Is that it's name in the pack.mcmeta?

OreCruncher commented 8 years ago

That contains the description.

Inside the pack you have an "assets" folder. Under that you created another folder. The name of that folder is the ID. A lot of examples you see on the internet relate to replacing the Minecraft resources, so the folder layout is "assets/minecraft". You can have your own, such as "assets/oldmatmos". Then, the "id" of the pack would be "oldmatmos" and you would refer to assets in that folder using "oldmatmos".

Here are the assets for Dynamic Surroundings. In that folder you can see "dsurround" (the ID of the Dynamic Surroundings mod is dsurround), and "minecraft" (for the particle textures that replace the Vanilla ones).

DrakoAlcarus commented 8 years ago

Now I have this for my config:

{
    "entries":[
        {
            "biomeName":"underground",
            "sounds":[
                {
                    "sound":"matmosclassic:caverumble",
                    "volume":0.25
                },
                {
                    "sound":"matmosclassic:caveroar",
                    "volume":0.3,
                    "spot":true,
                    "weight":20
                },
            ]
        }
    ]
}

And this for my sounds.json:

{
    "caverumble":{
        "category":"ambient",
        "sounds":[
            "ambient/cave/rumble1",
            "ambient/cave/rumble2",
            "ambient/cave/rumble3"
        ]

    },
    "caveroar":{
        "category":"ambient",
        "sounds":[
            "ambient/cave/cave_hit1",
            "ambient/cave/cave_hit2",
            "ambient/cave/cave_hit3",
            "ambient/cave/cave_hit4"
        ]

    },
    "underwater":{
        "category":"ambient",
        "sounds":[
            "ambient/other/water_underwater_loop"
        ]

    }
}

And here is the contents of my Resource pack files, and their order:

TekkitClassicAndMore
    * pack.mcmeta
    >assets
        >matmosclassic
            *sounds.json
            >ambient
                >cave
                    * cave_hit1.ogg
                    * cave_hit2.ogg
                    * cave_hit3.ogg
                    * cave_hit4.ogg
                    * rumble1.ogg
                    * rumble2.ogg
                    * rumble3.ogg
                >other
                    * rain_drip1.ogg
                    * rain_drip2.ogg
                    * rain_drip3.ogg
                    * rain_drip4.ogg
                >wildlife
                    * chirp1.ogg
                    * chirp2.ogg
                    * chirp3.ogg
                    * flit1.ogg
                    * squeek1.ogg
                    * squeek2.ogg
                    * squeek3.ogg
                >wind
                    * treewind1.ogg
                    * treewind2.ogg
                    * treewind3.ogg
                    * treewind4.ogg
                    * windgust.ogg
                    * windgust_strong.ogg
            >interact
                *fire_burst.ogg
                *travel.ogg
                *water_underwater_loop.ogg

I left out the minecraft folder, because it had some random texture changes.

But nevertheless, it isn't working still. I have the pack activated in the game, and I checked your config if my config was still there, and it is. What is going wrong?

OreCruncher commented 8 years ago

The biomeName is case sensitive. Make it "Underground".

Also, can you play one of your sounds using the /playsound command?

DrakoAlcarus commented 8 years ago

I played your owl sound just fine, but my sounds didn't play. In fact, I got this spammed on my log:

[16:08:54] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:55] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:56] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:57] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:58] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Server thread/INFO]: [VanaeAlcarus: Played sound 'owl' to VanaeAlcarus]
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:owl
[16:08:59] [Client thread/INFO]: [CHAT] Played sound 'owl' to VanaeAlcarus
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:08:59] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:00] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble
[16:09:01] [Client thread/WARN]: Unable to play empty soundEvent: matmosclassic:caverumble

//with the occasional://
[16:09:37] [Client thread/WARN]: Unable to play unknown soundEvent: matmosclassic:cave_hit3

So, it seems like the code is somewhat working, but it either can't find the sounds, or something is wrong with the sounds.

OreCruncher commented 8 years ago

Is the pack available somewhere so I can download and check things out?

DrakoAlcarus commented 8 years ago

I'll try to upload it on my Google Drive:

https://drive.google.com/open?id=0B5cQMrY_ixOfLTBlWUM1VV9DYVU

OreCruncher commented 8 years ago

Need to make it public so I can get it.

DrakoAlcarus commented 8 years ago

Try this: https://drive.google.com/file/d/0B5cQMrY_ixOfLTBlWUM1VV9DYVU/view?usp=sharing

DrakoAlcarus commented 8 years ago

If that doesn't work, give me your email, and I will give it to you from there.

OreCruncher commented 8 years ago

That worked. It's going to be a bit before I can dig into it. I should have something tomorrow.

DrakoAlcarus commented 8 years ago

That's fine. I'm kind of satisfied seeing that my code seems to operate like it should. It's good to learn.

OreCruncher commented 8 years ago

Ok - just noticed the issue. Currently your structure is like this:

TekkitClassicAndMore
    * pack.mcmeta
    >assets
        >matmosclassic
            *sounds.json
            >ambient
                >cave

It needs to be like this:

TekkitClassicAndMore
    * pack.mcmeta
    >assets
        >matmosclassic
            *sounds.json
            >sounds
                >ambient
                    >cave

Essentially move the folders "ambient" and "interact" into a folder called "sounds" and you should be good. I did this and was able to play your sounds using /playsound.

DrakoAlcarus commented 8 years ago

Yay! It works now!

But there is a problem: It doesn't play random sounds, but instead it seems to chose a random sound and play it over and over again with pauses in between. It needs to play in a loop, with the three sounds played at different times to give more depth instead of a heartbeat-like rumble.

OreCruncher commented 8 years ago

caverumble? it will repeat, but a single sound will be randomly selected for the repeat. It will not change until the sound is resubmitted down into the sound engine. I will take a look at the code to see if it can be tweaked to do something you are looking for.

OreCruncher commented 8 years ago

Try adding a repeat delay of 1 to the sound record:

{
    "entries":[
        {
            "biomeName":"underground",
            "sounds":[
                {
                    "sound":"matmosclassic:caverumble",
                    "volume":0.25,
                    "repeatDelay":1
                },
                {
                    "sound":"matmosclassic:caveroar",
                    "volume":0.3,
                    "spot":true,
                    "weight":20
                },
            ]
        }
    ]
}

This will cause the repeat logic in Dynamic Surroundings to kick in. It should cause another sound to generate. The delay of 1 tick should be minimal. Note that because it is random it is possible for it to repeat the sound again on the next attempt (33% chance since there are 3 sounds to select from).

DrakoAlcarus commented 8 years ago

I will make a clip so you can hear what I am aiming for, because I suck at explaining.

OreCruncher commented 8 years ago

Other thing to do is double check each of the ogg files to make sure that it makes sense to loop. If there are "blank" spots in the recording, either beginning or end there will be gaps on the play loop.

DrakoAlcarus commented 8 years ago

https://youtu.be/_cJ98RV3nKo?t=1m

Skip to one minute in, because I turn up the sounds there.

It sounds to me like it plays a sound, and one second after, plays another of the three sounds or an empty sound, keeping it almost constant.

DrakoAlcarus commented 8 years ago

Also, I want the smoke from cooling lava back.

OreCruncher commented 8 years ago

If this is what your config looks like:

{
    "entries":[
        {
            "biomeName":"underground",
            "sounds":[
                {
                    "sound":"matmosclassic:caverumble",
                    "volume":0.25
                },
                {
                    "sound":"matmosclassic:caveroar",
                    "volume":0.3,
                    "spot":true,
                    "weight":20
                },
            ]
        }
    ]
}

then "caverumble" will be continuous. It will keep playing. If you want it to only occur periodically, then you need to add a "spot":true to it:

{
    "entries":[
        {
            "biomeName":"Underground",
            "sounds":[
                {
                    "sound":"matmosclassic:caverumble",
                    "volume":0.25,
                    "spot":true
                },
                {
                    "sound":"matmosclassic:caveroar",
                    "volume":0.3,
                    "spot":true,
                    "weight":20
                },
            ]
        }
    ]
}

As for cooling lava I am not sure what you are referring to. You mean the smoke particles that come up when lava turns to obsidian? I don't do anything related to that.

DrakoAlcarus commented 8 years ago

Yeah. Older versions of Minecraft did that. I meant to say I want to figure out how to add the effect, and make it look like steam.

OreCruncher commented 8 years ago

Unfortunately all that stuff is occurring server side and the client doesn't know when lava turns to obsidian/cobble. I could add supporting code server side, but there may be unintended side effects. As you point out older versions of MC did this, but it was dropped in "newer" versions. (I checked back with 1.7.10 and see where the code does nothing.)

DrakoAlcarus commented 8 years ago

Alright, it's fine.

OreCruncher commented 8 years ago

Actually it is a pretty cool effect. I suspect the reason that it was "removed" was particle lag. Each one of those blocks that converted would generate 8 large smoke particles. Dump water on lava like you show that is a lot of particles. Of course, the vanilla rain splash routine generates a lot of particles, too. :\

DrakoAlcarus commented 8 years ago

The world will never know.

DrakoAlcarus commented 8 years ago

Alright, here is a demo of what it sounds like now. Compare this and the tekkit classic clip, and you may see what I'm trying to do.

https://www.youtube.com/watch?v=14DMspm8yIQ&feature=youtu.be

OreCruncher commented 8 years ago

Listened to the recent recording. What does your config look like? Does it look like this:

{
    "entries":[
        {
            "biomeName":"underground",
            "sounds":[
                {
                    "sound":"matmosclassic:caverumble",
                    "volume":0.25,
                    "repeatDelay":1
                },
                {
                    "sound":"matmosclassic:caveroar",
                    "volume":0.3,
                    "spot":true,
                    "weight":20
                },
            ]
        }
    ]
}

Also, if you could upload your lastest resource pack I can drop and in and play around with the settings.

DrakoAlcarus commented 8 years ago

Nope. What it needs to do is play a sound, then within the next 1-2 seconds, play another sound from that category while it's still playing the first, making it a constant sound. What your mod keeps doing is playing the sound until it ends, then it chooses another.

Resource pack: https://drive.google.com/file/d/0B5cQMrY_ixOfbnZBMkwwMkNfWE0/view?usp=sharing

OreCruncher commented 8 years ago

That's not how the sound system in Minecraft works. When it gets a command to play a given sound it randomly selects an ogg to play based on the sounds.json. The sound engine could be told to repeat the sound (with optional delay), or not repeat. Regardless of which repeat option is used nothing further will happen with the sound until the current ogg completes. Of course, something could submit the same sound several times to have them run concurrently. But right now Dynamic Surroundings does not do that. It either plays the sound as a spot sound (submit to the sound engine and forget about it), or as a background sound (sound that repeats with optional delay).

What you could do is stitch together the multiple ogg files into a single ogg and play that as a track. You could make several mixed versions so that there is some randomness. There really isn't a limit to the length of a track though I recommend keeping it down to 15 seconds or so.

DrakoAlcarus commented 8 years ago

How does matmos do it? On Feb 28, 2016 10:16 PM, "OreCruncher" notifications@github.com wrote:

That's not how the sound system in Minecraft works. When it gets a command to play a given sound it randomly selects an ogg to play based on the sounds.json. The sound engine could be told to repeat the sound (with optional delay), or not repeat. Regardless of which repeat option is used nothing further will happen with the sound until the current ogg completes. Of course, something could submit the same sound several times to have them run concurrently. But right now Dynamic Surroundings does not do that. It either plays the sound as a spot sound (submit to the sound engine and forget about it), or as a background sound (sound that repeats with optional delay).

What you could do is stitch together the multiple ogg files into a single ogg and play that as a track. You could make several mixed versions so that there is some randomness. There really isn't a limit to the length of a track though I recommend keeping it down to 15 seconds or so.

— Reply to this email directly or view it on GitHub https://github.com/OreCruncher/BetterRain/issues/103#issuecomment-190060625 .

OreCruncher commented 8 years ago

It's what Matmos does - based on surroundings it will do different sound activities based on it's rules. There is mod specific code that does all that. I could do the same thing Matmos does - but it is not how my mod is structured. I took a different approach with the goal of being as tick friendly as possible.

DrakoAlcarus commented 8 years ago

I guess I can't do what I wanted to do, huh? On Feb 29, 2016 4:24 PM, "OreCruncher" notifications@github.com wrote:

It's what Matmos does - based on surroundings it will do different sound activities based on it's rules. There is mod specific code that does all that. I could do the same thing Matmos does - but it is not how my mod is structured. I took a different approach with the goal of being as tick friendly as possible.

— Reply to this email directly or view it on GitHub https://github.com/OreCruncher/BetterRain/issues/103#issuecomment-190466532 .

OreCruncher commented 8 years ago

As mentioned you can mix your own sound by combining the various ogg files. Make several of these of varying length and sound sequence. It won't be exactly the way Matmos does it, but it could approximate it pretty well.

DrakoAlcarus commented 8 years ago

I'll try. I know the basics of Audacity, but it will take time to make all sorts of sound combos to match the feel, On Feb 29, 2016 4:32 PM, "OreCruncher" notifications@github.com wrote:

As mentioned you can mix your own sound by combining the various ogg files. Make several of these of varying length and sound sequence. It won't be exactly the way Matmos does it, but it could approximate it pretty well.

— Reply to this email directly or view it on GitHub https://github.com/OreCruncher/BetterRain/issues/103#issuecomment-190468771 .

OreCruncher commented 8 years ago

Cool. I do plan one expanding on how sounds are triggered as well as making more complex sound sequences. Just at the moment I am embroiled in other things.

OreCruncher commented 8 years ago

Been thinking about this problem a little bit. Internally in the mod I have something called an Emitter. The Emitter is responsible for doing the following:

What I think you are looking for is an Emitter that when configured with a sound profile will trigger that sound based on some interval. Using your caverumble as an example, the Emitter would be configured with the sound profile of matmosclassic:caverumble, and have a spawn time range of 20-40 ticks.

From a configuration standpoint it may look like the following:

{
    "entries":[
        {
            "biomeName":"(?i)underground",
            "sounds":[
                {
                    "sound":"matmosclassic:caverumble",
                    "volume":0.25,
                    "periodic":true,
                    "intervalMin":20,
                    "intervalMax":40
                }
            ]
        }
    ]
}

In laymans terms this would cause a sound from matmosclassic:caverumble to play every 20-40 ticks while the player is in the specified biome and the condition is being met. (The above config sample does not have a condition specified, but one could be added.)

OreCruncher commented 8 years ago

Based on the current changes and using the examples above the configuration entry will look like:

{
    "entries":[
        {
            "biomeName":"(?i)underground",
            "sounds":[
                {
                    "sound":"matmosclassic:caverumble",
                    "soundType":"periodic",
                    "volume":0.25,
                    "repeatDelay":20,
                    "repeatDelayRandom":20
                }
            ]
        }
    ]
}

This is not a spot sound. When conditions are met for playing the sound (biome, night/day, etc.) the sound will play once, and then delay another 20-39 ticks before the next play. This will continue until conditions change such that sound cannot play.

DrakoAlcarus commented 8 years ago

For far it seems to have worked, but the change is not very noticeable. What I will try to do is cut off the extra parts of sound that the player won't hear off of the cave rumble sounds. There is a lot of extra bits I can chop off if needed.

On Tue, Mar 1, 2016 at 10:16 AM, OreCruncher notifications@github.com wrote:

Based on the current changes and using the examples above the configuration entry will look like:

{ "entries":[ { "biomeName":"(?i)underground", "sounds":[ { "sound":"matmosclassic:caverumble", "soundType":"periodic", "volume":0.25, "repeatDelay":20, "repeatDelayRandom":"20 } ] } ] }

— Reply to this email directly or view it on GitHub https://github.com/OreCruncher/BetterRain/issues/103#issuecomment-190839345 .

DrakoAlcarus commented 8 years ago

Compare this clip (https://www.youtube.com/watch?v=J1AKQH8BMig) to the matmos clip I sent you a while ago.

On Tue, Mar 1, 2016 at 11:06 AM, Vanae Alcarus drako9823@gmail.com wrote:

For far it seems to have worked, but the change is not very noticeable. What I will try to do is cut off the extra parts of sound that the player won't hear off of the cave rumble sounds. There is a lot of extra bits I can chop off if needed.

On Tue, Mar 1, 2016 at 10:16 AM, OreCruncher notifications@github.com wrote:

Based on the current changes and using the examples above the configuration entry will look like:

{ "entries":[ { "biomeName":"(?i)underground", "sounds":[ { "sound":"matmosclassic:caverumble", "soundType":"periodic", "volume":0.25, "repeatDelay":20, "repeatDelayRandom":"20 } ] } ] }

— Reply to this email directly or view it on GitHub https://github.com/OreCruncher/BetterRain/issues/103#issuecomment-190839345 .

OreCruncher commented 8 years ago

Given the restrictions its not too bad. Once I finish up what I am working on I will make a build that has the periodic emitter available to you so you can try it out with what you are trying to do.