Dame 0 Posted January 29, 2021 Having trouble getting MOE % into my garage on carousel. Search code I found hasn't worked. Quote Share this post Link to post Short link Share on other sites
Heliomalt 53 #496579 Posted January 30, 2021 (edited) "tankStats": { "enabled": true, "layer": "top", "type": "extrafield", "formats": [ { // text block "updateEvent": "ON_MY_STAT_LOADED", "x": 560, //600 "y": 4, "width": 320, "height": 150, "screenHAlign": "center", //"shadow": { "alpha": 100, "blur": 1, "strength": 2 }, "textFormat": { "align": "left", "valign": "top" }, "format": "<font face='$FieldFont' color='#F0F0F0' size='15'><textformat tabstops='[{{l10n:137}}]' leading='2'></font>{{l10n:Gunmark}}: <font color='{{v.c_damageRating}}'>{{v.damageRating%-2.2f~%}}</font></textformat>" } I use this in my widgetsTemplates.xc, maybe it helps you. Edited January 30, 2021 by Heliomalt Quote Share this post Link to post Short link Share on other sites
Dame 0 #496587 Posted January 30, 2021 (edited) In carouselNormal.xc and not showing up. Tried // Marks of Excellence. { "enabled": true, "x": 158, "y": 32, "align": "right", "width": 13, "height": 13, "alpha": "{{v.damagerating?|0}}", }, Edited January 30, 2021 by Dame Quote Share this post Link to post Short link Share on other sites
Alfalis 15 #496617 Posted January 30, 2021 This will work: {"x": 67, "y": 50, "format": "<font color='{{v.c_damageRating}}' size='13'>{{v.damageRating}}</font>", "alpha": "{{v.selected?100|0}}", "shadow": {"color": "0x000000", "alpha": 50, "angle": 45, "distance": 0, "size": 1, "strength": 90}} Please also make sure, that you set your commas correctly at the end of each line or it will not work at all. It goes like this: { something, something, something } The last line inside a set of brackets must not have a comma, every other line has to end in a comma! The same goes for multiple pairs of brackets following each other: { something }, { something }, { something } Please note that all but the last pair of brackets is ended with a comma. Quote Share this post Link to post Short link Share on other sites
Dame 0 #496622 Posted January 30, 2021 I understand the , now thankyou. Neithe ryour code or what i'm using now is working. { "enabled": true, "x": 158, "y": 47, "align": "right", "width": 13, "height": 13, "alpha": "{{v.damageRating?|0}}", }, { "enabled": true, "x": 145, "y": 42, "align": "right", "format": "<b><font face='$FieldFont' size='12' color='#CFCFCF' alpha='#F0'>{{v.damageRating}}</font></b>", "shadow": ${ "def.textFieldShadow" } } Quote Share this post Link to post Short link Share on other sites
Alfalis 15 #496741 Posted February 1, 2021 In your example there is again a comma mistake in the first set of brackets. { "enabled": true, "x": 158, "y": 47, "align": "right", "width": 13, "height": 13, "alpha": "{{v.damageRating?|0}}", }, Remove the comma in the second line - since it's the last entry inside the brackets it must not end in a comma. If you have errors like that in your custom config XVM will detect the mistake and simply not load your config at all. Quote Share this post Link to post Short link Share on other sites