mintik 2 Posted December 16, 2018 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: Original topic: I use the same code that was pasted in that topic. battleLabels.xc battleLabelsTemplates.xc python.log xvm.log Quote Share this post Link to post Short link Share on other sites
kupjones 30 #447109 Posted December 16, 2018 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 2 Quote Share this post Link to post Short link Share on other sites
mintik 2 #447110 Posted December 17, 2018 Can you tell me if this is a good python macro? It's the original from the original topic where I found this mod. However I'm not sure in which folder I have to put it. chancePenetration.py Quote Share this post Link to post Short link Share on other sites
kupjones 30 #447114 Posted December 17, 2018 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) 2 Quote Share this post Link to post Short link Share on other sites
vlad_cs_sr 1,575 #447127 Posted December 17, 2018 Quote Share this post Link to post Short link Share on other sites
mintik 2 #447191 Posted December 17, 2018 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! Quote Share this post Link to post Short link Share on other sites
kupjones 30 #447193 Posted December 17, 2018 Perfect! Quote Share this post Link to post Short link Share on other sites
Gundonov 0 #450622 Posted February 12, 2019 On 12/18/2018 at 12:02 AM, kupjones said: Perfect! Wow thank you for your help :D Quote Share this post Link to post Short link Share on other sites