Welcome
Ladies and Gents:

These forums are now closed and registration disabled.

Please join us at our new forum on Proboards. Our hope is that these new forums are more stable, provide more and better features, and allow continuation of the project forums in a safer, more secure, long term environment.

me3explorer.proboards.com

--The ME3Explorer Team

ME2 Texplorer Code Issues

Coder-centric area for programming advice and questions.

ME2 Texplorer Code Issues

Postby prince1142011 » 23 Jul 2014, 19:49

Hello all,
There is a documented bug in Texplorer for ME2 that causes texture replacement to go wrong sometimes: post7451.html#p7451

Essentially, some textures are incorrectly reported as being PCC stored rather than in the Textures archive. This causes issues with replacement either directly or using the new TPF tools.

I've been digging in the SVN code to try and figure out why and have discovered the following about the problematic textures:
  • The first PCC file the textures are encountered does not have a TextureFileCacheName property
  • At least one subsequent PCC file will have a TextureFileCacheName property

I believe the problem can be fixed by modifying the code for reading texture information once the treescan is complete. That's where I could use some help.
  • I know the TextureFileCacheName property of a texture is read during treescan. Is the property stored in the me2tree.bin file?
  • If it is stored, any clues as to which part of the code I need to be looking at?
  • If it is not stored, how is it determined on runtime and during texture replacement?

Thanks for any help!

prince1142011 has been thanked by:
prince1142011
User
 
Posts: 32
Joined: 05 Jan 2014, 03:57
Has thanked: 4 time
Have thanks: 8 time

Re: ME2 Texplorer Code Issues

Postby KFreon » 24 Jul 2014, 00:06

Thanks for looking into this.
That information is not stored in the tree because it changes when you change the texture (to fix sizing issues).

So what methods do later is to take the name of the first pcc in the list and generate a Texture2D object from it, then use it's arcName for the rest of things.
I suppose if arcName is null or none or whatever, we could keep looking through the list till we found one.
User avatar
KFreon
Toolset Developer
 
Posts: 1665
Joined: 16 Apr 2013, 00:57
Has thanked: 83 time
Have thanks: 520 time

Re: ME2 Texplorer Code Issues

Postby prince1142011 » 28 Jul 2014, 04:22

Thanks KFreon.

I discovered that if I rename the PCC files that don't have a arcName attribute for the texture so they are alphabetically after a PCC file that does have an arcName attribute, and then do a treescan the textures get imported correctly. After the import and reverting the file names to original, they work correctly in the game.

You'd said in chat that the majority of the functions just use the first PCC file in the tree. Since forcing that to change by changing the PCC file names works, would it be possible to just switch the order of the PCC files in the tree? Basically something like this:

Before (pseudocode):
Code: Select all
texture.PCC[0].name = PCC1
texture.PCC[0].arcName = null
texture.PCC[1].name = PCC2
texture.PCC[1].arcName = Textures
texture.PCC[2].name = PCC3
texture.PCC[2].arcName = null
texture.PCC[3].name = PCC4
texture.PCC[3].arcName = Textures

After (pseudocode):
Code: Select all
texture.PCC[0].name = PCC2
texture.PCC[0].arcName = Textures
texture.PCC[1].name = PCC1
texture.PCC[1].arcName = null
texture.PCC[2].name = PCC3
texture.PCC[2].arcName = null
texture.PCC[3].name = PCC4
texture.PCC[3].arcName = Textures
prince1142011
User
 
Posts: 32
Joined: 05 Jan 2014, 03:57
Has thanked: 4 time
Have thanks: 8 time

Re: ME2 Texplorer Code Issues

Postby KFreon » 28 Jul 2014, 05:17

That should be possible in the function that creates Texture2D's or PCC Objects.
So somthing like before returning the PCCObject, change the order. Sound good?
User avatar
KFreon
Toolset Developer
 
Posts: 1665
Joined: 16 Apr 2013, 00:57
Has thanked: 83 time
Have thanks: 520 time

Re: ME2 Texplorer Code Issues

Postby Hellstalker0352 » 05 Aug 2014, 03:03

I love you guys, I have a gut feeling I will be doing my ME2 playthrough really really soon <3

P.S. Only issue I have is the corrupted textures, fixes don't work for me D:

P.P.S. Waiting patiently :D
Hellstalker0352
User
 
Posts: 6
Joined: 14 Apr 2014, 17:45
Has thanked: 2 time
Have thanks: 0 time

Re: ME2 Texplorer Code Issues

Postby Didact2401 » 22 Aug 2014, 21:16

Any progress on this issue? My ME2 playthrough is currently on hold. :p
Didact2401
User
 
Posts: 49
Joined: 28 Dec 2012, 04:14
Has thanked: 0 time
Have thanks: 12 time

Re: ME2 Texplorer Code Issues

Postby KFreon » 22 Aug 2014, 22:56

Sorry, things are happening, just slowly. I'm still trying to work out this "compression method unknown" thing.
User avatar
KFreon
Toolset Developer
 
Posts: 1665
Joined: 16 Apr 2013, 00:57
Has thanked: 83 time
Have thanks: 520 time


Return to Coders' Help

Who is online

Users browsing this forum: No registered users and 1 guest

suspicion-preferred