GaijinEntertainment / fmod_studio_warthunder_for_modders

Fmod studio project for War Thunder sound modders
121 stars 104 forks source link

New loop system in next patch? #89

Open 787992 opened 2 years ago

787992 commented 2 years ago

@Uchuujin01 Wonder if this is something new, because all modded airplane guns & auto-cannon guns are silent with loops turned on

Most importantly how to make it to work with the new patch? Is it something like new slider?

Uchuujin01 commented 2 years ago

Hello! All you need to do, with the new patch - is to add one new variable in config.blk, in sound{} block. I'll clarify this question later, tomorrow, ok?

787992 commented 2 years ago

I'll clarify this question later, tomorrow, ok?

Sure thing

btw, thanks for fixing stuff mentioned earlier in the next patch!

787992 commented 2 years ago

Hello! All you need to do, with the new patch - is to add one new variable in config.blk, in sound{} block. I'll clarify this question later, tomorrow, ok?

Looks like patch will drop tomorrow, what's the new config line?

Uchuujin01 commented 2 years ago

Hello! About modification of sound loop system. We have two parameters: useLoopsForGunSound and useLoopsForGMGunSound. They should be in config.blk, in sound{} block. useLoopsForGunSound:b = true - this means that aircraft weapon sounds in loop mode, but it starts with on_shot = 1, and sounds while on_shot = 1. useLoopsForGunSound:b = false - this means that aircraft weapon works in usual keyoff mode. When you pull the triger, sound events starts, when you release it - keyoff releases the event. By default will be "true" value.

useLoopsForGMGunSound:b = true - all surface vehivles weapon works in one-shot mode, on_shot parameter set to 1 and back to 0 every shot (current production algoritm). With "false" state it works just like "true" state of previous parameter - loop mode that initiates with on_shot = 1, and stops when on_shot sets back to "0".

It looks like a bit messy, but we tried to maintain compatibility with current aircraft and ground vehicles weapon modes.

787992 commented 2 years ago

It looks like a bit messy, but we tried to maintain compatibility with current aircraft and ground vehicles weapon modes.

Yeah, that's actually good to know :)

Hope, i understood everything clearly, and it should look like this? unknown

Uchuujin01 commented 2 years ago

Yes, like this, taking into account what type of weapon sound generating your mod maintains. After the major update these variables will be like this: useLoopsForGunSound:b = yes useLoopsForGMGunSound:b = no

So, in case your aircraft mode maintains regular loop mode, you should write useLoopsForGunSound:b = no. Or, if your mod is only about ground weapon, you can live useLoopsForGunSound:b in its default mode (no need to write it), and select only mode for useLoopsForGMGunSound:b.

787992 commented 2 years ago

Yes, like this, taking into account what type of weapon sound generating your mod maintains. After the major update these variables will be like this: useLoopsForGunSound:b = yes useLoopsForGMGunSound:b = no

So, in case your aircraft mode maintains regular loop mode, you should write useLoopsForGunSound:b = no. Or, if your mod is only about ground weapon, you can live useLoopsForGunSound:b in its default mode (no need to write it), and select only mode for useLoopsForGMGunSound:b.

It seems those lines are not included in new patch update, anything mentioned above doesn't work, and didn't appear in game files as new possible lines.

Uchuujin01 commented 2 years ago

"It seems those lines are not included in new patch update" - they shouldn't be included, default values don't need to be typed.

Uchuujin01 commented 2 years ago

Don't forget to enable mods, and type mentioned two variables. I'll check them on production version again just in case.

Uchuujin01 commented 2 years ago

Yes, something went wrong, we're figuring out

Uchuujin01 commented 2 years ago

I was mistaken, sorry, the default value for useLoopsForGunSound:b=no. So, you need "yes" value to make it work in regular loop mode. Variable for ground vehicles (useLoopsForGMGunSound) seems doesn't work, we're working on it.

787992 commented 2 years ago

I was mistaken, sorry, the default value for useLoopsForGunSound:b=no. So, you need "yes" value to make it work in regular loop mode.

Just in case, even old line useLoopsForGunSound:b=yes doesn't work. tested on airplanes which used old keyoff system, still muted

Uchuujin01 commented 2 years ago

I double checked it in production version, works for me, "useLoopsForGunSound:b=yes" switches aircraft guns in regular keyoff mode.

Uchuujin01 commented 2 years ago

Be sure you added "mod" folder. New vanilla sounds with "useLoopsForGunSound:b=yes" will not play.

Uchuujin01 commented 2 years ago

useLoopsForGMGunSound - our fault in configs, will be fixed this on text day

787992 commented 2 years ago

I double checked it in production version, works for me, "useLoopsForGunSound:b=yes" switches aircraft guns in regular keyoff mode.

Are you sure, that the whole event structure for planes weren't re-created with new GUIDs? Because i can't get it to work with keyoff system nor on_shot.

1) Tested with both lines (just in case second line will help) 2) Tested "useLoopsForGunSound:b=yes" line alone with keyoff system 3) Tested "useLoopsForGunSound:b=no" line alone with on_shot system 4) Tested without any additional lines with keyoff system 5) Tested without any additional lines with on_shot system

EDIT: With "useLoopsForGunSound:b=no" oneshot cannons are working (37mm-75mm etc.), but only for once - normal behaviour without loop system, keyoff system should stuck at sustain point and play and don't keyoff, however still muted

787992 commented 2 years ago

@Uchuujin01 Oh and just in case, the game also ignoring modded master.bank and using vanillas instead

Uchuujin01 commented 2 years ago

Hello! I've checked master.bank - it successfully works in mod, not sure what's wrong with yours.

But, aircraft weapon definitely works wrong with useLoopsForGunSound:b=yes, sound event always destroyed just after the spawning.

But, useLoopsForGMGunSound:b now should work fine.

787992 commented 2 years ago

Hello! I've checked master.bank - it successfully works in mod, not sure what's wrong with yours.

Hey! Fixed itself somehow. (probably micro-patch)

But, useLoopsForGMGunSound:b now should work fine.

Well, checked it twice with same steps mentioned above and unfortunately it doesn't work, if those are having same GUIDs it definetely should work, but still muted.

The only few working are oneshot cannons, like 37mm flak36 and 37mm m1a2 no matter of "yes" or "no" in the config.

Uchuujin01 commented 2 years ago

Hello! I've checked now - all variables work 100% fine. There was bugfix this miorning.

787992 commented 2 years ago

Hello! I've checked now - all variables work 100% fine. There was bugfix this miorning.

I don't really know what to add, it works but for planes oneshot 37mm-75mm cannons, before it sounded only once with loops set to "no". And were muted with set to "yes", now it works properly. But the rest planes MGs or cannons are still muted.

Exact same for tanks, all MGs and auto-cannons still muted, can't even say if it works or not, not even signs of life from these events, like bugged sounding or something, just muted.

I'll attach clog and dxgiag just in case 2021_09_13_14_23_45__932.zip

EDIT: I'm using keyoff system for planes and on_shot system for tanks just like previous patch. GMloops set to "no" (even with set to "yes" still muted)

RadonSound commented 2 years ago

It's all working for me now. Both air and ground gun loop sounds are working fine like before the update. For some reason the Nr-23's are muted only on some planes like Mig-15 / YaK-30 . The Nr-23 on Yak-15P works fine, did the others maybe received a new event?

Uchuujin01 commented 2 years ago

Hello! I've checked now - all variables work 100% fine. There was bugfix this miorning.

I don't really know what to add, it works but for planes oneshot 37mm-75mm cannons, before it sounded only once with loops set to "no". And were muted with set to "yes", now it works properly. But the rest planes MGs or cannons are still muted.

Exact same for tanks, all MGs and auto-cannons still muted, can't even say if it works or not, not even signs of life from these events, like bugged sounding or something, just muted.

I'll attach clog and dxgiag just in case 2021_09_13_14_23_45__932.zip

EDIT: I'm using keyoff system for planes and on_shot system for tanks just like previous patch. GMloops set to "no" (even with set to "yes" still muted)

I'm afraid you doing something wrong. Maybe you haven't updated WT today? Just like @RadonSound says, those variables work, we checked them on production cirquit. Soon there will be an update in our WT wiki sound mod page, maybe you'll find something useful there.

Uchuujin01 commented 2 years ago

It's all working for me now. Both air and ground gun loop sounds are working fine like before the update. For some reason the Nr-23's are muted only on some planes like Mig-15 / YaK-30 . The Nr-23 on Yak-15P works fine, did the others maybe received a new event?

Yes, for some cannons there are some new sound events. I'll update project repository asap, this week, if there will be no serious issues found with sound.

787992 commented 2 years ago

I'm afraid you doing something wrong. Maybe you haven't updated WT today? Just like @RadonSound says, those variables work, we checked them on production cirquit. Soon there will be an update in our WT wiki sound mod page, maybe you'll find something useful there.

Uhh, i don't really know what's going on, but quickly created mod with just one loop sample for all planes and all tank MGs (please check attached file) Not included in build cannons and auto-cannons

https://user-images.githubusercontent.com/63158562/133135905-9f249757-a7a0-4a66-8c27-749c1d6d3495.mp4

Everything works as intended in FMOD, however in the game still muted.

My config:

sound{ speakerMode:t="stereo" fmod_sound_enable:b=yes enable_mod:b=yes useLoopsForGunSound:b=yes useLoopsForGMGunSound:b=no }

loop_test.zip

FenixAlfa159 commented 2 years ago

Hello! If I may add more info to this. My current build of the mod which works with one_shot playback.

My sound part on my config.blk is like this:

sound{ speakerMode:t="auto" fmod_sound_enable:b=yes enable_mod:b=yes useLoopsForGMGunSound:b=no }

yet, my ground machine guns aren't playing at all.

Gentlespie commented 2 years ago

I'm afraid you doing something wrong. Maybe you haven't updated WT today? Just like @RadonSound says, those variables work, we checked them on production cirquit. Soon there will be an update in our WT wiki sound mod page, maybe you'll find something useful there.

Uhh, i don't really know what's going on, but quickly created mod with just one loop sample for all planes and all tank MGs (please check attached file) Not included in build cannons and auto-cannons

loops.mp4 Everything works as intended in FMOD, however in the game still muted.

My config:

sound{ speakerMode:t="stereo" fmod_sound_enable:b=yes enable_mod:b=yes useLoopsForGunSound:b=yes useLoopsForGMGunSound:b=no }

loop_test.zip

I have also tested that loop test mod you posted and i don't see it working at all with that config setup... I am running latest version of game of 2.9.0.26

RadonSound commented 2 years ago

Here are my current settings that works for Air & Ground loops

Air Screenshot (49)

Ground Screenshot (50)

sound{ speakerMode:t="stereo" fmod_sound_enable:b=yes enable_mod:b=yes useLoopsForGunSound:b=yes useLoopsForGMGunSound:b=yes }

Not sure if that could help someone out.

Uchuujin01 commented 2 years ago

I'm afraid you doing something wrong. Maybe you haven't updated WT today? Just like @RadonSound says, those variables work, we checked them on production cirquit. Soon there will be an update in our WT wiki sound mod page, maybe you'll find something useful there.

Uhh, i don't really know what's going on, but quickly created mod with just one loop sample for all planes and all tank MGs (please check attached file) Not included in build cannons and auto-cannons

loops.mp4 Everything works as intended in FMOD, however in the game still muted.

My config:

sound{ speakerMode:t="stereo" fmod_sound_enable:b=yes enable_mod:b=yes useLoopsForGunSound:b=yes useLoopsForGMGunSound:b=no }

loop_test.zip

Maybe the problem is in on_shot parameter, you don't need it with useLoopsForGunSound:b=yes. Try to get rid of it

787992 commented 2 years ago

Maybe the problem is in on_shot parameter, you don't need it with useLoopsForGunSound:b=yes. Try to get rid of it

I tried literally everything, no idea why it's still muted, i got confirmation from other modders that facing same problem.

Could you please test the mod i sent in previous message?

I know those variables actually impacts vanilla sounds, thus it's working, but when you use modded files, everything goes to mute state.

Here are my current settings that works for Air & Ground loops

Could you please record in-game clips, if it's actually working, maybe changed vanilla sounds mislead you?

Uchuujin01 commented 2 years ago

"Could you please test the mod i sent in previous message?"

Ok, I'll test it.

"I know those variables actually impacts vanilla sounds, thus it's working, but when you use modded files, everything goes to mute state." - I don't know how to say it another way, those variables work fine, for me and for most of the players. If it doesn't work for you, something wrong with your mod and settings. I'll try to figure out what exactly.

Uchuujin01 commented 2 years ago

"Could you please test the mod i sent in previous message?" I thought you sent me your project. Why did you send me sound banks? What should I do with them? Send me your project, then I will find the issue.

And, BTW, where is your masterbank.bank and masterbank.strings.bank? The mod will not work without it

RadonSound commented 2 years ago

Could you please record in-game clips, if it's actually working, maybe changed vanilla sounds mislead you?

https://user-images.githubusercontent.com/67481432/133249603-d0500ce2-44cc-4a48-ae8f-a5257f60680e.mp4

(sorry for the backround noise) But here are some examples for loop sounds, some of them are old loops tracks from the older days. Every gun event in FMOD has a overworked track (including loops) so i don't hear any vanilla sounds

787992 commented 2 years ago

And, BTW, where is your masterbank.bank and masterbank.strings.bank? The mod will not work without it

Oh damn, that was the issue, i've always used mods without masterbank.strings, and it worked fine, because it was replaced with vanillas masterbank, or masterbank.strings In this case for some reason game didn't use vanillas masterbank.strings thus muting all changed events

Uchuujin01 commented 2 years ago

And, BTW, where is your masterbank.bank and masterbank.strings.bank? The mod will not work without it

Oh damn, that was the issue, i've always used mods without masterbank.strings, and it worked fine, because it was replaced with vanillas masterbank, or masterbank.strings In this case for some reason game didn't use vanillas masterbank.strings thus muting all changed events

Glad we figured it out )

787992 commented 2 years ago

Glad we figured it out )

Everything works fine so far :). I don't want too look like a "needy" person, but could you please take a look, why the game can't see vanilla masterbank.strings when such missing in mod folder?

Thing is, both masterbanks could be replaced from sound folder, some mods don't even use both masterbanks to rely on vanilla mixing. You may know, that masterbank.strings contains mostly info about events and names, i figuered out (with your help of course), that my own masterbank.strings is required in order to play sounds correctly, but stricting to use my mod exclusively. Thus making naval or crew call-outs muted, because it's not part of the mod and not part of masterbank.strings

Pretty weird, because i never included my own masterbank.strings in mod folder and could hear crew call-out or naval sounds perfectly even not having such events in project files.

Uchuujin01 commented 2 years ago

Everything works fine so far :). I don't want too look like a "needy" person, but could you please take a look, why the game can't see vanilla masterbank.strings when such missing in mod folder?

This is normal behaviour, master bank should fit to other banks it generated with, because of GUIDs. Usually events call not by name but by GUIDs - this is some kind of ID that every event has. So, vanilla sound events simply have another unique GUIDs that yours. GUIDs generated automatically by fmod.

Uchuujin01 commented 2 years ago

It is better to call events by GUIDs rather than by names, because of sound engine perfomance.

787992 commented 2 years ago

This is normal behaviour, master bank should fit to other banks it generated with, because of GUIDs. Usually events call not by name but by GUIDs - this is some kind of ID that every event has. So, vanilla sound events simply have another unique GUIDs that yours. GUIDs generated automatically by fmod.

I mean, i knew it way way before, my project files never had crew sounds or music or naval sounds to reduce memory usage and increase responsive time. It was working fine with all previous patches until this one, that's why asking in case something has changed

Uchuujin01 commented 2 years ago

I mean, i knew it way way before, my project files never had crew sounds or music or naval sounds to reduce memory usage and increase responsive time. It was working fine with all previous patches until this one, that's why asking in case something has changed

Nothing changed exept of GUIDS, because sound banks completely rebuilt. As I said before, it is completely normal behaviour for your mod not work without its master bank files.

787992 commented 2 years ago

Nothing changed exept of GUIDS, because sound banks completely rebuilt. As I said before, it is completely normal behaviour for your mod not work without its master bank files.

Hmm, then how do i deal with muted crew sounds and naval? Do i need to add these events back to my project files and compile only tanks and planes related banks? This is weird because my masterbank.strings is from new clean project with fully compilled banks including naval and crews

Uchuujin01 commented 2 years ago

If you modded crew naval sounds, then yes, you definitely need to rebuild all your mod banks. If you didn't mod them, then you don't need them in your mod folder. Excuse me if I misunderstood you.

787992 commented 2 years ago

If you modded crew naval sounds, then yes, you definitely need to rebuild all your mod banks. If you didn't mod them, then you don't need them in your mod folder. Excuse me if I misunderstood you.

Sorry, i meant crew and naval are untouched here, i modded everything related to planes and tanks Makes sense if you changed GUIDs for all sounds, my masterbank.strings won't work with changed GUIDs

But, without masterbank.strings wouldn't it work with vanilla masterbank.strings that works from /sound folder?

Uchuujin01 commented 2 years ago

But, without masterbank.strings wouldn't it work with vanilla masterbank.strings that works from /sound folder?

No, it wouldn't, i think, if vanilla masterbank.strings has GUIDs those don't match modded sound events GUIDs