RufusXA Posted May 14, 2015 Share Posted May 14, 2015 (edited) Доброго времени суток, люди! Подскажите, пожалуйста, есть ли возможность по аналогу данных модов XVM: XFW_MOD_VERSION = '3.0.0'XFW_MOD_URL = 'http://www.modxvm.com/'XFW_MOD_UPDATE_URL = 'http://www.modxvm.com/en/download-xvm/'XFW_GAME_VERSIONS = ['0.9.7']import tracebackimport BigWorldfrom gui.shared.SoundEffectsId import SoundEffectsIdfrom gui.shared.utils.sound import Soundfrom xfw import *from xvm_main.python import configfrom xvm_main.python.logger import *def Battle_showSixthSenseIndicator(self, isShow): try: vehId = BigWorld.entities[bigWorld.player().playerVehicleID].typeDescriptor.type.compactDescr if vehId == 59393: Sound('/rudy/dog/dog').play() else: soundId = config.config['sounds']['sixthSense'] if soundId is not None and soundId != '': Sound(soundId).play() except: err(traceback.format_exc())def _test(): log('test') if config.config is not None: soundId = config.config['sounds']['sixthSense'] if soundId is not None and soundId != '': Sound(soundId).play() BigWorld.callback(1, _test) def _RegisterEvents(): from gui.Scaleform.Battle import Battle RegisterEvent(Battle, 'showSixthSenseIndicator', Battle_showSixthSenseIndicator) BigWorld.callback(0, _RegisterEvents) или мод на 6 чувствище без XVM: global guiCountDown, backupVolumefrom game import *autoFlushPythonLog()import FMODimport SoundGroupsimport BigWorldimport ResMgrimport GUIfrom gui.Scaleform.Battle import Battlefrom gui.WindowsManager import g_windowsManagerfrom debug_utils import LOG_ERRORfrom debug_utils import LOG_CURRENT_EXCEPTIONfrom debug_utils import LOG_DEBUGfrom debug_utils import LOG_NOTEfrom functools import partialfrom gui.shared.utils.HangarSpace import _HangarSpacefrom gui import GUI_SETTINGSimport redef playSound(sound, i): if i < 1: sequenceEnd() return else: sound.stop() sound.play() i = i - 1 BigWorld.callback(myConf['AudioTick'] / 1000, partial(playSound, sound, i)) returndef sequenceEnd(): SoundGroups.g_instance.setVolume(myConf['VolumeType'], backupVolume) def new_showSixthSenseIndicator(self, isShow): old_showSixthSenseIndicator(self, isShow) startGuiCountDown() sound = SoundGroups.g_instance.FMODgetSound(myConf['AudioPath']) i = myConf['AudioRange'] / myConf['AudioTick'] backupVolume = SoundGroups.g_instance.getVolume(myConf['VolumeType']) SoundGroups.g_instance.setVolume(myConf['VolumeType'], myConf['Volume']) playSound(sound, i) old_showSixthSenseIndicator = Battle.showSixthSenseIndicatorBattle.showSixthSenseIndicator = new_showSixthSenseIndicatordef new_spaceDone(self): old_spaceDone(self) GUI_SETTINGS._GuiSettings__settings['sixthSenseDuration'] = myConf['IconRange'] old_spaceDone = _HangarSpace._HangarSpace__spaceDone_HangarSpace._HangarSpace__spaceDone = new_spaceDonedef initGuiCountDown(): if guiCountDown is not None: return else: guiCountDown = GUI.Text('') GUI.addRoot(guiCountDown) guiCountDown.widthMode = 'PIXEL' guiCountDown.heightMode = 'PIXEL' guiCountDown.verticalPositionMode = 'PIXEL' guiCountDown.horizontalPositionMode = 'PIXEL' guiCountDown.horizontalAnchor = 'LEFT' guiCountDown.colourFormatting = True guiCountDown.font = myConf['TimerFont'] guiCountDown.visible = False x, y = GUI.screenResolution() guiCountDown.position = eval(myConf['TimerPosition']) return def startGuiCountDown(): if myConf['TimerRange'] == 0: return else: if guiCountDown is None: initGuiCountDown() guiCountDown.visible = False max = myConf['TimerRange'] / 1000 min = -1 diff = -myConf['TimerTick'] / 1000 for i in xrange(max, min, diff): BigWorld.callback(i, partial(tickGuiCountDown, max - i)) return def endGuiCountDown(): if guiCountDown is not None: guiCountDown.visible = False def tickGuiCountDown(i): color = myConf['TimerColor'] color = '\\c' + re.sub('[^A-Za-z0-9]+', '', color) + 'FF;' guiCountDown.text = color + myConf['TimerText'] % str(i) if i == 0: BigWorld.callback(myConf['TimerZeroDelay'] / 1000, endGuiCountDown) g_windowsManager.onInitBattleGUI = g_windowsManager.onInitBattleGUI + initGuiCountDowng_windowsManager.onDestroyBattleGUI = g_windowsManager.onDestroyBattleGUI + endGuiCountDownguiCountDown = NonebackupVolume = NonemyConf = {}myConf['AudioPath'] = '/GUI/notifications_FX/cybersport_timer'myConf['AudioRange'] = 9000myConf['AudioTick'] = 1000myConf['IconRange'] = 2000myConf['Volume'] = 1.0myConf['VolumeType'] = 'gui'myConf['TimerColor'] = '#FF8000'myConf['TimerFont'] = 'verdana_medium.font'myConf['TimerPosition'] = '(round(x / 2) + 120, round(y / 6) + 20, 0.7)'myConf['TimerRange'] = 9000myConf['TimerTick'] = 1000myConf['TimerZeroDelay'] = 200myConf['TimerText'] = '%s'cfg = ResMgr.openSection('scripts/client/mods/sixthsenseduration.xml')if cfg is None: LOG_ERROR('CONFIG NOT FOUND')else: sec = cfg['AudioPath'] if sec is not None: myConf['AudioPath'] = sec.asString sec = cfg['AudioRange'] if sec is not None: myConf['AudioRange'] = sec.asFloat sec = cfg['AudioTick'] if sec is not None: myConf['AudioTick'] = sec.asFloat sec = cfg['IconRange'] if sec is not None: myConf['IconRange'] = sec.asFloat sec = cfg['Volume'] if sec is not None: myConf['Volume'] = sec.asFloat sec = cfg['VolumeType'] if sec is not None: myConf['VolumeType'] = sec.asString sec = cfg['TimerRange'] if sec is not None: myConf['TimerRange'] = sec.asInt sec = cfg['TimerTick'] if sec is not None: myConf['TimerTick'] = sec.asInt sec = cfg['TimerZeroDelay'] if sec is not None: myConf['TimerZeroDelay'] = sec.asFloat sec = cfg['TimerColor'] if sec is not None: myConf['TimerColor'] = sec.asString sec = cfg['TimerFont'] if sec is not None: myConf['TimerFont'] = sec.asString sec = cfg['TimerPosition'] if sec is not None: myConf['TimerPosition'] = sec.asString sec = cfg['TimerText'] if sec is not None: myConf['TimerText'] = sec.asString сообразить мод на озвучку взрыва БК? А если всё же есть (а я знаю что есть, но не умею), то давайте, делайте)) FMod знаю - звуки сделаю и запакую. Надо так: есть ли возможность сделать отдельный мод (не меня стандартные, а добавляя только данный мод) озвучку с доп звуком взрыва БК???Т.е. на ивент (или как там) взрыв БК добавить звук... А выглядело чтобы это так (ну это только XVM):http://4cheat.ru/i/view.php?id=7084.jpg и звуки (как плеер вставить?; мод нужен здесь):https://soundcloud.com/rufus-xa/kchclctavznthttps://soundcloud.com/rufus-xa/298pjh4qaqrkhttps://soundcloud.com/rufus-xa/3a-1 Edited May 14, 2015 by RufusXA @ Quote Link to comment Short link Share on other sites More sharing options...
kharlashkin Posted May 20, 2015 Share Posted May 20, 2015 Большой поклонник Гарри Поттера? @ Quote Link to comment Short link Share on other sites More sharing options...
RufusXA Posted May 20, 2015 Author Share Posted May 20, 2015 Никак нет! Но ведь можно использовать и другие звуки и надписи. @ Quote Link to comment Short link Share on other sites More sharing options...
Yusha Posted May 27, 2015 Share Posted May 27, 2015 Никак нет! Но ведь можно использовать и другие звуки и надписи. С точки зрения звуков...игра не разделяет понятия - взрыв БК/уничтожение танка. @ Quote Link to comment Short link Share on other sites More sharing options...
RufusXA Posted May 30, 2015 Author Share Posted May 30, 2015 Ок... Так называемый "мод кармы". Надпись появляется при дамаге свыше 1к(?) К этому событию есть возможность прикрутить? @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.