Jump to content
Korean Random
ktulho

damageLog средствами XVM.

Recommended Posts

@ktulho просматривал логи, нашёл в одном месте:

Build 8.2.0_31

2019-12-13 02:16:42.056: INFO: =============================
2019-12-13 02:16:42.056: INFO: 2019-12-13 02:16:42: [ERROR] mods/xfw_libraries/xfw/events.pyc
2019-12-13 02:16:42.056: ERROR: Traceback (most recent call last):
2019-12-13 02:16:42.056: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2019-12-13 02:16:42.057: ERROR:   File "./xfw/events.py", line 24, in fire
2019-12-13 02:16:42.058: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 905, in _Vehicle_onHealthChanged
2019-12-13 02:16:42.058: ERROR:     g_dataHitLog.onHealthChanged(self, newHealth, attackerID, attackReasonID)
2019-12-13 02:16:42.058: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 343, in onHealthChanged
2019-12-13 02:16:42.058: ERROR:     self.updateData()
2019-12-13 02:16:42.058: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 283, in updateData
2019-12-13 02:16:42.058: ERROR:     self.setRatings()
2019-12-13 02:16:42.059: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 221, in setRatings
2019-12-13 02:16:42.059: ERROR:     if (_stat.resp is not None) and (self.data['name'] in _stat.resp['players']):
2019-12-13 02:16:42.059: ERROR: KeyError: 'players'
2019-12-13 02:16:42.059: INFO: =============================
2019-12-13 02:17:32.767: INFO: =============================
2019-12-13 02:17:32.767: INFO: 2019-12-13 02:17:32: [ERROR] mods/xfw_libraries/xfw/events.pyc
2019-12-13 02:17:32.767: ERROR: Traceback (most recent call last):
2019-12-13 02:17:32.767: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2019-12-13 02:17:32.768: ERROR:   File "./xfw/events.py", line 24, in fire
2019-12-13 02:17:32.769: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 990, in Vehicle_onHealthChanged
2019-12-13 02:17:32.769: ERROR:     data.onHealthChanged(self, newHealth, attackerID, attackReasonID)
2019-12-13 02:17:32.769: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 552, in onHealthChanged
2019-12-13 02:17:32.769: ERROR:     self.updateData()
2019-12-13 02:17:32.769: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 336, in updateData
2019-12-13 02:17:32.769: ERROR:     if (_stat.resp is not None) and (attacker['name'] in _stat.resp['players']):
2019-12-13 02:17:32.769: ERROR: KeyError: 'players'
2019-12-13 02:17:32.769: INFO: =============================
2019-12-13 02:19:48.440: INFO: =============================
2019-12-13 02:19:48.440: INFO: 2019-12-13 02:19:48: [ERROR] mods/xfw_libraries/xfw/events.pyc
2019-12-13 02:19:48.440: ERROR: Traceback (most recent call last):
2019-12-13 02:19:48.440: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2019-12-13 02:19:48.441: ERROR:   File "./xfw/events.py", line 24, in fire
2019-12-13 02:19:48.442: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 990, in Vehicle_onHealthChanged
2019-12-13 02:19:48.442: ERROR:     data.onHealthChanged(self, newHealth, attackerID, attackReasonID)
2019-12-13 02:19:48.442: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 552, in onHealthChanged
2019-12-13 02:19:48.442: ERROR:     self.updateData()
2019-12-13 02:19:48.442: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 336, in updateData
2019-12-13 02:19:48.442: ERROR:     if (_stat.resp is not None) and (attacker['name'] in _stat.resp['players']):
2019-12-13 02:19:48.442: ERROR: KeyError: 'players'
2019-12-13 02:19:48.442: INFO: =============================
2019-12-13 02:19:48.741: INFO: =============================
2019-12-13 02:19:48.741: INFO: 2019-12-13 02:19:48: [ERROR] mods/xfw_libraries/xfw/events.pyc
2019-12-13 02:19:48.741: ERROR: Traceback (most recent call last):
2019-12-13 02:19:48.741: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2019-12-13 02:19:48.742: ERROR:   File "./xfw/events.py", line 24, in fire
2019-12-13 02:19:48.743: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 905, in _Vehicle_onHealthChanged
2019-12-13 02:19:48.743: ERROR:     g_dataHitLog.onHealthChanged(self, newHealth, attackerID, attackReasonID)
2019-12-13 02:19:48.743: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 343, in onHealthChanged
2019-12-13 02:19:48.743: ERROR:     self.updateData()
2019-12-13 02:19:48.743: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 283, in updateData
2019-12-13 02:19:48.744: ERROR:     self.setRatings()
2019-12-13 02:19:48.744: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\hitLog.py", line 221, in setRatings
2019-12-13 02:19:48.744: ERROR:     if (_stat.resp is not None) and (self.data['name'] in _stat.resp['players']):
2019-12-13 02:19:48.744: ERROR: KeyError: 'players'
2019-12-13 02:19:48.744: INFO: =============================
2019-12-13 02:19:50.755: INFO: =============================
2019-12-13 02:19:50.755: INFO: 2019-12-13 02:19:50: [ERROR] mods/xfw_libraries/xfw/events.pyc
2019-12-13 02:19:50.755: ERROR: Traceback (most recent call last):
2019-12-13 02:19:50.756: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2019-12-13 02:19:50.756: ERROR:   File "./xfw/events.py", line 24, in fire
2019-12-13 02:19:50.757: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 990, in Vehicle_onHealthChanged
2019-12-13 02:19:50.757: ERROR:     data.onHealthChanged(self, newHealth, attackerID, attackReasonID)
2019-12-13 02:19:50.757: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 552, in onHealthChanged
2019-12-13 02:19:50.757: ERROR:     self.updateData()
2019-12-13 02:19:50.757: ERROR:   File "res_mods/configs/xvm/py_macro\xvm\damageLog.py", line 336, in updateData
2019-12-13 02:19:50.757: ERROR:     if (_stat.resp is not None) and (attacker['name'] in _stat.resp['players']):
2019-12-13 02:19:50.758: ERROR: KeyError: 'players'
2019-12-13 02:19:50.758: INFO: =============================

репля нет.

Share this post


Link to post

Short link
Share on other sites

ух уж эти твины (tweens)... хороши но никак не вникаю в их настройку..

помогите сделать так чтобы lastHit как бы поднимался из damageLog history

https://i.imgur.com/J66PXsZ.png

Edited by tunut

Share this post


Link to post

Short link
Share on other sites
20.01.2020 в 22:40, tunut сказал:

помогите сделать так чтобы lastHit как бы поднимался из damageLog history

Основная проблема в том, что в tweens не работает параметр "screenVAlign", а также py_macros. Поэтому не удается привязаться к нижнему краю экрану.

Для разрешения экрана 1600х1024 можно сделать так (измененный default):

    // Display the last damage (hit) (see damageLog.xc).
    // Отображение последнего урона (попадания) (см. damageLog.xc).
    "lastHit": {
      "enabled": true,
      "updateEvent": "PY(ON_LAST_HIT)",
      // "screenVAlign": "bottom",
      "tweens": [
        // "damageLog"/"timeDisplayLastHit"
        [ "fromTo", 0.75, { "scaleX": 0, "scaleY": 0 , "y": 740}, {"screenVAlign": "bottom", "scaleX": 1, "scaleY": 1 , "y": 710} ],
        [ "to", 3.75, {"y": 560}],
        // [ "delay", 3.75 ],
        [ "fromTo", 0.5, { "scaleX": 1, "scaleY": 1, "y": 560 }, { "screenVAlign": "bottom", "scaleX": 0, "scaleY": 0, "y": 540} ]
      ],
      "x": 300,
      // "y": "{{py:xvm.damageLog.lastHit.y}}",
      "width": 200,
      "height": 50,
      "layer": "bottom",
      // "screenHAlign": "center",

      "shadow": {
        "distance": "{{py:xvm.damageLog.lastHit.shadow('distance')}}",
        "angle": "{{py:xvm.damageLog.lastHit.shadow('angle')}}",
        "color": "{{py:xvm.damageLog.lastHit.shadow('color')}}",
        "alpha": "{{py:xvm.damageLog.lastHit.shadow('alpha')}}",
        "blur": "{{py:xvm.damageLog.lastHit.shadow('blur')}}",
        "strength": "{{py:xvm.damageLog.lastHit.shadow('strength')}}",
        "hideObject": "{{py:xvm.damageLog.lastHit.shadow('hideObject')}}",
        "inner": "{{py:xvm.damageLog.lastHit.shadow('inner')}}",
        "knockout": "{{py:xvm.damageLog.lastHit.shadow('knockout')}}",
        "quality": "{{py:xvm.damageLog.lastHit.shadow('quality')}}"
      },
      "textFormat": { "align": "center", "color": "0xF4EFE8", "size": 16 },
      "format": "{{py:xvm.damageLog.lastHit}}",
      "mouseEvents": {
        "mouseDown": "lastHit_mouseDown",
        "mouseUp": "lastHit_mouseUp",
        "mouseMove": "lastHit_mouseMove"
      }
    },

 

Edited by ktulho
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
21.01.2020 в 21:00, ktulho сказал:

Основная проблема в том, что в tweens не работает параметр "screenVAlign", а также py_macros. Поэтому не удается привязаться к нижнему краю экрану.

Для разрешения экрана 1600х1024 можно сделать так (измененный default):


    // Display the last damage (hit) (see damageLog.xc).
    // Отображение последнего урона (попадания) (см. damageLog.xc).
    "lastHit": {
      "enabled": true,
      "updateEvent": "PY(ON_LAST_HIT)",
      // "screenVAlign": "bottom",
      "tweens": [
        // "damageLog"/"timeDisplayLastHit"
        [ "fromTo", 0.75, { "scaleX": 0, "scaleY": 0 , "y": 740}, {"screenVAlign": "bottom", "scaleX": 1, "scaleY": 1 , "y": 710} ],
        [ "to", 3.75, {"y": 560}],
        // [ "delay", 3.75 ],
        [ "fromTo", 0.5, { "scaleX": 1, "scaleY": 1, "y": 560 }, { "screenVAlign": "bottom", "scaleX": 0, "scaleY": 0, "y": 540} ]
      ],
      "x": 300,
      // "y": "{{py:xvm.damageLog.lastHit.y}}",
      "width": 200,
      "height": 50,
      "layer": "bottom",
      // "screenHAlign": "center",

      "shadow": {
        "distance": "{{py:xvm.damageLog.lastHit.shadow('distance')}}",
        "angle": "{{py:xvm.damageLog.lastHit.shadow('angle')}}",
        "color": "{{py:xvm.damageLog.lastHit.shadow('color')}}",
        "alpha": "{{py:xvm.damageLog.lastHit.shadow('alpha')}}",
        "blur": "{{py:xvm.damageLog.lastHit.shadow('blur')}}",
        "strength": "{{py:xvm.damageLog.lastHit.shadow('strength')}}",
        "hideObject": "{{py:xvm.damageLog.lastHit.shadow('hideObject')}}",
        "inner": "{{py:xvm.damageLog.lastHit.shadow('inner')}}",
        "knockout": "{{py:xvm.damageLog.lastHit.shadow('knockout')}}",
        "quality": "{{py:xvm.damageLog.lastHit.shadow('quality')}}"
      },
      "textFormat": { "align": "center", "color": "0xF4EFE8", "size": 16 },
      "format": "{{py:xvm.damageLog.lastHit}}",
      "mouseEvents": {
        "mouseDown": "lastHit_mouseDown",
        "mouseUp": "lastHit_mouseUp",
        "mouseMove": "lastHit_mouseMove"
      }
    },

 

Где можно размер шрифта поменять например на 12 . ?  пробовал 16 сменить на 12 не поменялся. Слово последний урон тоже меньше не делается . название шрифта меняется, но размер остается прежним

Edited by P.S.Enot

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.

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...