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

Using the TPF Tools

Deprecated or out of scope tutorials.

Using the TPF Tools

Postby KFreon » 11 Jan 2014, 02:12

Welcome to the:
TPF Tools/Installer Tutorial!

This tutorial will go over what TPF Tools can do and how to go about doing it.
Basically it replaces ModGenerator and ModMaker for textures by bypassing .mod's completely. This prevents problems where a .mod doesn't have the correct information for a specific user (eg wrong DLC/localisation) by building for each users' system.

For users who don't know the terms: Vanilla, .mod, .tpf, etc
Spoiler:
A .tpf is a package of texture files (Images) created and normally used by Texmod, a program that does what we do, but temporarily.
A .mod is a file created by Saltisgood, The Fob, and WV as a means of distributing textures so users didn't have to fiddle with Texplorer. Texture .mods are now obsolete.
A vanilla install is a fresh installation with absolutely no modifications. Texplorer checks this and WV's VanillaMaker can help ensure you have a good installation.
Also read this.


Features:
- Ability to view TPF without extraction incl details, preview, and .def
- Extract specific textures from TPF
- Convert textures between .dds surface formats (DXT1, DXT5, etc)
- Install textures directly from TPF's and raw .dds files
- Create .mod as you would from Texplorer's ModGenerator
- Multiple TPF's and raw image installation supported
- Ability to replace invalid textures via right click
- Save all opened files as .tpf (2 versions, safe one = texmod incompatible, unsafe = texmod compatible)
- Works for ME1, 2, and 3 :D


MOST PEOPLE LOOK HERE
Most users just want to install textures, so all you need to do is have a fixed TPF from Antarius or somewhere similar, and click the "Install valid mods" button. That's it!
You have to select which game you want to mod first with the top right "Change" button.
If you don't have a fixed TPF, you can try "Autofix and Install" which will attempt to fix invalid textures before installing. May not work...
NOTE: Invalid textures will be ignored.



How to use
How to open
First, how to get to it. Right here in the tools menu:
Image


Main window info
That opens this window where you can see several things to do.
You can load textures through the Load TPF menu, or by dropping and dragging TPF's or .dds images.
NOTE: The top right button changes which Texplorer tree to look at (ie change this to mod each game)
Image


After loading TPF
You can load a tpf up the top and explore it as you could in Salt's TPF Explorer tool. (Cos that's where I got the code from)
From here, you can see the contents of the TPF, extract them by right clicking, or extract them all with the menu up top.
Otherwise, right-clicking a texture gives the option to extract, convert, or replace it.
You can also remove textures from the list using the Delete key.
Image


You can then Analyse the TPF against the Texplorer tree. This will search for matching textures as Texplorer's ModGenerator does. (Cos that's where I got the code)
Any invalid textures are flagged and the details of what's wrong with them is displayed next to them, and in the right-hand details pane.
You can now replace invalid textures with valid ones, and the program will check them again.
The Analyse button takes you to this stage automatically.
You can now both see and select the PCC's you wish the install to alter in the PCC's pane.
Image



The final step then is to install all valid textures. This will ignore all invalid textures and only try to install valid ones.
Image


New buttons are "Autofix and Install" and "Save to .mod". They perform their various functions without requiring user input after selecting TPF's.
Some other things you can do are repacking all open files as a .tpf. This is builds a tpf that this program can read, that is, you can distribute tpfs for this program. HOWEVER, they are not compatible with texmod. I'll see what I can do about that.
However you can also Rebuild with Texmod. This button is experimental and may not work on all systems. It creepily takes control of the mouse and just clicks the relevant buttons in Texmod.

You can also convert .dds textures between various surface formats, such as DXT1, DXT5, V8U8, and more.
Image


DISCLAIMER: I take credit only for smooshing functions together. All real work was done by Salt, AK, WV, and no doubt others.

User avatar
KFreon
Toolset Developer
 
Posts: 1665
Joined: 16 Apr 2013, 00:57
Has thanked: 83 time
Have thanks: 520 time

Re: Using the TPF Tools

Postby almostfaceman » 17 Jan 2014, 23:29

After installing textures with this method, do the dlc (if applicable) default.sfar's (as applicable) need to be "rebuilt" along with the PCConsoleTOC.bin (using the appropriate tools)?
Good. Bad. I'm the guy with the gun.
User avatar
almostfaceman
User
 
Posts: 123
Joined: 20 Nov 2013, 16:47
Location: Texas
Has thanked: 146 time
Have thanks: 12 time

Re: Using the TPF Tools

Postby giftfish » 18 Jan 2014, 00:54

One question, one comment :]

First, regarding raw .dds textures. This is likely a stupid question, but since you can drag a .dds here with literally any file name, how do you link it to a specific game texture from this interface? Or, do you basically need to give it an identical name to what you want to replace, I guess?

Second, regarding a potential bug. I can drag a .dds texture to the window (we'll say it has a file name not found in the tree), and the tool will tell me it has no mips. When, in fact, it absolutely has mips. 100% certain. I can package the same file with texmod quick, load it in, and then miraculously, it has mips. So, is this due to the filename not matching anything in the tree again, or is this a potential bug?
giftfish
 

Re: Using the TPF Tools

Postby KFreon » 18 Jan 2014, 11:12

@ almostfaceman: Um...Actually I don't know. Quick code check says yes. Yes I do :P
Thanks for reminding me :D I'll do that automatically like modmaker etc.

@ giftfish: Ok so the dragging dds thing. If you drag the .dds in with a .def or there is already a .def in there, it will check to see if the filename is in any .def loaded. That's only if its name doesn't have the hash in it. So if its "MASSEFFECT3.EXE_0x15A1G17R.dds" or whatever, that has the hash, and it will use that. Otherwise it checks any loaded .def files to find it and if it still can't...Um I can't remember what it does. Probably says not found or completely ignores it...

Arrghh I swear I fixed that mip bug. I'll have another look. So you tested it with what format texture and it wasn't found in the tree at all?

EDIT: So if the hash is unknown, it dies. Fixed in my copy now though so we'll see how it goes. Thanks for pointing it out :D

KFreon has been thanked by:
User avatar
KFreon
Toolset Developer
 
Posts: 1665
Joined: 16 Apr 2013, 00:57
Has thanked: 83 time
Have thanks: 520 time

Re: Using the TPF Tools

Postby giftfish » 18 Jan 2014, 18:42

KFreon wrote:@ giftfish: Ok so the dragging dds thing. If you drag the .dds in with a .def or there is already a .def in there, it will check to see if the filename is in any .def loaded. That's only if its name doesn't have the hash in it. So if its "MASSEFFECT3.EXE_0x15A1G17R.dds" or whatever, that has the hash, and it will use that. Otherwise it checks any loaded .def files to find it and if it still can't...Um I can't remember what it does. Probably says not found or completely ignores it...

Arrghh I swear I fixed that mip bug. I'll have another look. So you tested it with what format texture and it wasn't found in the tree at all?

EDIT: So if the hash is unknown, it dies. Fixed in my copy now though so we'll see how it goes. Thanks for pointing it out :D

Yeah, basically it just says it's invalid. If you, for example, drag a .dds in the window named "test_texture.dds". So, basically, for people just walking into the tool for the first time, and who maybe don't have experience with textures at all, they have to integrate the "hash" (that weird-looking alpha-numeric code) into the file name. There's no way to "browse" to the texture or anything.

And...I think I have a few other bugs for you here.

1. I've tested this with the ThaneMOD cabin photo and hoodie (by Ottemis) and those work great. A CustTex is generated & TOC.bin is automatically updated. Awesome & easy!

BUT...

2. UI textures are a big problem. These don't seem to be working at all. I've triple-checked things on my end, and the tool seems to be either making errors (but not knowing it) or failing completely (and still not knowing it).

We replace 4 UI textures for ThaneMOD:

--CDX_Drell_512x256 (0x4A83EEB5)
--Kinect_OptionNarrative_512x256 (0x800751AA)
--Kinect_PowerWheel_512x256 (0xA9DCDC85)
--Kinect_SquadOrders_512x256 (0xC3328A25)

All these showed up in the TPF tool as formatted properly and it "matched" things up via the Texplorer search correctly. I could view each image appropriately, and each new texture was linked to the appropriate file name. But, here's the results I got:

--CDX_Drell_512x256 (0x4A83EEB5) >>> new texture not applied; original texture still present and linked to Textures.tfc, despite debug window saying was replaced

--Kinect_OptionNarrative_512x256 (0x800751AA) >>> incorrect new texture applied (used the one for 0xC3328A25 instead); Texplorer says it's linked to Textures.tfc & not CustTextures0.tfc, despite being a new texture

--Kinect_PowerWheel_512x256 (0xA9DCDC85) >>> new texture not applied; original texture still present and linked to Textures.tfc, despite debug window saying was replaced

--Kinect_SquadOrders_512x256 (0xC3328A25) >>> new texture not applied; original texture still present and linked to Textures.tfc, despite debug window saying was replaced

Let me know if you want me to send you the .tpf file. As far as I can tell, I didn't make any errors, and everything is as it should be in the .tpf and in the TPF Tool. But none are actually applied correctly.
giftfish
 

Re: Using the TPF Tools

Postby KFreon » 18 Jan 2014, 22:39

I'm not sure what you want me to do with the texture name thing. A hash is required from somewhere I'm afraid. If you're replacing a texture, you don't need the hash in the name (most of the time) cos its already got it from the original texture.

Yes, please send that .tpf. But first thing I need to know is do those textures work in modmaker? Cos if they don't, they won't work here either.
User avatar
KFreon
Toolset Developer
 
Posts: 1665
Joined: 16 Apr 2013, 00:57
Has thanked: 83 time
Have thanks: 520 time

Re: Using the TPF Tools

Postby giftfish » 18 Jan 2014, 23:39

KFreon wrote:I'm not sure what you want me to do with the texture name thing. A hash is required from somewhere I'm afraid. If you're replacing a texture, you don't need the hash in the name (most of the time) cos its already got it from the original texture.

Yes, please send that .tpf. But first thing I need to know is do those textures work in modmaker? Cos if they don't, they won't work here either.

I don't expect you to do anything about the texture name thing, KFreon. I was just clarifying, so I understood how it worked.

Here's the link for the .tpf -- I hope you find a simple error that I made, lol!

Also, another very, very weird issue. Our testers can't get the cabin photo .tpf that I just made to work. Despite it working for me. After troubleshooting a bit with coldwetn0se, my Texmod hash is different than hers. How is that possible?

Mine is: 0x861F2964 and hers is 0xB942DE04. She get's a "NOT IN TREE" error when using the .tpf, and mine works fine.

After finding this out, I asked coldwetn0se to look up her hashes for the UI textures we're replacing. All those are the same as mine. But, the photo is different.

I thought these hashes were constants? What the heck?
giftfish
 

Re: Using the TPF Tools

Postby KFreon » 19 Jan 2014, 00:30

I didn't mean to be confrontational, just wondered if there was an idea you were alluding to. I find it difficult to think non techie these days :)

The easiest thing for them to do would be to leave it in the name format from texmod, or if they get it from a TPF, just throw the old .def in with it.

I've seen different hashes from texmod before, and I'm not certain what causes them.
I just had a thought though, if the texture is modified when you extract it with texmod, ie you've already replaced it but you go back and get it again with texmod, that would give you a different hash.
That, or treescanning on modified files would give the search different hashes.

One of these has happened to you as my hash is the same as hers. Yours is not in my tree :)

Some further info on hashes: Hashes are a numerical representation of the image (usually down to a bitwise level). As such, if any part of the image changes, format, colours, a single pixel, the hash will be different. Now texmod calculates these magically (I don't know) for the image currently loaded in memory. So whatever that image is, is the hash it gives.
So if you modified the pictureframe, then went into texmod and got it again, the hash you get will be different. Either way, the hash in your tree for that texture will be different to everyone elses.

Now another thing. We might have all further bug things go into this topic on the bug reports forum :)
User avatar
KFreon
Toolset Developer
 
Posts: 1665
Joined: 16 Apr 2013, 00:57
Has thanked: 83 time
Have thanks: 520 time

Re: Using the TPF Tools

Postby giftfish » 19 Jan 2014, 00:57

@KFreon --

I didn't think you were being confrontational, lol. It's all good.

I didn't extract any of the game textures with texmod. I just used Texplorer to look up the hashes, so I know how to name the files to create the TPF. And, yes, I figured my hash was somehow....incorrect...as the .tpf replace was working for me and nobody else. Ok, so...apparently I need to go vanilla and rebuild my tree.bin to see if that fixes it. Was hoping to avoid that, but I was thinking you were probably going to have me try that. Blarg.

Bug reports in the new thread, check.

Please let me know what you find out about the .tpf I linked. As I said, all those hashes do match, but the textures don't seem to be added correctly. I'll vanilla my game and rebuild my tree.bin and let you know what happens :)

Thanks!
giftfish
 

Re: Using the TPF Tools

Postby KFreon » 19 Jan 2014, 01:11

Yes, I'll get onto that weirdness as soon as possible :D
User avatar
KFreon
Toolset Developer
 
Posts: 1665
Joined: 16 Apr 2013, 00:57
Has thanked: 83 time
Have thanks: 520 time

Next

Return to Tutorials - Deprecated

Who is online

Users browsing this forum: No registered users and 0 guests

suspicion-preferred