Jump to content
Korean Random
Sign in to follow this  
bounceplink

paths.xml and XVM (WoT 8.8?) bug

Recommended Posts

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 by bounceplink

Share this post


Link to post

Short link
Share on other sites

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()
\--------------------------------------------------------------------------------/

post-17496-0-09152700-1380822389_thumb.jpg

Edited by bounceplink

Share this post


Link to post

Short link
Share on other sites

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

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 by bounceplink

Share this post


Link to post

Short link
Share on other sites

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.

Share this post


Link to post

Short link
Share on other sites

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:

  1. Rename C:\Games\World_of_Tanks\res_mods\0.8.8\ to C:\Games\World_of_Tanks\res_mods\0.8.8-backup\
  2. Makedir C:\Games\World_of_Tanks\mods\0.8.8\
  3. Unpack XVM to C:\Games\World_of_Tanks\mods\0.8.8\
  4. Make paths.xml look like the above
  5. Run game.

__init__.py.rar

Share this post


Link to post

Short link
Share on other sites

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 by sirmax

Share this post


Link to post

Short link
Share on other sites

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

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

Share this post


Link to post

Short link
Share on other sites

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.

Share this post


Link to post

Short link
Share on other sites

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.

Share this post


Link to post

Short link
Share on other sites

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?

Share this post


Link to post

Short link
Share on other sites

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

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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...