Jump to content
Korean Random
sirmax

Расширенный формат макросов.

Recommended Posts

потому что d- это целое число, а цифра означает количество символов для выравнивания. Дробное- f (первый пост темы)

Спасибо,я в этих макросах дуб дубом)))

Share this post


Link to post

Short link
Share on other sites

 

 

соответствие старых макросов новым

    [ "{{tdv}}",            "{{tdv%.1f|-.-}}" ],
    [ "{{tfb}}",            "{{tfb%.1f|-.-}}" ],
    [ "{{tsb}}",            "{{tsb%.1f|-.-}}" ]

 Ноль надо дописать, а то числа меньше 1 получаются без него и начинаются сразу с точки.

    [ "{{tdv}}",            "{{tdv%0.1f|-.-}}" ],
    [ "{{tfb}}",            "{{tfb%0.1f|-.-}}" ],
    [ "{{tsb}}",            "{{tsb%0.1f|-.-}}" ]

Share this post


Link to post

Short link
Share on other sites

Подскажите, пытался сделать так:

{{t-battles<=9499?{{t-hb%2d~h|-h}}|{{t-battles>=9500?{{t-kb%2d~k}}}}}}

почему то дефолт не срабатывает "|-h", вместо него пусто или пробел, в итоге строка съезжает в statisticForm и battleLoading.
может что-то не то делаю...?

Edited by Hawk1983x

Share this post


Link to post

Short link
Share on other sites

Уважаемые разработчики, большое спасибо за то, что постоянно напоминаете нам, простым пользователям мода о том, что программирование, регэкспы и прочее форматирование нужно знать наизусть! Каждый раз обновляя XVM я знаю, что придется опять вспоминать давно забытое еще с ВУЗа и заранее готовлюсь ностальгировать...

В общем, часок мучений и конфиг был обработан напильником, но блин... Как же было просто, когда был визуальный редактор! Нет ли в планах его возвращения? Запускать реплей для просмотра сделанных изменений ОЧЕНЬ неудобно.

Share this post


Link to post

Short link
Share on other sites

 

 

Запускать реплей для просмотра сделанных изменений ОЧЕНЬ неудобно.
В конфиге xvm.xc есть опция:
"autoReloadConfig": false,

По-умолчанию она выключена. Пропишите true, и если при запущенной игре мод почувствует изменение в конфиге (при воспроизведении реплея или просто находясь в ангаре), то перезагрузит его автоматически и вы увидите все изменения, которые произвели :)

  • 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

По идее лучше пересоздать тему в разделе "Настройка XVM"

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

По идее лучше пересоздать тему в разделе "Настройка XVM"

Абсолютно согласен,еле нашел,когда понадобилась))

Share this post


Link to post

Short link
Share on other sites

Добрый день .

Edited by H_E_K_P_O_M_A_H_T_

Share this post


Link to post

Short link
Share on other sites

Cannot get the below part to work. Is there something wrong?

"format": "{{cap.points<=50?{{.captureBar.textsize.50}}|{{cap.points>=90?{{.captureBar.textsize.90}}|{{.captureBar.textsize.75}}}}}}",

"textsize": {
      "50": "<font size='16' color='#FFFFFF'><b>{{cap.points%d~%}}</b></font>",
      "75": "<font size='18' color='#F50800'><b>{{cap.points%d~%}}</b></font>",
      "90": "<font size='20' color='#F50800'><b>{{cap.points%d~%}}</b></font>"
    },

Share this post


Link to post

Short link
Share on other sites

{{.captureBar.enemy.points.textsize... instead of {{.captureBar.textsize...

Edited by konrad509

Share this post


Link to post

Short link
Share on other sites

Sorry was not clear enough. That part is okay but I put both in the same code box.

  "captureBar": {
    // false - Disable
    // false - Отключить
    "enabled": true,
    // Change the distance between capture bars
    // Изменение расстояния между полосами захвата
    "distanceOffset": 0,
    // Hide capture progress bar
    // Спрятать полосу прогресса захвата
    "hideProgressBar": false,
    // textsize macro
    "textsize": {
      "50": "<font size='15' color='#FFFFFF'><b>{{cap.points%d~%}}</b></font>",
      "75": "<font size='18' color='#F50800'><b>{{cap.points%d~%}}</b></font>",
      "90": "<font size='20' color='#F50800'><b>{{cap.points%d~%}}</b></font>"
    },
    // Enemies capturing ally base
    // Противник захватывает базу союзников
    "enemy": {
...

Share this post


Link to post

Short link
Share on other sites

Ah, ok then. It seems to work for me. Post the whole content of this file. Or the file itself.

Edited by konrad509

Share this post


Link to post

Short link
Share on other sites

Ingame I see the formatted string for value "50" but it doesn't change if cap.points is above 50%. Could be an issue with static/dynamic macro.

 

captureBar.zip

Share this post


Link to post

Short link
Share on other sites

Ok, so you want to do this only when enemy is capturing your base. I can't check it now, because I can't find a replay with enemy capturing the base.... :hmm:

But I noticed a mistake in ally->points->format - there's a # missing before the colour 7BEC37.

 

You used the same colour here:

"75": "<font size='18' color='#F50800'><b>{{cap.points%d~%}}</b></font>",
"90": "<font size='20' color='#F50800'><b>{{cap.points%d~%}}</b></font>"

  

Edited by konrad509
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

The ally team should get it too (with green color), but it's not implemented yet.

 

You used the same colour here:

On purpose.

Edited by OlliN

Share this post


Link to post

Short link
Share on other sites

@konrad509, @OlliN, the config macro {{cap.points}} has no separation on the ally and the enemy! so the formula is not working - just not clear on what {{cap.points}} it should work. for example, if you would have {{enemy.cap.points}} and {{ally.cap.points}} it could worked, but now - no (imho)

Edited by Kapany3uk

Share this post


Link to post

Short link
Share on other sites

But I noticed a mistake in ally->points->format - there's a # missing before the colour 7BEC37.

Looks like that was the problem why it didn't work.

 

Does anyone have a replay where both team are capping?

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