Jump to content
Korean Random
Sign in to follow this  
Dame

MOE % on carousel

Recommended Posts

Having trouble getting MOE % into my garage on carousel.

Search code I found  hasn't worked.

Share this post


Link to post

Short link
Share on other sites
"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 by Heliomalt

Share this post


Link to post

Short link
Share on other sites

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}}",
      },



image.thumb.png.158b80fa5256b718decad97f2df0700d.png
 image.thumb.png.e04333ab633115f487cbcf57f51d2818.pngspacer.png Edited by Dame

Share this post


Link to post

Short link
Share on other sites

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.

Share this post


Link to post

Short link
Share on other sites

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" }
      }

Share this post


Link to post

Short link
Share on other sites

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.

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