Started by
Eisenkopf1
on
Topic category: Help with modding (Java Edition)
How can I make mob sound effects stop varying in pitch?
I created a resource pack with new sounds for the zombies (replacing 'say1.ogg', 'say2.ogg', and 'say3.ogg'), but the pitch of the sounds seems to be randomized when played in-game. I need them to play at the default pitch only.
Does anybody have any know-how with this? Any help would be greatly appreciated.
Just for resource pack only, which is for non modded game I can't help. You can stop reading then. But if it is about added mobs, with new sounds…
…Well, I don't think that this is too heavy. But I am a beginner with modding and looked myself for an answer on this quest.
Therefore, there is no answer, I have an idea, how this can work. But first of all, every sound has a pitch between 0.5f to 2.0f! To get rid with this pitch if you create a new mob and the pitch is annoying there are 2 steps you can do.
The first you need to do is create procedures you can find an example here: https://mcreator.net/forum/62211/play-sound-every-x-ticks-when-riding-e… based on this, you can create a procedure, which counts the ticks of the entity after a certain time of ticks had passed, the say sound will be played. The advantage is, you can define a pitch and this pitch only is played.
But I show a pic from myself, because you should add a "does entity exist…" argument with a square cube. If not, you will hear the sound at the full volume as long as the entity is loaded, where ever it is. And if you have 17 zombies loaded, you get molested by Zombie sounds just like they are surrounding you.
So to prevent the entity Living sounds from playing follow this step. Either you don't have any base Ai activated in Ai and goals. (The Box right on top of the window) If this is rght go back to visual and Sound and delete the living Sounds, you don't need. But if you have a base Ai activated like Zombie, you need to do something else. Open the mob in the code editor and scroll down to the "public SoundEvent" lines. So you might have ambient sounds, hurt sounds and death sounds there. All 3 lines have a return line below. You can replace the one or all 3 return entrys with: "return null;" and these sounds won't played anymore! Only the sound you programmed in the procedure, will be played and the Sound wich is not replaced with "return null;".
You know what? I am quite sure, that there are some better and easier ways to get rid with pitches. But that's not so easy for beginners. Is it? And if there is no one who is ready for help, I need to improvise then. So this is the result.