zekias87 2 Posted April 1, 2018 I would like to know if there is someone out there who could help me implement a penetration calculator. I did some searching and come up with the russian forums Since I cant speak russian I Google translated it and found a Probability of penetration file "chancePenetration.py" which I also have attached in this post. But my problem is that I dont know how to use it. I have placed it in "py_macro" folder but that does nothing, so I guess I need to somehow implement it by creating another file somewhere? What I am hoping is that someone out there alreay have done this or knows how to do it and are willing to help. chancePenetration.py Quote Share this post Link to post Short link Share on other sites
konrad509 445 #426640 Posted April 1, 2018 Well, the .py files only contain the macros definitions and all that stuff. To actually use a macro, you need to use it in your config. Quote Share this post Link to post Short link Share on other sites
SRQFlyer 9 #426641 Posted April 1, 2018 You need to update your configuration. To you battlelabels.xc you need to add something like: ${ "battleLabelSight.xc":"def.piercingChance"}, Then in battlelabeltemplates.xc add "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='16'>{{py:sight.piercingActual}} {{py:sight.piercingActual?/|}} {{py:sight.armorActual}}</font>" }, Quote Share this post Link to post Short link Share on other sites
zekias87 2 #426670 Posted April 2, 2018 (edited) 10 hours ago, SRQFlyer said: You need to update your configuration. To you battlelabels.xc you need to add something like: ${ "battleLabelSight.xc":"def.piercingChance"}, Then in battlelabeltemplates.xc add "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='16'>{{py:sight.piercingActual}} {{py:sight.piercingActual?/|}} {{py:sight.armorActual}}</font>" }, Thanks man, exactly what I was hoping foir! I will try that out! Edit* It works exactly like I was looking for! Thanks again, you are the king! I would never have figured that out on my own. Helpful people like you makes the world go around. Rep+ Edited April 2, 2018 by zekias87 New info 1 Quote Share this post Link to post Short link Share on other sites