HEKPOMAHT Posted June 30, 2018 Share Posted June 30, 2018 вот и я о том же. Одна затыка с задержкой осталась + не знаю, баг это или нет, но макрос {{ready}} ни разу не показал, что противник вышел из боя, где бы я его не прописал, у союзников показывает. Было бы не плохо чтобы его адаптировали для экстраполей. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted July 1, 2018 Author Share Posted July 1, 2018 (edited) Изменения в аддоне "Название карты": добавлен макрос: {{py:map.kind}} - возвращает 'summer', если карта летняя, 'winter' - зимняя, 'desert' - пустынная. переименованы макросы: {{py:maps.nameFileMap}} -> {{py:map.nameFile}} {{py:maps.localeNameMap}} -> {{py:map.localeName}} Edited July 1, 2018 by ktulho 1 @ Quote Link to comment Short link Share on other sites More sharing options...
SmashPuppet Posted July 1, 2018 Share Posted July 1, 2018 (edited) My apologies if this should be in the sight thread. Not sure if here or there is the best place to post. A humble proposal... {{py:map.sightColor}} Instead of long macros for every instance of "color": in battleLabelSight.xc, we could add to sight.xc: { "sight": { // false - disable the mod "enabled": true, "colors": { // Set colours of sight elements depending on season of map "winter": "0xFF96FF", // Pink example "desert": "0x64FF30", // Vibrant Green "summer": "0xD4FFAA" // Light Green }, A working example script of your code: import BigWorldfrom items.vehicles import CAMOUFLAGE_KIND_INDICESfrom xvm_main.python import configfrom xfw import *from xvm_main.python.logger import *autoReloadConfig = FalsedefaultClr = "0xD4FFAA"def readConfig(): global autoReloadConfig, defaultClr, winterClr, desertClr, summerClr autoReloadConfig = config.get('autoReloadConfig') winterClr = config.get('sight/colors/winter') desertClr = config.get('sight/colors/desert') summerClr = config.get('sight/colors/summer')readConfig()@xvm.export('map.sightColour', deterministic=True)def maps_mapKind(): if autoReloadConfig: readConfig () mapKind = CAMOUFLAGE_KIND_INDICES.get(BigWorld.player().guiSessionProvider.arenaVisitor.type.getVehicleCamouflageKind(), None) if mapKind is "winter" and winterClr is not None: return winterClr if mapKind is "desert" and desertClr is not None: return desertClr if mapKind is "summer" and summerClr is not None: return summerClr else: return defaultClr Then we can change colours in just one area. (Edited to reflect Ktulho's solution below) battleLabelSight.xc color example: "textFormat": { "align": "left", "color": "{{.sight.colors.{{py:map.kind}}}}" }, It is only an idea. If not interesting enough, the example may still be useful to others.Amazing work to you and the others (authors and testers!). It's very appreciated. Cheers! Edited July 2, 2018 by SmashPuppet A better solution from Ktulho @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted July 2, 2018 Author Share Posted July 2, 2018 @SmashPuppet 8 часов назад, SmashPuppet сказал: A working example script of your code: Можно немного компактнее: import BigWorld from items.vehicles import CAMOUFLAGE_KIND_INDICES from xvm_main.python import config from xfw import * from xvm_main.python.logger import * defaultClr = "0xD4FFAA" @xvm.export('map.sightColour', deterministic=True) def maps_mapKind(): mapKind = CAMOUFLAGE_KIND_INDICES.get(BigWorld.player().guiSessionProvider.arenaVisitor.type.getVehicleCamouflageKind(), None) colors = config.get('sight/colors') return colors.get(mapKind, defaultClr) 1 @ Quote Link to comment Short link Share on other sites More sharing options...
SmashPuppet Posted July 2, 2018 Share Posted July 2, 2018 (edited) 8 minutes ago, ktulho said: @smashpuppet Can be a little more compact: You are the man. much better. I am not so great with python or knowing the game internals. Just enough to be dangerous though. Learning from you all. Thanks! Edited July 2, 2018 by SmashPuppet @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted July 2, 2018 Author Share Posted July 2, 2018 @SmashPuppet можно обойтись без скрипта: "textFormat": { "align": "left", "color": "{{.sight.colors.{{py:map.kind}}}}" }, 1 @ Quote Link to comment Short link Share on other sites More sharing options...
SmashPuppet Posted July 2, 2018 Share Posted July 2, 2018 4 minutes ago, ktulho said: @SmashPuppet you can do without a script: "textFormat": { "align": "left", "color": "{{.sight.colors.{{py:map.kind}}}}" }, And even more compact. Wow, I totally over thought this one. Again thanks! @ Quote Link to comment Short link Share on other sites More sharing options...
Kaeptn Posted July 19, 2018 Share Posted July 19, 2018 guys, i'd like to request a small script to create a hangar widget that can list locked tanks (CW) in one place (vehicle and time). would be nice if anybody could do that. @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted August 6, 2018 Author Share Posted August 6, 2018 Скрипты для WoT 1.1 CT: minimapSize.py sixthSense.py capture.py infoPremium.py myHP.py beginBattle.py openBrowser.py 1 @ Quote Link to comment Short link Share on other sites More sharing options...
CrazyST Posted August 9, 2018 Share Posted August 9, 2018 @ktulho , день добрый! Подскажи, пожалуйста, можно ли сделать событие, срабатывающее при изменении режима (рандом, ранговый, ...), для использования в "updateEvent"? @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted August 9, 2018 Author Share Posted August 9, 2018 25 минут назад, CrazyST сказал: Подскажи, пожалуйста, можно ли сделать событие, срабатывающее при изменении режима (рандом, ранговый, ...), для использования в "updateEvent"? Можно наверно. По идее, при смене режима обновляется ангар, поискать что-то типа "updateHangare". @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted August 28, 2018 Author Share Posted August 28, 2018 Обновил скрипты в шапке для патча 1.1.0. 3 @ Quote Link to comment Short link Share on other sites More sharing options...
WarPet Posted August 28, 2018 Share Posted August 28, 2018 6 минут назад, ktulho сказал: Обновил скрипты в шапке для патча 1.1.0. Добрый вечер, если использую те, что вот от сюда: В 06.08.2018 в 22:40, ktulho сказал: Скрипты для WoT 1.1 CT: minimapSize.py sixthSense.py capture.py infoPremium.py myHP.py beginBattle.py openBrowser.py скачивать обновленные из шапки нужно? @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted August 28, 2018 Author Share Posted August 28, 2018 Только что, Peqpepu сказал: скачивать обновленные из шапки нужно? Нет, там тоже самое. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
steaxch Posted August 29, 2018 Share Posted August 29, 2018 @ktulho привет, смотрю ты во многие скрипты добавил from xfw_actionscript.python import * у меня есть пара своих, мне тоже нужно добавить? ЗЫ. а в твоем boosters.py не нужно добавлять? @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted August 29, 2018 Author Share Posted August 29, 2018 1 минуту назад, steaxch сказал: у меня есть пара своих, мне тоже нужно добавить? Нужно добавлять, если в скрипте создаешь свои события (as_event('ON_XXX')) 2 @ Quote Link to comment Short link Share on other sites More sharing options...
Slava7572 Posted August 29, 2018 Share Posted August 29, 2018 25 минут назад, ktulho сказал: Нужно добавлять, если в скрипте создаешь свои события (as_event('ON_XXX')) Получается эти будут работать,ничего добавлять не нужно,Саш? @ Quote Link to comment Short link Share on other sites More sharing options...
ktulho Posted August 29, 2018 Author Share Posted August 29, 2018 10 минут назад, Slava7572 сказал: Получается эти будут работать Должны. @ Quote Link to comment Short link Share on other sites More sharing options...
Slava7572 Posted August 29, 2018 Share Posted August 29, 2018 1 час назад, ktulho сказал: Должны. Спасибо за помощь)) @ Quote Link to comment Short link Share on other sites More sharing options...
Pensioner Posted September 5, 2018 Share Posted September 5, 2018 В 29.08.2018 в 16:11, ktulho сказал: Не знаю может уже было такое предложение, вопрос вот какой, можно ли в макрос "Таймер для шестого чувства" добавить ручной запуск. К примеру знаеш что был долго в засвете и лампа не срабатывала, потом спрятался и пережидаешь пока пропадёшь из засвета, жмёшь клавишу и таймер показывает время (теоретически) после которого ты уже не светишься. @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
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.