Willster419 18 Posted January 8, 2017 (edited) Hello, New modder here.I am trying to make a sound mod to override some of the GUI sounds like timer and enemy_spotted_for_team. I have successfully created a wwise audio bnk and it is loaded and played in WOT. It also works with remapping the game event name to the name I made in wwise via xvm sound event remapper.My question is this: do I have to use xvm to remap the sound events? I am familiar with the bank remapper from D2R52, but it was for 9.15.1 and now throws exceptions.The sound mapper from xvm works, and his looks similar to xvm. Could someone help me to get it to work?Thanks,Willster419 EDIT: Below is D2R52's code # Embedded file name: mod_SoundMapperimport ResMgrimport WWISEfrom debug_utils import *def _OverrideMethod(handler, cls, method):orig = getattr(cls, method)newm = lambda *a, **k: handler(orig, *a, **k)if type(orig) is not property:setattr(cls, method, newm)else:setattr(cls, method, property(newm))def _checkAndReplace(event):if event in myreplace:return myreplace[event]else:return eventdef _WWISE_WW_eventGlobal(base, event):return base(_checkAndReplace(event))def _WWISE_WW_eventGlobalPos(base, event, pos):return base(_checkAndReplace(event), pos)def _WWISE_WW_getSoundObject(base, event, matrix, local):return base(_checkAndReplace(event), matrix, local)def _WWISE_WW_getSound(base, eventName, objectName, matrix, local):return base(_checkAndReplace(eventName), _checkAndReplace(objectName), matrix, local)def _WWISE_WW_getSoundCallback(base, eventName, objectName, matrix, callback):return base(_checkAndReplace(eventName), _checkAndReplace(objectName), matrix, callback)def _WWISE_WW_getSoundPos(base, eventName, objectName, position):return base(_checkAndReplace(eventName), _checkAndReplace(objectName), position)ms = ResMgr.openSection('../res_mods/configs/D2R52/mod_SoundMapper.xml')if ms is not None:myreplace = {}for k, v in ms.items():myreplace[k] = v.asStringif len(myreplace) > 0:_OverrideMethod(_WWISE_WW_eventGlobal, WWISE, 'WW_eventGlobal')_OverrideMethod(_WWISE_WW_eventGlobalPos, WWISE, 'WW_eventGlobalPos')_OverrideMethod(_WWISE_WW_getSoundObject, WWISE, 'WW_getSoundObject')_OverrideMethod(_WWISE_WW_getSound, WWISE, 'WW_getSound')_OverrideMethod(_WWISE_WW_getSoundCallback, WWISE, 'WW_getSoundCallback')_OverrideMethod(_WWISE_WW_getSoundPos, WWISE, 'WW_getSoundPos')BigWorld.logInfo('LOAD', 'SoundMapper by D2R52', None)else:BigWorld.logInfo('LOAD', 'SoundMapper by D2R52 is not loaded - missing configuration', None) (It is very similar to the xvm code) here is the python log error 2017-01-08 09:58:42.967: ERROR: [EXCEPTION] (scripts/client/MapActivities.py, 491):Traceback (most recent call last): File "scripts/client/MapActivities.py", line 486, in __playSound File "scripts/client/SoundGroups.py", line 863, in WWgetSoundObject File "mod_SoundMapper", line 8, in <lambda>TypeError: _WWISE_WW_getSoundObject() takes exactly 4 arguments (5 given) The XVM files i think i need are:res_mods\mods\xfw\python\xfw\_init_.pyres_mods\mods\xfw\python\xfw\events.pyres_mods\mods\packages\xvm_sounds\python\_init_.py Edited January 8, 2017 by Willster419 Quote Share this post Link to post Short link Share on other sites
Willster419 18 #373470 Posted January 8, 2017 Unless someone can point me to where the base capture sound event is declared in an XML... Quote Share this post Link to post Short link Share on other sites
Budyx69 32 #373538 Posted January 8, 2017 you must change the def def _WWISE_WW_getSoundObjectdef _WWISE_WW_getSoundObject(base, event, matrix, local, auxSend): return base(_checkAndReplace(event), matrix, local, auxSend) 1 Quote Share this post Link to post Short link Share on other sites
Willster419 18 #373549 Posted January 9, 2017 (edited) It works! Many thanks! May I ask how you were able to figure it out..? Edited January 9, 2017 by Willster419 Quote Share this post Link to post Short link Share on other sites
Budyx69 32 #373589 Posted January 9, 2017 is Easy:see i scripts/client/soundgroups.py the def "WWgetSoundObject"the code from D2R52 is from 0.9.15in 9.16 has WG this def changed old def: def WWgetSoundObject(self, objectName, matrix, local = (0.0, 0.0, 0.0)):if DEBUG_TRACE_SOUND is True:LOG_DEBUG('SOUND: WWgetSoundObject', objectName, matrix, local)if DEBUG_TRACE_STACK is True:import tracebacktraceback.print_stack()return WWISE.WW_getSoundObject(objectName, matrix, local) new_def def WWgetSoundObject(self, objectName, matrix, local = (0.0, 0.0, 0.0), auxSend = False):if DEBUG_TRACE_SOUND is True:LOG_DEBUG('SOUND: WWgetSoundObject', objectName, matrix, local)if DEBUG_TRACE_STACK is True:import tracebacktraceback.print_stack()return WWISE.WW_getSoundObject(objectName, matrix, local, auxSend) 1 Quote Share this post Link to post Short link Share on other sites
Willster419 18 #373636 Posted January 9, 2017 Ah, so using WG scripts is what i should first look to for refrence, not xvm. Thanks again!! Quote Share this post Link to post Short link Share on other sites
Willster419 18 #374017 Posted January 11, 2017 I know this is selfish of me to ask, but what about his custom sound bank loader? That is throwing exceptions as well. I will post the exact code and python log exception later today. (EST based) Quote Share this post Link to post Short link Share on other sites
Willster419 18 #374132 Posted January 12, 2017 (edited) here is the bank loader code: mod_SoundBankLoader.pyc # Embedded file name: mod_SoundBankLoaderimport WWISEimport ResMgrfrom debug_utils import *def _OverrideMethod(handler, cls, method):orig = getattr(cls, method)newm = lambda *a, **k: handler(orig, *a, **k)if type(orig) is not property:setattr(cls, method, newm)else:setattr(cls, method, property(newm))def _WWISE_WG_loadBanks(base, xmlPath, banks, isHangar, *args, **kwargs):if extraBanks:banks_list = (banks + ';' + extraBanks).split(';')banks_list = set([ x.strip() for x in banks_list if x and x.strip() ])banks = '; '.join(banks_list)base(xmlPath, banks, isHangar, *args, **kwargs)extraBanks = ''mysettings = ResMgr.openSection('../res_mods/configs/D2R52/mod_SoundBankLoader.xml/preloadSoundBanks')if mysettings is not None:extraBanks = mysettings.asString.strip()if extraBanks:_OverrideMethod(_WWISE_WG_loadBanks, WWISE, 'WG_loadBanks')BigWorld.logInfo('LOAD', 'SoundBankLoader by D2R52', None)else:BigWorld.logInfo('LOAD', 'SoundBankLoader by D2R52 is not loaded - missing configuration', None) And the exeption: 2017-01-11 19:29:15.429: ERROR: [EXCEPTION] (, 352):Traceback (most recent call last):File "", line 344, in _findValidMODsFile "scripts/common/Lib/importlib/__init__.py", line 37, in import_moduleFile "mod_SoundBankLoader", line 26, inFile "mod_SoundBankLoader", line 7, in _OverrideMethodAttributeError: 'module' object has no attribute 'WG_loadBanks' In looking myself, all i could find was in _WWISEStubs.py: def WG_loadBanks(*args, **kwargs):pass It sound to me like they removed the method from the python.log error, but that would not make sense because the def stub is there...? Edited January 12, 2017 by Willster419 Quote Share this post Link to post Short link Share on other sites