Jump to content
Korean Random
SmashPuppet

Advanced Hit/Humorous Markers (py_macro)

Recommended Posts

I would call this addon a script that is "just for fun". It does not add much of anything important to improve or enhance game play, but it might make you smile. =D

Over the years, I have found myself here often and have learned quite a lot. (Unfortunately, I have not yet learned Russian though!) =). So it only seems fair to share with everyone a little something I wrote. A simple python script. I have been using it in my own config since about a year ago and without any issue. No slowing the game down or worries about new versions. The nature of the script doesn't rely much on the game itself. Just how you use it in the config.
Though there has been some significant changes to help make things easier and simplify it's use for other languages. Just drop it in and away you go if your config is close to default.
If not, no sweat! Below is a step by step install process. Easy!

 

Very small sample of what it does:

Images:

 

 


ddmOTM.png.3782721c7a9653a29e6c4d0f9c531d31.png

IKlwcZW.thumb.png.bafc2d91f9e3dfc6b3b7a6ebef2518e5.png
 

 


What it does, is it simply randomizes text that is stored in a config file and is displayed as part of the OTM's when dealing damage or destroying another player via markers.xc section. Both as yourself and the other players in the battle. I use it to add a little humour to the game.
You can now enable and disable certain sections of the config. Enabling the default section for markers_ahmUTData.xc will turn on the built-in counter and override any settings or arguments you have passed on to the macro.

 

{{py:ahm.deathMSG('{{vtype-key}}', '{{squad}}', 'top|bottom')}}:
Use to display custom randomized text from config file for upper and/or lower OTM while checking if squad and vehicle type.
Currently Only NA and a very rough RU - (needs a Russian speaker to correct my horrible attempt!). You can see how languages are added by simply looking at markers_ahmData.xc


{{py:ahm.utMsg('{{my-frags}}', 'counter|random')}}:
Use to display frag message dependent on how many kills you have. Works well with UT Announcer mods. Change config file to match your audio mod if you use one.
2nd argument is for static messages - 'counter' or randomized messages - 'random'
Known Issue: {{my-frags}} does not seem to keep track of "blind shot kills". A kill when the destroyed vehicle was invisible at the time. I can't help this. Bug the XVM devs ;)  
Currently Only NA and a very rough RU - (needs a Russian speaker to correct my horrible attempt!). You can see how languages are added by simply looking at markers_ahmUTData.xc
As long as a language is in the config, it should work seemlessly, right out of the box.


{{py:ahm.sDmg('{{ally?E|A}}dmg_kind', '{{py:ahm.dmg-kind-key('{{dmg-kind}}')}}')}}
Used to display which texts from the proper config section for damage types. Tip: Leave shot blank as it can be annoying! =)
I cannot see what other uses one might have other than what it was intended for. But here it is. It is meant to simplify the config.
Texts found in markers_ahmData.xc, specialDamage section.


{{py:ahm.dmg-kind-key('{{dmg-kind}}')}}
There is no {{dmg-kind-key}} macro in xvm, similar to say, {{vtype-key}}.
This again, simplifies the config and keeps icons to a minimum. (naming schemes)


{{py:ahm.medals('{{frags}}')}}
Another exclusive/dependant macro to AHM. Used to pick and display medals achieved by other players.
This again, simplifies the config. I see no other use outside this addon.


Installation:

In @xvm.xc file, add the following somewhere after "markers": ${"markers.xc":"markers"},

 


@xvm.xc
 

    "ahm": ${"markers_advancedHitMarkers.xc":"ahm"},                    // Over-target markers - Advanced Hit Markers.
    "ahmData": ${"markers_ahmData.xc":"ahmMSG"},                        // Over-target markers - Advanced Hit Markers.
    "ahmUTData": ${"markers_ahmUTData.xc":"ahmUTMSG"},                  // Over-target markers - Advanced Hit Markers.
 

@xvm.xc

 

In markersAliveNormal.xc file, change:

def.damageText section:

 

 

 

 

      // Rising speed of displayed damage (float up speed).
      // Время отображения отлетающего урона.
      "speed": 6,
      // Maximum distance of target for which damage rises.
      // Расстояние, на которое отлетает урон.
      "maxRange": 100,
      // Text for normal damage (see description of macros in the macros.txt).
      // Текст при обычном уроне (см. описание макросов в macros.txt).
    "blowupMessage":        ${"markers_AdvancedHitMarkers.xc": "ahm.them.alive.blowupMessage"},
    "damageMessage":        ${"markers_AdvancedHitMarkers.xc": "ahm.them.alive.damageMessage"}
    },
 

ally.damageText section:

 

 

 

 

    // Floating damage values for ally, player, squadman.
    // Всплывающий урон для союзника, игрока, взводного.
    "damageText": {
      "$ref": { "path":"def.damageText" }
    },
    "damageTextPlayer": {
    "damageMessage": ${"def.damageText.damageMessage"},
    "blowupMessage": ${"markers_AdvancedHitMarkers.xc": "ahm.me.alive.blowupMessage"}
    },
    "damageTextSquadman": {
      "$ref": { "path":"def.damageText" }
    },
 

enemy.damageText section:

 

 

 

 

    // Floating damage values for ally, player, squadman.
    // Всплывающий урон для союзника, игрока, взводного.
    "damageText": {
      "$ref": { "path":"def.damageText" }
    },
    "damageTextPlayer": {
    "damageMessage": ${"def.damageText.damageMessage"},
    "blowupMessage": ${"markers_AdvancedHitMarkers.xc": "ahm.me.alive.blowupMessage"}
    },
    "damageTextSquadman": {
      "$ref": { "path":"def.damageText" }
    },
 

markersAliveNormal.xc

 

In markersDeadNormal.xc file, change:

def.damageText section:

 

 

 

 

      // Rising speed of displayed damage (float up speed).
      // Время отображения отлетающего урона.
      "speed": 6,
      // Maximum distance of target for which damage rises.
      // Расстояние, на которое отлетает урон.
      "maxRange": 100,
      // Text for normal damage (see description of macros in the macros.txt).
    "blowupMessage":        ${"markers_AdvancedHitMarkers.xc": "ahm.them.dead.blowupMessage"},
    "damageMessage":        ${"markers_AdvancedHitMarkers.xc": "ahm.them.dead.damageMessage"}
    }
 

ally.damageText section:

 

 

 

 

    // Floating damage values for ally, player, squadman.
    // Всплывающий урон для союзника, игрока, взводного.
    // Text for normal damage (see description of macros in the macros.txt).
    "damageText": {
      "$ref": { "path":"def.damageText" }
    },
    "damageTextPlayer": {
    "blowupMessage":    ${"markers_AdvancedHitMarkers.xc": "ahm.me.dead.blowupMessage"},
    "damageMessage":    ${"markers_AdvancedHitMarkers.xc": "ahm.me.dead.damageMessage"}
    },
    "damageTextSquadman": {
      "$ref": { "path":"def.damageText" }
    },
 

enemy.damageText section:

 

 

 

 

    // Floating damage values for ally, player, squadman.
    // Всплывающий урон для союзника, игрока, взводного.
    "damageText": {
      "$ref": { "path":"def.damageText" }
    },
    "damageTextPlayer": {
    "blowupMessage":    ${"markers_AdvancedHitMarkers.xc": "ahm.me.dead.blowupMessage"},
    "damageMessage":    ${"markers_AdvancedHitMarkers.xc": "ahm.me.dead.damageMessage"}
    },
    "damageTextSquadman": {
      "$ref": { "path":"def.damageText" }
    },
 

markersDeadNormal.xc
 
Then add these .xc files to res_mods/configs/xvm/default (or to your own config folder if that is what you are doing)

markers_ahmUTData.xc

markers_ahmData.xc

markers_AdvancedHitMarkers.xc

 

Then add these python scripts to res_mods/configs/xvm/py_macro

collection.py  by Ktulho - from THIS post.

advancedHitMarkers.py

And then add the icon files to res_mods/mods/shared_resources/xvm/res/icons

ahm_icons.zip

 

To give you an idea of what and how many random messages you can have, here is my own markers_ahmData.xc file. ( included in the archive )

 


markers_ahmData.xc
 

// SmashPuppet(NA) October 2016-2017 - Advanced Hit Markers for use with markers.xc (OTM)
// https://koreanrandom.com/forum/topic/42480-dynamic-damage-over-target-markers-py_macro/
// Part of Advanced Hit Markers (markers_ahmData.xc) - SmashPuppet(NA)
// Usage example:
//
// {{py:ahm.deathMSG( '{{vtype-key}}', '{{squad}}', 'top|bottom')}} - The only argument that should be changed is the third.  
// Third argument can either be 'top' or 'bottom' only. This tells the macro which part of the OTM to affect - Required.
// If a language does not exist in markers_ahmData.xc, 'en' or 'ru' is used as default. Depends on region.
// Add more languages to markers_ahmData.xc if you want another. Please share!
// Cheers from Canada! =)
// formatting with HTML allowed. Macros allowed
{
    "ahmMSG": {

        "enabled": true,

        "lang": {
            "en": {
                "specialDmg": {

                    "enabled": true,

                    "Edmg_kind": { // edit here to expand or change the {{dmg-kind}} text. / called by {{.markers.Edmg_kind.{{dmg-kind}}}} in res_mods\configs\xvm\SmashPuppet\various\markers\smashMessages.xc 
                        "fire": "              {{hp-ratio>=11?<font size=\'11\'>HE LEAKIN!</font>|{{hp-ratio<=10?<font size=\'11\'>Roasted!</font>}}}}", // example of how you can have the text change over time/current hp ratio.
                        "world_collision": "               Hey this HuRTs!",
                        "ramming": "               oOO it TiCKLeS!",
                        "shot": "" // Leave blank if you find this too annoying
                    },
                    "Admg_kind": { // edit here to expand or change the {{dmg-kind}} text. / called by {{.markers.Admg_kind.{{dmg-kind}}}} in res_mods\configs\xvm\SmashPuppet\various\markers\smashMessages.xc 
                        "fire": "              {{hp-ratio>=11?<font size=\'11\'>HE LEAKIN!</font>|{{hp-ratio<=10?<font size=\'11\'>SizZlIng!</font>}}}}", // example of how you can have the text change over time/current hp ratio.
                        "world_collision": "               ow. owie. OUCH!",
                        "ramming": "               Cootchy-KoO!",
                        "shot": "" // Leave blank if you find this too annoying
                    }
                },

                "medals": { // Text replacement prefix header for any other player who achieves it (ally/enemy kills - not you!)

                    "enabled": true,

                    "4": "<font face='Monofonto' size='12' align='center'><font size='14' color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font> gets\n</font><font size='10'>FIGHTER!</font>",
                    "6": "<font face='Monofonto' size='12' align='center'><font sixe='14' color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font> gets\n</font><font size='10'>TOP GUN!</font>",
                    "8": "{{level>=5?<font face='Monofonto' size='12' align='center'><font color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font> gets\n</font><font size='10'>RADLEY\nWALTER'S!</font>}}",
                    "10": "{{level>=5?<font face='Monofonto' size='12' align='center'><font color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font> gets\n</font><font size='10'>POOL'S!</font>}}",
                    "14": "{{level>=5?<font face='Monofonto' size='12' align='center'><font color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font> gets\n</font><font size='10'>Raseiniai\nHeroes!</font>}}",
                    "16": "Show Off" // Domination mode? Grand Battles?
                },

                "top": {
                    "squad": {
                        "Man Down!": "1",
                        "I SCREWED UP!": "2",
                        "I Tried. I Died!": "3",
                        "They Killed Kenny!": "4",
                        "I Shit the Bed!": "5",
                        "F.U.B.A.R!!!": "6",
                        "N.F.G!!!": "7",
                        "<font size='12'>{{name}}.exe\nStopped Working</font>": "8"
                    },
                    "SPG": {
                        "Clicker Lost!": "1",
                        "Smack Down!": "2",
                        "Sky Cancer Remission!": "3",
                        "SPG Gone!": "4",
                        "Oh Snap!": "5",
                        "ToOdles!": "6",
                        "<font size='12'>{{vtype-l}}.EXE\nStopped Working</font>": "7"
                    },
                    "LT": {
                        "SWATTED!": "1",
                        "LIGHTS OUT!": "2",
                        "RAID?!": "3",
                        "LT Down!": "4",
                        "Wut?": "5",
                        "BUSTED!": "6",
                        "Turd Flushed!": "7",
                        "<font size='12'>{{vehicle-short}}'s\nSUCK!</font>": "8"
                    },
                    "HT": {
                        "Learn to Heavy!": "1",
                        "Stupid is Stupid!": "2",
                        "Big Boy DOWN": "3",
                        "HT Down!": "4",
                        "Huh?": "5",
                        "I'll be Back!": "6",
                        "<font size='12'>{{vtype-l}}.EXE\nStopped Working</font>": "7"
                    },
                    "MT": {
                        "He did it WRONG!": "1",
                        "Medium WHERE?!": "2",
                        "Flanker Flunked!": "3",
                        "SMRT smart!": "4",
                        "YOLO!": "5",
                        "<font size='12'>{{vtype-l}}.EXE\nStopped Working</font>": "6"
                    },
                    "TD": {
                        "How NOT to HIDE!": "1",
                        "TD? or not TD?!": "2",
                        "Camp\nFailure!": "3",
                        "TD Down!": "4",
                        "YIKES!": "5",
                        "Well Shit...": "6",
                        "<font size='12'>{{vtype-l}}.EXE\nStopped Working</font>": "7"
                    }
                },

                "bottom": {
                    "SPG": {
                        "Click finger Snapped!": "1",
                        "Toss the Umbrellas!": "2",
                        "Cancer Removed!": "3",
                        "Scumbag Arty Removed!": "4",
                        "RAGE QUIT!!!": "5",
                        "Next time, USE LUBE!": "6",
                        "Still your DADDY!": "7",
                        "Ya look like a b4 picture!": "8",
                        "I wish I cared.": "9",
                        "Your face is mishapen!": "10",
                        "Nice one Butterpants!": "11",
                        "Clickity Click!\nPiece of Sh..": "12",
                        "Acking fusshole!": "13",
                        "Shoulda bought a Pinto": "14",
                        "Fake News!": "15"
                    },
                    "LT": {
                        "Squished like a Bug!": "1",
                        "Disposed!": "2",
                        "Ass  Kicked!": "3",
                        "My Eyes! We're blind!": "4",
                        "You're so fake\nBarbie's Jealous!": "5",
                        "MEDIC!!!": "6",
                        "Lead Magnet! Ahhhgh!": "7",
                        "Cheats!! Hacks!\nSORCERY!!": "8",
                        "Jerk-Bitch! Idget! Assbutt!": "9",
                        "It's OK if you\nwanna drop dead.": "10",
                        "You hit the JERKpot!": "11",
                        "My other ride's your mom!": "12",
                        "Acking fusshole!": "13",
                        "CrapTastic!": "14",
                        "Hoser!": "15",
                        "Fake News!": "16"
                    },
                    "MT": {
                        "Up Yours!": "1",
                        "Time to Uninstall!": "2",
                        "REPORTED!!!": "3",
                        "Goodbye Cruel World!": "4",
                        "May you Stink Forever!": "5",
                        "I did it Wrong!": "6",
                        "I did it wrong AGAIN!": "7",
                        "SORCERY!!!": "8",
                        "You're not half the\nman your MOM is.": "9",
                        "Can I have your head\nfor my rock garden?": "10",
                        "Your gene pool could\nuse some chlorine!": "11",
                        "Nonsense!": "12",
                        "Screw You!": "13",
                        "Ya look like a b4 picture!": "14",
                        "Pickle Smoocher!": "15",
                        "These undies were fresh!": "16",
                        "Fake News!": "17"
                    },
                    "TD": {
                        "Learn to TD!": "1",
                        "Needed a Bigger Bush!": "2",
                        "The Cake is a Lie!": "3",
                        "Are your\nparents cousins?": "4",
                        "I meant to do that.": "5",
                        "I Just Pooped a Little.": "6",
                        "Tank-tard mode off!": "7",
                        "BAD's my middle name!": "8",
                        "So THAT just\nhappened.": "9",
                        "Kiss my metallic ass!": "10",
                        "Die Hipster Scum!": "11",
                        "Who's the TD here?": "12",
                        "It's OK if you\nwanna drop dead.": "13",
                        "Your face is mishapen!": "14",
                        "What EVIL magic is this?": "15",
                        "You're a Butt Knuckle!": "16"
                    },
                    "HT": {
                        "Another Baddie!": "1",
                        "How not to Heavy!": "2",
                        "Destroyed!": "3",
                        "FFS!!!": "4",
                        "BAAAAAAD!!!": "5",
                        "Nice shot Rubbernuts!": "6",
                        "I HATE THIS GAME!": "7",
                        "I dislike you. . .": "8",
                        "I'm the Fuck-Up Fairy!": "9",
                        "Weapons Grade\nDouche Canoe!": "10",
                        "Street smart.\nSesame Street smart.": "11",
                        "You look like a\nbearded woman!": "12",
                        "Ooo I dropped the soap!": "13",
                        "Nice one Butterpants!": "14",
                        "Mexico's paying for this!": "15",
                        "I'm a Butt Knuckle!": "16"
                    }
                }
            },

            // Extremely crude attempt at Russian entries. If you speak Russian, please correct/change/add and share!
            // Чрезвычайно грубая попытка русских записей. Если вы говорите по-русски, пожалуйста, исправьте/измените/добавьте и поделитесь!
            "ru": {

                "specialDmg": {

                    "enabled": true,

                    "Edmg_kind": { // отредактируйте здесь, чтобы развернуть или изменить текст {{dmg-kind}}.
                        // пожар
                        "fire": "              {{hp-ratio>=11?<font size=\'11\'>У кого-нибудь есть зефир?</font>|{{hp-ratio<=10?<font size=\'11\'>Хрустящие!</font>}}}}", // example of how you can have the text change over time/current hp ratio.
                        // падение
                        "world_collision": "          Это действительно больно!",
                        // таран
                        "ramming": "        любовь еще, быть может!",
                        // атака
                        "shot": "" // Оставьте пустым, если вы обнаружите, что это слишком раздражает
                    },

                    "Admg_kind": { // отредактируйте здесь, чтобы развернуть или изменить текст {{dmg-kind}}. 
                        // пожар
                        "fire": "              {{hp-ratio>=11?<font size=\'11\'>У кого-нибудь есть зефир?</font>|{{hp-ratio<=10?<font size=\'11\'>Хрустящие!</font>}}}}", // example of how you can have the text change over time/current hp ratio.
                        // падение
                        "world_collision": "               Ой-ой-ой!",
                        // таран
                        "ramming": "               Я вас любил!",
                        // атака
                        "shot": "" // Оставьте пустым, если вы обнаружите, что это слишком раздражает
                    }
                },

                "medals": { // Заголовок префикса замены текста для любого другого игрока, который достигает его (союзник/враг убивает - не вы!)

                    "enabled": true,
 
                    "4": "<font face='Monofonto' size='12' align='center'><font size='14' color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font>\nполучает\n</font><font size='10'>истребитель!</font>",
                    "6": "<font face='Monofonto' size='12' align='center'><font sixe='14' color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font>\nполучает\n</font><font size='10'>Воин!</font>",
                    "8": "{{level>=5?<font face='Monofonto' size='12' align='center'><font color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font>\nполучает\n</font><font size='10'>Рэдли-Уолтерса!</font>}}",
                    "10": "{{level>=5?<font face='Monofonto' size='12' align='center'><font color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font>\nполучает\n</font><font size='10'>Пула!</font>}}",
                    "14": "{{level>=5?<font face='Monofonto' size='12' align='center'><font color='{{ally?{{.minimap.labelsData.colors.txt.enemy_alive}}|{{.minimap.labelsData.colors.txt.ally_alive}}}}'>{{py:killerName('{{name}}')}}</font>\nполучает\n</font><font size='10'>героев\nРасейняя!</font>}}",
                    "16": "Выпендриваться" // Режим доминирования? Великие сражения?
                },

                "top": {
                    "squad": {
                        "Человек вниз!": "1",
                        "Я облажался!": "2",
                        "Я Пытался\nя умер!": "3",
                        "Они убили Кенни!": "4",
                        "Я Дерьмо\nкровать!": "5",
                        "КРАНТЫ!!!": "6"
                    },
                    "SPG": {
                        "зазывала\nЗатерянный!": "1",
                        "Обрушить!": "2",
                        "Аэрозоль для\nнасекомых!": "3",
                        "Унесенные!": "4",
                        "Давай!": "5",
                        "Будь что будет!": "6"
                    },
                    "LT": {
                        "Прихлопнул!": "1",
                        "Отбой!": "2",
                        "Аэрозоль для\nнасекомых?!": "3",
                        "ЛТ вниз!": "4",
                        "как жаль!": "5",
                        "арестованный!": "6",
                        "Какашка\nПромываемый!": "7"
                    },
                    "HT": {
                        "Научитесь\nтяжелому!": "1",
                        "глупость так\nже глупо!": "2",
                        "Большой мальчик\nвниз": "3",
                        "ТТ вниз!": "4",
                        "Да?": "5",
                        "Я вернусь!": "6",
                        "Пиф! Ой!": "7"
                    },
                    "MT": {
                        "Он сделал это\nНЕПРАВИЛЬНО!": "1",
                        "Средние редкие?!": "2",
                        "Фланкер расположен!": "3",
                        "Не умный!": "4",
                        "Живем один раз!": "5"
                    },
                    "TD": {
                        "Как НЕ СКРЫТЬ!": "1",
                        "ПТ или нет ПТ!?": "2",
                        "Сбой лагеря!": "3",
                        "ПТ вниз!": "4",
                        "Ой ой!": "5",
                        "Ну Дерьмо ...": "6"
                    }
                },

                "bottom": {
                    "SPG": {
                        "Щелчок пальцем\nсломан!": "1",
                        "Бросьте Зонтики!": "2",
                        "Рак Удален!": "3",
                        "подонок САУ\nУдалены!": "4",
                        "Ярость - Выход!": "5",
                        "В следующий раз,\nИспользовать смазку!": "6",
                        "Тем не менее ваш ПАПА!": "7",
                        "Я похож на b4 картины!": "8",
                        "Я хотел бы я заботилась.": "9",
                        "Ваше лицо\nдеформировано!": "10",
                        "Хороший один\nБаттерпантс!": "11",
                        "щелчок пальцем\nостановлен!": "12",
                        "Поддельные\nновости!": "13"
                    },
                    "LT": {
                        "Сплющенный как Буг!": "1",
                        "Выбытие!": "2",
                        "Задница!": "3",
                        "!Мои глаза Мы слепы!": "4",
                        "Ты такая фальшивая,\nдаже Барби ревнует!": "5",
                        "МЕДИК!!!": "6",
                        "Ведущий магнит Ahhhgh!": "7",
                        "Чит!\nЧерная магия!": "8",
                        "Это нормально, если вы \nwanna офигительно.": "9",
                        "Вы попали в JERKpot!": "10",
                        "Моя другая ездить в вашей маме!": "11",
                        "Поддельные новости!": "12",
                        "Близо́к локото́к, да не уку́сишь": "13"
                    },
                    "MT": {
                        "Отвали!": "1",
                        "Время\nдеинсталлировать!": "2",
                        "ВЫСТУПИЛ !!!": "3",
                        "Прощай\nжестокий мир!": "4",
                        "Может ты\nвонь навсегда!": "5",
                        "Я сделал это\nнеправильно!": "6",
                        "Я сделал это\nнеправильно РАЗ!": "7",
                        "КОЛДОВСТВО !!!": "8",
                        "Вы не половина\nman ваша мама.": "9",
                        "Еще одна голова для\nмоего горного сада!": "10",
                        "Ваш генофонд может \nuse некоторого хлора!": "11",
                        "Чепуха!": "12",
                        "Пошел ты!": "13",
                        "Я похож на b4 картины!": "14",
                        "Соленый поцелуй!": "15",
                        "Эти неумирает были свежими!": "16",
                        "Поддельные новости!": "17"
                    },
                    "TD": {
                        "Учитесь ПТ!": "1",
                        "Мне нужен был\nбольшой куст!": "2",
                        "Торт является Ли!": "3",
                        "Являются ли ваши \nparents кузены?": "4",
                        "Я имел в виду, чтобы сделать это.": "5",
                        "Я просто измотан немного.": "6",
                        "Режим Tank-Тард прочь!": "7",
                        "Мое другое\nимя - 'плохое'!": "8",
                        "Так что только\nчто произошло?": "9",
                        "Поцелуй меня в металлический зад!": "10",
                        "Кто ТД здесь?": "11",
                        "Это нормально, если вы\nwanna офигительно.": "12",
                        "Ваше лицо\nдеформируется!": "13",
                        "Что ЗЛО магия это?": "14"
                    },
                    "HT": {
                        "Другой злодей!": "1",
                        "Как не тяжело!": "2",
                        "Разрушенный!": "3",
                        "Я ненавижу эту игру!": "4",
                        "Я не люблю тебя...": "5",
                        "у вас лицо\nбородатой женщины!": "6",
                        "Ууу я уронил мыло!": "7",
                        "хороший Масляные брюки!": "8",
                        "Мексика платить за это!": "9"
                    }
                }
            }
        }
    }
}
 


 
 
Just by looking at it, many of you can easily figure out how the script works. If you happen to know more than one language and have an itch to help out, please by all means, fix an existing or add a new language and share here! This is a work in progress and a learning experience for me. There is a lot of talent here, so any recommendations or changes are welcome!

The Russian frag counter has been made to synchronize with night_dragon_on's frags announcer audio config for XVM. Found here: https://koreanrandom.com/forum/topic/18955-замена-звуков-sound-changing-звуки-на-различные-события/

ToDo: I would like to add a {{hit-by-shellType}} macro. That would actually be useful and informative. Until then, I'm learning though. Unless someone beats me to it. ;) (hint, hint)

 

The entire archive:

advancedHitMarkers_v2.5.zip

Enjoy!


Changelog:

 


SmashPuppet (NA) | ahm
Advanced Hit Markers (Formerly Dynamic Damage Messages OTM)
https://koreanrandom.com/forum/topic/42480-dynamic-damage-over-target-markers-py_macro/
______________________________
06/01/18 0.9.21.0.2 (XVM 7.3.2)
^ Changed name to Advanced Hit Markers - (Shorter. Easier to say)
^ renamed nearly all files
^ Changed version to 2.5
^ recombined both scripts back into one
+ Now auto detects language. No longer have to pass {{region}} in macro
^ Now entire config based on language. English no longer hardcoded in sections by default
+ Added medals and specialText macros. ({{py:medals}} for other player achievements and
  {{py:specialText}} for damage types.
^ Finished (attempt) at Russian language entries. Feel free to correct and share!
* TODO: add shell type macro. Make ahm an actual addon with it's own local macros.

26/12/17 0.9.21.0.2 (XVM 7.3.2)
^ Changed version to 2.4
+ Added random messages to utMSG.py macro
^ updated markers files
^ updated RU translations some more. Still a MESS! =D 

16/12/17 0.9.21.0.2 (XVM 7.3.2)
^ Changed version to 2.3
^ Split up the ddmOTM macros into separate python scripts. utMSG.py and ddmOTM.py
- ddmOTM macros no longer use json
+ ddmOTM macros now use .xc config files
^ all markers files updated
+ added additional language "examples" to markers_ddmData.xc and markers_utData.xc
* TODO: Actual language entries! Currently RU only and it is very bad. ;) Please help!
! Note: It is advised that you delete the old config before updating to this version.
  py_macro and SmashPuppet folders in particular.

16/12/17 0.9.21.0.1 (XVM 7.3.0)
^ Changed version to 2.2
+ Added ability to add more languages (see res_mods\configs\xvm\data\ddmOTM\deathMessages.json)
+ Added use of py_macro by Ktulho (Korean Random Forums) {{py:killerName('')}} in markers.xc
  https://koreanrandom.com/forum/topic/39885-сборник-py_macro/

10/12/17 0.9.20.1.4 (XVM 7.2.4)
^ Changed version to 2.1
^ Fixed damage messages for fire, ramming, world collisions etc.

 

Edited by SmashPuppet
updated script(s)
  • Upvote 11

Share this post


Link to post

Short link
Share on other sites
3 minutes ago, DKRUBEN said:

nice work dude

 

Cheers! The next thing to do is to add more languages or different insults/slang in other languages. I would imagine that some of the strings in the json file will not translate at all to Russian for instance.

 

In time perhaps. :smile:

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

self.botton = {}

self.to p = {} ?

 

self.bottom= {[
	  #SPG 'UI_SPG':
	  'SPG': [
	  'UI_SPG':    'SPG Mensege',
      'UI_SPG_1':  'Click finger Snapped!',
      'UI_SPG_2':  'Toss the Umbrellas!',
      'UI_SPG_3':  'Cancer Removed!',
      'UI_SPG_4':  'Scumbag Arty Removed!',
      'UI_SPG_5':  'RAGE QUIT!!!',
	  'UI_SPG_6':  'Next time, USE LUBE!',
	  'UI_SPG_7':  'Still your DADDY!',
	  'UI_SPG_8':  'Ya look like a b4 picture!',
	  'UI_SPG_9':  'I wish I cared.',
	  'UI_SPG_10': 'Your face is mishapen!',
	  'UI_SPG_11': 'Nice one Butterpants!',
	  'UI_SPG_12': 'Clickity Click!\nPiece of Sh..',
	  'UI_SPG_13': 'Acking fusshole!',
	  'UI_SPG_14': 'Shoulda bought a Pinto',
	  'UI_SPG_15': 'Fake News!'
	  ],
	  'LT': [
	  'UI_LT':	  'LT Mensege',
      'UI_LT_1':  'Squished like a Bug!',
      'UI_LT_2':  'Disposed!',
      'UI_LT_3':  'Ass  Kicked!',
      'UI_LT_4':  'My Eyes! We are blind!',
      'UI_LT_5':  'You are so fake\nBarbies Jealous!',
      'UI_LT_6':  'MEDIC!!!',
      'UI_LT_7':  'Lead Magnet! Ahhhgh!',
      'UI_LT_8':  'Cheats!! Hacks!\nSORCERY!!',
	  'UI_LT_9':  'Jerk-Bitch! Idget! Assbutt!',
	  'UI_LT_10': 'Its OK if you\nwanna drop dead.',
	  'UI_LT_11': 'You hit the JERKpot!',
	  'UI_LT_12': 'My other rides your mom!',
	  'UI_LT_13': 'Acking fusshole!',
	  'UI_LT_14': 'CrapTastic!": "14',
	  'UI_LT_15': 'Hoser!',
	  'UI_LT_16': 'Fake News!'
	  ],
	  'MT': [
	  'UI_MT':    'MT Mensege',
      'UI_MT_1':  'Up Yours!',
      'UI_MT_2':  'Time to Uninstall!',
      'UI_MT_3':  'REPORTED!!!',
      'UI_MT_4':  'Goodbye Cruel World!',
      'UI_MT_5':  'May you Stink Forever!',
      'UI_MT_6':  'I did it Wrong!',
      'UI_MT_7':  'I did it wrong AGAIN!',
	  'UI_MT_8':  'SORCERY!!!',
	  'UI_MT_9':  'You are not half the\nman your MOM is.',
	  'UI_MT_10': 'Can I have your head\nfor my rock garden?',
	  'UI_MT_11': 'Your gene pool could\nuse some chlorine!',
	  'UI_MT_12': 'Nonsense!',
	  'UI_MT_13': 'Screw You!',
	  'UI_MT_14': 'Ya look like a b4 picture!',
	  'UI_MT_15': 'Pickle Smoocher!',
	  'UI_MT_16': 'These undies were fresh!',
	  'UI_MT_17': 'Fake News!'
	  ],
	  'TD': [
	  'UI_TD':	  'TD Mensege',
      'UI_TD_1':  'Learn to TD!',
      'UI_TD_2':  'Needed a Bigger Bush!',
      'UI_TD_3':  'The Cake is a Lie!',
      'UI_TD_4':  'Are your\nparents cousins?',
      'UI_TD_5':  'I meant to do that.',
	  'UI_TD_6':  'I Just Pooped a Little.',
	  'UI_TD_7':  'Tank-tard mode off!',
	  'UI_TD_8':  'BAD my middle name!',
	  'UI_TD_9':  'So THAT just\nhappened.',
	  'UI_TD_10': 'Kiss my metallic ass!',
	  'UI_TD_11': 'Die Hipster Scum!',
	  'UI_TD_12': 'Who the TD here?',
	  'UI_TD_13': 'Its OK if you\nwanna drop dead.',
	  'UI_TD_14': 'Your face is mishapen!',
	  'UI_TD_15': 'What EVIL magic is this?',
	  'UI_TD_16': 'You are a Butt Knuckle!'
	  ],
	  'HT': [
	  'UI_HT':    'HT Mensege'
      'UI_HT_1':  'Another Baddie!',
      'UI_HT_2':  'How not to Heavy!',
      'UI_HT_3':  'Destroyed!',
      'UI_HT_4':  'FFS!!!',
      'UI_HT_5':  'BAAAAAAD!!!',
      'UI_HT_6':  'Nice shot Rubbernuts!',
	  'UI_HT_7':  'I HATE THIS GAME!',
	  'UI_HT_8':  'I dislike you. . .',
	  'UI_HT_9':  'Im the Fuck-Up Fairy!',
	  'UI_HT_10': 'Weapons Grade\nDouche Canoe!',
	  'UI_HT_11': 'Street smart.\nSesame Street smart.',
	  'UI_HT_12': 'You look like a\nbearded woman!',
	  'UI_HT_13': 'Ooo I dropped the soap!',
	  'UI_HT_14': 'Nice one Butterpants!',
	  'UI_HT_15': 'Mexico paying for this!',
	  'UI_HT_16': 'Im a Butt Knuckle!'
      ]
	  ]

 

Edited by DKRUBEN

Share this post


Link to post

Short link
Share on other sites
4 hours ago, DKRUBEN said:

self.botton = {}

self.to p = {} ?

 


self.bottom= {[
	  #SPG 'UI_SPG':
	  'SPG': [
	  'UI_SPG':    'SPG Mensege',
      'UI_SPG_1':  'Click finger Snapped!',
      'UI_SPG_2':  'Toss the Umbrellas!',
      'UI_SPG_3':  'Cancer Removed!',
      'UI_SPG_4':  'Scumbag Arty Removed!',
      'UI_SPG_5':  'RAGE QUIT!!!',
	  'UI_SPG_6':  'Next time, USE LUBE!',
	  'UI_SPG_7':  'Still your DADDY!',
	  'UI_SPG_8':  'Ya look like a b4 picture!',
	  'UI_SPG_9':  'I wish I cared.',
	  'UI_SPG_10': 'Your face is mishapen!',
	  'UI_SPG_11': 'Nice one Butterpants!',
	  'UI_SPG_12': 'Clickity Click!\nPiece of Sh..',
	  'UI_SPG_13': 'Acking fusshole!',
	  'UI_SPG_14': 'Shoulda bought a Pinto',
	  'UI_SPG_15': 'Fake News!'
	  ],
	  'LT': [
	  'UI_LT':	  'LT Mensege',
      'UI_LT_1':  'Squished like a Bug!',
      'UI_LT_2':  'Disposed!',
      'UI_LT_3':  'Ass  Kicked!',
      'UI_LT_4':  'My Eyes! We are blind!',
      'UI_LT_5':  'You are so fake\nBarbies Jealous!',
      'UI_LT_6':  'MEDIC!!!',
      'UI_LT_7':  'Lead Magnet! Ahhhgh!',
      'UI_LT_8':  'Cheats!! Hacks!\nSORCERY!!',
	  'UI_LT_9':  'Jerk-Bitch! Idget! Assbutt!',
	  'UI_LT_10': 'Its OK if you\nwanna drop dead.',
	  'UI_LT_11': 'You hit the JERKpot!',
	  'UI_LT_12': 'My other rides your mom!',
	  'UI_LT_13': 'Acking fusshole!',
	  'UI_LT_14': 'CrapTastic!": "14',
	  'UI_LT_15': 'Hoser!',
	  'UI_LT_16': 'Fake News!'
	  ],
	  'MT': [
	  'UI_MT':    'MT Mensege',
      'UI_MT_1':  'Up Yours!',
      'UI_MT_2':  'Time to Uninstall!',
      'UI_MT_3':  'REPORTED!!!',
      'UI_MT_4':  'Goodbye Cruel World!',
      'UI_MT_5':  'May you Stink Forever!',
      'UI_MT_6':  'I did it Wrong!',
      'UI_MT_7':  'I did it wrong AGAIN!',
	  'UI_MT_8':  'SORCERY!!!',
	  'UI_MT_9':  'You are not half the\nman your MOM is.',
	  'UI_MT_10': 'Can I have your head\nfor my rock garden?',
	  'UI_MT_11': 'Your gene pool could\nuse some chlorine!',
	  'UI_MT_12': 'Nonsense!',
	  'UI_MT_13': 'Screw You!',
	  'UI_MT_14': 'Ya look like a b4 picture!',
	  'UI_MT_15': 'Pickle Smoocher!',
	  'UI_MT_16': 'These undies were fresh!',
	  'UI_MT_17': 'Fake News!'
	  ],
	  'TD': [
	  'UI_TD':	  'TD Mensege',
      'UI_TD_1':  'Learn to TD!',
      'UI_TD_2':  'Needed a Bigger Bush!',
      'UI_TD_3':  'The Cake is a Lie!',
      'UI_TD_4':  'Are your\nparents cousins?',
      'UI_TD_5':  'I meant to do that.',
	  'UI_TD_6':  'I Just Pooped a Little.',
	  'UI_TD_7':  'Tank-tard mode off!',
	  'UI_TD_8':  'BAD my middle name!',
	  'UI_TD_9':  'So THAT just\nhappened.',
	  'UI_TD_10': 'Kiss my metallic ass!',
	  'UI_TD_11': 'Die Hipster Scum!',
	  'UI_TD_12': 'Who the TD here?',
	  'UI_TD_13': 'Its OK if you\nwanna drop dead.',
	  'UI_TD_14': 'Your face is mishapen!',
	  'UI_TD_15': 'What EVIL magic is this?',
	  'UI_TD_16': 'You are a Butt Knuckle!'
	  ],
	  'HT': [
	  'UI_HT':    'HT Mensege'
      'UI_HT_1':  'Another Baddie!',
      'UI_HT_2':  'How not to Heavy!',
      'UI_HT_3':  'Destroyed!',
      'UI_HT_4':  'FFS!!!',
      'UI_HT_5':  'BAAAAAAD!!!',
      'UI_HT_6':  'Nice shot Rubbernuts!',
	  'UI_HT_7':  'I HATE THIS GAME!',
	  'UI_HT_8':  'I dislike you. . .',
	  'UI_HT_9':  'Im the Fuck-Up Fairy!',
	  'UI_HT_10': 'Weapons Grade\nDouche Canoe!',
	  'UI_HT_11': 'Street smart.\nSesame Street smart.',
	  'UI_HT_12': 'You look like a\nbearded woman!',
	  'UI_HT_13': 'Ooo I dropped the soap!',
	  'UI_HT_14': 'Nice one Butterpants!',
	  'UI_HT_15': 'Mexico paying for this!',
	  'UI_HT_16': 'Im a Butt Knuckle!'
      ]
	  ]

 


Not quite sure what you are asking. The json code structure is a bit messed up. It needs to be a certain way for the json python module to read it. It should look like this: (please excuse the lack of line breaks)

 

 

 


{  "top": {    "squad": {      "Man Down!": "1",      "I SCREWED UP!": "2",      "I Tried. I Died!": "3",      "They Killed Kenny!": "4",      "I Shit the Bed!": "5",      "F.U.B.A.R!!!": "6",      "N.F.G!!!": "7"    },
	

 


That snippet above is for the "top" section of the OTM, and if it happens to be a squad mate ( as called by {{py:deathMSG('top, {{squad}}, {{vtype-l}}')}} ). The data pairs need to be as shown above as well. If it is not a squad mate, the python script then moves to the other "top" section of the json file and randomly chooses a string based on {{vtype-l}}.

 

The second data pair ( the number ) in the line, is what the python script uses to randomize. It counts how many lines. In the above case there are 7. So the python script randomly chooses a number between 1 and 7.

 

If you change the data structure of the json file, the script will break.

 

If you want to change the strings, by all means do so. You will do it like this:

 

 


{   "top": {     "squad": {       "Человек вниз!": "1",       "Я ОБРАТИЛСЯ!": "2",       "Я пробовал, я умер!": "3",       "Они убили Кенни!": "4",       "Я дерьм кровать!": "5",       "F.U.B.A.R!!!": "6",       "N.F.G!!!": "7"     },

 

 

Again though, this is just a google translation and well, it might not make much sense to a Russian speaker. :smile: For instance, I know a little French and also know, that directly translating makes little sense. They say some things differently. Anyway...

If you want to add more lines, then do it like this:

 

 

 

 


{  "top": {    "squad": {      "Man Down!": "1",      "I SCREWED UP!": "2",      "I Tried. I Died!": "3",      "They Killed Kenny!": "4",      "I Shit the Bed!": "5",      "F.U.B.A.R!!!": "6",      "N.F.G!!!": "7",      "Big LETDOWN!": "8",      "Sorry!": "9"    },
	

 

 

Now the "squad" section in "top" has 9 lines to randomize instead of the 7 in my original json file.

Here is the entire json file:

deathMessages.json

 

I hope this is making sense for you.
Cheers! 

 

 

 

Also, just to add, if you are wanting to translate to another language. Just edit the existing json file. Soon I will add in new sections to it for each language and add functionality to the python script to check for language.

 

Either by passing on {{region}} and/or {{flag}} as well as allowing for the user to strictly call it by the language's short code. For example,  "en" or "fr" or "ru" etc etc.

But I haven't done this yet. So just editing the existing file, as is, will do for the moment.

 

Cheers!

Edited by SmashPuppet
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

Why do not you try this?

 


import glob
import os
import json

class Release(object):
    def __init__(self):
        self.i18n = os.path.join(self.configPath, 'i18n')
self.clear()

 
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

My knowledge of python is novice at best. The way I did it was the way I knew how. And it worked.

I did try to keep the modules used as part of the default built-in library offered by python. Not everyone (probably most) will have i18n installed.

 

Is i18n part of python install or a separate library?

I do like it but am trying to stay away from external libraries/modules. Unless there is an easy way to make it part of the package?

I'm not sure. Perhaps you know?

Ah, it is also for python 3. Python 2 is needed.

 

However, the provided gettext module looks like it will do the trick.

 

In any case, how it is done isn't too much of a problem. Getting a proper and coherent translations is. :biggrin: We would need that first.

 

I will work on a pseudo translation/locale system for the script tonight. It is mid afternoon here now and need to go shopping first! :laugh: Cheers from Canada!

Before I go, I'll mention that I use the term "translation" loosely.

 

Some of the "sayings" I am using are culturally or regionally specific and may not have any relevant meaning in another country.

 

For instance, "Clickity Click! Piece of sh..." is a reference to an old cartoon called Barba Papa and Barba Mamma - "Clickity Click! Barba Trick!".  Also, in English, the swear word for "poop" rhymes with "click". Of which might not rhyme in a different language.  Let alone a different country knowing about that cartoon. Some "sayings" might be able to be directly translated while others may not...

 

We just need somewhere to start with new languages is all that I'm thinking right now. :smile:
 

Edited by SmashPuppet
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites
В 10/12/2017 в 20:05, SmashPuppet сказал:


Não tem a certeza que você está pedindo. A estrutura de código JSON é um pouco confuso. Ele precisa ser de uma certa maneira para o módulo de json python para lê-lo. Deve olhar como este: (por favor, desculpe a falta de quebras de linha)

  Ocultar conteúdo

 

 



	

 


Esse trecho acima é para a seção "top" da OTM, e se ele passa a ser um companheiro de elenco (como chamado por  {{py: deathMSG ( 'top, {{time}}, {{vtype-l}}' )}} ). Os pares de dados precisa de ser, como mostrado acima, bem. Se não é um companheiro de equipe, o script python então se move para a outra seção "top" do arquivo JSON e aleatoriamente escolhe uma seqüência baseada em {{vtype-l}} .

 

O segundo par de dados (o número) na linha, é o que o script python usa para embaralhar. Ele conta quantas linhas. No caso acima, existem 7. Assim, o script pitão escolhe aleatoriamente um número entre 1 e 7.

 

Se você alterar a estrutura de dados do arquivo json, o script vai quebrar.

 

Se você quer mudar as cordas, por todos os meios fazê-lo. Você vai fazê-lo como este:

  Ocultar conteúdo

 


{ "Top": { "esquadrão": { "! Man down", "1", "! Eu paguei" "2", "Eu tentei, eu estou morto", "3", "Eles mataram Kenny!" "4", "Eu cago na cama!" "5", "FUBAR !!!", "6", "NFG !!!", "7"},

 

 

Novamente, porém, esta é apenas uma Tradução de Google e bem, pode não fazer muito sentido para um alto-falante russo. :smile: Por exemplo, eu sei um pouco de francês e também saber, que traduzindo diretamente faz pouco sentido. Eles dizem que algumas coisas de forma diferente. Enfim ...

Se você quiser adicionar mais linhas, em seguida, fazê-lo como este:

  Ocultar conteúdo

 

 

 



	

 

 

Agora, a seção de "esquadrão" no "top" tem 9 linhas Para tornar aleatório em vez do 7 no meu arquivo JSON originais.

Aqui está todo o arquivo json:

deathMessages.json

 

Espero que isso é fazer sentido para você.
Felicidades! 

 

 

 

Além disso, apenas para acrescentar, se você está querendo traduzir para outro idioma. Basta editar o arquivo json existente. Em breve vou adicionar novas seções para que para cada idioma e adicionar funcionalidade para o script python para verificar para a linguagem.

 

Ou passando em {{região}} e / ou {{flag}} , bem como permitindo que o usuário chamá-lo estritamente pelo código curto do idioma. Por exemplo,  "en"  ou "fr" ou "ru" etc etc.

Mas eu não fiz isso ainda. Então, basta editar o arquivo existente, como é, vai fazer no momento.

 

Felicidades!

 

В 10/12/2017 в 22:43, SmashPuppet сказал:

Meu conhecimento de python é novato na melhor das hipóteses. A maneira que eu fiz era a maneira que eu sabia. E funcionou.

Eu tentei manter os módulos usados como parte do padrão built-in biblioteca oferecida por python. Nem todo mundo (provavelmente a maioria) terá i18n instalado.

 

É parte i18n de python instalar ou uma biblioteca separada?

Eu gosto dele, mas estou tentando ficar longe de bibliotecas / módulos externos. A menos que haja uma maneira fácil de fazê-lo parte do pacote?

Não tenho certeza. Talvez você sabe?

Ah, é também para python 3. Python 2 é necessário.

 

No entanto, o fornecido gettext módulo parece que vai fazer o truque.

 

Em qualquer caso, como é feito não é muito de um problema. Conseguir um traduções adequadas e coerentes é. :biggrin:Precisaríamos de que em primeiro lugar.

 

Vou trabalhar em um sistema de tradução / locale pseudo para a noite script. É no meio da tarde aqui e agora precisa ir às compras em primeiro lugar! :laugh:Cheers do Canadá!

Antes de eu ir, eu vou falar que eu uso o termo "tradução" vagamente.

 

Alguns dos "ditos" Eu estou usando são culturalmente ou regionalmente específico e podem não ter qualquer significado relevante em outro país.

 

For instance, "Clickity Click! Piece of sh..." is a reference to an old cartoon called Barba Papa and Barba Mamma - "Clickity Click! Barba Trick!".  Also, in English, the swear word for "poop" rhymes with "click". Of which might not rhyme in a different language.  Let alone a different country knowing about that cartoon. Some "sayings" might be able to be directly translated while others may not...

 

Nós só precisamos de um lugar para começar com novas linguagens é tudo o que eu estou pensando agora. :smile:
 

:-P

Share this post


Link to post

Short link
Share on other sites

Updated to v2.2

 

Included use of ktulho's {{py:killerName('{{name}}')}}  macro in markers.xc - If other players get medals for kills, the OTM will now tell you.

Added ability to add more languages. Not very elegant but it works. Included is a preliminary Russian language section. If anyone speaks Russian and notices how bad the translation is, feel free to correct it or change it so that it makes sense! :biggrin:

 

It defaults to NA (English) if the macro argument is not satisfied. You may use {{region}} or language short code.

Example: {{py:deathMSG('{{region}}', 'top', '{{squad}}', '{{vtype-l}}')}} or {{py:deathMSG('RU', 'top', '{{squad}}', '{{vtype-l}}')}} or {{py:deathMSG('NA', 'top', '{{squad}}', '{{vtype-l}}')}} etc. etc.

 

I will add more regions/languages as time permits (and if my friends who speak other languages will help!). French, Spanish and Portuguese will most likely be next.

 

Note:

This is a learning experience for me. I plan on "internalizing" some of the arguments for the macro within the python script itself. For instance, finding the {{vtype}} and whether or not you/they are in a squad. Even the language.As well as dumping the json file and simply using a .xc file for the config settings.

 

Until then, cheers!

 

 

Edited by SmashPuppet
  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Updated to version 2.3.

 

No longer uses json file. Now uses .xc file for configuration.

Split up the python macro into two scripts. One for the UT messages and one for the dynamic damage messages.

 

If you use this addon, I would suggest completely removing the previous version as the structure has changed significantly. You will end up with extra files that do nothing if you just overwrite your old install.

 

I realize that a kill counter for UT style kill OTM's can easily be done in the standard config. But this will allow for more flexibility in the future.

 

The config file, markers_ddmData.xc is fairly self explanatory. You can see how adding a new language is easy. There is a somewhat complete Russian entry but it is in bad shape. =) Again, if anyone who feels like helping out? =D We would love you to bits. Haha!

 

Original post updated

 

 Enjoy!

Edited by SmashPuppet
  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

Updated to 2.4.

Updated header post.

 

Added randomization argument to utMSG.py. Worked on "fixing" some of the Russian language section as best I can with what time I have over the holidays here at home. Merry Christmas if you observe btw! :smile:

 

Again, the RU section is a mess. Eventually it will make sense and maybe even be funny too. (hopefully) All depends on the users here! :wink:

 

TODO: "Localize" the "other" player medals section and collision damage section. (Soon!)

 

Question: Is it considered bad practice to directly edit the l10n files? Is it possible to create extra files that can be called upon? If so, can I be pointed in the right direction so that I may learn? 

 

Until then, Cheers to all from Canada!

Share this post


Link to post

Short link
Share on other sites
On 12/10/2017 at 2:19 PM, DKRUBEN said:

Why do not you try this?

 


import glob
import os
import json

class Release(object):
    def __init__(self):
        self.i18n = os.path.join(self.configPath, 'i18n')
self.clear()

 

 

 

Ha! More reading and studying and yes, I now understand what you are saying. Thank you. This is completely possible and will most certainly make this far less messy. Cheers.

Again, python is rather new to me (I'm a perl/php/java kind of guy) but it's starting to make a lot more sense. It is becoming a lot less strange. =) 

Share this post


Link to post

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

 

 

Ha! Mais leitura e estudo e, sim, agora eu entendo o que você está dizendo. Obrigado. Isso é completamente possível e certamente vai fazer isso muito menos confuso. Felicidades.

Mais uma vez, python é bastante novo para mim (eu sou um perl / php / tipo java de cara), mas está começando a fazer muito mais sentido. Está se tornando muito menos estranho. =) 

I'm also new to python, but I try to help what I know.

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

Updated archive and main post to version 2.5.

 

Fairly significant changes. If a language exists in the config, it should work right out of the box on your installation now. Testing with other clients from different regions now works flawlessly. Added a few more macros to streamline the config files and to make the manipulation of the data a little easier. Added l10n to the script where it was needed most. Completely removed any hard coded English from the config and now everything resides in it's own language section.

 

You can now enable or disable entire sections. There is more but not really worth mentioning.

 

Here are a couple of vids. One in English and the other in Russian to see it in action. Better videos with cuts of everything this addon dos as time permits!



English:

 

 

 

Russian:

 

 

 

I'll be out of town for 2 weeks on a business trip. My apologies if I do not get back to you before then.

Enjoy!

It might be worth mentioning that the {{my-frags}} losing count by however many "blind kills" (tank you destroyed was not visible) might only be an issue in replays. I do not yet know if in actual battle... My post implies that it does and it should not.

  • Upvote 2

Share this post


Link to post

Short link
Share on other sites

There is only the sound part that counts the frags? With the bank and other things

Share this post


Link to post

Short link
Share on other sites
32 minutes ago, Slava7572 said:

There is only the sound part that counts the frags? With the bank and other things

 

No. There is a "counter" for texts that can be random or fixed. I know that you can make a counter in the config fairly easily, but you cannot randomize it. The frag counter is only one part of it. Also there are random texts for everyone else that dies as well. Texts based on vehicle type as well as damage type and even platoon/squad mates. So the possibilities are fairly great and varied. Not possible in a standard config. Maybe possible with math but the macros would be monstrous. =) 

 

The video's I should take more time to put together in order to show more clearly. 

Edited by SmashPuppet

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