bounceplink 2 Posted September 20, 2013 (edited) Greetings, I'm an experienced mod and XVM user so I downloaded the test2 version for 8.8 and for the life of me couldn't get it to work no matter what I did. I then discovered the issue: you must have the mod unpacked to the default mod directory path even if you normally use an alternate directory for all of your mods. I think this is a bug in the coding for XVM (or 8.8 WoT client) because it worked fine in previous versions. I manage all of my mods by unpacking each one into a separate folder under a mods/ directory in my main game directory as recommended from the WoT Wiki (http://wiki.worldoftanks.com/Modifications#Managing_Your_Skins_and_Mods) For example: C:\Games\World_of_TanksSEA\mods\8.8\latest_xvm_flex4.10 C:\Games\World_of_TanksSEA\mods\8.8\modFOO C:\Games\World_of_TanksSEA\mods\8.8\modBAR ... Then I add a line in my paths.xml file to include each directory separately. This allows me to keep all mods completely separate and easily enable/disable them at will by commenting/uncommenting them in my paths.xml file: <!-- <Path>./res_mods/0.8.8</Path> --> <Path>./mods/8.8/latest_xvm_flex4.10/res_mods/0.8.8</Path> <Path>./mods/8.8/modFOO </Path> <Path>./mods/8.8/modBAR </Path> ... Note that if I don't unpack the 0.8.8 XVM directory to the default mods directory (first line above) then the mod won't work. Once you unpack the 0.8.8 directory to the default mod directory then you can use the <Path> include command to include your "xvm" directory for your customized configs. Yes, it still works even if you have the default mod location commented out as I have done above. Can an XVM contributor please confirm if this is an XVM or WoT 8.8 client bug? Thank you. Edited September 20, 2013 by bounceplink Quote Share this post Link to post Short link Share on other sites
Mr A 750 #106205 Posted September 26, 2013 @bounceplink, This is XVM. Python part. Delete python.log, start game, attach it to post. Quote Share this post Link to post Short link Share on other sites
bounceplink 2 #109179 Posted October 3, 2013 (edited) Attached both working (with XVM copied into res_mods\0.8.8 directly) and not working (including it via paths.xml in a separate directory). I also attached a screen shot showing what it looks like when it's not working. Basically it looks like the mod is just expecting to live in res_mods\0.8.8 and gets confused when it's not. It used to work fine with the old version of XVM and the 8.7 WoT client. Note: when it is broken there is NO xvm.log file generated at all. When it's working it's fine. Note: the diff below is that the broken output is missing this line. Seems it starts to load them mod then skips it and moves on to my next mod in the list (session statistics by yasen krasen) [XPM] Loading mod: xvmstat 1.0.1 (http://www.modxvm.com/) Thank you. Broken /------------------------------------------------------------------------------\ BigWorld Release Client (compiled at 19:46:43 Aug 30 2013) starting on Fri Oct 04 01:43:13 2013 Checking ./mods/0.8.8/xvm-5.0.0-test3/res_mods/0.8.8: mods found [XPM] preloader gui.Scaleform.locale LoadMod: SessionStatistic [NOTE] (scripts/client/post_processing/__init__.py, 273): The quality = 0 was selected. [SPACE] Loading space: spaces/35_steppes Message: (-1, 'Screenshot saved: shot_009.jpg') Message: (-1, 'Screenshot saved: shot_010.jpg') Traceback (most recent call last): File "scripts/client/Avatar.py", line 371, in onBecomeNonPlayer AttributeError: 'PlayerAvatar' object has no attribute 'intUserSettings' Traceback (most recent call last): File "scripts/client/gui/Scaleform/Flash.py", line 277, in __call__ File "scripts/client/gui/Scaleform/Flash.py", line 239, in handleFsCommandCallback File "scripts/client/gui/Scaleform/Battle.py", line 686, in onExitBattle File "scripts/client/Avatar.py", line 2239, in leaveArena BigWorld.EntityIsDestroyedException: Avatar 44043440 has been destroyed PostProcessing.Phases.fini() \--------------------------------------------------------------------------------/ Working /------------------------------------------------------------------------------\ BigWorld Release Client (compiled at 19:46:43 Aug 30 2013) starting on Fri Oct 04 01:51:19 2013 Checking ./res_mods/0.8.8: mods found [XPM] preloader gui.Scaleform.locale [XPM] Loading mod: xvmstat 1.0.1 (http://www.modxvm.com/) LoadMod: SessionStatistic [NOTE] (scripts/client/post_processing/__init__.py, 273): The quality = 0 was selected. [SPACE] Loading space: spaces/35_steppes Traceback (most recent call last): File "scripts/client/Avatar.py", line 371, in onBecomeNonPlayer AttributeError: 'PlayerAvatar' object has no attribute 'intUserSettings' Traceback (most recent call last): File "scripts/client/gui/Scaleform/Flash.py", line 277, in __call__ File "scripts/client/gui/Scaleform/Flash.py", line 239, in handleFsCommandCallback File "scripts/client/gui/Scaleform/Battle.py", line 686, in onExitBattle File "scripts/client/Avatar.py", line 2239, in leaveArena BigWorld.EntityIsDestroyedException: Avatar 44043440 has been destroyed PostProcessing.Phases.fini() \--------------------------------------------------------------------------------/ Edited October 3, 2013 by bounceplink Quote Share this post Link to post Short link Share on other sites
Mr A 750 #109721 Posted October 4, 2013 Wait until here will be a dynamic path Quote Share this post Link to post Short link Share on other sites
bounceplink 2 #110173 Posted October 5, 2013 (edited) Mr A, I checked that code and I still see a hard-coded "res_mods" in the path. That is the current version I'm using in 5.0.0-test3 and it doesn't work. I checked MeltyMapsMathMod and the mod loader code in that one works. From CameraNode.pyc (decompiled). Can you please check on this in the XPM mod loader code to make sure it works like this? Note: I think Dellux is also using your code in his SessionStatistics mod and it breaks there, too. import BigWorld class CameraNode(BigWorld.UserDataObject): def __init__(self): BigWorld.UserDataObject.__init__(self) def load_mods(): import ResMgr, os, glob sec = ResMgr.openSection('../paths.xml') subsec = sec['Paths'] vals = subsec.values()[0:2] for val in vals: mp = val.asString + '/scripts/client/mods/*.pyc' for fp in glob.iglob(mp): _, fn = os.path.split(fp) sn, _ = fn.split('.') if sn != '__init__': print 'LoadMod: ' + sn try: exec 'import mods.' + sn except Exception as e: print e load_mods() Edited October 5, 2013 by bounceplink Quote Share this post Link to post Short link Share on other sites
sirmax 5,499 #111110 Posted October 8, 2013 Then I add a line in my paths.xml file to include each directory separately. This allows me to keep all mods completely separate and easily enable/disable them at will by commenting/uncommenting them in my paths.xml file: <!-- <Path>./res_mods/0.8.8</Path> --> <Path>./mods/8.8/latest_xvm_flex4.10/res_mods/0.8.8</Path> <Path>./mods/8.8/modFOO </Path> <Path>./mods/8.8/modBAR </Path> ... Note that if I don't unpack the 0.8.8 XVM directory to the default mods directory (first line above) then the mod won't work. Once you unpack the 0.8.8 directory to the default mod directory then you can use the <Path> include command to include your "xvm" directory for your customized configs. Yes, it still works even if you have the default mod location commented out as I have done above. Reproduced, wait for fix. Quote Share this post Link to post Short link Share on other sites
bounceplink 2 #111112 Posted October 8, 2013 Please try the attached partial fix. It should work for localized characters now. Mod still doesn't load until after battle loading window. Again, this is to make XVM work when it is not in <main gamedir\res_mods\*>. Here is an example of my paths.xml file: <root> <Paths> <!-- <Path>./res_mods/0.8.8</Path> --> <Path>./mods/0.8.8/in-res_mods/xvm-5.0.0-test3/res_mods/0.8.8</Path> In order to duplicate the bug: Rename C:\Games\World_of_Tanks\res_mods\0.8.8\ to C:\Games\World_of_Tanks\res_mods\0.8.8-backup\ Makedir C:\Games\World_of_Tanks\mods\0.8.8\ Unpack XVM to C:\Games\World_of_Tanks\mods\0.8.8\ Make paths.xml look like the above Run game. __init__.py.rar Quote Share this post Link to post Short link Share on other sites
Assassik 14 #111116 Posted October 8, 2013 Link to issue associated with this. https://code.google.com/p/wot-xvm/issues/detail?id=504 Quote Share this post Link to post Short link Share on other sites
sirmax 5,499 #111117 Posted October 8, 2013 (edited) The problem is not related to the python. The reason is that Application.swf search for xvm.swf with the related path: "../../../xvm/mods/xvm.swf", it is out of Paths bound and in that case WG search it in the res_mods dir. If you move/link /mods/0.8.8/in-res_mods/xvm-5.0.0-test3/res_mods/xvm dir to the res_mods/xvm, all will work, even if res_mods is not included into paths.xml xvm dir is designed to work without version dependency, and IMHO version dependency is useless at all. Please try the attached partial fix. It should work for localized characters now. It will not work if you are using absolute paths: os.getcwd() <Path>./mods/0.8.8/in-res_mods/xvm-5.0.0-test3/res_mods/0.8.8</Path> Unpack XVM to C:\Games\World_of_Tanks\mods\0.8.8\ did you forgot "in-res_mods"? I've commited your patch, but it this is only partial solution. It is working in the battle, but not in the hangar. To run hangar mods, you still need to create link: mklink mods/0.8.8/in-res_mods/xvm-5.0.0-test3/res_mods/xvm res_mods/xvm Edited October 8, 2013 by sirmax Quote Share this post Link to post Short link Share on other sites
bounceplink 2 #111134 Posted October 8, 2013 The problem is not related to the python. The reason is that Application.swf search for xvm.swf with the related path: "../../../xvm/mods/xvm.swf", it is out of Paths bound and in that case WG search it in the res_mods dir. If you move/link /mods/0.8.8/in-res_mods/xvm-5.0.0-test3/res_mods/xvm dir to the res_mods/xvm, all will work, even if res_mods is not included into paths.xmlAh, thank you for explaining this from my first post: Once you unpack the 0.8.8 directory to the default mod directory then you can use the <Path> include command to include your "xvm" directory for your customized configs. Yes, it still works even if you have the default mod location commented out as I have done above. xvm dir is designed to work without version dependency, and IMHO version dependency is useless at all.I tend to agree, however now that parts of XVM are included there in xvm\mods\xvm[-autologin,-hangar].swf and also for mod pack authors who need to maintain many different XVM configs it becomes useful to have it separate. It will not work if you are using absolute paths: os.getcwd() OK, this makes it very tricky. Perhaps one can assume a certain # of "../../" etc. Python 2.6 should really be better about working in localized settings. Unless there's a better way that I just don't know. did you forgot "in-res_mods"?Yes you are correct, I forgot to mention that in my post but it is correct in the filesystem/paths.xml file. I've commited your patch, but it this is only partial solution. It is working in the battle, but not in the hangar. To run hangar mods, you still need to create link: mklink mods/0.8.8/in-res_mods/xvm-5.0.0-test3/res_mods/xvm res_mods/xvm Thank you very much. Managing the link in res_mods\xvm seems like a reasonable solution. That being said I have to ask: is there any possibility to fix this for hangar mods also natively without using a link? Best regards. Quote Share this post Link to post Short link Share on other sites
sirmax 5,499 #111141 Posted October 8, 2013 Thank you very much. Managing the link in res_mods\xvm seems like a reasonable solution. That being said I have to ask: is there any possibility to fix this for hangar mods also natively without using a link? Looks like this is possible only if we'll move xvm dir into the versonified path. This will solve your issue, but will create many others. We need to think more about it. Quote Share this post Link to post Short link Share on other sites
bounceplink 2 #111552 Posted October 9, 2013 I've commited your patch, but it this is only partial solution. It is working in the battle, but not in the hangar. To run hangar mods, you still need to create link: mklink mods/0.8.8/in-res_mods/xvm-5.0.0-test3/res_mods/xvm res_mods/xvm I saw this made it into test4 and tried it on my PC and ran into a bug. Unless you include the XVM directory in the first 2 paths in paths.xml it will never be found. paths.xml: <root> <Paths> <!-- <Path>./res_mods/0.8.8</Path> --> <Path>./mods/0.8.8/YasenKrasen_0.8.8.4_V2/res_mods/0.8.8</Path> <Path>./mods/0.8.8/MeltyMapsMathMod088.02/res_mods/0.8.8</Path> <Path>./mods/0.8.8/xvm-5.0.0-test4/res_mods/0.8.8</Path>results in this (path debug output is mine): /------------------------------------------------------------------------------\ BigWorld Release Client (compiled at 19:46:43 Aug 30 2013) starting on Wed Oct 09 17:27:21 2013 Checking ./mods/0.8.8/YasenKrasen_0.8.8.4_V2/res_mods/0.8.8: mods found [XPM] preloader gui.Scaleform.locale path: ./mods/0.8.8/YasenKrasen_0.8.8.4_V2/res_mods/0.8.8/scripts/client/gui/mods path: ./mods/0.8.8/MeltyMapsMathMod088.02/res_mods/0.8.8/scripts/client/gui/mods ('[XPM] Error locating working directory: ', Exception('xpm.pyc is not found in the paths',)) [XPM] fallback to the default path: res_mods/0.8.8/scripts/client/gui/mods res_mods/0.8.8/scripts/client/gui/mods LoadMod: SessionStatistic LoadMod: MS [NOTE] (scripts/client/post_processing/__init__.py, 273): The quality = 0 was selected. PostProcessing.Phases.fini() \--------------------------------------------------------------------------------/I removed the string slicing here: (line 17): vals = subsec.values()#[0:2]And it works fine now (path debug output is mine): /------------------------------------------------------------------------------\ BigWorld Release Client (compiled at 19:46:43 Aug 30 2013) starting on Wed Oct 09 17:30:01 2013 Checking ./mods/0.8.8/YasenKrasen_0.8.8.4_V2/res_mods/0.8.8: mods found [XPM] preloader gui.Scaleform.locale path: ./mods/0.8.8/YasenKrasen_0.8.8.4_V2/res_mods/0.8.8/scripts/client/gui/mods path: ./mods/0.8.8/MeltyMapsMathMod088.02/res_mods/0.8.8/scripts/client/gui/mods path: ./mods/0.8.8/xvm-5.0.0-test4/res_mods/0.8.8/scripts/client/gui/mods ./mods/0.8.8/xvm-5.0.0-test4/res_mods/0.8.8/scripts/client/gui/mods [XPM] Loading mod: xvmstat 1.0.1 (http://www.modxvm.com/) [XPM] Loading mod: xvmtankcarousel 1.0.0 (http://www.modxvm.com/) LoadMod: SessionStatistic LoadMod: MS [NOTE] (scripts/client/post_processing/__init__.py, 273): The quality = 0 was selected. PostProcessing.Phases.fini() \--------------------------------------------------------------------------------/Please fix in SVN, thank you. Quote Share this post Link to post Short link Share on other sites
sirmax 5,499 #111564 Posted October 9, 2013 commited Quote Share this post Link to post Short link Share on other sites
Questler 0 #132249 Posted December 4, 2013 Hey guys As i se it, this is not fully fixed.It looks like the same things is missing as when you delete the Application.swf.Can some one please tell if this is correct? Quote Share this post Link to post Short link Share on other sites
Mr A 750 #132257 Posted December 4, 2013 Can some one please tell if this is correct? Application.swf - part of mod Quote Share this post Link to post Short link Share on other sites
Questler 0 #132414 Posted December 5, 2013 I know its part of mod, that is why i need it to work when the setup is like described in this topic. Quote Share this post Link to post Short link Share on other sites
bounceplink 2 #132419 Posted December 5, 2013 I know its part of mod, that is why i need it to work when the setup is like described in this topic. The 0.8.9 folder can be anywhere but the xvm folder (with configs and etc.) must be located within res_mods at this point. As sirmax mentioned moving it to the 0.8.9 dir would solve this issue but create many more. I'm using sirmax's workaround suggestion: symbolic directory link (mklink /d in Windows) to link from res_mods\xvm to the actual location of my xvm dir. When I release my mod pack I just put xvm into res_mods: sometimes it's best not to swim upstream. Quote Share this post Link to post Short link Share on other sites