Jump to content
Korean Random

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


Recommended Posts

20 минут назад, ktulho сказал:

@Legended попробуйте добавить параметр:


"flags": ["alive"]

 

Этот вариант не работает.

11 минут назад, HEKPOMAHT сказал:

допиши событие и используй макрос


"updateEvent": "ON_CURRENT_VEHICLE_DESTROYED, ..."
"alpha": "{{alive?100|0}}"

 

А этот вполне.

image.thumb.png.611545c4d0c6391bebc6ae3a6cafedcb.png

Спасибо всем.

Link to comment
Short link
Share on other sites

For your information, I have to test only the default config with the sighty.py and sight.xc installed, sphere permanently activated without hotkey, but again I see nothing. I tested again in the practice room, with different Arty replays, but always the same result. Strange, but it worked. Has a WG patch again destroyed something in the game?

Link to comment
Short link
Share on other sites

I am trying to get a .png to show when you aim at a tank, Each tank will have its on assign png 

Will the .png need system name like >  china-Ch01_Type59

Example: I am driving a Foch than I aim at a type59, I want to see the assign png for the typ59

 

This below will show .png for what tank your are driving all the time ?

I do not want to see nothing for what I'm driving , just need to see .png for target.

 

 

"target_png": {
      "enabled":true, 
      "updateEvent": "PY(ON_CAMERA_MODE), PY(ON_TARGET)",
      "x": "{{py:sight.cameraMode=arc?190|{{py:sight.cameraMode=sn?310|{{py:sight.cameraMode=str?275}}}}}}",
      "y": "{{py:sight.cameraMode=arc?-190|{{py:sight.cameraMode=sn?-120|{{py:sight.cameraMode=str?-75}}}}}}",
      "rotation": 0,
      "width": 250,
      "height": 100,
      "screenHAlign": "center",
      "screenVAlign": "center",
      "alpha" : "{{py:sight.nameTarget?{{py:sight.cameraMode=arc?100|100}}|100}}",
      "shadow": { "distance": 1, "angle": 45, "alpha": 80, "blur": 3, "strength": 2 },
      "textFormat": { "align": "left", "color": "0xd4ffaa" },
      "format": "<img src='xvm://res/icons/tanks/{{vehiclename}}.png'>"
     },

Edited by PigBrains
Link to comment
Short link
Share on other sites

So should it  look like this ?

 

"target_png": {
      "enabled":true,    
      "onHold": "false", "visibleOnHotKey": false ,
      "updateEvent": "PY(ON_CAMERA_MODE), PY(ON_TARGET)",
      "x": "{{py:sight.cameraMode=arc?190|{{py:sight.cameraMode=sn?310|{{py:sight.cameraMode=str?275}}}}}}",
      "y": "{{py:sight.cameraMode=arc?-190|{{py:sight.cameraMode=sn?-120|{{py:sight.cameraMode=str?-75}}}}}}",
      "rotation": 0,
      "width": 250,
      "height": 100,
      "screenHAlign": "center",
      "screenVAlign": "center",
      "alpha" : "{{py:sight.nameTarget?{{py:sight.cameraMode=arc?100|100}}|100}}",
      "shadow": { "distance": 1, "angle": 90, "alpha": 70, "blur": 5, "strength": 3 },
      "textFormat": { "align": "left", "color": "0xd4ffaa" },
      "format": "<img src='xvm://res/icons/icons/battle/tanks/{{py:sight.vehNameTarget}}.png'>"

Link to comment
Short link
Share on other sites

Решился запилить к дефолтному кастомному прицелу дальномер и получить закос под прицел Dellux годов 12-х :) Почти в каждом бою замеряю куда-то что-то а делать это балкалкмодом надоело лет пару назад. Сидел ровнял/примерял часов 10 минимум. То какой-то символ, то ещё зацепить  пару макросов да всё строго в дизайн текущего прицела. Поехал раков нагибать и жестоко обломился! Ожидал привязки дальномера и времени полёта снаряда к прицелу как у арты. А макросы {{py:sight.distance}} {{py:sight.timeFlight}} "отображают инфу для сведения".

 

Можно ли сделать подобное для самих прицелов?

 

Upd.

В 09.02.2017 в 09:45, ktulho сказал:

Добавил макрос {{py:dynamic_color_rating(rating, value)}} (build 7143), где

rating - название динамического цвета из файла colors.xc;

value - текущее значение.

макрос возвращает значение вида "FF0000"

 

Пример:

{{py:dynamic_color_rating('t_battles', {{t-battles}})}}

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

 

Попросил я пребатлтаймер наполнятся красным  начиная от 15 и до 5-ти секунд. С 5 до 0 сущая краснота. Но этот макрос вообще не фурычит при  value=1..3. Во время отсчёта 3 2 1 — тщательно уничтожает ресурс ссд через XVM.log.

 

2018-11-02 13:01:12: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 157, in process_python_macro
    return (func(), deterministic)
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 150, in <lambda>
    return (lambda: func(*args), deterministic)
  File "res_mods/configs/xvm/py_macro\xvm.py", line 72, in dynamic_color_rating
    return utils.dynamic_color_rating(rating, value)
  File "res_mods/configs/xvm/py_macro\xvm\utils.py", line 120, in dynamic_color_rating
    return smooth_transition_color('BGR', int(r_c, 16), int(l_c, 16), (value - l_v), (r_v - l_v))
  File "res_mods/configs/xvm/py_macro\xvm\utils.py", line 37, in smooth_transition_color
    r_k = - r_delta / sum_rgb if r_delta < 0 else r_delta / sum_rgb
ZeroDivisionError: float division by zero
arg='xvm.dynamic_color_rating('timer', 3)'

точно так же с в конце 2 и 1

Edited by BuSH
Link to comment
Short link
Share on other sites

 

2 часа назад, BuSH сказал:

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

Color.xc прикрепите.

Link to comment
Short link
Share on other sites

"timer": [
	  { "value": 0,		"color": "0xFF0000" },
	  { "value": 7,		"color": "0xFF0000" },
	  { "value": 15,	"color": "0xF8F400" },
	  { "value": 20,	"color": "0xFFFFFF" },
	  { "value": 30,	"color": "0xFFFFFF" }
    ]

сам цвет:

"color": "#{{py:isBattle?E3E3E3|{{py:xvm.dynamic_color_rating('timer', {{py:xvm.secondsBT}})}}}}"

 

Link to comment
Short link
Share on other sites

 

Эта строчка лишняя.

 

Hey ktulho...

 

Could you replace the Auto-Aim Circle addon with instead a "Tank Color Outline" version?

 

What I mean is when auto-aim is on a tank make it's "tank outline" be a different color.

There was a mod that did this once, and through testing I found CYAN to be the best color for it.

But you could also make the color changeable if you wanted, for those who want to use a different color...

 

This is really the best type of auto-aim indicator.

The Arrow is hard to see, and the Circle covers up the tank so you can't even see the tank well.

I don't know why you didn't use this in the first place?  If you need the code, we might be able to find it, sure it's out there somewhere, I might even have it.

 

Please please... Help with this?  Thank you.

 

 

-------------

 

 

Эй ktulho ...

Не могли бы вы заменить аддоны Circle Aim Circle вместо «Tuc Color Outline»?

Я имею в виду, когда авто-прицел находится на танке, это означает, что «контур резервуара» будет другого цвета.

Был мод, который сделал это один раз, и через тестирование я нашел CYAN лучшим цветом для него.

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

Это действительно лучший тип индикатора автоматической прицеливания.

Стрела трудно увидеть, и Круг закрывает танк, чтобы вы не могли даже хорошо видеть танк.

Я не знаю, почему вы не использовали это в первую очередь? Если вам нужен код, мы могли бы его найти, конечно, где-то там, я мог бы даже его получить.

Пожалуйста, пожалуйста ... Помогите с этим? Спасибо.

Link to comment
Short link
Share on other sites

3 часа назад, ktulho сказал:

ИМХО, Потому что это очень похоже на чит.

Он хочет,чтоб всегда захваченный светился в контуре другим цветом?Независимо от маркера?

Link to comment
Short link
Share on other sites

18 часов назад, Slava7572 сказал:

Он хочет,чтоб всегда захваченный светился в контуре другим цветом?Независимо от маркера?

Насколько я понимаю, да.

Edited by ktulho
Link to comment
Short link
Share on other sites

12 часов назад, ktulho сказал:

Насколько я понимаю, да.

Тогда реально читом попахивает,а если цвет контура меняется только по наведению,то смысла в этом мало,контур то один....Пусть в саппорт свою идею озвучит.

Link to comment
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...