Jump to content
Korean Random
PigBrains

Need Help ,How to make format read a text.xc ?

Recommended Posts

Need Help

In my Last Xvm update I added > Tank Developed  Years  ,to Hangar & Battle it shows what year the tank was developed 

Yellow icon year stands for Real Tank ,The Purple icons years represents that the tank was never made , just blueprints of tank or prototype was never complete .

Hawgs Alternative Xvm

It reads a png file for the year .france-F65_FCM_50t.png.afea7abe938cf06deded53bb24643e10.pnggermany-G51_Lowe.png.c0aeb3b89c0b542a13b601cff22202f0.pngchina-Ch02_Type62.png.1b36ad48806883191b55876adb113fad.png
 

1.thumb.png.5ff9f5cd0521c12220ee0f64cd04c6cd.png2.thumb.png.b115afd3fa79e28ec8924b26f43d989e.pngtext.thumb.png.323a43b49c1edcfda293223f0da8eda0.png

 

This is format line for png

"format": "<img src='xvm://res/icons/icons/battle/tanks/{{vehiclename}}.png'>"

 

I am trying to now is make it read a text file instead of . png in battle 

I'm not getting pass the format line. 

Here is what I got so far with no luck 

I'm stuck on the format line in battleLabelsTemplates.xc 

 

@xvm.xc

"years" : ${"years.xc":"years"}

 

battleLabels.xc

${ "battleLabelsTemplates.xc":"def.tankyears"}

${ "battleLabelsTemplates.xc":"def.years"}

 

battleLabelsTemplates

},
    "tankyears": {
      "enabled": true,    
      "layer": "bottom",       
       "x":-740, 
       "y": 920,  
       "width": 300, 
       "height":270,              
       "screenHAlign": "center",
       "shadow": {  "enabled": true,   "distance": 0, "angle": 0, "color": "0x000000", "alpha": 100,   "blur": 4, "strength": 2 },
       "textFormat": { "align": "right", "valign": "center"},
       "format": ${"years.xc":"years":"{{vehiclename}}"} "
    }
    
 years.xc  

{
"years":{
   "china-Ch01_Type59": "<b><font size='16' color='#D8E6BD'> 1958  </font></b>",
   "china-Ch01_Type59_Gold": "<b><font size='16' color='#5A3DAB'> 1958  </font></b>",
   "china-Ch02_Type62": "<b><font size='16' color='#D8E6BD'> 1958 </font></b>"
  }
}

 

 

Share this post


Link to post

Short link
Share on other sites

@xvm.xc

"years": ${"years.xc":"years"},
...

 

battleLabels.xc

{
  "labels": {
    "formats": [
      ${"battleLabelsTemplates.xc":"def.tankyears"},
      ...

 

battleLabelsTemplates

{
  "def": {
    "tankyears": {
      "enabled": true,
      "layer": "bottom",
      "x": -740,
      "y": 920,
      "width": 300,
      "height": 270,
      "screenHAlign": "center",
      "shadow": { "color": "0x000000", "alpha": 100, "blur": 4, "strength": 2 },
      "textFormat": { "align": "right", "valign": "center" },
      "format": "{{.years.{{vehiclename}}}}"
    },
    ...

 

years.xc  

{
"years": {
   "ussr-R88_Object268": "<b><font size='40' color='#D8E6BD'> TEST </font></b>"
  }
}

 

012a94bf0c92d145e89a2230fd44fc0d.png

 

Cheers!

non_banana2.gif

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites
1 час назад, Руслан cb сказал:

но как в ангар то это перенести

 

Используй аналогичные подстановки не в:

battleLabels.xc
battleLabelsTemplates.xc

А в:

widgets.xc
widgetsTemplates.xc

Оформление такое же.

  • Upvote 2

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.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...