PolyacovYury / PYmods

Storage for World of Tanks mods.
24 stars 10 forks source link

RadialMenu: Cannot initialize #13

Open prototype464 opened 2 years ago

prototype464 commented 2 years ago

(This same error occurs with this version I got here although I've heard not to trust this site) https://www.pkmods.com/custom-radial-menu-by-polyacov_yury/

Spent 3 hours trying to build this since I absolutely loved this mod before Communication 2.0 wiped it off the map, not initializing due to an error:

2022-01-22 11:39:25.346: ERROR: [EXCEPTION] (<string>, 639):
Traceback (most recent call last):
  File "<string>", line 626, in _findValidMODs
  File "scripts/common/Lib/importlib/__init__.py", line 37, in import_module
  File "scripts/client/gui/mods/mod_RadialMenu.py", line 17, in <module>
ImportError: cannot import name SHORTCUT_SETS

I would love to use it again <3 I'm sure tons of other people would too, this is an amazing mod!

PolyacovYury commented 2 years ago

The mod is currently in a deprecated I-don't-want-to-update-this state, since, IMO, the Communication 2.0 provides the useful features that were originally added by the mod. Convince me otherwise.

prototype464 commented 2 years ago

"Convince me otherwise."

This was my config I used way back in the day on this mod, for me it wasn't just extremely useful because of the extra commands the mod made possible (Everything being a variant so it sounds more natural, different pre-battle greetings, "On my way!" being a radial command, "Fall back, this flank is falling!", etc.)

Most of what I remember when using this mod, it made communication even more impactful, even for random battle standards. Communication 2.0 added a lot to the game for sure, but some people usually end up tunnel visioning and toning it out.

Something I noticed when having such a variable config with all kinds of messages, is that more often, folks would notice that and adjust their play based on that alone, which is what Communication 2.0 should have done more to fix, but didn't for some reason.

I loved this mod a lot because it added the ability to customize the radial menu, and there's no other mod like it. If you don't want to update it, that's fine mate! But these are my reasons why I loved this mod so much back in the day, and I'm sure other folks used it for a similar purpose :>

{
    "default": {
        "default": [
            {
                "title": "Greetings!",
                "icon": "Yes",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "Have fun, all!",
                    "Fight well and never give up!",
                    "KILL THEM ALL HAHAHAHAHA! Oh look, a pretty butterfly!",
                    "Destroy their vehicles and plunder their vaults of silver, to victory we advance!",
                    "Spare not one of the enemies nor their base, take their health and take their pride!",
                    "Some say if you give up before a battle is over, you are more likely to lose!"
                ]
            },
            {
                "title": "Fall-Back!",
                "icon": "Support",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "We're too far forward and they're advancing! Fall back!",
                    "I do say, sir! It is high time to get out of here! Fall back!",
                    "Fall back, lads! This place is overrun!",
                    "Get out of here! Fall back!",
                    "Fall back!"
                ]
            },
            {
                "title": "Onwards!",
                "icon": "Attack",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "Push! Push into them!",
                    "Advance on them! Forwards!",
                    "Move up! Advance on them!"
                ]
            },
            {
                "title": "Defend-the-Base!",
                "icon": "Backtobase",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "Défendre la base!",
                    "Fall back! The base is being attacked!",
                    "The enemy have made it to our base!",
                    "The base is under attack!"
                ]
            },
            {
                "title": "On-my-Way!",
                "icon": "Reload",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "I'm on my way!",
                    "On my way!"
                ]
            },
            {
                "title": "Help!",
                "icon": "Helpme",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "I need support at {ownPos}!",
                    "I need backup! I am at {ownPos}!",
                    "I am in need of support! I am currently at {ownPos}!",
                    "I kind of have a problem over here! Help! I am in {ownPos}!",
                    "Help! I'm at {ownPos}!"
                ]
            }
        ],
        "ally": [
            {
                "title": "Do-not-Rush!",
                "icon": "Stop",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "Don't rush ahead, {name}! Wait up, please!",
                    "Slow down, {name}! We aren't quite there yet, don't get stuck in!",
                    "{name} you are going too far ahead, wait up please!",
                    "{name} if you go too far ahead, I can't support you!"
                ]
            },
            {
                "title": "Advance!",
                "icon": "Followme",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "{name} please move forward, you are too far behind!",
                    "You need to move up, {name}! You're too far back!",
                    "Please advance, {name}!",
                    "Please move forward, {name}!"
                ]
            },
            {
                "title": "Blocking!",
                "icon": "Stop",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "{name}, your {vehicle} is in my line of fire!",
                    "{name}, get your fatass {vehicle} out of my line of fire!",
                    "{name}, I am trying to fire here. Your morbidly obese {vehicle} is preventing me from doing that!"
                ]
            },
            {
                "title": "Reloaded?",
                "icon": "Reload",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "{name}, is your {vehicle} reloaded?",
                    "{name}, are you reloaded?",
                    "Are you reloaded, {name}?"
                ]
            },
            {
                "title": "Fall-back!",
                "icon": "Turnback",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "Fall back, {name}!",
                    "This isn't looking very good, I highly advise you to fall back {name}!",
                    "The men at Dunkirk even had to get out of there! Fall back {name}!",
                    "This place is getting overrun, fall back {name}!",
                    "{name}, fall back!",
                    "Even a {vehicle} can't take that much, {name}! Fall back!"
                ]
            },
            {
                "title": "Follow-me!",
                "icon": "Followme",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "Follow me, {name}!",
                    "{name} in the {vehicle}, follow me!",
                    "Come with me, {name}!",
                    "{name}, bring that {vehicle} this way!",
                    "{name}, follow me!"
                ]
            }
        ],
        "enemy": [
            {
                "title": "Lure!",
                "icon": "Turnback",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "Could someone please lure that {vehicle} out? I may have a shot!",
                    "Able to lure that {vehicle} out? I may have a shot!",
                    "I need someone to lure that {vehicle} out! I may have a shot!",
                    "Lure that {vehicle} out, please! I may have a shot!",
                    "Anyone got a fishing rod? I need someone to lure that {vehicle} into my line of fire!"
                ]
            },
            {
                "title": "Focus!",
                "icon": "Support",
                "text": "{randPart}",
                "chatMode": "Team",
                "variants": [
                    "Please focus fire on {name} in the {vehicle}!",
                    "I need supporting fire on that {vehicle}!",
                    "Attack that {vehicle}!",
                    "I need focus fire on that {vehicle}!"
                ]
            },
            {
                "title": "Be-careful!",
                "icon": "Turnback",
                "text": "Be careful near that enemy {vehicle}!",
                "chatMode": "Team"
            },
            {
                "title": "Look-out!",
                "icon": "Yes",
                "text": "Look out, enemy {vehicle} inbound!",
                "chatMode": "Team"
            },
            {
                "title": "Null",
                "icon": "No",
                "text": "Null",
                "chatMode": "Team"
            },
            {
                "title": "Null",
                "icon": "No",
                "text": "Null",
                "chatMode": "Team"
            }
        ]
    }
}
prototype464 commented 2 years ago

Just wanted to add but I wouldn't mind if the Shortcut Set feature was gutted in order for an update to take less time, the mod would have less functionality but the idea of being able to customize the radial menu is still great.

Instead of alternative menus when holding Alt + Q for instance, why not just remove that if that's part of what's causing the issue of it not working? Would be easier to maintain that way too, since there would be less things to go wrong in a game update for instance.

PolyacovYury commented 2 years ago

The reason for the mod to not work is because the code for radial menu data provider was rewritten from scratch by WG. Alternative menus are just a matter of sending different data into the same provider. One more if statement, in other words.

prototype464 commented 2 years ago

The reason for the mod to not work is because the code for radial menu data provider was rewritten from scratch by WG. Alternative menus are just a matter of sending different data into the same provider. One more if statement, in other words.

I'd be really interested in trying to update this mod myself to see if I might be able to get it working, but I'd need some advice on two things if that'd be alright with you;

PolyacovYury commented 2 years ago

Is WoT open source? How are modders even able to create mods?

No, but game client's Python and ActionScript parts can be easily decompiled.

Is there a repository anywhere I can look at to get an idea of how the radial menu works?

https://github.com/IzeBerg/wot-src
https://github.com/StranikS-Scan/WorldOfTanks-Decompiled/

prototype464 commented 2 years ago

I see why you haven't wanted to update it, looking at the old and new Radial Menu source code alongside what the mod actually does, it would take an entire rewrite, or at least a bunch of sifting through names / tags / groups since they changed a lot of the original ones.

What even is the difference between "BASE_ALLY" and "HQ_ALLY"? I love this mod, but the way the old source code was all organized and the new code's formatting is... :s

Oh God... Jesus Christ, someone call a priest! image