Jump to content
Korean Random
Sign in to follow this  
leeuniverse

Feature Change SUGGESTION.... Enemy HP in Players Panel Improvement.

Recommended Posts

So, something that has always bothered me is how "Spotted Enemy" don't show their HP unless they've entered into my Red Circle.

See pic below....

 

I don't understand why this has always been "limited" this way.  It is no different than your ally spotting the tank and you knowing about it.

Just like they can easily tell you they spotted a particular tank (and it's legal for the game/XVM to have the spotted feature), they can just as easily tell you how much HP the Enemy has.

So, I see no "unfair advantage" reason why this would break Wargamings "cheating" rules, i.e. "knowing hidden information that can't be got through active communication".

 

So, can this functioning be changed so when an enemy is spotted, we know their HP also, not only that they were spotted?

If Wargaming like the retards they are really won't let XVM have this ability, then is there a way to just put their HP # in the spot so I don't have all these blank spaces, like how we can put FULL HP Bars there?

 

For example, if this is my code..... How can it be changed to make default HP #'s show for ALL enemy tanks?

"hp": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
	"format": "<font face='$FieldFont' size='{{alive?13|0}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}' color='{{c:hp-ratio}}'>{{alive?{{hp%4d}}}}</font>",
    "shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 2, "strength": 1, "distance": 0, "angle": 0	}
    }
  },

Also, how can the above code be changed so I can have # Text be a particular COLOR?

I know I can change color, but when I do that the HP # no longer changes to yellow, red, etc. as the HP goes down.

I'm not a "coder" so I need a bit of help with this.  I know I can change the color elsewhere as I did somehow that I forgot atm, but is there a way to change the color in this area?

Like, I want the HP #'s to be CYAN not White...

 

Thanks

 

V2ytZWF.jpg

Edited by leeuniverse

Share this post


Link to post

Short link
Share on other sites

colors.xc > def > colorHP - this defines the colors

colors.xc > colors > hp_ratio - this defines the threshold ranges

Share this post


Link to post

Short link
Share on other sites

I don't understand why this has always been "limited" this way.  It is no different than your ally spotting the tank and you knowing about it.

 

 

I might be wrong, but AFAIK, the server only sends information about tanks that are within your visible area (the red circle) to prevent cheating. The only information it sends about enemies outside this area is whether they are alive or not, and their approximative location on the (mini)map when they are spotted, so your game has no information about their HP. What you suggest could be implemented using XMQP though.

Edited by Tey
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

colors.xc > def > colorHP - this defines the colors

colors.xc > colors > hp_ratio - this defines the threshold ranges

 

Ya, I figured this was the only way, just checking.

 

I might be wrong, but AFAIK, the server only sends information about tanks that are within your visible area (the red circle) to prevent cheating. The only information it sends about enemies outside this area is whether they are alive or not, and their approximative location on the (mini)map when they are spotted, so your game has no information about their HP. What you suggest could be implemented using XMQP though.

 

Could be...

Oh, are you able to show how, or is it some fancy coding that's only for the experts?

 

Use max-hp macro

 

Could you show how it would be used with my code example, I don't fully understand how it all works?

 

Thanks all....

Share this post


Link to post

Short link
Share on other sites

Could be...

Oh, are you able to show how, or is it some fancy coding that's only for the experts?

 

If you are referring to the XMQP thing, this is the latter: it needs to be implemented in Python (not in .XC files) and it won't work unless other players in your team also have it (because it would rely on teammates reporting HP information about enemies that are within their visible area). So, unless it gets added to official XVM releases, it's useless in random battles.

Share this post


Link to post

Short link
Share on other sites

Use max-hp macro

 

Could you show how it would be used with my code example, I don't fully understand how it all works?

And to be clear, this shows ALL the Enemy's HP #'s so we don't have blank spaces, like how with Ally HP #'s we don't have blank spaces, and the HP Bar's show as "full"?

 

Thanks

Share this post


Link to post

Short link
Share on other sites

@leeuniverse,

 

maybe another field for:

..
"format": "<font face='$FieldFont' size='{{spotted?0|{{hp-ratio<100?0|13}}}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}' color='{{c:hp-ratio}}'>{{hp-max}}</font>"
..

didnt check, maybe wrong

 

checked. This works:

"hpSpot": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
"format": "<font face='$FieldFont' size='{{spotted?{{alive?13|0}}|0}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}' color='{{c:hp-ratio}}'>{{alive?{{hp?{{hp%4d}}|?}}}}</font>",
    "shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 2, "strength": 1, "distance": 0, "angle": 0 }
    },
  "hpUnSpot": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
"format": "<font face='$FieldFont' size='{{spotted?0|{{hp-ratio<100?0|13}}}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}' color='{{c:hp-ratio}}'>{{hp-max}}</font>",
    "shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 2, "strength": 1, "distance": 0, "angle": 0 }
    }
Edited by vlad_cs_sr

Share this post


Link to post

Short link
Share on other sites
On 5/15/2017 at 7:17 AM, vlad_cs_sr said:

@leeuniverse,

 

maybe another field for:


..
"format": "<font face='$FieldFont' size='{{spotted?0|{{hp-ratio<100?0|13}}}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}' color='{{c:hp-ratio}}'>{{hp-max}}</font>"
..

didnt check, maybe wrong

 

checked. This works:


"hpSpot": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
"format": "<font face='$FieldFont' size='{{spotted?{{alive?13|0}}|0}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}' color='{{c:hp-ratio}}'>{{alive?{{hp?{{hp%4d}}|?}}}}</font>",
    "shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 2, "strength": 1, "distance": 0, "angle": 0 }
    },
  "hpUnSpot": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
"format": "<font face='$FieldFont' size='{{spotted?0|{{hp-ratio<100?0|13}}}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}' color='{{c:hp-ratio}}'>{{hp-max}}</font>",
    "shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 2, "strength": 1, "distance": 0, "angle": 0 }
    }

 

Hey vlad_cs_sr....

 

Sorry I took so long to get back to you (a year LOL), but had stuff happen with life, and I actually didn't think anyone answered lol.

Anyway, thanks much for doing this for me.

 

However, I don't know if your code "broke" in the last year and doesn't work anymore or if I'm doing something wrong?  It's not working.

Do I need to "add" the "hpSpot" etc. codes anywhere else (other than the PP file with a def for it to show of course)?

 

XVM won't even start, it acts like there's some missing or wrong with the coding or something.

Is there something in your code that's no longer valid?  I don't see any imbalance in the code, of course, I'm not anywhere close to an expert.

Thoughts?

 

Is this part maybe breaking it?  size='{{spotted?0|{{hp-ratio<100?0|13}}}}'

 

Thanks much....  :)

Edited by leeuniverse

Share this post


Link to post

Short link
Share on other sites
6 часов назад, leeuniverse сказал:

XVM won't even start, it acts like there's some missing or wrong with the coding or something.

Is there something in your code that's no longer valid?  I don't see any imbalance in the code, of course, I'm not anywhere close to an expert.

Thoughts?

 

what does it say in xvm.log about sintax errors?

Also you need to add those:

"hpUnSpot",

"hpSpot"

to extra fields


 
"def": {
..
"hpSpot": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
"format": "<font face='$FieldFont' size='{{spotted?{{alive?13|0}}|0}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}' color='{{c:hp-ratio}}'>{{alive?{{hp?{{hp%4d}}|?}}}}</font>",
    "shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 2, "strength": 1, "distance": 0, "angle": 0 }
    },
  "hpUnSpot": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
"format": "<font face='$FieldFont' size='{{spotted?0|{{hp-ratio<100?0|13}}}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}' color='{{c:hp-ratio}}'>{{hp-max}}</font>",
    "shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 2, "strength": 1, "distance": 0, "angle": 0 }
    }
    ..
    }

 

 

"extraFieldsLeft": [
..
${"def.hpSpot"},
${"def.hpUnSpot"}
..
]

 

Share this post


Link to post

Short link
Share on other sites

Thanks much.....   I was adding that, but  I was doing one or two things the wrong way in both files.

 

Working now.  :)

3 hours ago, vlad_cs_sr said:

 

 

 

Hey vlad....

 

So, I'm having one small issue....

For some reason, the "color='{{c:hp-ratio}}" isn't being recognized, like it does in the HP section.

So, the text is just "White" until the enemy starts losing HP.

 

I've been able to just put a HEX color replacing hp-ratio, but where I run into a problem is that the enemy that's "outside" my Viewrange circle, and they've been spotted by my ally's, their HP text turns White.  So, I think somehow "hpSpot" needs to be changed so that it either recognizes hp-ratio or a hex or whatever color.  I've tried various variations but can't find one that works.

Any thoughts?

 

Thanks again.  :)

 

Here's what the code looks like:

"hp": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
"format": "<font face='$FieldFont' size='{{alive?13|0}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}'
color='{{c:hp-ratio}}'>{{alive?{{hp%4d}}}}</font>",
"shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 0, "strength": 2, "distance": 1, "angle": 0 }
 },
"hpSpot": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
"format": "<font face='$FieldFont' size='{{spotted?{{alive?13|0}}|0}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}'
color='{{c:hp-ratio}}'>{{alive?{{hp%4d}}|{{hp-max}}}}</font>",
"shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 2, "strength": 1, "distance": 0, "angle": 0 }
 },
"hpUnSpot": { "x": 118, "y": 3, "bindToIcon": true, "align": "center", "alpha": "{{alive?100|0}}",
"format": "<font face='$FieldFont' size='{{spotted?0|{{hp-ratio<100?0|13}}}}' alpha='{{alive?{{ready?#FF|#80}}|#80}}'
color='{{c:hp-ratio}}'>{{hp-max}}</font>",
"shadow": { "enabled": true, "color": "0x000000", "alpha": 100, "blur": 2, "strength": 1, "distance": 0, "angle": 0 }
 }

 

Share this post


Link to post

Short link
Share on other sites

maybe this mega-macro will help with color issue

 

{{c:hp-ratio<10.4?#FF0000|{{c:hp-ratio<25.4?#DD4444|{{c:hp-ratio<50.4?#FFCC22|{{c:hp-ratio<=100?#FCFCF}}}}}}}}

 


 

 


 

 
Edited by vlad_cs_sr

Share this post


Link to post

Short link
Share on other sites
16 hours ago, vlad_cs_sr said:

maybe this mega-macro will help with color issue

 

{{c:hp-ratio<10.4?#FF0000|{{c:hp-ratio<25.4?#DD4444|{{c:hp-ratio<50.4?#FFCC22|{{c:hp-ratio<=100?#FCFCF}}}}}}}}

1

 

LOL, don't know what I'm going to do with that, but I get what you're trying, couldn't get it to work however.

 

So, I realized I was missing one thing in the code, so I was mostly able to get it to work.

However, from the images below, you can see the "hp-max" that I added shows the tanks spotted outside of my range as "White" instead of the "hp-ratio" format.

 

So, if you could help me figure out how to format that one "hp-max" section to either be a solid color (like I did the hpUnSpot section) or to connect to the hp-ratio that would be great.

Seems like a simple fix but can't figure it out.

 

Q67vW3y.png

Edited by leeuniverse

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