Jump to content
Korean Random
Tey

Team WN8 / Командный WN8

Recommended Posts

 

 

try:

        #     with open('res_mods/configs/expected_tank_values.json') as values_file:

        #         self.user['expValues'] = json.load(data_file)

        # except Exception as e:

        #     LOG_WARN('Cannot load expected tank values (%s)' % (e,))

Does this mean that you need to set the expected values file on the specified path?

Share this post


Link to post

Short link
Share on other sites
Does this mean that you need to set the expected values file on the specified path?

 

Там же комментарий вставлен (в том смысле, что строки закомментированы) 

Edited by refaol

Share this post


Link to post

Short link
Share on other sites

Там же комментарий вставлен (в том смысле, что строки закомментированы) 

Я знаю,что заммичены,может раскомитить и считать по нормальному файлу ожидаемых значений.Если я все верно понял,сейчас он берет данные из ХВМ,а там до сих пор самая дебильная версия expected_tank_values.json в истории всего ВН8.

Share this post


Link to post

Short link
Share on other sites

Does this mean that you need to set the expected values file on the specified path?

 

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.

Share this post


Link to post

Short link
Share on other sites

 

 

Если я все верно понял,сейчас он берет данные из ХВМ,а там до сих пор самая дебильная версия expected_tank_values.json в истории всего ВН8.
 

А ее ты тоже поменял как то, ту что в хвм? Где и как подскажи plz, если да.

Share this post


Link to post

Short link
Share on other sites

 

А ее ты тоже поменял как то, ту что в хвм? Где и как подскажи plz, если да.

 

Не,я не менял,просто хвм одно показывает,как у всех думаю.а все остальные статистики другое,нормальное.Я не спец в питоне и вообще в хвм,но вроде он значения берет с сервера.

 

(response, duration, errStr) = loadUrl(__WN8_EXPECTED_DATA_URL)

 

 

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.
 I realized, although I personally would prefer this option :)Thanks for your code.

Share this post


Link to post

Short link
Share on other sites

Здесь временное решение отображения шанса)) Что то ни как не пойму что и как делать))

Share this post


Link to post

Short link
Share on other sites

Интересно отображает)  -5% )

post-14449-0-94680800-1496862860.jpg

Edited by SEREGA_SF

Share this post


Link to post

Short link
Share on other sites

Интересно отображает)  -5% )

attachicon.gifshot_038.jpg

Тут скорее отображаеться перевес команд в пользу одной или другой команды по WN8 нежели конкретно сам шанс на победу.

Edited by xenus

Share this post


Link to post

Short link
Share on other sites

Интересно отображает)  -5% )

attachicon.gifshot_038.jpg

Здесь на проценты особого внимания не смысла обращать,это просто разница по общему ВН8 тимы,лучше циферки включи,там понятней будет.Тем более,что это не шанс на победу,а просто общий скилл без учета уровней и пр.

Share this post


Link to post

Short link
Share on other sites

Да мне интересно просто было, как оно будет показывать)) Я уже привык по раскаткам ориентироваться, да по спискам))

Просто если выводит процентное соотношение - не должно с минусами быть, по идее нулем должно ограничиваться))

Edited by SEREGA_SF

Share this post


Link to post

Short link
Share on other sites

Да мне интересно просто было, как оно будет показывать)) Я уже привык по раскаткам ориентироваться, да по спискам))

Просто если выводит процентное соотношение - не должно с минусами быть, по идее нулем должно ограничиваться))

В смысле,как не должно,у твоей тимы меньше суммарный ВН8 на столько то процентов.Этот скрипт просто показывает общий скилл,опять же без учета уровня и прочего,это не шанс)))Если бы показывал шанс,то в данном случае было бы 45/55%,если я не ошибаюсь.

  • Upvote 1
  • Downvote 1

Share this post


Link to post

Short link
Share on other sites

Да ты Славк не понял, я и не про шанс говорю. 

Смотри, к примеру у моей тимы суммарный WN8 выше чем у противника на 5% - соответственно цифирька рисуется зеленым цветом.

Наоборот, у нас меньше на 5% - рисуется красным.

Минуса нафига не нужны выходит))

А нуль - это вообще в редких случаях можно сделать, когда одна тима сплошь из красных, другая наоборот бирюза/фиолет (но это совсем редкость)  :heh:

Edited by SEREGA_SF
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

 

 

Минуса нафига не нужны выходит))
А,ты про это,так скрипт же открытый,убери символ)) 

Share this post


Link to post

Short link
Share on other sites

Ахах Славк, умел бы я еще в скриптах ковыряться))

Share this post


Link to post

Short link
Share on other sites

Ахах Славк, умел бы я еще в скриптах ковыряться))

Вроде тут,но я тоже нуващенекодер)))

строка 101

def alliesAliveRatingRatio():

    if enemies_wn8 != 0 and allies_wn8 != 0:

        if enemies_wn8 > allies_wn8:

            return int(-(1.0 - allies_wn8 / enemies_wn8) * 100)

по идее(но это не точно),должно быть аналогично следующему ифу(элсу) в плане скобок,вот так:

def alliesAliveRatingRatio():

    if enemies_wn8 != 0 and allies_wn8 != 0:

        if enemies_wn8 > allies_wn8:

            return int((1.0 - allies_wn8 / enemies_wn8) * 100)

        else:

            return int((1.0 - enemies_wn8 / allies_wn8) * 100)

Для верочки спроси у гуру,ktulho,Kotyarko_O,night_dragon_on,они в этом шарят.

  • Upvote 2
  • Downvote 2

Share this post


Link to post

Short link
Share on other sites

Хых, попробую Славк, в лоб то все равно не получу, да и игру не убью, а пробовать учиться никогда не поздно))

Share this post


Link to post

Short link
Share on other sites

hi, i did a few modifications, maybe someone will find useful:

(WinChance is from 1% to 99% regarding on own team, colored in green if >50% or red if <50%  /  no negative chances "-")

e5BV77a.png

 

EDIT: mod_wn8_chance.py (at line 101)

def alliesAliveRatingRatio():
    if enemies_wn8 != 0 and allies_wn8 != 0:
        if enemies_wn8 > allies_wn8:
                return int(50 - (1.0 - allies_wn8 / enemies_wn8) * 50)
        else:
                return int(50 + (1.0 - enemies_wn8 / allies_wn8) * 50)
    return

 

mod_wn8_chance.py.rar

 

EDIT: battleLabelsTemplates.xc

"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": 14 },
      "format": "Team WN8: <font color='{{py:alliesAliveRatingRatio>=50?#00EE00|#EE0000}}'>{{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=50?=|{{py:alliesAliveRatingRatio>50?>|<}}}} {{py:enemiesAliveRating}}</font>"
    },

  "teamRating_WinChance": {
      "enabled": true,
      "updateEvent": "PY(ON_UPDATE_TEAM_RATING)",
      "x": 230,
      "y": 25,
      "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 5, "strength": 1.5 },
      "textFormat": { "size": 14 },
      "format": "WinChance: <font color='{{py:alliesAliveRatingRatio>=50?#00EE00|#EE0000}}'>{{py:alliesAliveRatingRatio}}%</font>"
    },

 

EDIT: battleLabels.xc

"formats": [

 

 

    

   ${ "battleLabelsTemplates.xc":"def.teamRating" },
   ${ "battleLabelsTemplates.xc":"def.teamRating_WinChance" }
    ]
  }
}

Edited by NiseriuS

Share this post


Link to post

Short link
Share on other sites

А если в "teamRating_WinChance" заменить фрагмент 

<font color='{{py:alliesAliveRatingRatio>=50?#00EE00|#EE0000}}'>{{py:alliesAliveRatingRatio}}%</font>" 

на

<font color='{{py:alliesAliveRatingRatio>=90?#D042F3|{{py:alliesAliveRatingRatio>=75?#02C9B3|{{py:alliesAliveRatingRatio>=60?#60FF00|{{py:alliesAliveRatingRatio>=40?#F8F400|{{py:alliesAliveRatingRatio>=25?#FE7903|#FE0E00}}}}}}}}}}'>{{py:alliesAliveRatingRatio}}%</font>"

то "шанс" будет окрашиваться в заданные цвета по шкале

Edited by refaol
  • Upvote 4

Share this post


Link to post

Short link
Share on other sites

hi, i did a few modifications, maybe someone will find useful:

(WinChance is from 1% to 99% regarding on own team, colored in green if >50% or red if <50%  /  no negative chances "-")

e5BV77a.png

 

EDIT: mod_wn8_chance.py (at line 101)

def alliesAliveRatingRatio():

    if enemies_wn8 != 0 and allies_wn8 != 0:

        if enemies_wn8 > allies_wn8:

                return int(50 - (1.0 - allies_wn8 / enemies_wn8) * 50)

        else:

                return int(50 + (1.0 - enemies_wn8 / allies_wn8) * 50)

    return

 

attachicon.gifmod_wn8_chance.py.rar

 

EDIT: battleLabelsTemplates.xc

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

      "format": "Team WN8: <font color='{{py:alliesAliveRatingRatio>=50?#00EE00|#EE0000}}'>{{py:alliesAliveRating}} {{py:alliesAliveRatingRatio=50?=|{{py:alliesAliveRatingRatio>50?>|<}}}} {{py:enemiesAliveRating}}</font>"

    },

  "teamRating_WinChance": {

      "enabled": true,

      "updateEvent": "PY(ON_UPDATE_TEAM_RATING)",

      "x": 230,

      "y": 25,

      "shadow": { "distance": 1, "angle": 90, "alpha": 80, "blur": 5, "strength": 1.5 },

      "textFormat": { "size": 14 },

      "format": "WinChance: <font color='{{py:alliesAliveRatingRatio>=50?#00EE00|#EE0000}}'>{{py:alliesAliveRatingRatio}}%</font>"

    },

 

EDIT: battleLabels.xc

"formats": [

 

 

    

   ${ "battleLabelsTemplates.xc":"def.teamRating" },

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

    ]

  }

}

Так и не понял как это сделать(

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