• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Official DAT Texture Wizard (current version: 6.1.4)

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
@ DRGN DRGN I kinda get it how to find the Palette Offset, but i dont know very well how to change it into Placements.txt
for example :

37 - 000688a0

i was reading the user guide and I found this example

C:\exampleFolder\palettedImage_123456_8.tpl --> 0123F:3210F

so, what should I do ?
I don't think I wrote something for the program to read palette offsets from the placements text files, since they're so uncommon (and not used in Steelia's placements files). I think you'll just need to type that into the program manually. The example you found is an example of how it would be given to the program (in the "Source Texture(s):" text field), where 0123F would be the hex address of the image data, and 3210F would be the hex address of the palette data.
 
Last edited:

Dark Mario Bros

Smash Rookie
Joined
Jul 12, 2015
Messages
11
Location
Belo Horizonte, Brazil
@ DRGN DRGN
well, I couldnt find the palette offset from the eyes
Steelia's texture pack has the image offset but not palette offset
can you find them for me ?

dat file: plmrbu
textures folders of steelia's texture packs: 33EyeHalf, 36EyeB, 37EyeF
Image type : _9
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
@ DRGN DRGN
well, I couldnt find the palette offset from the eyes
Steelia's texture pack has the image offset but not palette offset
can you find them for me ?

dat file: plmrbu
textures folders of steelia's texture packs: 33EyeHalf, 36EyeB, 37EyeF
Image type : _9
For future reference (and for anyone else), there's discussion on how to find these starting here-ish.

For current reference, here they are:

0x2c9e0:0x359e0
0x448a0:0x718a0
0x4d8a0:0x71ac0
0x568a0:0x71ce0
0x5f8a0:0x71f00
0x688a0:0x72120

I'm just looking at data, so I can't tell which is which. You'll have to do a little testing.

You can read more about this where I linked to (and you'll need at least some understanding of the data structures), but here's a very brief description of what I did:

1) Looked up the image data headers by searching for the image data addresses (-0x20 since all addresses in the file are not counting the file header).
2) Searched for pointers to those headers, which led me to a table of image headers & palette headers (eyes commonly have this sort of thing)
3) Identified which pointers are for palettes (the first half of the table are image headers, the second half are palette headers)
4) Followed those pointers to the palette headers
5) Followed those palette headers to the palette data
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
@ DRGN DRGN Have you had any success swapping _9 textures by changing pointers in a .dat file?
I haven't tried it. I'll probably experiment with it at some point though. Having more CSPs, toggleable for all the costumes we can fit in the game, would be awesome.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
@ DRGN DRGN Have you had any success swapping _9 textures by changing pointers in a .dat file?
I dont see any reason why this wouldnt work.
For future reference (and for anyone else), there's discussion on how to find these starting here-ish.

For current reference, here they are:

0x2c9e0:0x359e0
0x448a0:0x718a0
0x4d8a0:0x71ac0
0x568a0:0x71ce0
0x5f8a0:0x71f00
0x688a0:0x72120

I'm just looking at data, so I can't tell which is which. You'll have to do a little testing.

You can read more about this where I linked to (and you'll need at least some understanding of the data structures), but here's a very brief description of what I did:

1) Looked up the image data headers by searching for the image data addresses (-0x20 since all addresses in the file are not counting the file header).
2) Searched for pointers to those headers, which led me to a table of image headers & palette headers (eyes commonly have this sort of thing)
3) Identified which pointers are for palettes (the first half of the table are image headers, the second half are palette headers)
4) Followed those pointers to the palette headers
5) Followed those palette headers to the palette data
Been staring at the joint matanim section and youre right about the tables. Its the section is actually really easy to understand. But thats probably because Ive been staring at the file layout for 8 hours a day for a month straight.
 

Dark Mario Bros

Smash Rookie
Joined
Jul 12, 2015
Messages
11
Location
Belo Horizonte, Brazil
For future reference (and for anyone else), there's discussion on how to find these starting here-ish.

For current reference, here they are:

0x2c9e0:0x359e0
0x448a0:0x718a0
0x4d8a0:0x71ac0
0x568a0:0x71ce0
0x5f8a0:0x71f00
0x688a0:0x72120

I'm just looking at data, so I can't tell which is which. You'll have to do a little testing.

You can read more about this where I linked to (and you'll need at least some understanding of the data structures), but here's a very brief description of what I did:

1) Looked up the image data headers by searching for the image data addresses (-0x20 since all addresses in the file are not counting the file header).
2) Searched for pointers to those headers, which led me to a table of image headers & palette headers (eyes commonly have this sort of thing)
3) Identified which pointers are for palettes (the first half of the table are image headers, the second half are palette headers)
4) Followed those pointers to the palette headers
5) Followed those palette headers to the palette data
oh , Thanks so much!

OOOOOOOOOOOOOOOOOOOOOOOOOOH it would make the life of this plumber easier
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
DRGN DRGN
MnSlChr.usd

Closed Port Half Bone Structures:

0035a3c8 = P1 top right
0035a408 = P1 bottom left

0035a508 = P2 top right
0035a548 = P2 bottom left

0035a7c8 = P3 top right
0035a808 = P3 bottom left

0035a9c8 = P4 top right
0035aa08 = P4 bottom right

--------
So add 0x2C to each offset to get the x-axis translation. 0x30 for y-axis translation.

My brief tests indicated a floating point value of 0.0625 = 1 pixel movement.

An x value of -0.0625 and a y value of -0.125 look good, but I'll let you have the final say as to the perfect values to use.

Capture.PNG


EDIT: actually, I think -0.125 for x and y might be perfect.
 
Last edited:

Anutim

Smash Apprentice
Joined
Oct 22, 2013
Messages
185
DRGN DRGN
MnSlChr.usd

Closed Port Half Bone Structures:

0035a3c8 = P1 top right
0035a408 = P1 bottom left

0035a508 = P2 top right
0035a548 = P2 bottom left

0035a7c8 = P3 top right
0035a808 = P3 bottom left

0035a9c8 = P4 top right
0035aa08 = P4 bottom right

--------
So add 0x2C to each offset to get the x-axis translation. 0x30 for y-axis translation.

Might brief tests indicated a floating point value of 0.0625 = 1 pixel movement.

An x value of -0.0625 and a y value of -0.125 look good, but I'll let you have the final say as to the perfect values to use.

View attachment 77190
Amazing! And the animation still looks as clean?
 

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
DRGN DRGN
MnSlChr.usd

Closed Port Half Bone Structures:

0035a3c8 = P1 top right
0035a408 = P1 bottom left

0035a508 = P2 top right
0035a548 = P2 bottom left

0035a7c8 = P3 top right
0035a808 = P3 bottom left

0035a9c8 = P4 top right
0035aa08 = P4 bottom right

--------
So add 0x2C to each offset to get the x-axis translation. 0x30 for y-axis translation.

Might brief tests indicated a floating point value of 0.0625 = 1 pixel movement.

An x value of -0.0625 and a y value of -0.125 look good, but I'll let you have the final say as to the perfect values to use.

View attachment 77190

EDIT: actually, I think -0.125 for x and y might be perfect.
How many times am I allowed to like this post before I am banned from Smashboards?
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
Gather ‘round, ladies and gentlemen! Prepare yourself for a tour of discovery and change. Uncover textures you’ve never known, and personally pave the way for incredible new graphics!

That's right, my latest texture revolution is upon you! Check the OP!
 

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
488
Location
BEST COAST, WA
NNID
1337-1337-1337
3DS FC
1337-1337-1337
Gather ‘round, ladies and gentlemen! Prepare yourself for a tour of discovery and change. Uncover textures you’ve never known, and personally pave the way for incredible new graphics!

That's right, my latest texture revolution is upon you! Check the OP!
h-hold-hold on.. MATE. I don't.. I don't know. Do you realize you might have taken away all my free time now.

This is insaaaaaaaaaaane! Talk about All In One. i love iiiitttt
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
DTW 3.0 is the real deal. I've been using it a whole bunch recently. The information display combined with the image previews just makes it so easy to use.

DRGN, does DTW still adjust the number of colors in a palette, or does it leave that value untouched?

Incredible work as always, DRGN.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
No, it leaves it untouched, and I came up with a solution to get the actual number currently in use. So that tab now reports how many colors are currently used (in case you've switched to a texture that uses a smaller palette) as well as the max (or at least the game's original value). You'll most likely want to grab the release in the OP, as it has a bunch of small changes and fixes like that from beta.
 

Lukcas

Smash Rookie
Joined
Aug 19, 2014
Messages
14
Location
Sweden
Hey man, great tool but im getting a problem that prevents me from changing textures.
When i try to change a texture this error pops up and crashes the program


Any ideas on how to fix this?
 

Lukcas

Smash Rookie
Joined
Aug 19, 2014
Messages
14
Location
Sweden
What exactly are your steps that lead to this?
I highlight the texture i want to change, drag the png to the program.
When i right click a file and import a texture nothing happens. All of this works for my friend.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
I highlight the texture i want to change, drag the png to the program.
When i right click a file and import a texture nothing happens. All of this works for my friend.
Also, I forgot to ask, what OS are you using? Probably more importantly, is it 32 or 64 bit? None of the systems I use are 32 bit, so I haven't tested on that (though if that's what you're using I could try recompiling for that anyways).
 

Lukcas

Smash Rookie
Joined
Aug 19, 2014
Messages
14
Location
Sweden
Also, I forgot to ask, what OS are you using? Probably more importantly, is it 32 or 64 bit? None of the systems I use are 32 bit, so I haven't tested on that (though if that's what you're using I could try recompiling for that anyways).
I'm using windows 10, 64 bit
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
I'm using windows 10, 64 bit
I'm not able to reproduce this so far, and I can't look at the source code right now, so I don't know what's causing it on your side. So ATM my best advice is to try re-downloading it, or use it on a different system, unfortunately.

I can still try to look into it if I have some more details though. The more exact that I know your scenario, the better chance I have of tracking it down.
What texture were you trying to replace (you can just go by the offset), and in what file?
Was the file in an ISO, or was it standalone?
What's your build of Win10 (the one I'm testing on atm is build 10240)? The easiest way to check this is to bring up the run dialog (Windows Key + R), type in "winver" and hit Enter.
Are you able to replace textures in other files?
 

Lukcas

Smash Rookie
Joined
Aug 19, 2014
Messages
14
Location
Sweden
I'm not able to reproduce this so far, and I can't look at the source code right now, so I don't know what's causing it on your side. So ATM my best advice is to try re-downloading it, or use it on a different system, unfortunately.

I can still try to look into it if I have some more details though. The more exact that I know your scenario, the better chance I have of tracking it down.
What texture were you trying to replace (you can just go by the offset), and in what file?
Was the file in an ISO, or was it standalone?
What's your build of Win10 (the one I'm testing on atm is build 10240)? The easiest way to check this is to bring up the run dialog (Windows Key + R), type in "winver" and hit Enter.
Are you able to replace textures in other files?
I'm also using build 10240
I've also tried changing mulitple textures, Dr. Mario textures, Character selection screen textures and multiple stage textures. None work
I've also tried changing files in both the iso and a standalone file
I've tried redownloading but no luck there
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
GrNKr.dat

An image is referenced so much that it's offset data gets cut off. Seems to be no way to scroll down and view all the info.
Capture.PNG

(this is fullscreen)
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
GrNKr.dat

An image is referenced so much that it's offset data gets cut off. Seems to be no way to scroll down and view all the info.
View attachment 82463

(this is fullscreen)
Heheh, yeah. I noticed that can happen. But it's so rare I figured I'd leave it for next release. I'll add a scrollbar to it. Thanks for reminding me.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
Ok, I got an update! Download in the OP.

Changelist (from v3.0):

- Character Color Converter added!
- Column sorting for DAT Texture Tree tab (click on column headers to sort)
- ISO File Tree support for 20XX 4.0 Beta
- Character files in the ISO File Tree organized into individual folders
- "Structure Offsets" tab renamed to "Texture Structure"
- Scrollbar for Texture Structure tab (appears when needed. yes, like Batman)
- Now shows Texture and Material structure offsets in Texture Structure tab
- Texture properties are now shown and editable in the Texture Structure tab
- Added framework for adding other structures & properties in the future
- Program now moves to the front when you've dragged something onto it
- Improved other drag-'n'-drop handling (mostly backend stuff)
- Fixed an issue that prevented PAL ISOs from being opened
- File naming for exported audio files has been changed slightly*
- Text entries (e.g. for image data headers) turn red when changed
- Fixed the counter incrementing of 'Processing File __....' for bulk imports

*Previously, certain files in the "audio" folder would have "(jp)" added to their name upon exporting, to differentiate them from files of the same name within the "us" subfolder. Now, instead, files within the "us" folder have "(us)" added to their name upon exporting. The same is done for the other language folders in the PAL version.

Doq Doq I looked into building for 32 bit as well. I thought I'd just be able to change some settings in the compiler, but it looks like I have to change my architecture of python and maybe some other libraries to 32-bit only. So I need to reinstall what I have on an emulator or another system and then I should be able to do it.

64 Bit. I'm running WineBottler on a mac. But I haven't had problems until now.
Sorry, I haven't used WineBottler before. And I don't have a mac to do testing on. :/
 
Last edited:

Uchihadark7

Smash Journeyman
Joined
Nov 22, 2015
Messages
243
Location
Idaho
Ok, I got an update! Download in the OP.

Changelist (from v3.0):

- Character Color Converter added!
- Column sorting for DAT Texture Tree tab (click on column headers to sort)
- ISO File Tree support for 20XX 4.0 Beta
- Character files in the ISO File Tree organized into individual folders
- "Structure Offsets" tab renamed to "Texture Structure"
- Scrollbar for Texture Structure tab (appears when needed. yes, like Batman)
- Now shows Texture and Material structure offsets in Texture Structure tab
- Texture properties are now shown and editable in the Texture Structure tab
- Added framework for adding other structures & properties in the future
- Program now moves to the front when you've dragged something onto it
- Improved other drag-'n'-drop handling (mostly backend stuff)
- Fixed an issue that prevented PAL ISOs from being opened
- File naming for exported audio files has been changed slightly*
- Text entries (e.g. for image data headers) turn red when changed
- Fixed the counter incrementing of 'Processing File __....' for bulk imports

*Previously, certain files in the "audio" folder would have "(jp)" added to their name upon exporting, to differentiate them from files of the same name within the "us" subfolder. Now, instead, files within the "us" folder have "(us)" added to their name upon exporting. The same is done for the other language folders in the PAL version.

Doq Doq I looked into building for 32 bit as well. I thought I'd just be able to change some settings in the compiler, but it looks like I have to change my architecture of python and maybe some other libraries to 32-bit only. So I need to reinstall what I have on an emulator or another system and then I should be able to do it.



Sorry, I haven't used WineBottler before. And I don't have a mac to do testing on. :/
No worries. I don't really expect anyone to do testing on Mac, so having a mac is just something I've had to deal with for the past year.
 

Hype Man

Smash Rookie
Joined
Jul 21, 2015
Messages
11
DRGN DRGN Hey I'm assuming you've been asked this before, but is there any way to use png to tpl.bat with mac (10.9.5)? Or is there another program I could use?

If not I may cry

EDIT: just saw that you haven't done any testing on mac. Guess i'll have to drown in a puddle of my own tears now.

Any chance I can texture hack without that program? I'm trying to making a melee build like the one used for B.E.A.S.T. V. Just change the colour scheme for the CSS and SSS and possibly add a logo like they did with the beast one.
 
Last edited:

Milun

Smash Ace
Joined
Oct 29, 2009
Messages
516
Location
Australia
Um... I found a bug:


It seems to happen when I index my pngs. If I don't It works fine, but it slightly alters the colours:



(You can see a faint line where the two textures connect).
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
Um... I found a bug:


It seems to happen when I index my pngs. If I don't It works fine, but it slightly alters the colours:



(You can see a faint line where the two textures connect).
It might not be a bug; it might be that you have palettes that are larger (more colors) than there's space for in the file, which would result in overwriting of the palette header (which then causes the game to look in some random place for the palette, which results in gibberish for colors). How many colors are you giving the palette, and what's the max that that texture has space for? Which file is this? It's also possible that you corrupted the palette header during a previous import attempt (also possibly part of the texture after it if that's the case), so if you're still having problems you'll either need to repair the header, or start over with a new, unmodified file. The Texture Structure tab will tell you the offsets of the palette header and palette data. If you still have trouble, you can post the texture and your file and I can take a look.

There was a check in there to prevent a palette with too many colors from being imported, but apparently I disabled it at some point, probably to do some testing or change it a bit, and forgot to re-enable it. I'll make sure it's there in the next update. I've also thought about making the palette entries on the Palettes tab clickable and directly editable, but I don't know how many people would actually find that useful, and so simply haven't done anything more with it because I've been working on other higher-priority features.
 

Milun

Smash Ace
Joined
Oct 29, 2009
Messages
516
Location
Australia
It might not be a bug; it might be that you have palettes that are larger (more colors) than there's space for in the file, which would result in overwriting of the palette header (which then causes the game to look in some random place for the palette, which results in gibberish for colors). How many colors are you giving the palette, and what's the max that that texture has space for? Which file is this? It's also possible that you corrupted the palette header during a previous import attempt (also possibly part of the texture after it if that's the case), so if you're still having problems you'll either need to repair the header, or start over with a new, unmodified file. The Texture Structure tab will tell you the offsets of the palette header and palette data. If you still have trouble, you can post the texture and your file and I can take a look.

There was a check in there to prevent a palette with too many colors from being imported, but apparently I disabled it at some point, probably to do some testing or change it a bit, and forgot to re-enable it. I'll make sure it's there in the next update. I've also thought about making the palette entries on the Palettes tab clickable and directly editable, but I don't know how many people would actually find that useful, and so simply haven't done anything more with it because I've been working on other higher-priority features.
The pallette was below 256, as it was meant to be. It's not corrupted, as I can swap in non-indexed images to fix it. Interestingly enough, while the image is selected, and you look in the pallette tab, the colours are fine. If you look at a different image, then go back to the bad one, the pallette tab shows the magenta.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
The pallette was below 256, as it was meant to be. It's not corrupted, as I can swap in non-indexed images to fix it. Interestingly enough, while the image is selected, and you look in the pallette tab, the colours are fine. If you look at a different image, then go back to the bad one, the pallette tab shows the magenta.
I think the amount of space palletes take up vary. So if the original image only used 8 bytes and youre trying to use 10 bytes you create an issue.
 
Top Bottom