Jump to content
Korean Random
ktulho

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

Recommended Posts

On 10/19/2023 at 12:20 AM, ktulho said:

@SicFunzler обновите reloading.py

 

 

 

The problem came from mod_SoundEventInjector.py

 

Now all go good THX

 

MFG

SicFunzler

 

Edited by SicFunzler

Share this post


Link to post

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

Попробуй

проверил в бою - всё ровно срабатывает (скрывает элементы прицела)

Share this post


Link to post

Short link
Share on other sites

@ktulho прошлый раз в Натиске тоже срабатывал - так пришлось в моде отключать:

  

12.10.2022 в 19:45, HEKPOMAHT сказал:

с Build: 10.1.0_0017 - порядок :ok:

 

Share this post


Link to post

Short link
Share on other sites

from WG 1.23.0 (tested on XVM 10.8.0_0097)

python.log python.log

2023-11-21 18:32:18.664: INFO: =============================
2023-11-21 18:32:18.664: INFO: 2023-11-21 18:32:18: [ERROR] mods/xfw_libraries/xfw/events.pyc
2023-11-21 18:32:18.664: ERROR: Traceback (most recent call last):
2023-11-21 18:32:18.664: ERROR:   File "./xfw/events.py", line 57, in __event_handler
2023-11-21 18:32:18.665: ERROR:   File "./xfw/events.py", line 24, in fire
2023-11-21 18:32:18.665: ERROR:   File "res_mods/configs/xvm/py_macro\infoAutoAim.py", line 179, in VehicleMarkerTargetPlugin__addAutoAimMarker
2023-11-21 18:32:18.665: ERROR:     setTarget(self._vehicleID)
2023-11-21 18:32:18.665: ERROR:   File "res_mods/configs/xvm/py_macro\infoAutoAim.py", line 125, in setTarget
2023-11-21 18:32:18.665: ERROR:     targetVehicle = target.typeDescriptor.type.shortUserString
2023-11-21 18:32:18.665: ERROR: AttributeError: 'NoneType' object has no attribute 'typeDescriptor'
2023-11-21 18:32:18.665: INFO: =============================

and xvm.log (error is gone when I removed collection.py)

2023-11-21 18:37:53: [B:007] [XFW/XfwComponent] onLibLoaded: Mod loaded: xvm_battle_classic.swf
2023-11-21 18:37:55: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 156, in process
    (func, deterministic) = __get_function(arg)
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 117, in __get_function
    args = ast.literal_eval(args_string)
  File "scripts/common/Lib/ast.py", line 49, in literal_eval
  File "scripts/common/Lib/ast.py", line 37, in parse
  File "<unknown>", line 1
    (, 0.924)

 

Edited by Aslain

Share this post


Link to post

Short link
Share on other sites
21.11.2023 в 20:40, Aslain сказал:

and xvm.log (error is gone when I removed collection.py)


2023-11-21 18:37:53: [B:007] [XFW/XfwComponent] onLibLoaded: Mod loaded: xvm_battle_classic.swf
2023-11-21 18:37:55: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 156, in process
    (func, deterministic) = __get_function(arg)
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 117, in __get_function
    args = ast.literal_eval(args_string)
  File "scripts/common/Lib/ast.py", line 49, in literal_eval
  File "scripts/common/Lib/ast.py", line 37, in parse
  File "<unknown>", line 1
    (, 0.924)

 

При использовании арифметических макросов ({{py:sum(x1,x2[,...])}}, {{py:sub(a, b)}}, {{py:mul(x1,x2[,...])}}, и т.д.), необходимо проверять, чтобы аргументы не возвращали None. Например:

{{py:mul({{py:visionRadius('{{name}}')?{{py:visionRadius('{{name}}')}}|0}}, 0,924)}}

 

Share this post


Link to post

Short link
Share on other sites
16 minutes ago, ktulho said:

When using arithmetic macros ( {{py:sum(x1,x2[,...])}}, {{py:sub(a, b)}}, {{py:mul(x1,x2[,.. .])}}, etc. ), you need to check that the arguments do not return None . For example:


{{py:mul({{py:visionRadius('{{name}}')?{{py:visionRadius('{{name}}')}}|0}}, 0,924)}}

 

Changed it from

"format": "{{py:mul({{py:reloadVehicle('{{name}}')}}, 0.924)%.01f~s}}"

to

            "format": "{{py:mul({{py:reloadVehicle('{{name}}')?{{py:reloadVehicle('{{name}}')}}|0}}, 0.924)%.01f~s}}"

and error is gone, also changed 0,924 back to 0.924 and all is working again. Why I see no reload value from bots?


Anyway I ended up with this, so I don't see 0 from bots:

 

            "format": "{{py:mul({{py:reloadVehicle('{{name}}')?{{py:reloadVehicle('{{name}}')}}|}}, 0.924)%.01f~s}}"


Thanks.

Share this post


Link to post

Short link
Share on other sites

 

@ktulho errors in battles with bots

 

2023-12-04 11:03:09: [B:006] [XVM INFO]
                               XVM_VERSION=10.8.1 #0005 for WoT 1.23.0.1
                               gameRegion=EU
                               configVersion=6.1.0
                               autoReloadConfig=false
                               markers.enabled=true
                               servicesActive=true
                               xmqp=true
                               statBattle=true
2023-12-04 11:03:09: [B:007] [XFW/XfwComponent] onLibLoaded: Mod loaded: xvm_battle_classic.swf
2023-12-04 11:03:12: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 156, in process
    (func, deterministic) = __get_function(arg)
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 117, in __get_function
    args = ast.literal_eval(args_string)
  File "scripts/common/Lib/ast.py", line 49, in literal_eval
  File "scripts/common/Lib/ast.py", line 37, in parse
  File "<unknown>", line 1
    (':Garfield O'Carr:')
                     ^
SyntaxError: invalid syntax
arg='reloadVehicle(':Garfield O'Carr:')'
2023-12-04 11:03:12: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 156, in process
    (func, deterministic) = __get_function(arg)
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 117, in __get_function
    args = ast.literal_eval(args_string)
  File "scripts/common/Lib/ast.py", line 49, in literal_eval
  File "scripts/common/Lib/ast.py", line 37, in parse
  File "<unknown>", line 1
    (':Garfield O'Carr:')
                     ^
SyntaxError: invalid syntax
arg='reloadVehicle(':Garfield O'Carr:')'

 

 

xvm.log1

Edited by Aslain

Share this post


Link to post

Short link
Share on other sites
29 minutes ago, ktulho said:

@Aslain try and use "double quotes"

For which element? Could you show some example.

 

By the way, that error is only when bots are in battle, from what I see, It's fine in battles without bots

Edited by Aslain

Share this post


Link to post

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

For which element? Could you show some example.

 

By the way, that error is only when bots are in battle, from what I see, It's fine in battles without bots

{{py:reloadVehicle(\"{{name}}\")}}

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
19 minutes ago, ktulho said:

{{py:reloadVehicle(\"{{name}}\")}}

Yup, this fixed all errors in logs, the bots however have 0.0sec reload, is it possible to display their static reload at all?

 

image.png.5d3d648913c420463d8566b1152a9542.png

Edited by Aslain

Share this post


Link to post

Short link
Share on other sites

@ktulho, подскажите пожалуйста, а есть какая-то возможность вывести в прицел информацию о разбросе орудия на 100 м?

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