BuSH Posted October 10, 2020 Share Posted October 10, 2020 @ktulho там до трёпа было и "по делу )" https://kr.cm/f/t/40466/c/490442/ @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted October 11, 2020 Author Share Posted October 11, 2020 07.10.2020 в 08:15, BuSH сказал: Почему бы и сюда не добавить табличный урон пули как в демеджлоге. Добавил. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
BuSH Posted October 12, 2020 Share Posted October 12, 2020 6 часов назад, ktulho сказал: Добавил. Парсер не может его пережевать, хоть обучен миксовать int и float. Можно просто урон в макросе сделать целым, но лучше же парсер научить. Я не первый раз сталкиваюсь. int(float('530.0')) 2020-10-12 02:30:19.008: INFO: ============================= 2020-10-12 02:30:19.008: INFO: 2020-10-12 02:30:19: [ERROR] mods/xfw_libraries/xfw/events.pyc 2020-10-12 02:30:19.008: ERROR: Traceback (most recent call last): 2020-10-12 02:30:19.008: ERROR: File "events", line 58, in __event_handler 2020-10-12 02:30:19.009: ERROR: File "events", line 25, in fire 2020-10-12 02:30:19.009: ERROR: File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 910, in _Vehicle_onHealthChanged 2020-10-12 02:30:19.009: ERROR: g_dataHitLog.onHealthChanged(self, newHealth, attackerID, attackReasonID) 2020-10-12 02:30:19.009: ERROR: File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 348, in onHealthChanged 2020-10-12 02:30:19.009: ERROR: self.updateData() 2020-10-12 02:30:19.009: ERROR: File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 302, in updateData 2020-10-12 02:30:19.009: ERROR: self.updateLabels() 2020-10-12 02:30:19.010: ERROR: File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 220, in updateLabels 2020-10-12 02:30:19.010: ERROR: g_hitLogs.output() 2020-10-12 02:30:19.010: ERROR: File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 824, in output 2020-10-12 02:30:19.010: ERROR: log.output() 2020-10-12 02:30:19.010: ERROR: File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 781, in output 2020-10-12 02:30:19.010: ERROR: self.listLog = self.groupHitByFireRamming.getListLog() 2020-10-12 02:30:19.010: ERROR: File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 692, in getListLog 2020-10-12 02:30:19.010: ERROR: self.udateListLog() 2020-10-12 02:30:19.010: ERROR: File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 653, in udateListLog 2020-10-12 02:30:19.010: ERROR: formattedString = parser(_config.get(self.S_FORMAT_HISTORY, ''), macros) 2020-10-12 02:30:19.010: ERROR: File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 80, in parser 2020-10-12 02:30:19.010: ERROR: return parser_addon.parser_addon(notParsedStr, macros) 2020-10-12 02:30:19.010: ERROR: File "res_mods/configs/xvm/py_macro\xvm\parser_addon.py", line 6, in parser_addon 2020-10-12 02:30:19.010: ERROR: return _parser(strHTML, dict_macros) 2020-10-12 02:30:19.010: ERROR: File "res_mods/configs/xvm/py_macro\xvm\parser_addon.py", line 153, in _parser 2020-10-12 02:30:19.010: ERROR: _macro, non = formatMacro(substr, macros) 2020-10-12 02:30:19.011: ERROR: File "res_mods/configs/xvm/py_macro\xvm\parser_addon.py", line 92, in formatMacro 2020-10-12 02:30:19.011: ERROR: compar = comparing(_macro, _operator, _math) 2020-10-12 02:30:19.011: ERROR: File "res_mods/configs/xvm/py_macro\xvm\parser_addon.py", line 17, in comparing 2020-10-12 02:30:19.011: ERROR: _math = int(_math) 2020-10-12 02:30:19.011: ERROR: ValueError: invalid literal for int() with base 10: '530.0' 2020-10-12 02:30:19.011: INFO: ============================= @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted October 12, 2020 Author Share Posted October 12, 2020 5 часов назад, BuSH сказал: Парсер не может его пережевать, хоть обучен миксовать int и float. Нужен пример. @ Quote Link to comment Short link Share on other sites More sharing options...
BuSH Posted October 12, 2020 Share Posted October 12, 2020 3 часа назад, ktulho сказал: Нужен пример. Макрос новый,. Когда сравниваем с другими циферками типа: {{shell-dmg={{dmg}}?aga|ne}} хотЛога нет а при каждом уроне вот тот лог. Вот такие забавные у нас данные. {{shell-dmg}} = '530.0' {{dmg}} = 530 parser_addon когда пробует привести к целому этот shell-dmg вылетает с ValueError Ну вот кароче: >>> int('530.0') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: '530.0' >>> int(float('530.0')) 530 >>> int(530.0) 530 @ Quote Link to comment Short link Share on other sites More sharing options...
HEKPOMAHT Posted October 12, 2020 Share Posted October 12, 2020 1 час назад, BuSH сказал: {{shell-dmg}} = '530.0' когда я тестировал макрос в дамаглоге - применял форматирование: {{shell-dmg}} = 530.0 {{shell-dmg%.0f}} = 530 @ Quote Link to comment Short link Share on other sites More sharing options...
BuSH Posted October 12, 2020 Share Posted October 12, 2020 @HEKPOMAHT ну такое... Вопрос не в построении костылей, а наоборот! @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted October 12, 2020 Author Share Posted October 12, 2020 5 часов назад, BuSH сказал: {{shell-dmg={{dmg}}?aga|ne}} Такая конструкция ошибок не дает. @ Quote Link to comment Short link Share on other sites More sharing options...
BuSH Posted October 12, 2020 Share Posted October 12, 2020 Та хотелось минимум, придуманный с лога. Но поковырятся в тех фантазиях молодости пришлось таки. Пока только осилил уменьшить лог до одного, пожирневшего вложенностями, макроса, без которого, ошибки нет., По утру ещё поковыряю. {{alive?{{shell-dmg={{dmg}}?{{0%5d~%}}|{{py:abs({{py:mul({{py:div({{py:sub({{dmg}}, {{shell-dmg}})}}, {{shell-dmg}})}},100)}})<26?{{dmg>{{shell-dmg}}?<font color='#00FF00'>{{py:mul({{py:div({{py:sub({{dmg}}, {{shell-dmg}})}}, {{shell-dmg}})}},100)%5.1f~%}}</font>|<font color='#FF3333'>{{py:mul({{py:div({{py:sub({{shell-dmg}}, {{dmg}})}}, {{shell-dmg}})}},100)%5.1f~%}}</font>}}|{{c:type-shell=FFFFFF?<font color='#ffff55'>{{py:div(100, {{py:div({{py:div({{shell-dmg}}, 2)}}, {{dmg}})}})%5.1f~%}}</font>|}}}}}}|}}{{my-vtype-key=SPG?<tab>{{splash-hit?|+}}}} Ух орну если abs станет крайним. @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted October 12, 2020 Author Share Posted October 12, 2020 10 минут назад, BuSH сказал: Та хотелось минимум, придуманный с лога. Но поковырятся в тех фантазиях молодости пришлось таки. Пока только осилил уменьшить лог до одного, пожирневшего вложенностями, макроса, без которого, ошибки нет., По утру ещё поковыряю. {{alive?{{shell-dmg={{dmg}}?{{0%5d~%}}|{{py:abs({{py:mul({{py:div({{py:sub({{dmg}}, {{shell-dmg}})}}, {{shell-dmg}})}},100)}})<26?{{dmg>{{shell-dmg}}?<font color='#00FF00'>{{py:mul({{py:div({{py:sub({{dmg}}, {{shell-dmg}})}}, {{shell-dmg}})}},100)%5.1f~%}}</font>|<font color='#FF3333'>{{py:mul({{py:div({{py:sub({{shell-dmg}}, {{dmg}})}}, {{shell-dmg}})}},100)%5.1f~%}}</font>}}|{{c:type-shell=FFFFFF?<font color='#ffff55'>{{py:div(100, {{py:div({{py:div({{shell-dmg}}, 2)}}, {{dmg}})}})%5.1f~%}}</font>|}}}}}}|}}{{my-vtype-key=SPG?<tab>{{splash-hit?|+}}}} Ух орну если abs станет крайним. Что здесь считается? @ Quote Link to comment Short link Share on other sites More sharing options...
BuSH Posted October 12, 2020 Share Posted October 12, 2020 (edited) разница от базового урона :) эта штука успешно откатала несколько десятков тысяч боёв ) оно рабочее если че но когда я сам прикручивал этот макрос, он был изначально INT 07.10.2020 в 08:15, BuSH сказал: self.data['shellDamage'] = int(_shells['shellDamage']) Edited October 12, 2020 by BuSH @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted October 12, 2020 Author Share Posted October 12, 2020 @BuSH Этот макрос не подходит? {{dmg-deviation}} - TODO / отклонение нанесенного урона от номинального урона снаряда в процентах. Возвращает 0.0, если техника была уничтожена выстрелом, или выстрел был фугасом и отклонение составило больше 25%. @ Quote Link to comment Short link Share on other sites More sharing options...
BuSH Posted October 12, 2020 Share Posted October 12, 2020 ну там чуть более тонко всё :) + арта со сплешами @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted October 12, 2020 Author Share Posted October 12, 2020 17 минут назад, ktulho сказал: {{py:mul({{py:div({{py:sub({{dmg}}, {{shell-dmg}})}}, {{shell-dmg}})}},100)}} Это вроде можно заменить на {{dmg-deviation}} @ Quote Link to comment Short link Share on other sites More sharing options...
BuSH Posted October 13, 2020 Share Posted October 13, 2020 (edited) 20 часов назад, BuSH сказал: {{shell-dmg={{dmg}}?aga|ne}} наоборот :) {{dmg={{shell-dmg}}?aga|ne}} вместо dmg любой integer перед сравнением тип данных с 1-го объекта применится ко 2-му dmg у нас INT за что уносит в выделенное условие за что и 2-й объект получает тоже INT но у нас _math, который {{shell-dmg}}, очень хитрое число и int() не терпит не так много городить костелей пришлось для воспроизведения ну и кек, чебурек махнул местами ) Edited October 13, 2020 by BuSH @ Quote Link to comment Short link Share on other sites More sharing options...
crasovsky.a Posted October 21, 2020 Share Posted October 21, 2020 Доброго аремени суток всем!!! Ребята перестал отображатся лог урона по противникам,помогите пожалуйста. JustDj1.rar @ Quote Link to comment Short link Share on other sites More sharing options...
Antoshkaaa Posted December 8, 2020 Share Posted December 8, 2020 День добрый. В hotkeys.xc хотел поставить 9 (KEY_8), не работает, как впрочем и остальные в том же ряду. "hitLogAltMode": { "enabled": true, "keyCode": 9, "onHold": true }, Это баг какой-то? @ Quote Link to comment Short link Share on other sites More sharing options...
BuSH Posted December 8, 2020 Share Posted December 8, 2020 @Antoshkaaa у картохи с 1 по 0 всякие ремки, аптечки и т. д. в дефолте. Не пробовал освободить нужную кнопачку? @ Quote Link to comment Short link Share on other sites More sharing options...
Antoshkaaa Posted December 9, 2020 Share Posted December 9, 2020 @BuSH мда... бредово у них устроено... помогло, спасибо. Но как по мне все равно имеет место косяк. Я на эти цифры, не убирая их в настройках игры установил TotalEfficiency и все работает, только хитлог отказался. @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted December 9, 2020 Author Share Posted December 9, 2020 @Antoshkaaa Скорее всего проблема не в hitLog. Проверяли на чистом XVM? @ 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.