Join also our Discord channel! Click here.

Watch Dogs XBG models

Post questions about game models here, or help out others!
User avatar
Tosyk
double-veteran
double-veteran
Posts: 945
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 225 times
Been thanked: 117 times
Contact:

Re: Watch Dogs XBG models

Post by Tosyk » Wed Apr 22, 2020 5:53 pm

volfin wrote:
Wed Apr 22, 2020 4:34 pm
Mesh only. importer doesn't support skeletons.
I'm porting addon to 2.8 blender and I'm nearly done.
also I noticed section called Skeleton and you mentioned in the one of the the latest posts the "bone dictionary" so I thought skeleton is also supported

also I'm getting this error when I'm trying to load model from .\Watch_Dogs2\data_win64\worlds\san_francisco\_ex\graphics\characters\wd2\persons_of_interest\pers01\pers01.xbg

Code: Select all

Traceback (most recent call last):
  File "C:\Users\User1\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\io_scene_WD2\__init__.py", line 82, in execute
    result=import_WD2.import_WD2(self.filepath, bpy.context,self.randomize_colors,self.import_vertcolors,self.skip_blank,self.use_layers,self.mesh_scale)
  File "C:\Users\User1\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\io_scene_WD2\import_WD2.py", line 956, in import_WD2
    xbtParser(xbtPath)
  File "C:\Users\User1\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\io_scene_WD2\import_WD2.py", line 544, in xbtParser
    filehandle=open(filename,'rb')	
FileNotFoundError: [Errno 2] No such file or directory: 'F:\\Games\\SteamLibrary\\steamapps\\common\\Watch_Dogs2\\data_win64\\worlds\\san_francisco\\_ex\\'

location: <unknown location>:-1
Thank you for all you do here
my blog | my forum

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 108 times
Been thanked: 302 times

Re: Watch Dogs XBG models

Post by volfin » Thu Apr 23, 2020 2:01 pm

yeah there was some code about skeletons but it's unused. I copy over a lot of code at the start of every project in case I need it. that was part of that boilerplate code.

As for your error, you need to move the files to a directory in the root, the filepath is much too long for it to handle, Python can only work with file paths 255 characters long or shorter.

User avatar
Tosyk
double-veteran
double-veteran
Posts: 945
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 225 times
Been thanked: 117 times
Contact:

Re: Watch Dogs XBG models

Post by Tosyk » Thu Apr 23, 2020 5:05 pm

thanks for the reply!
can you add a checker for the long path to bypass it when it throws error and still load the model?

edit:
I moved my game into F:\WD2 but still gets the error:

Code: Select all

Traceback (most recent call last):
  File "C:\Users\User1\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\io_scene_WD2\__init__.py", line 82, in execute
    result=import_WD2.import_WD2(self.filepath, bpy.context,self.randomize_colors,self.import_vertcolors,self.skip_blank,self.use_layers,self.mesh_scale)
  File "C:\Users\User1\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\io_scene_WD2\import_WD2.py", line 956, in import_WD2
    xbtParser(xbtPath)
  File "C:\Users\User1\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\io_scene_WD2\import_WD2.py", line 544, in xbtParser
    filehandle=open(filename,'rb')	
FileNotFoundError: [Errno 2] No such file or directory: 'F:\\WD2\\'

location: <unknown location>:-1
and for some files I'm getting this:

Code: Select all

Traceback (most recent call last):
  File "C:\Users\User1\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\io_scene_WD2\__init__.py", line 82, in execute
    result=import_WD2.import_WD2(self.filepath, bpy.context,self.randomize_colors,self.import_vertcolors,self.skip_blank,self.use_layers,self.mesh_scale)
  File "C:\Users\User1\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\io_scene_WD2\import_WD2.py", line 953, in import_WD2
    xbtPath=file.split('graphics')[0]+file_str(BI(1)[0])
  File "C:\Users\User1\AppData\Roaming\Blender Foundation\Blender\2.72\scripts\addons\io_scene_WD2\import_WD2.py", line 774, in file_str
    s+=lit.decode("utf-8")
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xaf in position 0: invalid start byte

location: <unknown location>:-1
Thank you for all you do here
my blog | my forum

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 108 times
Been thanked: 302 times

Re: Watch Dogs XBG models

Post by volfin » Thu Apr 23, 2020 6:33 pm

no there's no way to recover from that problem. you need to move the extracted files to a folder in the root of the drive with a short name, I usually name a folder 'x' and move extracted stuff there.

UTF errors I know nothing about. maybe a problem with your windows character set.

User avatar
Tosyk
double-veteran
double-veteran
Posts: 945
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 225 times
Been thanked: 117 times
Contact:

Re: Watch Dogs XBG models

Post by Tosyk » Thu Apr 23, 2020 6:54 pm

volfin wrote:
Thu Apr 23, 2020 6:33 pm
no there's no way to recover from that problem. you need to move the extracted files to a folder in the root of the drive with a short name, I usually name a folder 'x' and move extracted stuff there.
my new path for the game is F:\WD2, do you think path F:\x will resolve the problem?
volfin wrote:
Thu Apr 23, 2020 6:33 pm
UTF errors I know nothing about. maybe a problem with your windows character set.
the issue is in this function:

Code: Select all

def file_str(long): 
   s=''
   for j in range(0,long): 
       lit =  unpack('c',filehandle.read(1))[0]
       print("ord of "+str(lit)+" is "+str(ord(lit)))
       if ord(lit)!= 0:
           s+=lit.decode("utf-8")
       else:
           break;
   return s
some models works, some not because of this error. any suggestions? :scaredy:
Thank you for all you do here
my blog | my forum

Post Reply