Giter Club home page Giter Club logo

pymods's People

Contributors

polyacovyury avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pymods's Issues

Bug 1.0.2 CommonTest

Traceback (most recent call last):
File "scripts/client/game.py", line 156, in init
File "scripts/client/gui/shared/personality.py", line 371, in init
File "scripts/client/gui/mods/init.py", line 19, in init
File "scripts/client/gui/mods/init.py", line 67, in _findValidMODs
File "scripts/common/Lib/importlib/init.py", line 37, in import_module
File "BankLoader", line 352, in
File "BankLoader", line 36, in init
File "Simple", line 24, in init
File "Dummy", line 28, in init
File "BankLoader", line 348, in load
File "BankLoader", line 183, in checkConfigs
AttributeError: 'NoneType' object has no attribute 'asInt'

Get your mods

Where can I get your mods? I need your help. Thank you very much

mod_radialmenu.pyc script not loading

hello polyakov,

i have found an issue and wanted to tell you about it with sending you the log.

this is the part of the python.log that shows the error:

2019-05-04 15:09:10.483: INFO: ---------------------------------------------------------------------------
2019-05-04 15:09:10.486: INFO: ./mods/configs/PYmods/RadialMenu/RadialMenu.json
2019-05-04 15:09:10.486: INFO: Expecting object: line 6 column 23 (char 121)
2019-05-04 15:09:10.488: ERROR: [EXCEPTION] (scripts/common/Event.py, 46):
Traceback (most recent call last):
  File "scripts/common/Event.py", line 44, in __call__
  File "scripts/client/PYmodsCore/config/interfaces/Dummy.py", line 185, in MSAApply
  File "scripts/client/gui/mods/mod_RadialMenu.py", line 70, in onApplySettings
  File "scripts/client/PYmodsCore/config/interfaces/Simple.py", line 70, in onApplySettings
  File "scripts/client/PYmodsCore/config/interfaces/Simple.py", line 23, in <lambda>
  File "scripts/client/PYmodsCore/config/json_reader.py", line 148, in loadJson
  File "scripts/common/Lib/json/__init__.py", line 351, in loads
  File "scripts/common/Lib/json/decoder.py", line 366, in decode
  File "scripts/common/Lib/json/decoder.py", line 382, in raw_decode
ValueError: Expecting object: line 6 column 23 (char 121)

2019-05-04 15:09:10.488: INFO: [SL_PRO] Skipped Script: mod_radialmenu.pyc
2019-05-04 15:09:10.488: INFO: 
2019-05-04 15:09:10.491: ERROR: [EXCEPTION] (<string>, 596):
Traceback (most recent call last):
  File "<string>", line 584, in _findValidMODs
  File "scripts/common/Lib/importlib/__init__.py", line 37, in import_module
  File "scripts/client/gui/mods/mod_RadialMenu.py", line 267, in <module>
  File "scripts/client/gui/mods/mod_RadialMenu.py", line 35, in __init__
  File "scripts/client/PYmodsCore/config/interfaces/Simple.py", line 53, in __init__
  File "scripts/client/PYmodsCore/config/interfaces/Dummy.py", line 23, in __init__
  File "scripts/client/PYmodsCore/config/interfaces/Simple.py", line 74, in load
  File "scripts/client/PYmodsCore/config/interfaces/Dummy.py", line 113, in load
  File "scripts/client/gui/mods/mod_RadialMenu.py", line 74, in readCurrentSettings
  File "scripts/client/PYmodsCore/config/interfaces/Simple.py", line 65, in readCurrentSettings
  File "scripts/client/PYmodsCore/config/interfaces/Dummy.py", line 80, in updateMod
  File "scripts/client/gui/modsSettingsApi/api.py", line 133, in updateModSettings
  File "scripts/common/Event.py", line 44, in __call__
  File "scripts/client/PYmodsCore/config/interfaces/Dummy.py", line 185, in MSAApply
  File "scripts/client/gui/mods/mod_RadialMenu.py", line 70, in onApplySettings
  File "scripts/client/PYmodsCore/config/interfaces/Simple.py", line 70, in onApplySettings
  File "scripts/client/PYmodsCore/config/interfaces/Simple.py", line 23, in <lambda>
  File "scripts/client/PYmodsCore/config/json_reader.py", line 148, in loadJson
  File "scripts/common/Lib/json/__init__.py", line 351, in loads
  File "scripts/common/Lib/json/decoder.py", line 366, in decode
  File "scripts/common/Lib/json/decoder.py", line 382, in raw_decode
ValueError: Expecting object: line 6 column 23 (char 121)

Game hangs on battle loading screen with soundEventInjector installed (WoT 1.16.1.0)

As of today's new patch release (WoT 1.16.1.0), while running only soundEventInjector + its dependencies (using the most recent archive from Yandex), game loads as normal into hangar/etc, but upon attempting to enter any battle mode, the game hangs on the loading screen (progress bar fills up, but never finishes loading).

Scanning python.log, this caught my attention (I can provide you with the full python.log + replay file if necessary, but I did not include it here in my initial post since it is very long):

2022-04-12 10:47:41.531: ERROR: Traceback (most recent call last):
2022-04-12 10:47:41.531: ERROR:   File "scripts/client/Avatar.py", line 624, in onBecomePlayer
2022-04-12 10:47:41.531: ERROR:   File "scripts/client/gui/mods/mod_SoundEventInjector.py", line 255, in new_initGUI
2022-04-12 10:47:41.531: ERROR: AttributeError: 'IngameSoundNotifications' object has no attribute '_IngameSoundNotifications__events'

It's not a problem. I need help with the core.

hello, I use your core in my mods, because it is simple to use, but now I needed to know, if in your core there is some way to (write and read) a json file (to create a cache file), already tried this.

class ConfigInterface (PYmodsConfigInterface):
def init __ (self):
self.values={}
super (ConfigInterface, self) .
init __ ()

def readCurrentSettings (self, quiet = True):
     super (ConfigInterface, self) .readCurrentSettings (quiet)
     self.values = loadJson (self.ID, 'cache', self.values, {}, quiet = quiet) # [0]

Wot 1.18.0.0

error in import modules.
def registerSettings(self): from ...delayed.api import registerSettings registerSettings(self)

i know wg give to us a little more shit.

autogenerated json files

Hi Yury,

is it possible that there is a small issue with the updated jsonreader/writer suff?
Generated json files, like the mod config files are now missing the space intent in the first line while storing dictionaries.

examples of a mod config file

NEW output:
"shadow": {
"alpha": 1, # # 0 spaces - spaces are missing
"angle": 45, # 4 spaces
"blurX": 4, # 4 spaces
"blurY": 4, # 4 spaces
"distance": 4, # 4 spaces
"quality": 1, # 4 spaces
"strength": 1 # 4 spaces
},

OLD output:
"shadow": {
"alpha": 1, # 4 spaces - here it is correct
"angle": 45, # 4 spaces
"blurX": 4, # 4 spaces
"blurY": 4, # 4 spaces
"distance": 4, # 4 spaces
"quality": 1, # 4 spaces
"strength": 1 # 4 spaces
},

note: GitHub didn't show the blockquote as it should, but i hope you understand the meaning of the issue.

soundEventInjector: lacking method to define double-shot effects for dualgun vehicles?

This is something I have been trying to figure out the solution to for a while, but with no success, so I will ask here: currently, there is a way to define the shot effects for dualgun vehicles; for the sake of documentation for others setting up audio mods, here is an example:

{
    "guns": {			    
		"nation": {            
			"cannon_name": {
                "effects": ["shot_dualgun_L", "shot_dualgun_R"],
	        "reloadEffect": "reload_dualgun"
			}
		}
	}
}

However, this only defines the shot effects for each gun firing cyclically.

The base game also has a separate set of effects defs for when the vehicle fires a double-shot, including a more pronounced shockwave + greater disturbance to the ground beneath the shot etc, as well as a unique set of firing sounds. However, while the base game uses a separate set of vehicle XMLs (with _siege_mode appended to them) to set this up, I cannot seem to find a way to do the same using soundEventInjector.

I have attempted creating a json with a list of exceptions for the _siege_mode versions of each dualgun vehicle, with the separate double-shot effects defined; however, this does not have any affect in-game.

Firstly, is there already some method to set the double-shot effects in the mod, which I may simply be missing? And if not, may I request such a function be added to the mod?

The current trouble is that, while firing a double shot does cause the standard firing effect to trigger two times (once for each gun), this is often not enough feedback for the player (making it hard to tell when a double-shot has been fired, unless said player takes the full hit from both guns at once). Likewise, I have received some feedback from players of dualgun vehicles that they miss the stock effects for these vehicles while using a sound mod (since there currently is not a way to make them trigger as intended -- or at least, there does not appear to be a way to do so).

Thank you for your continued support of this mod :)

PlayerspanelApi... as fix code

`package polyacov_yury.views.battle
{
// Flash
import flash.filters.DropShadowFilter;
import flash.text.TextField;
// WG Imports
import net.wg.data.constants.generated.LAYER_NAMES;
import net.wg.gui.battle.random.views.BattlePage;
import net.wg.gui.battle.views.BaseBattlePage;
import net.wg.gui.components.containers.MainViewContainer;
import net.wg.infrastructure.base.AbstractView;
import net.wg.infrastructure.interfaces.ISimpleManagedContainer;
// Scalefromm
import scaleform.gfx.TextFieldEx;

public class PlayersPanels extends AbstractView
{
	private static const NAME_MAIN:String = "main";
	
	public static var ui:PlayersPanelsApi;
	
	public var py_log:Function;
	public var py_update:Function;
	
	private var viewPage:BaseBattlePage;
	
	private var configs:Object = {};
	private var textFields:Object = {};
	
	public function PlayersPanelsApi():void
	{
		super();
		ui = this;
	}
	
	override protected function onPopulate():void
	{
		super.onPopulate();
		
		try
		{
			parent.removeChild(this);
			var viewContainer:MainViewContainer = _getContainer(LAYER_NAMES.VIEWS) as MainViewContainer;
			viewContainer.setFocusedView(viewContainer.getTopmostView());
			viewPage = viewContainer.getChildByName(NAME_MAIN) as BaseBattlePage;
		}
		catch (error:Error)
		{
			py_log(error.getStackTrace());
		}
	}
	
	override protected function onDispose():void
	{
		super.onDispose();
	}
	
	public function as_create(linkage:String, config:Object):void
	{
		if (viewPage) createComponent(linkage, config);
	}
	
	public function as_update(linkage:String, data:Object):void
	{
		if (viewPage) updateComponent(linkage, data);
	}
	
	public function as_delete(linkage:String):void
	{
		if (viewPage) deleteComponent(linkage);
	}
	
	private function _getContainer(containerName:String) : ISimpleManagedContainer
	{
		return App.containerMgr.getContainer(LAYER_NAMES.LAYER_ORDER.indexOf(containerName))
	}
	
	private function createComponent(linkage:String, config:Object):void
	{
		configs[linkage] = config;
		textFields[linkage] = {};
	}
	
	private function updateComponent(linkage:String, data:Object):void
	{
		try
		{
			if (!textFields[linkage].hasOwnProperty(data['vehicleID']))
			{
				_createTextField(linkage, data);
			}
			
			var textField:TextField = textFields[linkage][data.vehicleID];
			
			if (configs[linkage]['isHtml'])
				textField.htmlText = data.text;
			else
				textField.text = data.text;
		}
		catch (e:Error)
		{
			DebugUtils.LOG_ERROR(e.getStackTrace());
		}
	}
	
	public function deleteComponent(linkage:String):void
	{
		delete configs[linkage];
		delete textFields[linkage];
	}
	
	private function _createTextField(linkage:String, data:Object):void
	{
		var isRight:Boolean = false;
		var textField:TextField = null;
		var playersPanelHolder:* = null;
		var movieIndex:Number = 0;
		var config:Object = null;
		var shadow:Object = null;
		
		var playersPanel:* = (viewPage as BattlePage).playersPanel;
		
		playersPanelHolder = playersPanel.listLeft.getHolderByVehicleID(data['vehicleID']);
		if (!playersPanelHolder)
		{
			isRight = true;
			playersPanelHolder = playersPanel.listRight.getHolderByVehicleID(data['vehicleID']);
		}
		
		config = configs[linkage][isRight ? "right" : "left"];
		shadow = configs[linkage]["shadow"];
		
		textField = new TextField();
		textField.visible = true
		textField.height = config.height;
		textField.width = config.width;
		textField.autoSize = config.align;
		textField.selectable = false;
		textField.filters = [new DropShadowFilter(shadow.distance, shadow.angle, shadow.color, shadow.alpha, shadow.blurX, shadow.blurY, shadow.strength, shadow.quality)]
		TextFieldEx.setNoTranslate(textField, true);
		
		textField.x = playersPanelHolder._listItem.vehicleIcon.x + config.x;
		textField.y = playersPanelHolder._listItem.vehicleIcon.y + config.y;
		
		movieIndex = playersPanelHolder._listItem.getChildIndex(playersPanelHolder._listItem.vehicleTF) + 1;
		playersPanelHolder._listItem.addChildAt(textField, movieIndex);
		
		textFields[linkage][data.vehicleID] = textField;
	}
}

}`

Request for permission to use your PlayerPanelsAPI in my own mod package

Hello Yury,

i couldn't find a direct email to get in contact with you, so i will write it here.

I'm a WoT mod developer and want to ask you for permission to include your PlayerPanelsAPI in my mod-package.

Can i use it for my mod too and put the needed PlayerPanelsAPI files in my mod package? Of course you will get the credits for it!

Any feedback would be great.

thanks in advance

RadialMenu: Cannot initialize

(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!

Issue with mod_StatPaints since WoT 1.9.1 CT

2020-05-30 14:23:22.595: ERROR: [EXCEPTION] (scripts/common/items/vehicles.py, 3739):
Traceback (most recent call last):
File "scripts/common/items/vehicles.py", line 3734, in getItemByCompactDescr
File "scripts/common/items/init.py", line 379, in parseIntCompactDescr
TypeError: unsupported operand type(s) for &: 'CustomPaint' and 'int'

sorting list of mods in the modsettingsapi by id

Hi,
this is more a question than an issue. I noticed that the mods listed in the modsettingsapi that you're using in your PYmodsCore have no sorting order. Is it possible to sort them by their (translated) name? This could be helpful when there are a lot of mods.

1.5.0.0 Common Test

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.