Jump to content
Korean Random

ADIX

User
  • Content Count

    5
  • Joined

  • Last visited

Everything posted by ADIX

  1. Thanks, OMG your code is much shorter... I was sure I tried py:xvm.total_hp.ally(100) ... And thanks for the sample. I didn't know you can add other things next to a $ref part... I'm using my own markers (markersAliveNormal/Extended). They only differ in color. Until now I had the whole damageText part copied to all 6 (per file) section and modified only the color... Now it's just ally: "damageText": { "$ref": { "path":"def.damageText" }, "textFormat": { "$ref": { "path":"def.damageText.textFormat" }, "color": "0x00ff00" } }, "damageTextPlayer": { "$ref": { "path":"def.damageText" }, "textFormat": { "$ref": { "path":"def.damageText.textFormat" }, "color": "0x0080ff" } }, "damageTextSquadman": { "$ref": { "path":"def.damageText" }, "textFormat": { "$ref": { "path":"def.damageText.textFormat" }, "color": "0x0080ff" } } enemy: "damageText": { "$ref": { "path":"def.damageText" }, "textFormat": { "$ref": { "path":"def.damageText.textFormat" }, "color": "0xcc0000" } }, "damageTextPlayer": { "$ref": { "path":"def.damageText" }, "textFormat": { "$ref": { "path":"def.damageText.textFormat" }, "color": "0xD7A03C" } }, "damageTextSquadman": { "$ref": { "path":"def.damageText" }, "textFormat": { "$ref": { "path":"def.damageText.textFormat" }, "color": "0xffff00" } } insted of millions of lines... Thanks :D
  2. I wanted to create a hp bar. Yes these macros helped me to do it :) I'm extending the default xvm config, so using the macros in battleLabelsTemplates.xc in the def section: "totalHP2": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": "{{py:sub({{py:div({{py:sub(100,{{py:percent_hp(0)}})}},2)}},120)}}", "y": 35, "width": "{{py:percent_hp(0)}}", "screenHAlign": "center", "align": "right", "height": 15, "bgColor": "#00ff00", "alpha": "50" }, "totalHP2bg": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": "-120", "y": 35, "width": "100", "screenHAlign": "center", "align": "right", "height": 15, "bgColor": "#888888", "alpha": "50" }, "totalHP3": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": "{{py:sub(120,{{py:div({{py:sub(100,{{py:percent_hp(1)}})}},2)}})}}", "y": 35, "width": "{{py:percent_hp(1)}}", "screenHAlign": "center", "align": "right", "height": 15, "bgColor": "#ff0000", "alpha": "50" }, "totalHP3bg": { "enabled": true, "updateEvent": "PY(ON_UPDATE_HP)", "x": "120", "y": 35, "width": "100", "screenHAlign": "center", "align": "right", "height": 15, "bgColor": "#888888", "alpha": "50" }, And in the battleLabels.xc: ${ "battleLabelsTemplates.xc":"def.totalHP2" }, ${ "battleLabelsTemplates.xc":"def.totalHP2bg" }, ${ "battleLabelsTemplates.xc":"def.totalHP3" }, ${ "battleLabelsTemplates.xc":"def.totalHP3bg" }, To use @night_dragon_on's macros download the latest zip from the site he linked and extract at least the configs\xvm\py_macro folder. For the list of macros open the NDO_scripts.py file and look for the @xvm.export parts. Between the '...' is the name of the macro. As you can see from my config I used percent_hp. Thanks once more @night_dragon_on :)
  3. @night_dragon_on Thank you! Nice work :)
  4. It's a data, ration can be calculated from total_hp / current_hp but there is no total hp data (current total_hp is "total hp left" so the current hp of the team). So the ration is needed or both the starting value of the total_hp and the current value to calculate the percentage.
  5. It would be great if there would be somthing py:xvm.total_hp_ratio.ally/enemy and not just py:xvm.total_hp.ally/enemy. Some nice bars could be made that way :)
×
×
  • Create New...