-
Posts
32 -
Joined
-
Last visited
Posts posted by Tey
-
-
Indeed, I was too lazy to decide in which XC file to put the settings, so it's only in the Python file yet <_<
-
wonder whats the decision behind this
That's probably explained there. From what I understand from the Google translation, the XVM devs think that the v30 expected values have been rigged. I'm not sure why they believe that (it was true for v29 though), but anyway, v30 values are meaningless so it's a good decision.
Hopefully, if the XVM devs manage to find out a way to compute fair and up-to-date WN8 expected values, other sites might use them as well instead of the ones from wnefficiency...
- 1
-
Edited by Tey
It seems to be showing 100% all the time if allies' WN8 > enemies' WN8 and -100% otherwise.
Aw right, typical float/integer programming mistake. It's fixed in latest version, which also uses overall WN8 by default now (set useTankRating config key to True for the old behavior).
- 3
-
Edited by Tey
If I wanted to change it to count the overall win8, instead of the current vehicle, what would I change?
Apply the following changes or just use konrad509's version (he did exactly the same thing).
Remove that part from mod_wn8_chance.py (lines 116 to 133):
if 'wn8expDamage' in info and all(k in stats['v'] for k in ('b', 'frg', 'dmg', 'w', 'spo', 'def')): if stats['v']['b'] >= 100: # Compute WN8 for that vehicle rDAMAGE = stats['v']['dmg'] / (stats['v']['b'] * info['wn8expDamage']) rSPOT = stats['v']['spo'] / (stats['v']['b'] * info['wn8expSpot']) rFRAG = stats['v']['frg'] / (stats['v']['b'] * info['wn8expFrag']) rDEF = stats['v']['def'] / (stats['v']['b'] * info['wn8expDef']) rWIN = stats['v']['w'] / (stats['v']['b'] * info['wn8expWinRate']) * 100.0 rWINc = max(0, (rWIN - 0.71) / (1 - 0.71) ) rDAMAGEc = max(0, (rDAMAGE - 0.22) / (1 - 0.22) ) rFRAGc = max(0, min(rDAMAGEc + 0.2, (rFRAG - 0.12) / (1 - 0.12))) rSPOTc = max(0, min(rDAMAGEc + 0.1, (rSPOT - 0.38) / (1 - 0.38))) rDEFc = max(0, min(rDAMAGEc + 0.1, (rDEF - 0.10) / (1 - 0.10))) WN8 = 980*rDAMAGEc + 210*rDAMAGEc*rFRAGc + 155*rFRAGc*rSPOTc + 75*rDEFc*rFRAGc + 145*min(1.8,rWINc) vehicle['wn8'] = WN8
I would have done the exact same changes :) Do you have an example of wrong ratio (like which sums produce which wrong ratio)? My graphic card died, so I can't check it out with WoT currently, but I can probably figure out what's wrong from samples.I'm not familiar with this stuff, but I managed to do something. It seems to calculate the sum of the overall WN8 now, but incorrectly calculates the ratio. Unless the author replies, you may try it if you want mod_wn8_chance.zip
BTW, this macro does not handle players with no WN8 very well. It just ignores them, which is probably wrong as it's like considering they have a WN8 of 0 (they are probably newbies, but 0 is still too low). Of course, this impacts the WN8 sums comparison and ratio. I'm open to suggestions...
-
Interesting, so now all tanks of the same tier and type have the same expectations That sounds so wrong...
Anyway, XVM still uses the v29 of expected values, and no other sites use the "new" values yet, so I doubt this is the reason for OP question.
-
I did something similar to compensate the lake of win chance. It shows the accumulated WN8 of both team and the ratio (it looks ugly on screenshot but not in game):
If you want to use it:
- download that script and put it in res_mods\configs\xvm\py_macro
- edit battleLabels.xc and change it that way:
{ "labels": { ... "formats": [ ... , ${ "battleLabelsTemplates.xc":"def.teamRating"} ] } }
- edit battleLabelsTemplates.xc and change it that way (and customize to your needs):
{ ... "def": { ... ,"teamRating": { "enabled": true, "updateEvent": "PY(ON_UPDATE_TEAM_RATING)", "x": 230, "y": 2, "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 5, "strength": 1.5 }, "textFormat": { "size": 15 }, "format": "Team WN8: <font color='{{py:alliesAliveRatingRatio>=0?#00EE00|#EE0000}}'>{{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=0?=|{{py:alliesAliveRatingRatio>0?>|<}}}} {{py:enemiesAliveRating}} ({{py:alliesAliveRatingRatio}}%)</font>" } } }
- 8
-
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.
-
Edited by Tey
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.
- 1
-
We are preparing some fine-tuning and will roll out a more flexible solution to py_macro, including permitting the use of the familiar old version of the display.
We prepare some improvements and will publish a more flexible solution by py_macro, including that allows to use the familiar old version of the display.
2 translations, 2 different meanings about the py_macro part, and the last part is still unclear (what is the "familiar old version of the display" supposed to be?). I guess Vlad's translation is the most correct, and Google's translation is crappy as usual...
Well, thanks anyway, I guess we'll just have to wait for related commits to understand what all that mean.
-
Готовим некоторые доработки и выкатим более гибкое решение на py_macro, в том числе позволяющее использовать привычный старый вариант отображения.
I'm also interested by a proper translation of that message (especially the last part about py_macro), because Google and Bing translators did a poor job :(
-
It works out of the box for me. Tell me if you encounter issues.
-
@HekePrkl: that's a good suggestion, but I need time to add it.
@Aslain: I guess this comes from other mods that either use the chat to print custom messages or modify chat messages (like this addon does). I could tell more with a replay, but unless this addon does not work as expected, this should be a harmless warning which do not appear in latest version (unless you change the default logging level).
-
I've checked the replay and the warnings are harmless. Download the latest version of the mod and they should go away.
Note that if you want the arty names to be colorized as well in these messages, you should make sure they have the same format as player names (that is, something like "player_name (vehicle)" instead of "vehicle (player_name)").
-
@yoyo070: can you provide a replay where this happens please?
-
Add, if not difficult.I do not want the rainbow chatting))
Implemented in latest version. This is disabled by default, so you should set customColors to true to enable it. Only the XVM scale is supported, so have a look to this post to find out the conversions to other scales.
BTW, if you only want to disable colorization, just set colorizeAuthor and colorizeTarget to false.
- 1
-
Edited by Tey
Tried to use:
"authorPrefix": "<img src='xvm://res/icons/flags/{{flag|default}}.png' width='16' height='13'>",
but it doesn't work.Could this be solved somehow?
When the flag is missing, this is already the default.png image that is shown as the flag. This is a transparent 16x13 image in default XVM configuration. Unfortunately, there's no way to specify an alternative image in the syntax, as it uses Python formatting (not XVM macros). Should someone be brave enough to implement XVM macros in Python, I'll be glad to use that instead.
I have an older version, without configuration.Specific color can be set?
The colors.xc file is included in official XVM releases since ages, so you should have it. This mod uses the same colors as XVM.
That said, I might add specific colors in chat.xc if you need it, but it won't be as elaborate as in colors.xc (that is, there will only be one color scale for the normalized rating, not one color scale for each rating type).
Also, images can be set depending on the command?like on a picture
The main purpose of that mod is to customize the players name, not the whole chat message. So no, this is not possible. That shouldn't be that hard to implement though, but I have no time for that yet :(
- 1
-
Edited by Tey
@yoyo070: you're right, colorizeTarget was not taken into account. This should be fixed in latest version. As for colorizeAuthor, I believe you tested that with replays, right? If so, note that non-radio messages (i.e., messages written by players like "camper noobs" in your last screenshot) are not saved as chat messages in replays, so this mod cannot modify them when playing a replay¹. But if you try in a live battle, your changes to chat.xc should work for these messages.
¹ but if the mod did modify them while recording the replay (during live battle), then theses modifications are recorded in the replay and are permanent. This explains why the messages are colorized in your screenshots, even though the mod cannot change this kind of messages during replays playback.
- 2
-
@yoyo070: download latest version from here, and use something like that:
"authorPrefix": "<img src='cfg://yaya070/img/wn8/{cr}.png' width='16' height='13'>",
- 1
-
Edited by Tey
What about to ability to define color scale (like in XVM) or switch for color source defined in colors.xc? It is possible to implement it ? Or where are colors taken from ?
The player name colors are the one defined in colors.xc and the rating (WGR, WN8, WN6, ...) is the one you set in the settings on XVM website. Said differently, the color applied is equivalent to the "{{c:r}}" XVM macro. My colors.xc file is different than the default one from XVM, which explains why some players names are in orange.
-
Edited by Tey
@soulza: I'll answer your PM here just in case other people are also interested by that.
Download the latest version of the mod here and you'll be able to add stuff before and after the players names by editing chat.xc. The default version inserts the player flag before its name, but only for the message author (not the targets).To add your fruit images, you probably want to change both authorPrefix and prefix with something like that:
// Prefix for the message author "authorPrefix": "<img src='cfg://soulzaskehoblue/keho/fruit/{xr:.0f}.png' width='12' height='12'>", // Prefix for target players "prefix": "<img src='cfg://soulzaskehoblue/keho/fruit/{xr:.0f}.png' width='12' height='12'>",
Note that this does not use the XVM macros formatting because this is not available from Python scripts (or I'm too stupid to figure out how to do). The formatting comes from Python with named arguments whose list is given in chat.xc comment.
- 1
-
Edited by Tey
This mod allows you to decorate players name in battle chat messages. The default configuration colorizes players name based on their ratings, and add the flag of message author:
Installation:
- download the latest version from here (click on the "Download ZIP" button).
- extract the files.
- copy mod_chat_color.py to the res_mods\configs\xvm\py_macro folder.
- copy chat.xc to the res_mods\configs\xvm\default folder (or wherever your XVM configuration files are).
- edit @xvm.xc and add the following line just before the last closing brace (}):
, "chat": ${"chat.xc":"chat"}
Check the comments in chat.xc to tweak the configuration. Note that the prefix/suffix parameters do not use the XVM macros formatting because this is not available from Python scripts (or I'm too stupid to figure out how to do). The formatting comes from Python with named arguments whose list is given in chat.xc comments (names match some XVM macros). The list is way smaller than what's available in XVM macros, but I might add some more on demand.
Known issues:
- this mod cannot decorate non-radio messages when playing a replay. This is because non-radio messages are not recorded as chat messages in replay files. Also, decorations of non-radio messages are recorded in replay files: anyone playing the replay file will see these messages as decorated, even without that mod installed.
- 12
-
Okay, thanks for the answer.
If anyone is aware of another mod for that, I'm interested :)
- 1
- 1
-
Hi,
In the in-battle chat, is it possible to colorize the author name of each message based on the rating of that player with XVM? I mean something like that for instance:
player_1 (FV215b) : hello
player_2 (E100) : Reloading! 3 s left!
player_3 (IS-7) : Requesting fire at enemy_1 (T30)
Where player_1 is bad, player_2 is normal, player_3 is good and enemy_1 is unique (yeah, I know highlighting enemy_1 as in the last message is probably too much).
UPD (moderator): Solved, author made his own addon for XVM.- 1
- 1
-
ok, applied
According your second patch - I made it different way, please test it in the 6968 build.
Thanks, your fix for the second issue is definitely better, but it doesn't work as event handlers must accept arguments:
2016-12-23 19:55:09.463: ERROR: [EXCEPTION] (scripts/client/gui/shared/event_bus.py, 44): Traceback (most recent call last): File "scripts/client/gui/shared/event_bus.py", line 42, in handleEvent TypeError: _start() takes no arguments (1 given)
The fix is obvious though (and it works correctly after that):
--- xmqp.py.bak2 2016-12-23 20:05:19.485185000 +0100 +++ xmqp.py 2016-12-23 20:05:41.421070300 +0100 @@ -41,7 +41,7 @@ BigWorld.player().arena.onNewVehicleListReceived -= start BigWorld.callback(0, _start) -def _start(): +def _start(*args): g_eventBus.removeListener(XVM_EVENT.XVM_SERVICES_INITIALIZED, _start) if not g_xvm.xvmServicesInitialized: g_eventBus.addListener(XVM_EVENT.XVM_SERVICES_INITIALIZED, _start)
Team WN8 / Командный WN8
in Components of XVM and Addons (py_macro)
Posted
No, this is old code that I wrote before I realize that XVM already provides the WN8 expected values to Python scripts. It's still there (but commented) just in case I need something similar for the config.