BlackGur Posted January 24, 2017 Share Posted January 24, 2017 Почему бы не выделить полезные посты в отдельный пост? Например как сделать хп в ушах по альту, % отметок в карусели и т.д. Я же потом не найду Link to comment Short link Share on other sites More sharing options...
Lom Posted January 26, 2017 Share Posted January 26, 2017 (edited) привет всем. в шрифте XVMSymbol заметил один символ. так вот интересно можно его как то прикрутить чтобы он появлялся над техникой и союзников и противника на время ремонта гусли и мотора? ну как обычные символы над танками в виде черепа или щита у союзников. Edited January 26, 2017 by ЛОМ Link to comment Short link Share on other sites More sharing options...
ktulho Posted January 26, 2017 Share Posted January 26, 2017 Это надо в раздел предложений писать. 1 @ Link to comment Short link Share on other sites More sharing options...
Lom Posted January 26, 2017 Share Posted January 26, 2017 Это надо в раздел предложений писать. понял)) я думал это в хвм просто можно как то прикрутить как и маркер атакую или маркер защиты)) ну нет так нет))) Link to comment Short link Share on other sites More sharing options...
night_dragon_on Posted January 26, 2017 Author Share Posted January 26, 2017 (edited) Это надо в раздел предложений писать. Тут то с передачей информации по лампе сервак не всегда справлялся, а такие события передавать думаю нецелесообразно, лишняя нагрузка. Все таки проект xvm-ма не коммерческий, и сервера арендованные не резиновые. Edited January 26, 2017 by night_dragon_on 1 @ Link to comment Short link Share on other sites More sharing options...
ktulho Posted January 26, 2017 Share Posted January 26, 2017 Тут то с передачей информации по лампе сервак не всегда справлялся, а такие события передавать думаю нецелесообразно, лишняя нагрузка. Сбитая гусля и без сервера определяется. Link to comment Short link Share on other sites More sharing options...
arm Posted January 26, 2017 Share Posted January 26, 2017 Ставлю FragCorrelation_v1.zip, и при загрузке хвм не определяется, Ваше решение Link to comment Short link Share on other sites More sharing options...
night_dragon_on Posted January 26, 2017 Author Share Posted January 26, 2017 (edited) и при загрузке хвм не определяется, Ваше решение Прикрепи логи из корневой папки игры: файлы XVM.log и Python.log В последнем обновлении менялся путь до быстрых настроек, возможно используешь старые файлики конфига или панели. Edited January 26, 2017 by night_dragon_on 1 @ Link to comment Short link Share on other sites More sharing options...
Slava7572 Posted January 26, 2017 Share Posted January 26, 2017 (edited) night_dragon_on,тоже пробовал прикрутить к своему набору FragCorrelation_v1.Скопировал код,закинул скрипты,поставил шрифт,но чет никак.В папке py_macro создался NDO_scripts.pyс,hp_panel.py и dmg_count.py неактивны почему то.Попробовал без NDO_scripts.py,а hp_panel.py и dmg_count.py закинул в py_macro,вот такая ошибка в логе,жаль не сохранил первый лог,с расположением как по инструкции. 2017-01-26 15:38:19: [iNFO] HTTPS: /4.0/getStatsReplay/0bfbfe67-****-****-****-********5710/5659653=5889,27290002=3649,15442324=5921,37235606=63553,8096027=8481,11171998=3649,15959327=19217,19872800=5137,5685155=4385,28255018=2865,11863212=8449,2105392=8705,64922130=11521,69076411=17953,5819709=7169,4243014=10257,72963916=1793,20394829=5377,38571342=9233,8405326=2593,19441253=7937,11764456=3377,6279186=3649,13901294=7169,2158960=7425,3722867=50193,11637240=5697,4680957=16657,3068542=3649,4163925=42252017-01-26 15:38:20: [b:002] onLibLoaded: ../../res_mods/mods/packages/xvm_battle/as_battle/xvm_battle.swf2017-01-26 15:38:20: [b:003] [XFW] Mod loaded: xvm_battle.swf2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='current_hp(0)'2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='max_hp_symbols('Q')'2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='current_hp_symbols(0, 'Q')'2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='str_replace('0x00CC33', '0x', '#')'2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='max_hp_symbols('R')'2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='current_hp(1)'2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='current_hp_symbols(1, 'R')'2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='str_replace('0xF50800', '0x', '#')'2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='high_сaliber(0)'2017-01-26 15:38:21: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='avg_damage(0)'2017-01-26 15:38:21: [X:000] onLibLoaded:2017-01-26 15:38:22: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='high_сaliber(0)'2017-01-26 15:38:22: [iNFO] Time: 3323 ms, Size: 3966 (9761) bytes2017-01-26 15:38:22: [VM] initialized2017-01-26 15:38:25: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='avg_damage(0)'2017-01-26 15:38:39: [ERROR] Traceback (most recent call last):File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro(func, deterministic) = get_function(arg)File "C:\Games\World_of_Tanks\res_mods\mods/packages\xvm_main\python\python_macro.py", line 147, in get_function(func, deterministic) = _container.get(func_name)TypeError: 'NoneType' object is not iterablearg='high_сaliber(0)' П.С:питон лог чистый как в первом,так и во втором случае. Edited January 26, 2017 by Slava7572 Link to comment Short link Share on other sites More sharing options...
night_dragon_on Posted January 26, 2017 Author Share Posted January 26, 2017 (edited) вот такая ошибка в логе,жаль не сохранил первый лог,с расположением как по инструкции. Прикрепи всю папку с конфигом, посмотрю что там. Подправлю. В папке py_macro создался NDO_scripts.pyс,hp_panel.py и dmg_count.py неактивны почему то. Возможно причина в том что подключаешь не все скрипты прописанные по умолчанию для загрузки: 'NDO_scripts.py' ##################################################################### # imports from NDO_scripts import info_panel from NDO_scripts import hp_panel from NDO_scripts import dmg_count from NDO_scripts import total_efficiency А только необходимые для панели, вот и ошибки о недостающем файле всплывают. Ну и соответственно скрипты не подключаются, о чем и свидетельствует лог. Попробовал без NDO_scripts.py,а hp_panel.py и dmg_count.py закинул в py_macro,вот такая ошибка в логе Если подключать их отдельно без загрузочного NDO_scripts.py то нужно восстановить загрузку в них: 'Пример' #@xvm.export('current_hp', deterministic=False) def current_hp(current_team): return panel.teams_totalhp[current_team] На: @xvm.export('current_hp', deterministic=False) def current_hp(current_team): return panel.teams_totalhp[current_team] Edited January 26, 2017 by night_dragon_on Link to comment Short link Share on other sites More sharing options...
Slava7572 Posted January 26, 2017 Share Posted January 26, 2017 Возможно причина в том что подключаешь не все скрипты прописанные по умолчанию для загрузки: Да,я только два указанных в предыдущем сообщении закинул.Не думал,что нужны все. Если подключать их отдельно без загрузочного NDO_scripts.py то нужно восстановить загрузку в них: Ок,сейчас попробую. Link to comment Short link Share on other sites More sharing options...
night_dragon_on Posted January 26, 2017 Author Share Posted January 26, 2017 (edited) Не думал,что нужны все. Нужны эти два, но остальные из загрузки нужно было убрать так: 'NDO_scripts.py' ##################################################################### # imports from NDO_scripts import hp_panel from NDO_scripts import dmg_count ##################################################################### # handlers > hp_panel @xvm.export('str_replace', deterministic=True) def str_replace(str, old, new, max=-1): return hp_panel.str_replace(str, old, new, max=-1) @xvm.export('current_hp', deterministic=False) def current_hp(current_team): return hp_panel.current_hp(current_team) @xvm.export('percent_hp', deterministic=False) def percent_hp(current_team): return hp_panel.percent_hp(current_team) @xvm.export('percent_hp_section', deterministic=False) def percent_hp_section(current_team): return hp_panel.percent_hp_section(current_team) @xvm.export('current_hp_symbols', deterministic=False) def current_hp_symbols(current_team, symbol): return hp_panel.current_hp_symbols(current_team, symbol) @xvm.export('max_hp_symbols', deterministic=True) def max_hp_symbols(symbol): return hp_panel.max_hp_symbols(symbol) @xvm.export('sign_hp', deterministic=False) def sign_hp(): return hp_panel.sign_hp() @xvm.export('color_sign_hp', deterministic=False) def color_sign_hp(): return hp_panel.color_sign_hp() ##################################################################### # handlers > dmg_count @xvm.export('high_сaliber', deterministic=False) def high_caliber(dmg_total): return dmg_count.high_caliber(dmg_total) @xvm.export('avg_damage', deterministic=False) def avg_damage(dmg_total): return dmg_count.avg_damage(dmg_total) Edited January 26, 2017 by night_dragon_on 1 @ Link to comment Short link Share on other sites More sharing options...
Slava7572 Posted January 26, 2017 Share Posted January 26, 2017 Нужны эти два, но остальные из загрузки нужно было убрать так: 'NDO_scripts.py' ##################################################################### # imports from NDO_scripts import hp_panel from NDO_scripts import dmg_count ##################################################################### # handlers > hp_panel @xvm.export('str_replace', deterministic=True) def str_replace(str, old, new, max=-1): return hp_panel.str_replace(str, old, new, max=-1) @xvm.export('current_hp', deterministic=False) def current_hp(current_team): return hp_panel.current_hp(current_team) @xvm.export('percent_hp', deterministic=False) def percent_hp(current_team): return hp_panel.percent_hp(current_team) @xvm.export('percent_hp_section', deterministic=False) def percent_hp_section(current_team): return hp_panel.percent_hp_section(current_team) @xvm.export('current_hp_symbols', deterministic=False) def current_hp_symbols(current_team, symbol): return hp_panel.current_hp_symbols(current_team, symbol) @xvm.export('max_hp_symbols', deterministic=True) def max_hp_symbols(symbol): return hp_panel.max_hp_symbols(symbol) @xvm.export('sign_hp', deterministic=False) def sign_hp(): return hp_panel.sign_hp() @xvm.export('color_sign_hp', deterministic=False) def color_sign_hp(): return hp_panel.color_sign_hp() ##################################################################### # handlers > dmg_count @xvm.export('high_сaliber', deterministic=False) def high_caliber(dmg_total): return dmg_count.high_caliber(dmg_total) @xvm.export('avg_damage', deterministic=False) def avg_damage(dmg_total): return dmg_count.avg_damage(dmg_total) Да,я уже понял,но выбрал вариант без лишних отсылок,прописал,как вы написали в скрипте и все Ок,Огромное спасибо! Link to comment Short link Share on other sites More sharing options...
arm Posted January 27, 2017 Share Posted January 27, 2017 Я конечно понимаю, что вы умеете (Slava7572 и автор) и т.п., но остальные то в нулях Для простого пользователя: загрузил-заменил , ни как? Прошу помощи и ваше решение Link to comment Short link Share on other sites More sharing options...
Slava7572 Posted January 27, 2017 Share Posted January 27, 2017 Я конечно понимаю, что вы умеете (Slava7572 и автор) и т.п., но остальные то в нулях Для простого пользователя: загрузил-заменил , ни как? Прошу помощи и ваше решение А что сложного,берем из архива dmg_count.py и hp_panel.py,кидаем их в C:\Games\World_of_Tanks\res_mods\configs\xvm\py_macro,открываем Нотепадом++ или другим нормальным редактором и делаем по инструкции автора.Т.е. удаляем решетку(#) перед @xvm.export везде,сохраняем. Должно быть так: ##################################################################### # imports import BigWorld import xvm_battle.python.fragCorrelationPanel as panel from CurrentVehicle import g_currentVehicle from gui.Scaleform.daapi.view.lobby.hangar.Hangar import Hangar from gui.shared import g_itemsCache from xfw import * import traceback ##################################################################### # constants actual_arenaUniqueID = None playerAvgDamage = None max_hp_enemy = 0 ##################################################################### # handlers @xvm.export('high_сaliber', deterministic=False) def high_caliber(dmg_total): global actual_arenaUniqueID, max_hp_enemy arenaUniqueID = BigWorld.player().arenaUniqueID if actual_arenaUniqueID != arenaUniqueID: actual_arenaUniqueID = arenaUniqueID max_hp_enemy = 0 if panel.teams_totalhp[1] > max_hp_enemy: max_hp_enemy = panel.teams_totalhp[1] battletype = BigWorld.player().arena.guiType if (battletype != 1) or (max_hp_enemy == 0): return else: symbol = '<img src="img://gui/maps/icons/achievement/32x32/mainGun.png" width="26" height="26" align="middle" vspace="-11">' done = '<img src="img://gui/maps/icons/library/done.png" width="21" height="21" align="middle" vspace="-11">' threshold = max_hp_enemy * 0.2 if max_hp_enemy > 5000 else 1000 high_caliber = int(threshold - dmg_total) if high_caliber <= 0: high_caliber = done return '%s%s' % (symbol, high_caliber) if max_hp_enemy >= 1000 else '' @registerEvent(Hangar, '_Hangar__updateParams') def Hangar__updateParams(self): try: global playerAvgDamage playerAvgDamage = g_itemsCache.items.getVehicleDossier(g_currentVehicle.item.intCD).getRandomStats().getAvgDamage() return playerAvgDamage except: err(traceback.format_exc()) @xvm.export('avg_damage', deterministic=False) def avg_damage(dmg_total): global playerAvgDamage battletype = BigWorld.player().arena.guiType if battletype != 1: return elif playerAvgDamage == None: return else: symbol = '<img src="img://gui/maps/icons/library/cybersport/emblems/default_32x32.png" width="32" height="32" align="middle" vspace="-10">' done = '<img src="img://gui/maps/icons/library/done.png" width="25" height="25" align="middle" vspace="-10">' avgDamage = int(playerAvgDamage - dmg_total) if avgDamage <= 0: avgDamage = done return '%s%s' % (symbol, avgDamage) и так: ##################################################################### # imports from xfw import * import BigWorld import xvm_battle.python.fragCorrelationPanel as panel ##################################################################### # constants actual_arenaUniqueID = None max_hp_team = [0, 0] percent_filling = 5 section = 20 maxRatio = 95 minRatio = 65 ##################################################################### # handlers @registerEvent(panel, 'update_hp') def update_hp(vehicleID, hp): as_event('ON_UPDATE_HP') @xvm.export('str_replace', deterministic=True) def str_replace(str, old, new, max=-1): return str.replace(old, new, max) @xvm.export('current_hp', deterministic=False) def current_hp(current_team): return panel.teams_totalhp[current_team] @xvm.export('percent_hp', deterministic=False) def percent_hp(current_team): global actual_arenaUniqueID, max_hp_team arenaUniqueID = BigWorld.player().arenaUniqueID if actual_arenaUniqueID != arenaUniqueID: actual_arenaUniqueID = arenaUniqueID max_hp_team = [0, 0] if panel.teams_totalhp[current_team] > max_hp_team[current_team]: max_hp_team[current_team] = panel.teams_totalhp[current_team] return round((100. * current_hp(current_team)) / max_hp_team[current_team], 0) if max_hp_team[current_team] != 0 else None @xvm.export('percent_hp_section', deterministic=False) def percent_hp_section(current_team): return int(round(percent_hp(current_team) / percent_filling, 0)) if percent_hp(current_team) is not None else None @xvm.export('current_hp_symbols', deterministic=False) def current_hp_symbols(current_team, symbol): return percent_hp_section(current_team) * str(symbol) if percent_hp_section(current_team) is not None else section @xvm.export('max_hp_symbols', deterministic=True) def max_hp_symbols(symbol): return str(symbol) * section @xvm.export('sign_hp', deterministic=False) def sign_hp(): return '>' if current_hp(0) > current_hp(1) else '<' if current_hp(0) < current_hp(1) else '=' @xvm.export('color_sign_hp', deterministic=False) def color_sign_hp(): if current_hp(0) < current_hp(1): ratio = max(min((100. * current_hp(0) / current_hp(1) - minRatio) / (maxRatio - minRatio), 1), 0) color_sign_hp = panel.color_gradient(panel.hp_colors['neutral'], panel.hp_colors['bad'], ratio) elif current_hp(0) > current_hp(1): ratio = max(min((100. * current_hp(1) / current_hp(0) - minRatio) / (maxRatio - minRatio), 1), 0) color_sign_hp = panel.color_gradient(panel.hp_colors['neutral'], panel.hp_colors['good'], ratio) else: color_sign_hp = panel.color_gradient(panel.hp_colors['neutral'], panel.hp_colors['neutral'], 1) return color_sign_hp В конфиге копируем только секции с ХП и калибром("panel_hp_ally","panel_hp_enemy","high_сaliber","avg_damage"),непосредственно панели касаются только первые две,калибр и ср.урон добавляем по вкусу))) 1 @ Link to comment Short link Share on other sites More sharing options...
long Posted January 27, 2017 Share Posted January 27, 2017 Уважаемый night_dragon_on,возможно ли прикрутить карусель танков из вашего конфига к стандартному. Я пробовал не выходит,я так понял там файлы текст и колор завязаны с каруселью. Link to comment Short link Share on other sites More sharing options...
night_dragon_on Posted January 27, 2017 Author Share Posted January 27, 2017 (edited) Для простого пользователя: загрузил-заменил , ни как? Если используешь здешний конфиг то так все и происходит, если свой то процесс добавления в свой конфиг по примеру описанному @Slava7572-ой возможно ли прикрутить карусель танков из вашего конфига к стандартному Да, можно. default.zip Edited January 28, 2017 by night_dragon_on Link to comment Short link Share on other sites More sharing options...
long Posted January 27, 2017 Share Posted January 27, 2017 Спасибо за карусель!!! Link to comment Short link Share on other sites More sharing options...
arm Posted January 27, 2017 Share Posted January 27, 2017 Могу так сказать, что 99 проц пользователей вашего конфига - грубо "нубы", к которым и я отношусь, ставлю FragCorrelation_v1,не работает хвм, можно ли перезалить, скачал-скопировал, настоящий FragCorrelation_v1 не работает. То что вы пишете здесь-здесь поправить, не катит, не смогу-не умею. Прошу помощи в исправленном файле Link to comment Short link Share on other sites More sharing options...
long Posted January 27, 2017 Share Posted January 27, 2017 Уважаемый night_dragon_on,в вашей карусели для дефолтного конфига почемуто не подгружаются картинки из папки vtype, может я что то не так делаю? Link to comment Short link Share on other sites More sharing options...
Recommended Posts