Jump to content
Korean Random
ktulho

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

Recommended Posts

Хочется сделать прицел более контрастным, но в игре есть белые, коричневые, зелёные фоны. Даже тень не всегда помогает. Есть идеи, как можно сделать, скажем, смену цвета прицела в зависимости от карты?

Share this post


Link to post

Short link
Share on other sites
On 6/28/2018 at 3:22 PM, aster said:

I want to make the sight more contrast, but the game has white, brown, green backgrounds. Even the shadow does not always help. There are ideas, how can you make, say, a change in the color of the sight depending on the map?

 

Use {{py:map.kind}} from here in your config to change sight colours depending on the map to your liking.

Edited by SmashPuppet
maps.py updated. Edited to reflect changes
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@aster I wrote a simple, quick and dirty script to help group the maps into categories. Winter or Summer. (Desert and all others default to Summer)

You can then choose a colour depending on the map season. You can also use it to change the shadow alpha and/or strength for better contrast on a winter map.

Color options in your battleLabelSight.xc like so:

"color": "{{py:map.kind=winter?0xF50800|{{py:map.kind=desert?0x64FF30|0xD4FFAA}}}}" // Red if winter or bright Green if desert or lighter green if summer

 

Put ktulho's maps.py in your py_macro folder and this one as well:

(removed script) No longer needed. Ktulho updated maps.py =D 

 

Again, this is just an example. Choose whatever colours best suit your needs. Hope this helps. Cheers!

Edited by SmashPuppet
maps.py functionality updated. Post moot

Share this post


Link to post

Short link
Share on other sites

Discovered a possible issue with infoAutoAim.py. If you auto aim on a tank and then auto aim again on another tank without first disengaging, both tanks remain highlighted with the model and {{py:sight.autoAim*}} do not disappear after finally disengaging. It works normally if you disengage before auto aiming again on a different tank.

 

(About 3 minutes after battle starts)
20180630_1927_france-F37_AMX50_Foch_34_redshire.wotreplay

 

Cheers!

  • Upvote 1

Share this post


Link to post

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

Discovered a possible issue with infoAutoAim.py. If you auto aim on a tank and then auto aim again on another tank without first disengaging, both tanks remain highlighted with the model and {{py:sight.autoAim*}} do not disappear after finally disengaging. It works normally if you disengage before auto aiming again on a different tank.

 

Исправил. Обновил скрипт infoAutoAim.py.

В 29.06.2018 в 01:22, aster сказал:

Хочется сделать прицел более контрастным, но в игре есть белые, коричневые, зелёные фоны. Даже тень не всегда помогает. Есть идеи, как можно сделать, скажем, смену цвета прицела в зависимости от карты?

Добавил.

  • Upvote 3

Share this post


Link to post

Short link
Share on other sites
8 hours ago, ktulho said:

Исправил. Обновил скрипт infoAutoAim.py.

Добавил.

 

Excellent! Works and thank you! :no1:

Also a much better/elegant solution for maps.py. Again cheers!

Share this post


Link to post

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

Thank you)

 

If you look here , the ability to change colour is simple. (simpler than I had originally thought)

 

sight.xc



{
  "sight": {
    // false - disable the mod
    "enabled": true,
    "colors": {
    // Set colours of sight elements depending on season of map
      "winter": "0xFF96FF", // Pink example
      "desert": "0x64FF30", // Vibrant Green
      "summer": "0xD4FFAA"  // Light Green
    },


 

and an example in battleLabelSight.xc



"textFormat": { "align": "left", "color": "{{.sight.colors.{{py:map.kind}}}}" },

Share this post


Link to post

Short link
Share on other sites

I use only the penetration calculator, as you can see on the screenshot, this is working. But I have some errors in the xvm.log, maybe someone could help? Thank you.

shot_104.jpg

2018-07-18 16:03:51: XVM: eXtended Visualization Mod ( https://modxvm.com/ )
2018-07-18 16:03:51:     XVM Version   : 7.6.8
2018-07-18 16:03:51:     XVM Revision  : 8514
2018-07-18 16:03:51:     XVM Branch    : default
2018-07-18 16:03:51:     XVM Hash      : 22539bca9a05d9e5e104307881d119b367458b48
2018-07-18 16:03:51:     WoT Current   : 1.0.2.2
2018-07-18 16:03:51:     Current Time  : 2018-07-18 16:03:51 +0200
2018-07-18 16:03:51: ---------------------------
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\xvm.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\@xvm.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\minimapAlt.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\minimap.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\minimapCircles.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\minimapLines.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\minimapMapSize.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\minimapLabelsAlt.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\minimapLabelsTemplates.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\minimapLabelsData.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\hitLog.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\battle.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\colors.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\export.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\sight.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\elements.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\camera.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\sounds.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\battleLabels.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\battleLabelsTemplates.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\battleLabelSight.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\minimapLabels.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\battleLoading.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\statisticForm.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\playersPanel.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\markers.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\markersDeadExtended.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\markersDeadNormal.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\markersAliveExtended.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\markersAliveNormal.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\squad.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\safeShot.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\iconset.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\battleMessages.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\tooltips.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\xmqp.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\tweaks.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\userInfo.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\alpha.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\battleResults.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\texts.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\captureBar.xc
2018-07-18 16:03:51: [JSONxLoader] load: res_mods\configs\xvm\default\vehicleNames.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\hotkeys.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\hangar.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\carousel.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\carouselNormal.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\carouselSmall.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\widgets.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\widgetsTemplates.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\damageLog.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\login.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\configs\xvm\default\battleLoadingTips.xc
2018-07-18 16:03:52: [JSONxLoader] load: res_mods\mods\shared_resources\xvm\l10n\de.xc
2018-07-18 16:03:52: Config loaded. Region: EU (detected), Language: de (detected)
2018-07-18 16:04:03: [INFO]    HTTPS: /4.0/getToken/e4689f1a-****-****-****-********81d7/543716953
2018-07-18 16:04:03: [INFO]    Time: 62 ms, Size: 279 (279) bytes
2018-07-18 16:04:03: [INFO]    HTTPS: /4.0/getVersionWithLimit/e4689f1a-****-****-****-********81d7/543716953/50
2018-07-18 16:04:03: [INFO]    Time: 61 ms, Size: 10640 (10640) bytes
2018-07-18 16:04:03: [X:000] Loading swf mods:
2018-07-18 16:04:03: [X:001]   xvm_battle/as_battle_classic/xvm_battle_classic.swf
2018-07-18 16:04:03: [B:002] onLibLoaded: ../../res_mods/mods/xfw_packages/xvm_battle/as_battle_classic/xvm_battle_classic.swf
2018-07-18 16:04:03: [B:003] [XVM:BATTLE] processView: classicBattlePage
2018-07-18 16:04:04: [B:004] [XVM INFO]
                               XVM_VERSION=7.6.8 #8514 for WoT 1.0.2.2
                               gameRegion=EU
                               configVersion=6.1.0
                               autoReloadConfig=false
                               markers.enabled=false
                               servicesActive=true
                               xmqp=true
                               statBattle=false
2018-07-18 16:04:04: [B:005] [XFW] Mod loaded: xvm_battle_classic.swf
2018-07-18 16:04:04: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 156, in process_python_macro
    (func, deterministic) = get_function(arg)
  File "res_mods/mods/xfw_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='sight.cameraMode'
2018-07-18 16:04:04: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 156, in process_python_macro
    (func, deterministic) = get_function(arg)
  File "res_mods/mods/xfw_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='sight.cameraMode'
2018-07-18 16:04:04: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 156, in process_python_macro
    (func, deterministic) = get_function(arg)
  File "res_mods/mods/xfw_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='sight.cameraMode'
2018-07-18 16:04:04: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_main\python\python_macro.py", line 156, in process_python_macro
    (func, deterministic) = get_function(arg)
  File "res_mods/mods/xfw_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='sight.cameraMode'
2018-07-18 16:04:04: [INFO]    HTTPS: /3.0/getComments/e4689f1a-****-****-****-********81d7
2018-07-18 16:04:09: [VM]    initialized
2018-07-18 16:04:09: [VM] registered

battleLabels.xc

/**
 * List of battle interface labels.
 */
{
  "labels": {
    // Referenced labels:
    // * every custom field can be separate enabled or disabled by "enabled" switch in their settings.
    // * extended format supported, see extra-field.txt
    "formats": [
      ${ "battleLabelsTemplates.xc":"def.hitlogHeader" },
      ${ "battleLabelsTemplates.xc":"def.hitlogBody" },
      ${ "battleLabelsTemplates.xc":"def.totalHP" },
      ${ "battleLabelsTemplates.xc":"def.avgDamage" },
      ${ "battleLabelsTemplates.xc":"def.mainGun" },
      ${ "battleLabelsTemplates.xc":"def.damageLogBackground"},
      ${ "battleLabelsTemplates.xc":"def.damageLog" },
      ${ "battleLabelsTemplates.xc":"def.lastHit" },
      ${ "battleLabelsTemplates.xc":"def.fire" },
      ${ "battleLabelsTemplates.xc":"def.totalEfficiency" },
      ${ "battleLabelsTemplates.xc":"def.repairTimeEngine" },
      ${ "battleLabelsTemplates.xc":"def.repairTimeGun" },
      ${ "battleLabelsTemplates.xc":"def.repairTimeTurret" },
      ${ "battleLabelsTemplates.xc":"def.repairTimeTracks" }, 
      ${ "battleLabelsTemplates.xc":"def.repairTimeSurveying" },
      ${ "battleLabelsTemplates.xc":"def.repairTimeRadio" },
      ${ "battleLabelSight.xc":"def.cameraMode"},	
      ${ "battleLabelSight.xc":"def.cameraMode_sn"},
      ${ "battleLabelSight.xc":"def.piercingChance"},
      ${ "battleLabelsTemplates.xc":"def.TEAM_ENEMY_HP_ground" },
      ${ "battleLabelsTemplates.xc":"def.TEAM_HP_ground" },
      ${ "battleLabelsTemplates.xc":"def.ENEMY_HP_ground" },
      ${ "battleLabelsTemplates.xc":"def.TEAM_HP_bar" },
      ${ "battleLabelsTemplates.xc":"def.ENEMY_HP_bar" },
      ${ "battleLabelsTemplates.xc":"def.TEAM_HP_border" },
      ${ "battleLabelsTemplates.xc":"def.ENEMY_HP_border" },
      ${ "battleLabelsTemplates.xc":"def.TEAM_HP" },
      ${ "battleLabelsTemplates.xc":"def.ENEMY_HP" },
      ${ "battleLabelsTemplates.xc":"def.TEAM_ENEMY_HP_diff" }
    ]
  }
}

battleLabelSight.xc

{
  "def": {
    "cameraMode": {
      "enabled": true,
      "updateEvent": "PY(ON_CAMERA_MODE)",
      "x": 0,
      //"y": "{{py:math.sum({{py:sight.sight_y}}, 12)}}",
      "y": 0,
      "width": 536,
      "height": 283,
      "screenHAlign": "center",
      "screenVAlign": "center",
	  "alpha" : "{{py:sight.cameraMode=arc?100|0}}",
      "format": ""
    },
    "cameraMode_sn": {
      "enabled": true,
      "updateEvent": "PY(ON_CAMERA_MODE)",
      "x": 0,
      //"y": "{{py:math.sum({{py:sight.sight_y}}, 2)}}",
      "y": 0,
      "width": 502,
      "height": 124,
      "screenHAlign": "center",
      "screenVAlign": "center",
	  "alpha" : "{{py:sight.cameraMode=sn?100|0}}",      
      "format": ""
    },
    "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,
      // "borderColor": "0xFF0000", //!!!
      "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='18'>{{py:sight.piercingActual}} {{py:sight.piercingActual?/|}} {{py:sight.armorActual}}</font>"
    }
  }
}

sight.xc

{
  "sight": {
    // false 
    "enabled": true,
    // {{py:....Target}} 
    "delayHideTarget": 3,
    // 
    "sphereDispersion": {
      // true 
      "enabled": false,
      //  ["LT", "MT", "HT", "TD", "SPG"]
      "vtype": ["SPG"],
      // 
      "hotkey": { 
        // true 
        "enabled": false,
        // hotkeys.xc.
        "keyCode": 29,
        // onHold: false 
        "onHold": true }
    },
    // true 
    "removeIndicator": false,
    // true 
    "removeCentralMarker": false,
    // true 
    "removeLoad": false,
    // true 
    "removeCondition": false,   
    // true 
    "removeContainers": false,
    // true 
    "removeLoadingTimer": false,
    // true 
    "removeZoomIndicator": false,
    // true 
    "removeDistance": false,
    // true 
    "removeQuantityShells": false,
    // {{py:sight.shellType}}).
    "shellType": {
      "armor_piercing":    "{{l10n:armor_piercing}}",    // armor piercing 
      "high_explosive":    "{{l10n:high_explosive}}",    // high explosive 
      "armor_piercing_cr": "{{l10n:armor_piercing_cr}}", // armor piercing composite rigid 
      "armor_piercing_he": "{{l10n:armor_piercing_he}}", // armor piercing high explosive 
      "hollow_charge":     "{{l10n:hollow_charge}}",     // high explosive anti-tank 
      "not_shell":         "Netu"
    },
    // ({{py:sight.c_piercingChance}})
    "c_piercingChance": {
      "not_pierced":    "#E82929",
      "little_pierced": "#E1C300",
      "great_pierced":  "#2ED12F"
    },
    // 
    "autoAim": {
      "enabled": false,
      // : "arrow", "cylinder"
      // "arrow"    
      // "cylinder" 
      "markerType": "cylinder"
    }
  }
}

sight.py

import traceback
import BigWorld
import Math
import math
import ProjectileMover
import BattleReplay
from projectile_trajectory import computeProjectileTrajectory
from constants import SERVER_TICK_LENGTH, SHELL_TRAJECTORY_EPSILON_CLIENT  # , ARENA_GUI_TYPE
from Vehicle import Vehicle
from Avatar import PlayerAvatar
from gui.Scaleform.daapi.view.meta.CrosshairPanelContainerMeta import CrosshairPanelContainerMeta
from VehicleGunRotator import VehicleGunRotator
from ClientArena import CollisionResult
from gui.battle_control.controllers.consumables.ammo_ctrl import AmmoReplayPlayer
import gui.Scaleform.daapi.view.battle.shared.crosshair.plugins as plug
from gui.Scaleform.daapi.view.battle.shared.crosshair.plugins import AmmoPlugin
from gui.Scaleform.daapi.view.battle.classic.stats_exchange import FragsCollectableStats

from xfw import *
from xvm_main.python.logger import *
import xvm_main.python.config as config
from xvm import utils

VEHICLE_CLASSES = {'mediumTank': 'MT', 'lightTank': 'LT', 'heavyTank': 'HT', 'AT-SPG': 'TD', 'SPG': 'SPG'}


COLOR_PIERCING_CHANCE = {'not_pierced':    '#E82929',
                         'little_pierced': '#E1C300',
                         'great_pierced':  '#2ED12F'}


currentDistance = None
vehicle = None
player = None
timeFlight = None
timeAIM = None
sphere = None
_explosionRadius = None
isDisplaySphere = False
isDownHotkey = True
shellType = None
cameraHeight = None
isAlive = False

isNotEvent = False


def explosionRadius():
    global _explosionRadius
    if vehicle is None or not hasattr(vehicle, 'typeDescriptor'):
        return
    _type = vehicle.typeDescriptor.shot.shell.type
    _explosionRadius = _type.explosionRadius if hasattr(_type, 'explosionRadius') else None


@registerEvent(AmmoPlugin, '_AmmoPlugin__onGunAutoReloadTimeSet')
def _AmmoPlugin__onGunAutoReloadTimeSet(self, state, stunned):
    if config.get('sight/enabled', True) and isNotEvent:
        explosionRadius()


@registerEvent(AmmoReplayPlayer, 'setGunReloadTime')
def AmmoReplayPlayer_setGunReloadTime(self, timeLeft, baseTime):
    if config.get('sight/enabled', True) and isNotEvent:
        explosionRadius()


@registerEvent(CrosshairPanelContainerMeta, 'as_setReloadingS')
def CrosshairPanelContainerMeta_as_setReloadingS(self, duration, baseTime, startTime, isReloading):
    if config.get('sight/enabled', True) and isNotEvent:
        explosionRadius()


@registerEvent(FragsCollectableStats, 'addVehicleStatusUpdate')
def FragsCollectableStats_addVehicleStatusUpdate(self, vInfoVO):
    if config.get('sight/enabled', True) and isNotEvent:
        if (not vInfoVO.isAlive()) and (vehicle is not None) and (vehicle.id == vInfoVO.vehicleID):
            setValueDead()


@registerEvent(PlayerAvatar, 'handleKey')
def handleKey(self, isDown, key, mods):
    if config.get('sight/enabled', True) and isNotEvent:
        global isDownHotkey
        hotkey = config.get('sight/sphereDispersion/hotkey', None)
        if hotkey is not None and hotkey['enabled'] and (key == hotkey['keyCode']):
            if isDown:
                if hotkey['onHold']:
                    if not isDownHotkey:
                        isDownHotkey = True
                else:
                    isDownHotkey = not isDownHotkey
            else:
                if hotkey['onHold']:
                    if isDownHotkey:
                        isDownHotkey = False


@overrideMethod(CrosshairPanelContainerMeta, 'as_setDistanceS')
def CrosshairPanelContainerMeta_as_setDistanceS(base, self, dist):
    if not (config.get('sight/enabled', True) and config.get('sight/removeDistance', False)):
        return base(self, dist)


@overrideMethod(CrosshairPanelContainerMeta, 'as_setNetVisibleS')
def CrosshairPanelContainerMeta_as_setNetVisibleS(base, self, mask):
    if config.get('sight/enabled', True):
        if config.get('sight/removeIndicator', False):
            mask &= 2
        if config.get('sight/removeQuantityShells', False):
            mask &= 1
    base(self, mask)


@overrideMethod(plug, '_makeSettingsVO')
def plugins_makeSettingsVO(base, settingsCore, *keys):
    data = base(settingsCore, *keys)
    if config.get('sight/enabled', True) and isNotEvent:
        for mode in data:
            if config.get('sight/removeCentralMarker', False) and ('centerAlphaValue' in data[mode]):
                data[mode]['centerAlphaValue'] = 0
            if config.get('sight/removeIndicator', False) and config.get('sight/removeQuantityShells', False) and ('netAlphaValue' in data[mode]):
                data[mode]['netAlphaValue'] = 0
            if config.get('sight/removeLoad', False) and ('reloaderAlphaValue' in data[mode]):
                data[mode]['reloaderAlphaValue'] = 0
            if config.get('sight/removeCondition', False) and ('conditionAlphaValue' in data[mode]):
                data[mode]['conditionAlphaValue'] = 0
            if config.get('sight/removeContainers', False) and ('cassetteAlphaValue' in data[mode]):
                data[mode]['cassetteAlphaValue'] = 0
            if config.get('sight/removeLoadingTimer', False) and ('reloaderTimerAlphaValue' in data[mode]):
                data[mode]['reloaderTimerAlphaValue'] = 0
            if config.get('sight/removeZoomIndicator', False) and ('zoomIndicatorAlphaValue' in data[mode]):
                data[mode]['zoomIndicatorAlphaValue'] = 0
    return data


@registerEvent(PlayerAvatar, 'onBecomePlayer')
def PlayerAvatar_onBecomePlayer(self):
    global player
    player = BigWorld.player()


@registerEvent(Vehicle, 'onEnterWorld')
def Vehicle_onEnterWorld(self, prereqs):
    if self.isPlayerVehicle and config.get('sight/enabled', True):
        global isNotEvent, vehicle, currentDistance, timeFlight, timeAIM, cameraHeight
        global _explosionRadius, isDisplaySphere, isDownHotkey, player, isAlive
        _explosionRadius = None
        currentDistance = None
        timeFlight = None
        timeAIM = None
        cameraHeight = None
        player = BigWorld.player()
        # isNotEvent = player.arenaGuiType not in [ARENA_GUI_TYPE.EVENT_BATTLES, ARENA_GUI_TYPE.EVENT_BATTLES_2]
        isNotEvent = True
        if isNotEvent:
            isAlive = self.isAlive and self.isCrewActive
            vehicle = self
            td = self.typeDescriptor
            _type = td.type
            vehClass = VEHICLE_CLASSES[list(_type.tags.intersection(VEHICLE_CLASSES.keys()))[0]]
            isDisplaySphere = config.get('sight/sphereDispersion/enabled', False) and (vehClass in config.get('sight/sphereDispersion/vtype', ['SPG']))
            isDownHotkey = not config.get('sight/sphereDispersion/hotkey/enabled', False)


def setValueDead():
    global currentDistance, timeFlight, timeAIM
    global _explosionRadius, isDisplaySphere, isDownHotkey
    global cameraHeight, isAlive
    _explosionRadius = None
    currentDistance = None
    timeFlight = None
    timeAIM = None
    isDisplaySphere = False
    isDownHotkey = False
    cameraHeight = None
    isAlive = False
    as_event('ON_MARKER_POSITION')


@registerEvent(Vehicle, 'onHealthChanged')
def onHealthChanged(self, newHealth, attackerID, attackReasonID):
    if self.isPlayerVehicle and config.get('sight/enabled', True) and isNotEvent:
        isAlive = (newHealth > 0) and bool(vehicle.isCrewActive)
        if (not isAlive) and (sphere in BigWorld.models()):
            BigWorld.delModel(sphere)


def update_sphere(position):
    global sphere
    if sphere is None:
        sphere = BigWorld.Model('objects/misc/bbox/sphere1.model')
        # log('sphere = %s' % (filter(lambda x: not x.startswith('__'), dir(sphere))))
        # sphere = BigWorld.Model('content/Interface/Arrow/normal/lod0/arrow.model')
    elif sphere in BigWorld.models():
        BigWorld.delModel(sphere)
    if (_explosionRadius is not None) and isAlive and isDownHotkey:
        sphere.position = position
        sphere.scale = Math.Vector3(_explosionRadius, _explosionRadius, _explosionRadius)
        BigWorld.addModel(sphere)


@overrideMethod(VehicleGunRotator, '_VehicleGunRotator__getGunMarkerPosition')
def _VehicleGunRotator__getGunMarkerPosition(base, self, shotPos, shotVec, dispersionAngles):
    if not (config.get('sight/enabled', True) and isNotEvent):
        return base(self, shotPos, shotVec, dispersionAngles)
    try:
        global timeFlight, currentDistance, timeAIM, cameraHeight
        shotDescr = self._VehicleGunRotator__avatar.getVehicleDescriptor().shot
        gravity = Math.Vector3(0.0, -shotDescr.gravity, 0.0)
        maxDist = shotDescr.maxDistance
        testVehicleID = self.getAttachedVehicleID()
        collideVehiclesAndStaticScene = ProjectileMover.collideDynamicAndStatic
        collideWithSpaceBB = self._VehicleGunRotator__avatar.arena.collideWithSpaceBB
        prevPos = shotPos
        endPos = shotPos
        direction = endPos - prevPos
        prevVelocity = shotVec
        dt = 0.0
        maxDistCheckFlag = False
        while True:
            dt += SERVER_TICK_LENGTH
            checkPoints = computeProjectileTrajectory(prevPos, prevVelocity, gravity, SERVER_TICK_LENGTH, SHELL_TRAJECTORY_EPSILON_CLIENT)
            prevCheckPoint = prevPos
            bBreak = False
            for curCheckPoint in checkPoints:
                testRes = collideVehiclesAndStaticScene(prevCheckPoint, curCheckPoint, (testVehicleID,))
                if testRes is not None:
                    collData = testRes[1]
                    if collData is not None and not collData.isVehicle():
                        collData = None
                    direction = testRes[0] - prevCheckPoint
                    endPos = testRes[0]
                    timeFlight = dt if (curCheckPoint - prevCheckPoint).length < direction.length * 2 else dt - SERVER_TICK_LENGTH
                    bBreak = True
                    break
                collisionResult, intersection = collideWithSpaceBB(prevCheckPoint, curCheckPoint)
                if collisionResult is CollisionResult.INTERSECTION:
                    collData = None
                    maxDistCheckFlag = True
                    direction = intersection - prevCheckPoint
                    timeFlight = dt if (curCheckPoint - prevCheckPoint).length < direction.length * 2 else dt - SERVER_TICK_LENGTH
                    endPos = intersection
                    bBreak = True
                    break
                elif collisionResult is CollisionResult.OUTSIDE:
                    collData = None
                    maxDistCheckFlag = True
                    direction = prevVelocity
                    endPos = prevPos + prevVelocity
                    bBreak = True
                prevCheckPoint = curCheckPoint

            if bBreak:
                break
            prevPos = shotPos + shotVec.scale(dt) + gravity.scale(dt * dt * 0.5)
            prevVelocity = shotVec + gravity.scale(dt)

        direction.normalise()
        cameraHeight = BigWorld.camera().position.y - endPos.y
        distance = (endPos - shotPos).length
        markerDiameter = 2.0 * distance * dispersionAngles[0]
        idealMarkerDiameter = 2.0 * distance * dispersionAngles[1]
        if maxDistCheckFlag:
            if endPos.distTo(shotPos) >= maxDist:
                direction = endPos - shotPos
                direction.normalise()
                endPos = shotPos + direction.scale(maxDist)
                distance = maxDist
                markerDiameter = 2.0 * distance * dispersionAngles[0]
                idealMarkerDiameter = 2.0 * distance * dispersionAngles[1]
        replayCtrl = BattleReplay.g_replayCtrl
        if replayCtrl.isPlaying and replayCtrl.isClientReady:
            markerDiameter, endPos, direction = replayCtrl.getGunMarkerParams(endPos, direction)
        currentDistance = distance
        aimingInfo = player._PlayerAvatar__aimingInfo
        aimingStartTime = aimingInfo[0]
        aimingFactor = aimingInfo[1]
        shotDispMultiplierFactor = aimingInfo[2]
        # unShotDispersionFactorsTurretRotation = aimingInfo[3]
        # chassisShotDispersionFactorsMovement = aimingInfo[4]
        # chassisShotDispersionFactorsRotation = aimingInfo[5]
        # chassisShotDispersionFactorsRotation = aimingInfo[5]
        aimingTime = aimingInfo[6]
        aimingTimeAll = math.log(aimingFactor / shotDispMultiplierFactor) * aimingTime
        aimingFinishTime = aimingTimeAll + aimingStartTime
        timeAIM = max(0.0, aimingFinishTime - BigWorld.time())
        as_event('ON_MARKER_POSITION')
        if isDisplaySphere:
            update_sphere(endPos)
        return endPos, direction, markerDiameter, idealMarkerDiameter, collData
    except Exception as ex:
        err(traceback.format_exc())
        return base(self, shotPos, shotVec, dispersionAngles)


@xvm.export('sight.distance', deterministic=False)
def sight_distance():
    return currentDistance


@xvm.export('sight.timeFlight', deterministic=False)
def sight_timeFlight():
    return timeFlight


@xvm.export('sight.timeAIM', deterministic=False)
def sight_timeAIM():
    return timeAIM


@xvm.export('sight.cameraHeight', deterministic=False)
def sight_cameraHeight():
    return cameraHeight


@xvm.export('sight.dynamic_colorRGB')
def smooth_transition_colorRGB(color_100, color_0, percent=None, maximum=100):
    if percent is None:
        return None
    else:
        return utils.smooth_transition_color('RGB', color_100, color_0, percent, maximum)


@xvm.export('sight.dynamic_colorRBG')
def smooth_transition_colorRBG(color_100, color_0, percent=None, maximum=100):
    if percent is None:
        return None
    else:
        return utils.smooth_transition_color('RBG', color_100, color_0, percent, maximum)


@xvm.export('sight.dynamic_colorGRB')
def smooth_transition_colorGRB(color_100, color_0, percent=None, maximum=100):
    if percent is None:
        return None
    else:
        return utils.smooth_transition_color('GRB', color_100, color_0, percent, maximum)


@xvm.export('sight.dynamic_colorGBR')
def smooth_transition_colorGBR(color_100, color_0, percent=None, maximum=100):
    if percent is None:
        return None
    else:
        return utils.smooth_transition_color('GBR', color_100, color_0, percent, maximum)


@xvm.export('sight.dynamic_colorBRG')
def smooth_transition_colorBRG(color_100, color_0, percent=None, maximum=100):
    if percent is None:
        return None
    else:
        return utils.smooth_transition_color('BRG', color_100, color_0, percent, maximum)


@xvm.export('sight.dynamic_colorBGR')
def smooth_transition_colorBGR(color_100, color_0, percent=None, maximum=100):
    if percent is None:
        return None
    else:
        return utils.smooth_transition_color('BGR', color_100, color_0, percent, maximum)

chancePenetration.py

import BigWorld
import math
from Vehicle import Vehicle
from gui.Scaleform.daapi.view.battle.classic.stats_exchange import FragsCollectableStats
from AvatarInputHandler.gun_marker_ctrl import _CrosshairShotResults, _SHOT_RESULT
import gui.Scaleform.daapi.view.battle.shared.crosshair.plugins as plug

from xfw import *
from xvm_main.python.logger import *
import xvm_main.python.config as config



COLOR_PIERCING_CHANCE = {'not_pierced':    '#E82929',
                         'little_pierced': '#E1C300',
                         'great_pierced':  '#2ED12F'}

piercingActual = None
armorActual = None
piercingChance = None
shotResult = None
hitAngle = None
normHitAngle = None
colorPiercingChance = COLOR_PIERCING_CHANCE
playerVehicleID = None


@registerEvent(plug.ShotResultIndicatorPlugin, '_ShotResultIndicatorPlugin__onGunMarkerStateChanged')
def onGunMarkerStateChanged(self, markerType, position, dir, collision):
    if config.get('sight/enabled', True):
        if not self._ShotResultIndicatorPlugin__isEnabled:
             self._ShotResultIndicatorPlugin__shotResultResolver.getShotResult(position, collision, dir, excludeTeam=self._ShotResultIndicatorPlugin__playerTeam)


@overrideClassMethod(_CrosshairShotResults, 'getShotResult')
def _CrosshairShotResults_getShotResult(base, cls, hitPoint, collision, dir, excludeTeam=0):
    if config.get('sight/enabled', True):

        def updateLabel():
            if (old_armorActual != armorActual) or (old_piercingActual != piercingActual):
                as_event('ON_CALC_ARMOR')

        global piercingActual, armorActual, shotResult, hitAngle, normHitAngle, piercingChance
        keyColor = [None, 'not_pierced', 'little_pierced', 'great_pierced']
        old_piercingActual = piercingActual
        old_armorActual = armorActual
        piercingActual = None
        armorActual = None
        piercingChance = None
        hitAngle = None
        normHitAngle = None
        shotResult = keyColor[0]
        if collision is None:
            updateLabel()
            return _SHOT_RESULT.UNDEFINED
        else:
            entity = collision.entity
            if entity.__class__.__name__ not in ('Vehicle', 'DestructibleEntity'):
                updateLabel()
                return _SHOT_RESULT.UNDEFINED
            if entity.health <= 0 or entity.publicInfo['team'] == excludeTeam:
                updateLabel()
                return _SHOT_RESULT.UNDEFINED
            player = BigWorld.player()
            if player is None:
                updateLabel()
                return _SHOT_RESULT.UNDEFINED
            vDesc = player.getVehicleDescriptor()
            shell = vDesc.shot.shell
            caliber = shell.caliber
            shellKind = shell.kind
            ppDesc = vDesc.shot.piercingPower
            maxDist = vDesc.shot.maxDistance
            dist = (hitPoint - player.getOwnVehiclePosition()).length
            piercingPower = cls._computePiercingPowerAtDist(ppDesc, dist, maxDist)
            fullPiercingPower = piercingPower
            minPP, maxPP = cls._computePiercingPowerRandomization(shell)
            result = _SHOT_RESULT.NOT_PIERCED
            isJet = False
            jetStartDist = None
            ignoredMaterials = set()
            collisionsDetails = cls._getAllCollisionDetails(hitPoint, dir, entity)
            if collisionsDetails is None:
                updateLabel()
                return _SHOT_RESULT.UNDEFINED
            for cDetails in collisionsDetails:
                if isJet:
                    jetDist = cDetails.dist - jetStartDist
                    if jetDist > 0.0:
                        piercingPower *= 1.0 - jetDist * cls._SHELL_EXTRA_DATA[shellKind].jetLossPPByDist
                if cDetails.matInfo is None:
                    result = cls._CRIT_ONLY_SHOT_RESULT
                else:
                    matInfo = cDetails.matInfo
                    if (cDetails.compName, matInfo.kind) in ignoredMaterials:
                        continue
                    hitAngleCos = cDetails.hitAngleCos if matInfo.useHitAngle else 1.0
                    hitAngle = hitAngleCos
                    normHitAngle = hitAngle
                    if not isJet and cls._shouldRicochet(shellKind, hitAngleCos, matInfo, caliber):
                        normHitAngle = -1.0
                        break
                    piercingPercent = 1000.0
                    if piercingPower > 0.0:
                        penetrationArmor = cls._computePenetrationArmor(shellKind, hitAngleCos, matInfo, caliber)
                        normHitAngle = matInfo.armor / penetrationArmor if penetrationArmor != 0.0 else hitAngle
                        piercingPercent = 100.0 + (penetrationArmor - piercingPower) / fullPiercingPower * 100.0
                        piercingActual = int(piercingPower)
                        armorActual = int(penetrationArmor)
                        piercingChance = min(1.0, (penetrationArmor / penetrationArmor - 0.75) * 2) if penetrationArmor > 0.0 else 1.0
                        piercingPower -= penetrationArmor
                        # log('penetrationArmor = %s     piercingPercent = %s    piercingPower = %s' % (penetrationArmor, piercingPercent, piercingPower))
                    if matInfo.vehicleDamageFactor:
                        if minPP < piercingPercent < maxPP:
                            result = _SHOT_RESULT.LITTLE_PIERCED
                        elif piercingPercent <= minPP:
                            result = _SHOT_RESULT.GREAT_PIERCED
                        break
                    elif matInfo.extra:
                        if piercingPercent <= maxPP:
                            result = cls._CRIT_ONLY_SHOT_RESULT
                    if matInfo.collideOnceOnly:
                        ignoredMaterials.add((cDetails.compName, matInfo.kind))
                if piercingPower <= 0.0:
                    break
                if cls._SHELL_EXTRA_DATA[shellKind].jetLossPPByDist > 0.0:
                    isJet = True
                    mInfo = cDetails.matInfo
                    armor = mInfo.armor if mInfo is not None else 0.0
                    jetStartDist = cDetails.dist + armor * 0.001
            shotResult = keyColor[result]
            updateLabel()
            return result
    else:
        return base(hitPoint, collision, dir, excludeTeam)


@registerEvent(Vehicle, 'onEnterWorld')
def Vehicle_onEnterWorld(self, prereqs):
    global piercingActual, armorActual, shotResult, hitAngle, normHitAngle, colorPiercingChance, playerVehicleID, piercingChance
    if self.isPlayerVehicle and config.get('sight/enabled', True):
        piercingActual = None
        armorActual = None
        piercingChance = None
        shotResult = None
        hitAngle = None
        normHitAngle = None
        colorPiercingChance = config.get('sight/c_piercingChance', COLOR_PIERCING_CHANCE)
        playerVehicleID = self.id
        as_event('ON_CALC_ARMOR')


@registerEvent(FragsCollectableStats, 'addVehicleStatusUpdate')
def FragsCollectableStats_addVehicleStatusUpdate(self, vInfoVO):
    global piercingActual, armorActual, shotResult, hitAngle, normHitAngle, colorPiercingChance, piercingChance
    if (not vInfoVO.isAlive()) and (playerVehicleID == vInfoVO.vehicleID):
        piercingActual = None
        armorActual = None
        piercingChance = None
        shotResult = None
        hitAngle = None
        normHitAngle = None
        as_event('ON_CALC_ARMOR')


@xvm.export('sight.piercingActual', deterministic=False)
def sight_piercingActual():
    return piercingActual


@xvm.export('sight.hitAngle', deterministic=False)
def sight_hitAngle():
    return math.degrees(math.acos(hitAngle)) if hitAngle is not None else None


@xvm.export('sight.normHitAngle', deterministic=False)
def sight_normHitAngel():
    return normHitAngle if (normHitAngle is None) or (normHitAngle < 0) else math.degrees(math.acos(normHitAngle))


@xvm.export('sight.armorActual', deterministic=False)
def sight_piercingActual():
    return armorActual


@xvm.export('sight.c_piercingChance', deterministic=False)
def sight_c_piercingChance():
    return colorPiercingChance.get(shotResult, None)


@xvm.export('sight.piercingChance', deterministic=False)
def sight_piercingChance(norm=None):
    global piercingChance
    if piercingChance is not None:
        piercingChance = (piercingChance * 100 if norm is None else piercingChance * norm)
    return piercingChance

 

Edited by Heliomalt

Share this post


Link to post

Short link
Share on other sites

Is it possible to show the distance only, if I aim on a target? Now with this config I see it all the time. Makes no sense for me, when I see the distance, when I am aiming on a house for example. Thanks in advance.

 

"distance": {
      "enabled": true,
	  "flags": [ "alive" ],
      "updateEvent": "PY(ON_TARGET), PY(ON_CAMERA_MODE), PY(ON_MARKER_POSITION)",
      "x": 0,
	  "y": "{{py:sight.cameraMode=arc?-238|{{py:sight.cameraMode=sn?-238|-230}}}}",
      "width": 100,
      "height": 32,
      //"borderColor": "0xFF0000", //!!!
      "screenHAlign": "center",
      "screenVAlign": "center",
      "alpha" : 100,
      "shadow": { "distance": 1, "angle": 90, "alpha": 70, "blur": 5, "strength": 3 },
      "textFormat": { "align": "center", "color": "0xd4ffaa" },
      //"format": " <font color='#{{py:sight.vehicleTarget?FF0000|d4ffaa}}' size='22'>{{py:sight.distance%3.f m}}</font>"
      "format": " <font color='#{{py:sight.vehicleTarget?d4ffaa|FF0000}}' size='22'>{{py:sight.distance%4.f m}}</font>"
    },

 

 

Share this post


Link to post

Short link
Share on other sites

I took the py_macro  infoAutoAim.py

 

I added this to markersAliveNormal.xc

 

},
    "auto_AIM_vehicle": {
      "enabled": true,
      "updateEvent": "PY(ON_CAMERA_MODE), PY(ON_AUTO_AIM), ON_CURRENT_VEHICLE_DESTROYED",
      "x": "{{py:sight.cameraMode=arc?0|{{py:sight.cameraMode=sn?0}}}}", 
      "y": "{{py:sight.cameraMode=arc?-90|{{py:sight.cameraMode=sn?-90}}}}", 
      "align": "center",      
      "width": 41,
      "height": 41,
      "alpha" : "{{alive?{{py:sight.autoAimVehicle?100|0}}|0}}",         
      "format": "<img src='cfg://HAWGS/img/battle/m_autoaim.png'>"     
         
    },

 

added to both ally & enemy

 

${ "def.auto_AIM_vehicle" },

 

it refers to this png

m_autoaim.png.e31c10248799069b8353454cc5e18487.png

 

I have tested this over and over . It now will show png file  when someone has auto aim lock onto them from another player

But it will only when I activate auto aim myself on someone.

 

How do I get it to show all the time ,

I have tried 

"updateEvent": " ON_EVERY_SECOND",

It still only shows when my auto aims is actvated

 

1729543511_Autoaim.thumb.png.bb51b8dd193f43d2124a54568cbe1b14.png

 

Any ideals ?

Share this post


Link to post

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

Any ideals ?

В маркерах не получиться.

Share this post


Link to post

Short link
Share on other sites

Build 8535 СТ

2018-08-06 17:29:11.475: INFO: =============================
2018-08-06 17:29:11.475: INFO: 2018-08-06 17:29:11: [ERROR] mods/xfw/python/xfw/events.pyc
2018-08-06 17:29:11.475: ERROR: Traceback (most recent call last):
2018-08-06 17:29:11.475: ERROR:   File "mods/xfw/python/xfw/events.py", line 57, in __event_handler
2018-08-06 17:29:11.475: ERROR:   File "mods/xfw/python/xfw/events.py", line 24, in fire
2018-08-06 17:29:11.475: ERROR:   File "res_mods/configs/xvm/py_macro\reloading.py", line 112, in CrosshairPanelContainerMeta_as_setReloadingS
2018-08-06 17:29:11.476: ERROR:     reloading(duration, baseTime, startTime)
2018-08-06 17:29:11.476: ERROR:   File "res_mods/configs/xvm/py_macro\reloading.py", line 55, in reloading
2018-08-06 17:29:11.476: ERROR:     as_event('ON_RELOAD')
2018-08-06 17:29:11.476: ERROR: NameError: global name 'as_event' is not defined
2018-08-06 17:29:11.476: INFO: =============================
2018-08-06 17:29:11.473: INFO: =============================
2018-08-06 17:29:11.473: INFO: 2018-08-06 17:29:11: [ERROR] mods/xfw/python/xfw/events.pyc
2018-08-06 17:29:11.473: ERROR: Traceback (most recent call last):
2018-08-06 17:29:11.473: ERROR:   File "mods/xfw/python/xfw/events.py", line 57, in __event_handler
2018-08-06 17:29:11.474: ERROR:   File "mods/xfw/python/xfw/events.py", line 24, in fire
2018-08-06 17:29:11.474: ERROR:   File "res_mods/configs/xvm/py_macro\quantityShells.py", line 23, in CrosshairPanelContainerMeta_as_setAmmoStockS
2018-08-06 17:29:11.474: ERROR:     as_event('ON_AMMO_COUNT')
2018-08-06 17:29:11.474: ERROR: NameError: global name 'as_event' is not defined
2018-08-06 17:29:11.474: INFO: =============================
2018-08-06 17:28:49.573: INFO: =============================
2018-08-06 17:28:49.573: INFO: 2018-08-06 17:28:49: [ERROR] mods/xfw/python/xfw/events.pyc
2018-08-06 17:28:49.573: ERROR: Traceback (most recent call last):
2018-08-06 17:28:49.573: ERROR:   File "mods/xfw/python/xfw/events.py", line 57, in __event_handler
2018-08-06 17:28:49.574: ERROR:   File "mods/xfw/python/xfw/events.py", line 24, in fire
2018-08-06 17:28:49.574: ERROR:   File "res_mods/configs/xvm/py_macro\aimingSystem.py", line 63, in InterfaceScaleSetting_setSystemValue
2018-08-06 17:28:49.574: ERROR:     as_event('ON_CAMERA_MODE')
2018-08-06 17:28:49.574: ERROR: NameError: global name 'as_event' is not defined
2018-08-06 17:28:49.574: INFO: =============================

Share this post


Link to post

Short link
Share on other sites
В 24.01.2017 в 18:50, ktulho сказал:

 

Спасибо!!! Вот это тема так тема!

Подскажите пожалста кто-нить как сделать изменяемость цвета отображение от типа снаряда ( во я завернул!) .

 

 

 

 

Screenshot_4.png

Screenshot_5.png

Edited by rzaruba

Share this post


Link to post

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

Спасибо!!! Вот это тема так тема!

Подскажите пожалста кто-нить как сделать изменяемость цвета отображение от типа снаряда ( во я завернул!) 

 

 

 

Screenshot_4.png

Screenshot_5.png

Можно только цвет "голд" отражать. {{py:sight.goldShell}} - возвращает 'gold' если снаряд можно купить за золото, иначе - пусто

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