Jump to content
Korean Random
Kotyarko_O

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

Recommended Posts

7 минут назад, ddar сказал:

Я не смогу одновременно получить и то, и другое?

 

Да, но в этом случае нужно продублировать макросы в коде скрипта по аналогии с макросом: {{pl_vehicle_weight}} , например. Это сделать не сложно.

Edited by night_dragon_on

Share this post


Link to post

Short link
Share on other sites

@night_dragon_on спасибо, работает

Почему макрос незаметности неподвижной машины до выстрела {{py:invis_stand}} может отдавать неверные значения?

Например Leo по ТТХ имеет показатель 15,69 (без сетки, умения маскировки и т.п.), а макрос отдает 13,7. (Танк Leo по идее без учета бонусов. У меня его в ангаре нет, открыл в исследованиях и посмотрел характеристики)

 

FastStoneEditor3.png

infoPanel.xc

info_panel_data.py

infoPanel.py

Edited by ddar

Share this post


Link to post

Short link
Share on other sites

Доброго времени суток .

Назрел такой вопрос: можно ли для безбашенных ПТ-САСАУ дифференцировать броню башни и рубки ?

К примеру, панель при наведении на Ягу Е100 показывает Hull: 250-120-150 (емнип), Turret: 0-0-0 .

Вроде потому, что у Яги нет башни и рубка считается за часть корпуса, но броня рубки и самого корпуса различается, причем не только у Яги Е100 . 

Вот и, резюмируя, задаю вопрос: можно ли эти показатели (касаемо рубки) дифференцировать ?

Share this post


Link to post

Short link
Share on other sites

2017-11-12 10:46:28: [ERROR] Traceback (most recent call last):
  File "./res_mods/mods/packages\xvm_main\python\python_macro.py", line 157, in process_python_macro
    return (func(), deterministic)
  File "./res_mods/mods/packages\xvm_main\python\python_macro.py", line 150, in <lambda>
    return (lambda: func(*args), deterministic)
  File "res_mods/configs/xvm/py_macro\infoPanel.py", line 125, in infoPanelFormat
    return infoPanel.textsFormatted[idx]
IndexError: list index out of range
arg='infoPanelFormat(1)'

 

PLS help me

 

MFG

SicFunzler

Share this post


Link to post

Short link
Share on other sites
В 27.10.2017 в 17:05, night_dragon_on сказал:

@anotna123 , последняя версия что я выкладывал работает нормально.

Если нет то прикрепляй: xvm.log и python.log

 

Перезалил - заработало. Теперь не пашет в 0.9.20.1.3

Прикрепляю логи, ошибка в xvm.log:

 

2017-11-16 00:06:25: [ERROR] Traceback (most recent call last):
  File "./res_mods/mods/packages\xvm_main\python\python_macro.py", line 156, in process_python_macro
    (func, deterministic) = get_function(arg)
  File "./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 iterable
arg='infoPanelFormat'

xvm.log

python.log

Edited by anotna123

Share this post


Link to post

Short link
Share on other sites

@ktulho скачал версию выше, та же песня. Что может быть не так? Снёс папку mods и res_mods, распаковал xvm заново - та же фигня. Кроме этих двух папок он ещё где-то сидит?

xvm.log

python.log

Share this post


Link to post

Short link
Share on other sites

@ktulho нет там у меня такого файла. Я думал, что раз у меня default-конфиг, то только в этой папке панель и нужна (так, вроде бы, было раньше). Сейчас "догрузил" 2 файла из архива в указанную папку - всё заработало, спасибо большое!!

Share this post


Link to post

Short link
Share on other sites

2017-11-26 00:22:07.791: NOTICE: [NOTE] (scripts/client/game.py, 463): [SPACE] Loading space: spaces/212_epic_random_valley
2017-11-26 00:22:10.223: WARNING: [WARNING] (scripts/client/gui/Scaleform/framework/entities/BaseDAAPIComponent.py, 62): Class with alias `teamBasesPanel` already registered in object EpicRandomPage[0x3adaf2f0]=[key=ViewKey[alias=epicRandomPage, name=epicRandomPage], scope=SimpleScope[0x29febfb0]=[scopeType=view, parentScope=GlobalScope[0x29febf70]=[scopeType=global, parentScope=None]], state=2]. It will be rewritten.
2017-11-26 00:26:29.831: INFO: =============================
2017-11-26 00:26:29.831: INFO: 2017-11-26 00:26:29: [ERROR] mods/com.modxvm.xfw/python/xfw/events.pyc
2017-11-26 00:26:29.831: ERROR: Traceback (most recent call last):
2017-11-26 00:26:29.831: ERROR:   File "mods/xfw/python/xfw/events.py", line 57, in __event_handler
2017-11-26 00:26:29.831: ERROR:   File "mods/xfw/python/xfw/events.py", line 24, in fire
2017-11-26 00:26:29.832: ERROR:   File "res_mods/configs/xvm/py_macro\infoPanel.py", line 94, in targetFocus
2017-11-26 00:26:29.832: ERROR:     infoPanel.update(entity)
2017-11-26 00:26:29.832: ERROR:   File "res_mods/configs/xvm/py_macro\infoPanel.py", line 76, in update
2017-11-26 00:26:29.832: ERROR:     info_panel_data.init(vehicle, player().getVehicleAttached())
2017-11-26 00:26:29.832: ERROR:   File "./res_mods/mods/../configs/xvm/py_macro\info_panel_data.py", line 19, in init
2017-11-26 00:26:29.833: ERROR:     _typeDescriptor = vehicle.typeDescriptor if vehicle is not None else _playerVehicle.typeDescriptor
2017-11-26 00:26:29.833: ERROR:   File "scripts/client_common/svarog_script/py_component_system.py", line 74, in __getattr__
2017-11-26 00:26:29.833: ERROR: AttributeError: 'Svarog.ComponentSystem' object has no attribute 'typeDescriptor'
2017-11-26 00:26:29.833: INFO: =============================
2017-11-26 00:26:30.940: INFO: =============================
2017-11-26 00:26:30.941: INFO: 2017-11-26 00:26:30: [ERROR] mods/com.modxvm.xfw/python/xfw/events.pyc

 

Пожалуйста, помогите с этой ошибкой. Я получаю его python.log.  У меня есть это сообщение 6 раз подряд

Share this post


Link to post

Short link
Share on other sites

На Build: 8157 (branch default) постоянно ошибки сыпятся:

 

 INFO: =============================
 INFO: [ERROR] mods/xfw/python/xfw/events.pyc
 ERROR: Traceback (most recent call last):
 ERROR:   File "mods/xfw/python/xfw/events.py", line 57, in __event_handler
 ERROR:   File "mods/xfw/python/xfw/events.py", line 24, in fire
 ERROR:   File "res_mods/configs/xvm/py_macro\infoPanel.py", line 106, in handleKey
 ERROR:     infoPanel.update(player().getVehicleAttached())
 ERROR:   File "res_mods/configs/xvm/py_macro\infoPanel.py", line 81, in update
 ERROR:     self.setTextsFormatted()
 ERROR:   File "res_mods/configs/xvm/py_macro\infoPanel.py", line 53, in setTextsFormatted
 ERROR:     funcResponse = self.getFuncResponse(funcName)
 ERROR:   File "res_mods/configs/xvm/py_macro\infoPanel.py", line 43, in getFuncResponse
 ERROR:     return str(func())
 ERROR:   File "res_mods/configs/xvm/py_macro\info_panel_data.py", line 219, in pl_vehicle_weight
 ERROR:     return "%i" % (round(_playerVehicle.typeDescriptor.physics['weight'] / 1000))
 ERROR: AttributeError: 'NoneType' object has no attribute 'typeDescriptor'
 INFO: =============================
 

Share this post


Link to post

Short link
Share on other sites
28 минут назад, ktulho сказал:

@FFold эту версию используете? 

Да последний выложенный архив (работать работает но сыпятся ошибки в больших кол-вах). В предыдущей тоже сыпалось только другие номера линий.

Share this post


Link to post

Short link
Share on other sites

На Build: 8168 (branch default) сыпется тоже самое только

File "res_mods/configs/xvm/py_macro\infoPanel.py", line 106, in handleKey

 ERROR:     infoPanel.update(player().getVehicleAttached())

поменялось на

File "res_mods/configs/xvm/py_macro\infoPanel.py", line 98, in targetFocus

 ERROR:     infoPanel.update(entity)

Edited by FFold

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