Jump to content


Can´t hear my reloadsounds anymore

reload sounds sound mod

  • Please log in to reply
7 replies to this topic

Panzergefahr #1 Posted 15 September 2018 - 03:12 PM

    Sergeant

  • Player
  • 27482 battles
  • 235
  • Member since:
    04-27-2011
With the 1.1.0 update I can´t hear my Ritterkreuz mod reload sounds anymore even after the Wwise update to 2017.2.5. All other sounds are all heared but not the reload sounds so do you know what the devs have changed for this to occur?

Panzer_ich_begruesse_Sie #2 Posted 15 September 2018 - 03:25 PM

    Brigadier

  • Beta Tester
  • 33487 battles
  • 4,046
  • [D-S-S] D-S-S
  • Member since:
    11-18-2010
delete pls

Edited by Panzer_ich_begruesse_Sie, 15 September 2018 - 03:30 PM.


OldSkool #3 Posted 15 September 2018 - 03:50 PM

    Brigadier

  • WGL PRO Player
  • 69654 battles
  • 4,020
  • [SKILL] SKILL
  • Member since:
    09-22-2010

use python.

 

INJECT(PlayerAvatar, 'updateVehicleGunReloadTime;), (self.__hooked_updateVehicleGunReloadTime)



    def __hooked_updateVehicleGunReloadTime(self, baseMethod, baseObject, vehicleID, timeLeft, baseTime):
        baseMethod(baseObject, vehicleID, timeLeft, baseTime)
        g_sessionProvider = dependency.instance(IBattleSessionProvider)
        try:
            baseObject.__prevGunReloadTimeLeft = -1.0
            if (baseObject.__prevGunReloadTimeLeft != timeLeft and timeLeft == 0.0) and not g_sessionProvider.shared.vehicleState.isInPostmortem:
                   SoundGroups.g_instance.playSound2D('sound_event_name;)
                
        except:
            pass


Panzergefahr #4 Posted 15 September 2018 - 04:27 PM

    Sergeant

  • Player
  • 27482 battles
  • 235
  • Member since:
    04-27-2011

View PostPanzer_ich_begruesse_Sie, on 15 September 2018 - 03:25 PM, said:

delete pls

 

Delete what?
15:28 Added after 1 minute

View PostOldSkool, on 15 September 2018 - 03:50 PM, said:

use python.

 

INJECT(PlayerAvatar, 'updateVehicleGunReloadTime;), (self.__hooked_updateVehicleGunReloadTime)



    def __hooked_updateVehicleGunReloadTime(self, baseMethod, baseObject, vehicleID, timeLeft, baseTime):
        baseMethod(baseObject, vehicleID, timeLeft, baseTime)
        g_sessionProvider = dependency.instance(IBattleSessionProvider)
        try:
            baseObject.__prevGunReloadTimeLeft = -1.0
            if (baseObject.__prevGunReloadTimeLeft != timeLeft and timeLeft == 0.0) and not g_sessionProvider.shared.vehicleState.isInPostmortem:
                   SoundGroups.g_instance.playSound2D('sound_event_name;)
                
        except:
            pass

 

Thank you very much.. I will try to succede with implementing this code but it was long time since I used Python now.
15:34 Added after 7 minutes
By the way, shall I write this code in a simple textfile like gui.text or init.txt? I don´t remember how to do it anymore.

OldSkool #5 Posted 15 September 2018 - 04:45 PM

    Brigadier

  • WGL PRO Player
  • 69654 battles
  • 4,020
  • [SKILL] SKILL
  • Member since:
    09-22-2010

I created you a fully working example.

In file mod_reloadsound.py just change:

self.reloadSoundEvent = 'alert_english_gun'
to your event name of your soundbank.

 

edit: just compile it with pjorion, easiest way.

 

Attached Files

  • Attached File   mod_reloadsound.zip   1016bytes

Edited by OldSkool, 15 September 2018 - 04:48 PM.


Panzergefahr #6 Posted 15 September 2018 - 07:04 PM

    Sergeant

  • Player
  • 27482 battles
  • 235
  • Member since:
    04-27-2011
 

 Thank you very much but in what folder shall I place this file and what shall it be named to? I suppose you know that the reload sounds are in the gui.bnk file which is placed directly in the res_mods/1.1.0/audioww folder.


Edited by Panzergefahr, 15 September 2018 - 07:07 PM.


Panzergefahr #7 Posted 16 September 2018 - 10:14 AM

    Sergeant

  • Player
  • 27482 battles
  • 235
  • Member since:
    04-27-2011

It finally works but I had to change from .py to .pyc so whats the difference between these versions?


Edited by Panzergefahr, 16 September 2018 - 10:24 AM.


OldSkool #8 Posted 18 September 2018 - 09:22 PM

    Brigadier

  • WGL PRO Player
  • 69654 battles
  • 4,020
  • [SKILL] SKILL
  • Member since:
    09-22-2010
py is source u need to compile it for example with pjorion.




1 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users