Jump to content
Korean Random
ktulho

Прицел (без сведения) средствами XVM

Recommended Posts

1 час назад, sicfunzler сказал:

Сейчас все работает, только дисплей проникновения не помогает

 

    "piercingChance": {
      "enabled": true,
      "flags": [ "alive" ],
      "updateEvent": "PY(ON_CALC_ARMOR), PY(ON_CAMERA_MODE)",
      "x": 0,
      "y": "{{py:sight.cameraMode=arc?-49|{{py:sight.cameraMode=sn?39|44}}}}",
      "width": 100,
      "height": 26,
      "screenHAlign": "center",
      "screenVAlign": "center",
      "alpha" : 100,
      "shadow": { "distance": 1, "angle": 90, "alpha": 90, "blur": 5, "strength": 3 },
      "textFormat": { "align": "center", "valign": "center" },
      "format": "<font color='{{py:sight.c_piercingChance}}' size='16'>{{py:sight.piercingActual~/}}{{py:sight.armorActual}}</font>"
    }, 

Тоже не работает данная фича. В логах чисто, просто нет маркеров, будто не существует данной настройки.

Share this post


Link to post

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

только дисплей проникновения не помогает

Исправил.

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

battleCrosshairsApp.swf

 

Также сделайте обновление THANKS из этого файла

 

Спасибо, что сейчас отлично.

Unbenannt.JPG

Edited by sicfunzler

Share this post


Link to post

Short link
Share on other sites

Привет товарищи,

а есть готовый блок чтобы только цвет и\или размер снарядов барабана изменить ?

Дефолтный внимание плохо акцентирует.

Share this post


Link to post

Short link
Share on other sites

Вот такое выловил сегодня:

2017-12-20 01:49:57.161: ERROR: Traceback (most recent call last):
2017-12-20 01:49:57.161: ERROR:   File "scripts/client/Avatar.py", line 1773, in updateGunMarker
2017-12-20 01:49:57.161: ERROR:   File "scripts/client/VehicleGunRotator.py", line 272, in setShotPosition
2017-12-20 01:49:57.161: ERROR:   File "mods/xfw/python/xfw/events.py", line 71, in <lambda>
2017-12-20 01:49:57.162: ERROR:   File "res_mods/configs/xvm/py_macro\sight.py", line 630, in _VehicleGunRotator__getGunMarkerPosition
2017-12-20 01:49:57.163: ERROR:     speedValue = vehicle.speedInfo.value
2017-12-20 01:49:57.163: ERROR: AttributeError: 'NoneType' object has no attribute 'speedInfo'

Share this post


Link to post

Short link
Share on other sites
В 10.12.2017 в 13:38, H_E_K_P_O_M_A_H_T_ сказал:

@ktulho , привет.

Решил прокачать ПТ-САУ Швеции, и после первого боя на UDES 03 вопрос возник:

Можно ли сделать, чтобы иконки пропадали после уничтожения ?

0e32c5b548df7b51aaf912fd3771b8a3.png 

Подумав, написал на официальный форум

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Если при нажатии ctrl миникарта открывается в центре экрана, то прицел оказывается над ней и перекрывает миникарту 

Share this post


Link to post

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

Если при нажатии ctrl миникарта открывается в центре экрана, то прицел оказывается над ней и перекрывает миникарту 

 

можно в прицел добавить этот параметр:

"layer": "substrate",

либо отключить зум в миникарте:

hotkeys.xc

"minimapZoom": { "enabled": false, "keyCode": 29, "onHold": true },

 

Edited by H_E_K_P_O_M_A_H_T_
дополнение

Share this post


Link to post

Short link
Share on other sites

На версии из шапки в логах:

2017-12-21 17:34:01.820: ERROR: Traceback (most recent call last):
2017-12-21 17:34:01.820: ERROR:   File "scripts/client/Avatar.py", line 1773, in updateGunMarker
2017-12-21 17:34:01.821: ERROR:   File "scripts/client/VehicleGunRotator.py", line 272, in setShotPosition
2017-12-21 17:34:01.821: ERROR:   File "mods/xfw/python/xfw/events.py", line 71, in <lambda>
2017-12-21 17:34:01.821: ERROR:   File "res_mods/configs/xvm/py_macro\sight.py", line 630, in _VehicleGunRotator__getGunMarkerPosition
2017-12-21 17:34:01.823: ERROR:     speedValue = vehicle.speedInfo.value
2017-12-21 17:34:01.823: ERROR: AttributeError: 'NoneType' object has no attribute 'speedInfo'

В логах строка 597 и ниже.

python2.zip

Share this post


Link to post

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

На версии из шапки в логах:


2017-12-21 17:34:01.820: ERROR: Traceback (most recent call last):
2017-12-21 17:34:01.820: ERROR:   File "scripts/client/Avatar.py", line 1773, in updateGunMarker
2017-12-21 17:34:01.821: ERROR:   File "scripts/client/VehicleGunRotator.py", line 272, in setShotPosition
2017-12-21 17:34:01.821: ERROR:   File "mods/xfw/python/xfw/events.py", line 71, in <lambda>
2017-12-21 17:34:01.821: ERROR:   File "res_mods/configs/xvm/py_macro\sight.py", line 630, in _VehicleGunRotator__getGunMarkerPosition
2017-12-21 17:34:01.823: ERROR:     speedValue = vehicle.speedInfo.value
2017-12-21 17:34:01.823: ERROR: AttributeError: 'NoneType' object has no attribute 'speedInfo'

В логах строка 597 и ниже.

python2.zip

Я как то такую запись уже вылавливал,подозреваю,что это из за protanki.reductionInfo(таймер сведения от протапков),у себя в конфиге выключил примерно такой же таймер(макрос py:sight.timeAIM) и вроде как больше ее не встречал.

Share this post


Link to post

Short link
Share on other sites

Где я допустил ошибку?

На обычных орудиях все нормально, и таймер перезарядки и время перезарядки показывает:

shot_089.jpg.8ec6b6f15287228f2205d73c308d63dd.jpg shot_088.jpg.3a06af1e07831c90e419ac20a32023fe.jpg

 

а вот на барабанах время перезарядки не кажет:

shot_090.jpg.7b7eddc9e14994f2500bafa66646d665.jpg

в тоже время таймеры на барабанах работают нормально:

shot_097.jpg.acbb5d9b47e1ebc85755fd5ce172d515.jpg shot_096.jpg.883dbe74f252d40323bdbd33e91a3665.jpg

 

код:

      "textFormat": { "align": "right", "valign": "bottom", "color": "0x{{py:sight.leftTime=0?95CB29|FF0000}}" },
      "format": "<font face='$FieldFont' size='17'>{{py:sight.leftTime=0?{{py:sight.quantityInClipShells>0?{{py:sight.reloadTimeClip%3.2f}}|{{py:sight.reloadTime%3.2f}}}}|{{py:sight.leftTime%3.2f}}}}</font>"

 

Share this post


Link to post

Short link
Share on other sites
3 hours ago, SEREGA_SF said:

      "textFormat": { "align": "right", "valign": "bottom", "color": "0x{{py:sight.leftTime=0?95CB29|FF0000}}" },       "format": "<fontface='$FieldFont'size='17'>{{py:sight.leftTime=0?{{py:sight.quantityInClipShells>0?{{py:sight.reloadTimeClip%3.2f}}|{{py:sight.reloadTime%3.2f}}}}|{{py:sight.leftTime%3.2f}}}}</font>"

 

shot_005.thumb.jpg.5e7d9db00f6b18f23368b77d804ce057.jpg

 

This works for me. It might for you. Though it is a little different than yours. I think готов means Ready, so I changed it in the code. Remove if you do not like it.

I prefer to have both the clip and the shell timers if using an auto loader. This might not be what you want but it does work.

 

EDIT:

No, it has stopped working. I can only get it to show in a replay and only after I rewind the replay. If I just let the replay play normally, it will not show. I had not noticed until now.

 

Sorry. I removed the config examples for the moment. Perhaps I have done something too or it could be the latest update to the client.

 

 

 

Edited by SmashPuppet
misunderstood question

Share this post


Link to post

Short link
Share on other sites

Как я могу интегрировать эти загрузочные изображения, чтобы я мог использовать свои собственные изображения,  Так что для заряженных и потерянных пуль

Unbenannt.PNG

Share this post


Link to post

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

На версии из шапки в логах:


2017-12-21 17:34:01.820: ERROR: Traceback (most recent call last):
2017-12-21 17:34:01.820: ERROR:   File "scripts/client/Avatar.py", line 1773, in updateGunMarker
2017-12-21 17:34:01.821: ERROR:   File "scripts/client/VehicleGunRotator.py", line 272, in setShotPosition
2017-12-21 17:34:01.821: ERROR:   File "mods/xfw/python/xfw/events.py", line 71, in <lambda>
2017-12-21 17:34:01.821: ERROR:   File "res_mods/configs/xvm/py_macro\sight.py", line 630, in _VehicleGunRotator__getGunMarkerPosition
2017-12-21 17:34:01.823: ERROR:     speedValue = vehicle.speedInfo.value
2017-12-21 17:34:01.823: ERROR: AttributeError: 'NoneType' object has no attribute 'speedInfo'

В логах строка 597 и ниже.

python2.zip

Подправил немного что бы не вываливалась данная ошибка.

ЗЫ. Diff для наглядности:

--- sight.py
+++ sight.py
@@ -630,2 +629,0 @@
-        speedValue = vehicle.speedInfo.value
-        show_timeAIM = (speedValue[0] < 0.5) and (speedValue[1] < 0.02) and (speedValue[1] > -0.02) and (-0.5 < speedValue[0])
@@ -633,5 +631,7 @@
-            if show_timeAIM:
-                lg = 10 * math.log(dispersionAngles[0] / dispersionAngles[1])
-                timeAIM = lg if lg > 0.01 else 0
-            else:
-                timeAIM = None
+            timeAIM = None
+            if vehicle is not None:
+                speedValue = vehicle.speedInfo.value
+                show_timeAIM = (speedValue[0] < 0.5) and (speedValue[1] < 0.02) and (speedValue[1] > -0.02) and (-0.5 < speedValue[0])
+                if show_timeAIM:
+                    lg = 10 * math.log(dispersionAngles[0] / dispersionAngles[1])
+                    timeAIM = lg if lg > 0.01 else 0
@@ -849 +849 @@
-        return None
+        return None
\ No newline at end of file

 

 

 

sight.py

Edited by xenus
  • Upvote 1

Share this post


Link to post

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

Как я могу интегрировать эти загрузочные изображения, чтобы я мог использовать свои собственные изображения,  Так что для заряженных и потерянных пуль

Unbenannt.PNG

Нужно флешку редактировать.

По просьбе сделали сведение для фаталити с дефотлтным отображением кассет:

crosshair_Controls.wotmod

 

____________________________________

По моему вопросу, есть кодеры, кто подскажет где у меня ошибка?)

 

Edited by SEREGA_SF

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