Jump to content
Korean Random
Sign in to follow this  
mintik

Armor penetration calculator

Recommended Posts

Hi,

 

I've started playing WoT again and I reconfigured my config for XVM. However the armor penetration calculator doens't work anymore.

Can somebody please take a look at my config and maybe tell me which code should be changed?

 

Example picture:

 

Untitled.thumb.png.48064a74e554ab7eb1963d311865831a.png

 

 

Original topic:

 

I use the same code that was pasted in that topic.

 

battleLabels.xc

battleLabelsTemplates.xc

python.log

xvm.log

Share this post


Link to post

Short link
Share on other sites

This line is your clue

 

format": "<font color='{{py:sight.c_piercingChance}}

 

Note the py:sight ...... code.  This actually calls an external Python module that is no longer in the XVM distribution.   Not sure where to get this python macro, i have an old copy but it does not include the listed functions.   

 

Maybe someone here has a copy that works.

 

Or, try a non XVM mod like PMOD -- that is the pen calc that I use

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

Yes, that would be it.  Here you can see the functions exported (exposed) to XVM.  This would be copied to the py_macro folder, as in "\Games\World_of_Tanks\res_mods\configs\xvm\py_macro"

 

@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)

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites
19 hours ago, kupjones said:

Yes, that would be it.  Here you can see the functions exported (exposed) to XVM.  This would be copied to the py_macro folder, as in "\Games\World_of_Tanks\res_mods\configs\xvm\py_macro"

 

@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)

 

Ok, thank you for checking the config for me.
It works again!

 

 

shot_016.jpg

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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...