Jump to content
Korean Random
ktulho

[Лог нанесенного урона / Hitlog] V2 (py_macro)

Recommended Posts

@ktulho там есть ошибка,но не знаю имеет ли она отношение к данной проблеме

@ktulho hitlog.py обновил точно, раньше работало

Share this post


Link to post

Short link
Share on other sites

Это может быть любой скрипт, где есть функция onHealthChanged

Share this post


Link to post

Short link
Share on other sites

@ktulho значит надо все обновить и тогда должна уйти такая проблема с хитлогом?

Share this post


Link to post

Short link
Share on other sites
4 минуты назад, motaro сказал:

значит надо все обновить

 

Желательно. Но если там у вас много файлов и все их искать в данном разделе (для того чтобы скачать актуальные версии) не хотите и/или нет времени, то можно упростить задачу.

 

В notepad++ (или аналогичном текст.редакторе) произвести поиск по файлам указав путь до папки "py_macro".

 

В поиске ввести onHealthChanged

И обновить только те файлы где будет найдено словосочетание.

Share this post


Link to post

Short link
Share on other sites
8 часов назад, motaro сказал:

разобрался, удалил скрипт sight.py,ошибка исчезла и хитлог заработал,а я думал он нужен

Я же писал, что его давно нет.

Share this post


Link to post

Short link
Share on other sites

@ktulho на тесте хитлог и дамаглог не работают. С боя ошибки в лог не пишутся.

В реплее пишутся:

2021-06-20 18:40:13.432: INFO: =============================
2021-06-20 18:40:13.432: INFO: 2021-06-20 18:40:13: [ERROR] mods/xfw_libraries/xfw/events.pyc
2021-06-20 18:40:13.432: ERROR: Traceback (most recent call last):
2021-06-20 18:40:13.432: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2021-06-20 18:40:13.433: ERROR:   File "./xfw/events.py", line 24, in fire
2021-06-20 18:40:13.434: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 853, in PlayerAvatar__processVehicleAmmo
2021-06-20 18:40:13.435: ERROR:     g_dataHitLog.loaded()
2021-06-20 18:40:13.435: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 306, in loaded
2021-06-20 18:40:13.435: ERROR:     self.intCD = self.ammo.getCurrentShellCD()
2021-06-20 18:40:13.435: ERROR: AttributeError: 'NoneType' object has no attribute 'getCurrentShellCD'
2021-06-20 18:40:13.435: INFO: =============================
2021-06-20 18:40:19.227: INFO: =============================
2021-06-20 18:40:19.227: INFO: 2021-06-20 18:40:19: [ERROR] mods/xfw_libraries/xfw/events.pyc
2021-06-20 18:40:19.227: ERROR: Traceback (most recent call last):
2021-06-20 18:40:19.227: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2021-06-20 18:40:19.228: ERROR:   File "./xfw/events.py", line 24, in fire
2021-06-20 18:40:19.229: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 1018, in Vehicle_onHealthChanged
2021-06-20 18:40:19.229: ERROR:     data.onHealthChanged(self, newHealth, oldHealth, attackerID, attackReasonID)
2021-06-20 18:40:19.229: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 564, in onHealthChanged
2021-06-20 18:40:19.229: ERROR:     self.updateData()
2021-06-20 18:40:19.229: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 318, in updateData
2021-06-20 18:40:19.229: ERROR:     self.data['dmgRatio'] = self.data['damage'] * 100 // self.data['maxHealth']
2021-06-20 18:40:19.229: ERROR: ZeroDivisionError: integer division or modulo by zero
2021-06-20 18:40:19.229: INFO: =============================

и со сборника одну нашёл:

2021-06-20 18:40:19.276: INFO: =============================
2021-06-20 18:40:19.276: INFO: 2021-06-20 18:40:19: [ERROR] mods/xfw_libraries/xfw/events.pyc
2021-06-20 18:40:19.276: ERROR: Traceback (most recent call last):
2021-06-20 18:40:19.276: ERROR:   File "./xfw/events.py", line 53, in __event_handler
2021-06-20 18:40:19.277: ERROR:   File "./xfw/events.py", line 24, in fire
2021-06-20 18:40:19.278: ERROR:   File "res_mods/configs/xvm/py_macro\collection.py", line 48, in onHealthChanged
2021-06-20 18:40:19.278: ERROR:     if attackerID not in _vehicles:
2021-06-20 18:40:19.278: ERROR: TypeError: argument of type 'NoneType' is not iterable
2021-06-20 18:40:19.278: INFO: ============================

 

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Пропал хитлог после восстановления игры и моего старого конфига.Подскажите,как быть?Замена моего файла hitLog.xc на дефолтный не помогло.

Screenshot_Win7-633.png.575d9dfcd47336410716747ea6fe932f.png

 

xvm.log python.log

Share this post


Link to post

Short link
Share on other sites
6 часов назад, Turbina сказал:

и моего старого конфига.

На сколько старый конфиг?

Share this post


Link to post

Short link
Share on other sites

Там первый хитлог (не V2).

 

@Turbina ещё в battleLabels нужно заменить секции hitlog_header и hitlog_body на свежие hitLogHeader и hitLogBody. Дёрнуть можно в default/battleLabelsTemplates.xc

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@ktulho если не перепутал - с ЛФ:

2021-08-19 20:43:48.308: INFO: =============================
2021-08-19 20:43:48.308: INFO: 2021-08-19 20:43:48: [ERROR] mods/xfw_libraries/xfw/events.pyc
2021-08-19 20:43:48.308: ERROR: Traceback (most recent call last):
2021-08-19 20:43:48.308: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2021-08-19 20:43:48.310: ERROR:   File "./xfw/events.py", line 24, in fire
2021-08-19 20:43:48.311: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 854, in PlayerAvatar__processVehicleAmmo
2021-08-19 20:43:48.311: ERROR:     g_dataHitLog.loaded()
2021-08-19 20:43:48.311: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 307, in loaded
2021-08-19 20:43:48.311: ERROR:     self.intCD = self.ammo.getCurrentShellCD()
2021-08-19 20:43:48.311: ERROR: AttributeError: 'NoneType' object has no attribute 'getCurrentShellCD'
2021-08-19 20:43:48.311: INFO: =============================

думал, что сохранил реплей... да сохранил не тот ges_slap.gif

Share this post


Link to post

Short link
Share on other sites

@ktulho с затоплением можно что сделать?

 

vVLNxmC.png

     // тест
     "dmg-kind": {
        "shot":     "попадание", // shot / попадание.
        "ramming":  "таран",     // ramming / таран.
        "drowning": "утопление", // drowning / утопление.
        ...
      },
      "formatHistory": "{{dmg-kind}} <font color='{{c:vtype}}'>{{vehicle}}</font>"

----

и чтоб при "groupHitsByPlayer": true исходя из реплея сгруппировал урон тараном с остатком хп при затоплении

8-53 затопил.wotreplay

Share this post


Link to post

Short link
Share on other sites
3 часа назад, HEKPOMAHT сказал:

с затоплением можно что сделать?

Наверное нет.

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@ktulho 

2021-11-19 18:19:19.191: INFO: =============================
2021-11-19 18:19:19.191: INFO: 2021-11-19 18:19:19: [ERROR] mods/xfw_libraries/xfw/events.pyc
2021-11-19 18:19:19.191: ERROR: Traceback (most recent call last):
2021-11-19 18:19:19.191: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2021-11-19 18:19:19.193: ERROR:   File "./xfw/events.py", line 24, in fire
2021-11-19 18:19:19.194: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 915, in _Vehicle_onHealthChanged
2021-11-19 18:19:19.195: ERROR:     g_dataHitLog.onHealthChanged(self, newHealth, attackerID, attackReasonID)
2021-11-19 18:19:19.195: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 350, in onHealthChanged
2021-11-19 18:19:19.195: ERROR:     self.updateData()
2021-11-19 18:19:19.195: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 304, in updateData
2021-11-19 18:19:19.195: ERROR:     self.updateLabels()
2021-11-19 18:19:19.195: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 222, in updateLabels
2021-11-19 18:19:19.195: ERROR:     g_hitLogs.output()
2021-11-19 18:19:19.195: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 829, in output
2021-11-19 18:19:19.195: ERROR:     log.output()
2021-11-19 18:19:19.195: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 784, in output
2021-11-19 18:19:19.195: ERROR:     self.listLog = self.groupHitByPlayer.getListLog()
2021-11-19 18:19:19.195: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 623, in getListLog
2021-11-19 18:19:19.196: ERROR:     self.updatePlayers()
2021-11-19 18:19:19.196: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 583, in updatePlayers
2021-11-19 18:19:19.196: ERROR:     self.updateList(self.CHANGE)
2021-11-19 18:19:19.196: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 540, in updateList
2021-11-19 18:19:19.196: ERROR:     macros = self.udateMacros()
2021-11-19 18:19:19.196: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 489, in udateMacros
2021-11-19 18:19:19.196: ERROR:     data['dmg-kind-player'] = ''.join([conf['dmg-kind-player'].get(ATTACK_REASONS[i], None) for i in player.get('dmg-kind-player', [])])
2021-11-19 18:19:19.196: ERROR: KeyError: 34
2021-11-19 18:19:19.196: INFO: =============================

 

лф-резервы - отобразилась только подложка хитлога.wotreplay

в лини фронта урон от резервов не отображается. Вроде ж чинили раньше.

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...