PolyacovYury/PYmods

1.5.0.0 Common Test

Closed this issue · 19 comments

Hello, are you updating your mods for the new version? I would like to know if yes, because I use your core in conjunction with my mods and I love your work. Thank you very much ...

Just pushed the first wave of 1.5.0.0 work, which mainly consists of breaking legacy support in PYmodsCore while fully rewriting parts of it, moving from vxSettings to modsSettingsApi and fixing g_appLoader imports (in half - by getting rid of them lol)

Basically - if you used (Dummy)BlockTemplateBuilder - you're in for a treat ^^
But there are good news - I don't clutter BigWorld with my stuff any more. Need curCV or g_modsListApi - ask for them from the Core itself.

There is an entirely new package called gui, where I put all the stuff that can't be imported by mods in helpers/i18n (g_modsListApi, mod settings registration, show*Dialog and utility hooks like temp_SM ServiceMessages all live there now).

This is what my debug.cmd told me after today... This is gonna be a fun update, I tell ya :P

Listing source/scripts/client/ ...
Listing source/scripts/client/PYmodsCore ...
Compiling source/scripts/client/PYmodsCore/__init__.py ...
Listing source/scripts/client/PYmodsCore/config ...
Compiling source/scripts/client/PYmodsCore/config/__init__.py ...
Listing source/scripts/client/PYmodsCore/config/interfaces ...
Compiling source/scripts/client/PYmodsCore/config/interfaces/Dummy.py ...
Compiling source/scripts/client/PYmodsCore/config/interfaces/PYmods.py ...
Compiling source/scripts/client/PYmodsCore/config/interfaces/Simple.py ...
Compiling source/scripts/client/PYmodsCore/config/interfaces/__init__.py ...
Compiling source/scripts/client/PYmodsCore/config/template_builders.py ...
Compiling source/scripts/client/PYmodsCore/config/utils.py ...
Listing source/scripts/client/PYmodsCore/events ...
Compiling source/scripts/client/PYmodsCore/events/__init__.py ...
Compiling source/scripts/client/PYmodsCore/events/game.py ...
Listing source/scripts/client/PYmodsCore/gui ...
Compiling source/scripts/client/PYmodsCore/gui/__init__.py ...
Compiling source/scripts/client/PYmodsCore/gui/api.py ...
Compiling source/scripts/client/PYmodsCore/gui/utils.py ...
Compiling source/scripts/client/PYmodsCore/utils.py ...
Listing source/scripts/client/gui ...
Listing source/scripts/client/gui/mods ...
Compiling source/scripts/client/gui/mods/mod_BanksLoader.py ...
Listing source/scripts/client/gui/mods/mod_CamoSelector ...
Compiling source/scripts/client/gui/mods/mod_CamoSelector/__init__.py ...
Compiling source/scripts/client/gui/mods/mod_CamoSelector/config.py ...
Compiling source/scripts/client/gui/mods/mod_CamoSelector/processors.py ...
Listing source/scripts/client/gui/mods/mod_CamoSelector/settings ...
Compiling source/scripts/client/gui/mods/mod_CamoSelector/settings/__init__.py ...
Compiling source/scripts/client/gui/mods/mod_HangarScreenshots.py ...
Compiling source/scripts/client/gui/mods/mod_Horns.py ...
Compiling source/scripts/client/gui/mods/mod_IngameGUITextTweaks.py ...
Compiling source/scripts/client/gui/mods/mod_LampLights.py ...
Compiling source/scripts/client/gui/mods/mod_PYSupport.py ...
Compiling source/scripts/client/gui/mods/mod_PlayersPanelHP.py ...
Compiling source/scripts/client/gui/mods/mod_RadialMenu.py ...
Listing source/scripts/client/gui/mods/mod_RemodEnabler ...
Compiling source/scripts/client/gui/mods/mod_RemodEnabler/__init__.py ...
Compiling source/scripts/client/gui/mods/mod_RemodEnabler/config.py ...
Compiling source/scripts/client/gui/mods/mod_RemodEnabler/processor.py ...
Compiling source/scripts/client/gui/mods/mod_ShowVehicle.py ...
Listing source/scripts/client/gui/mods/mod_Skinner ...
Compiling source/scripts/client/gui/mods/mod_Skinner/__init__.py ...
Compiling source/scripts/client/gui/mods/mod_Skinner/config.py ...
Compiling source/scripts/client/gui/mods/mod_Skinner/loader.py ...
Listing source/scripts/client/gui/mods/mod_Skinner/processor ...
Compiling source/scripts/client/gui/mods/mod_Skinner/processor/__init__.py ...
Compiling source/scripts/client/gui/mods/mod_Skinner/processor/skins_static.py ...
Compiling source/scripts/client/gui/mods/mod_SunController.py ...
Compiling source/scripts/client/gui/mods/mod_UT_announcer.py ...
Compiling source/scripts/client/gui/mods/mod_VoiceOverrider.py ...
Listing source/scripts/client/helpers ...
Listing source/scripts/client/helpers/i18n ...
Compiling source/scripts/client/helpers/i18n/ButtonReplacer.py ...
Compiling source/scripts/client/helpers/i18n/HangarPainter.py ...
Compiling source/scripts/client/helpers/i18n/__init__.py ...
Listing source/scripts/client/mods ...
Compiling source/scripts/client/mods/__init__.py ...
Checking build/wotmods/PYmods/BanksLoader.wotmod ...
Updating file res/scripts/client/gui/mods/mod_BanksLoader.pyc
Checking build/wotmods/PYmods/ButtonReplacer.wotmod ...
Updating file res/scripts/client/helpers/i18n/ButtonReplacer.pyc
Checking build/wotmods/PYmods/CamoSelector.wotmod ...
Updating file res/scripts/client/gui/mods/mod_CamoSelector/config.pyc
Updating file res/scripts/client/gui/mods/mod_CamoSelector/processors.pyc
Checking build/wotmods/PYmods/HangarPainter.wotmod ...
Updating file res/scripts/client/helpers/i18n/HangarPainter.pyc
Checking build/wotmods/PYmods/HangarScreenshots.wotmod ...
Updating file res/scripts/client/gui/mods/mod_HangarScreenshots.pyc
Checking build/wotmods/PYmods/Horns.wotmod ...
Updating file res/scripts/client/gui/mods/mod_Horns.pyc
Checking build/wotmods/PYmods/IngameGUITextTweaks.wotmod ...
Updating file res/scripts/client/gui/mods/mod_IngameGUITextTweaks.pyc
Checking build/wotmods/PYmods/LampLights.wotmod ...
Updating file res/scripts/client/gui/mods/mod_LampLights.pyc
Checking build/wotmods/PYmods/PYSupport.wotmod ...
Updating file res/scripts/client/gui/mods/mod_PYSupport.pyc
Checking build/wotmods/PYmods/PYmodsCore.wotmod ...
Updating file res/scripts/client/PYmodsCore/__init__.pyc
Updating file res/scripts/client/PYmodsCore/config/__init__.pyc
Updating file res/scripts/client/PYmodsCore/config/interfaces/Dummy.pyc
Updating file res/scripts/client/PYmodsCore/config/interfaces/PYmods.pyc
Updating file res/scripts/client/PYmodsCore/config/interfaces/Simple.pyc
Updating file res/scripts/client/PYmodsCore/config/template_builders.pyc
Updating file res/scripts/client/PYmodsCore/config/utils.pyc
Updating file res/scripts/client/PYmodsCore/events/game.pyc
Adding missing file: res/scripts/client/PYmodsCore/gui/__init__.pyc
Adding missing file: res/scripts/client/PYmodsCore/gui/api.pyc
Adding missing file: res/scripts/client/PYmodsCore/gui/utils.pyc
Updating file res/scripts/client/PYmodsCore/utils.pyc
Checking build/wotmods/PYmods/PlayersPanelHP.wotmod ...
Updating file res/scripts/client/gui/mods/mod_PlayersPanelHP.pyc
Checking build/wotmods/PYmods/RadialMenu.wotmod ...
Updating file res/scripts/client/gui/mods/mod_RadialMenu.pyc
Checking build/wotmods/PYmods/RemodEnabler.wotmod ...
Updating file res/scripts/client/gui/mods/mod_RemodEnabler/config.pyc
Updating file res/scripts/client/gui/mods/mod_RemodEnabler/processor.pyc
Checking build/wotmods/PYmods/ShowVehicle.wotmod ...
Updating file res/scripts/client/gui/mods/mod_ShowVehicle.pyc
Checking build/wotmods/PYmods/Skinner.wotmod ...
Updating file res/scripts/client/gui/mods/mod_Skinner/config.pyc
Updating file res/scripts/client/gui/mods/mod_Skinner/loader.pyc
Updating file res/scripts/client/gui/mods/mod_Skinner/processor/skins_static.pyc
Checking build/wotmods/PYmods/SunController.wotmod ...
Updating file res/scripts/client/gui/mods/mod_SunController.pyc
Checking build/wotmods/PYmods/UT_announcer.wotmod ...
Updating file res/scripts/client/gui/mods/mod_UT_announcer.pyc
Checking build/wotmods/PYmods/VoiceOverrider.wotmod ...
Updating file res/scripts/client/gui/mods/mod_VoiceOverrider.pyc

you are screwed. 🤦‍♂

Just pushed the first wave of 1.5.0.0 work, which mainly consists of breaking legacy support in PYmodsCore while fully rewriting parts of it, moving from vxSettings to modsSettingsApi and fixing g_appLoader imports (in half - by getting rid of them lol)

Basically - if you used (Dummy)BlockTemplateBuilder - you're in for a treat ^^
But there are good news - I don't clutter BigWorld with my stuff any more. Need curCV or g_modsListApi - ask for them from the Core itself.

There is an entirely new package called gui, where I put all the stuff that can't be imported by mods in helpers/i18n (g_modsListApi, mod settings registration, show*Dialog and utility hooks like temp_SM ServiceMessages all live there now).

this is just stupid, or I really do not understand wg, because of them only now remove g_AppLoader? I swear I do not understand.

you are screwed. 🤦‍♂

Excuse me?)

this is just stupid, or I really do not understand wg, because of them only now remove g_AppLoader? I swear I do not understand.

They removed it when all the paperwork for its removal was finished.

you are screwed. 🤦‍♂

Excuse me?)

Are not you with the job facilitated.

:P

Well, don't know if you found it yet, but instead of

from gui.app_loader.loader import g_appLoader
g_appLoader.doStuff()

you now do

from gui.shared.personality import ServicesLocator  # as SL
ServicesLocator.appLoader.doStuff() # SL.appLoader.doStuff()

yes, i know that... :)

I think I found an error in the import list in utils.py
from gui.Scaleform.framework import ViewTypes

def sendMessage(text='', colour='Green', panel='Player'): from gui.Scaleform.framework import ViewTypes from gui.shared.personality import ServicesLocator """ panel = 'Player', 'Vehicle', 'VehicleError' colour = 'Red', 'Purple', 'Green', 'Gold', 'Yellow', 'Self' """ battle_page = ServicesLocator.appLoader.getDefBattleApp().containerManager.getContainer(ViewTypes.VIEW).getView() if battle_page is not None: getattr(battle_page.components['battle%sMessages' % panel], 'as_show%sMessageS' % colour, None)(None, text) else: BigWorld.callback(0.5, partial(sendMessage, text, colour, panel))

I think I found an error in the import list in utils.py
from gui.Scaleform.framework import ViewTypes

And what's the problem? The only thing that was moved was the AppLoader, ViewTypes are where they are

utils.py
from gui.Scaleform.framework import ViewTypes
from gui.shared.personality import ServicesLocator
bug in import list (gui.)

import BigWorld
import ResMgr
from .config import *
from .utils import *

in init.py
gui = none
def delayedImport():
global gui
from . import gui

BigWorld.callback(0, delayedImport)


can not access code outside the core. :)

Sorry for the letter in bold, did not know it was like this.

Aw. Crap. That's odd.
Fixed. TYVM.

:) sry

Hello again... :)
bug in ChoiseColor in template. interface can't read color after to select one color :(
my config:

  self.data = {
        'enabled': False, 
        'color': '#FFFFFF',
        'alpha': 100
    }
    self.i18n = {
        'UI_description'            : self.ID,
        'UI_setting_color_text'     : 'Choose Map Border Color',
        'UI_setting_color_tooltip'  : 'This color will be applied to all Maps',
        'UI_setting_alpha_text'     : 'Alpha Value',
        'UI_setting_alpha_tooltip'  : 'This alpha value will be applied to all Maps'
    }
    super(ConfigInterface, self).init()

def createTemplate(self):
    return {
        'modDisplayName'    : self.i18n['UI_description'],
        'enabled'           : self.data['enabled'],
        'column1'           : [self.tb.createStepper('alpha', 10, 100, 10, False)],
        'column2'           : [self.tb.createControl('color', 'ColorChoice', 200)]}

in log:
2019-05-09 00:40:05.487: ERROR: Unexpected type of component:,ChoiceColor

  1. In your code, I don't see ChoiceColor, only ColorChoice.
  2. For this reason, I put some constants to the tb class. Please refer to HangarPainter's code.

As to why it is not applied - am not sure, will have to check.

Just checked. Color gets applied just fine. Or I didn't really understand what you mean by "interface can't read color after to select one color" (can you English grammar please?)

thx man, you are the master sry about that