Go Back   Neko-Sentai » FFXIV DAT Section » General Discussion

Notices

Reply
 
Thread Tools
Old 11-10-2016, 04:15 AM   #1
Guy Incognito
Regular Forum User
Forum Member
 
Join Date: Sep 2006
Posts: 102
Thanks: 0
Thanked 57 Times in 27 Posts

Default [TUT] how to use Frhed to manually insert dats

This is a quick tutorial on how to insert new game data (models/textures/etc) directly into the game dats. You should not be using this for anything that has an automated/easier method (such as textures with textools). This is for brute forcing when there are no alternatives.

These steps work more or less the same with any hex editor, I simply use Frhed because it's free.

  1. Download Frhed: frhed.sourceforge.net/en/
  2. MAKE A BACKUP OF ALL YOUR DATS
  3. Have the following information available to you: (There is a list below this)
    • The new dat you downloaded
    • Dat location
    • Offset
    • Length
  4. MAKE SURE YOUR NEW DAT IS NOT LARGER THEN THE ONE IT'S REPLACING
    The file sizes below are in bytes, right click the new dat in explorer and check it's size
  5. Open two separate windows/instances of frhed
  6. First Instance of frhed (if you are loading a loose dat file)
    • Go to File -> Open -> select the new dat you downloaded
    • Go to Edit -> Select All (or Control-A)
    • Go to Edit -> Copy (or Control-C)
    • Have current contents in your clipboard for the 2nd step
  7. First Instance of frhed (if you are loading an existing dat already in the game)
    • Go to File -> Open Partially
    • Select the dat from the file picker and select open
    • Enter in the offset value (exactly as provided, including the x if there is one)
    • Enter in the size value (also exactly as provided)
    • Select Ok
    • Go to Edit -> Select All (or Control-A)
    • Go to Edit -> Copy (or Control-C)
    • Have current contents in your clipboard for the 2nd step
  8. Second Instance of frhed
    • Go to File -> Open Partially
    • Select the dat from the file picker and select open
    • Enter in the offset value (exactly as provided, including the x if there is one)
    • Enter in the size value (also exactly as provided)
    • Select Ok
    • Zero out (delete) the existing dat
      • Go to Edit -> Select All (or Control-A)
      • Go to Edit -> Fill Selection
      • Enter in a value of 00 in the hex: field
      • Select Ok
    • Paste the new dat
      • Go to Edit -> Paste (or Control-V)
      • Select ok
      • Go to File -> Save
  9. Done
Files and offsets
  • Base female body:
    • Location: 040000.win32.dat0
    • Offset:137166848
    • Length: 11851
  • Base female legs:
    • Location: 040000.win32.dat0
    • 040000.win32.dat0
    • Offset:137076224
    • Length: 11851
  • Emperor's female body:
    • Location: 040000.win32.dat2
    • Offset: 683628288
    • Length: 77755
  • Emperor's female legs:
    • Location: 040000.win32.dat0
    • Offset: 892696576
    • Length: 77755

Last edited by Guy Incognito; 11-10-2016 at 04:21 PM.
Guy Incognito is offline  
Reply With Quote
The Following User Says Thank You to Guy Incognito For This Useful Post:
Shinobu (11-10-2016)
Old 11-10-2016, 05:15 AM   #2
Shinobu
Forum Lurker
Forum Lurker
 
Join Date: Nov 2016
Posts: 6
Thanks: 4
Thanked 0 Times in 0 Posts

Default

I can change my hairstyle with this? bcuz ffxiv textools It doesn't work

I want to change one of the default hairstyle from Female/Hyur/Midlander for this one: na.finalfantasyxiv.com/lodestone/playguide/db/item/0b296ac5953/
Shinobu is offline  
Reply With Quote
Old 11-10-2016, 05:25 AM   #3
Guy Incognito
Regular Forum User
Forum Member
 
Join Date: Sep 2006
Posts: 102
Thanks: 0
Thanked 57 Times in 27 Posts

Default

Quote:
Originally Posted by Shinobu View Post
I can change my hairstyle with this? bcuz ffxiv textools It doesn't work

I want to change one of the default hairstyle from Female/Hyur/Midlander for this one: na.finalfantasyxiv.com/lodestone/playguide/db/item/0b296ac5953/
I need two sets of filenames to do that: the original hairstyle you want changed, and the filename for the hairstyle that gives. If you can provide both of then then it should be possible, but with the following exceptions/issues:

You would need to open up the dats with ffxiv explorer and find them, there's a bunch of /obj/hair/ entries which are some of the hairstyles. There's a great deal of entries without filenames though.
If there's missing files, then it might simply break the dats being replaced, as every ingame model consists of a dozen or so files for 3d geometry/2d texture/material definitions (shinyness/etc)

Most of the work is getting the filenames and the offsets once you know the filenames.

If you can find the hairstyle's texture in textools, the filename of the texture is a good hint on the full file name/path of the rest of the models.
Guy Incognito is offline  
Reply With Quote
The Following User Says Thank You to Guy Incognito For This Useful Post:
Shinobu (11-10-2016)
Old 11-10-2016, 06:05 AM   #4
Shinobu
Forum Lurker
Forum Lurker
 
Join Date: Nov 2016
Posts: 6
Thanks: 4
Thanked 0 Times in 0 Posts

Default

Quote:
Originally Posted by Guy Incognito View Post
I need two sets of filenames to do that: the original hairstyle you want changed, and the filename for the hairstyle that gives. If you can provide both of then then it should be possible, but with the following exceptions/issues:

You would need to open up the dats with ffxiv explorer and find them, there's a bunch of /obj/hair/ entries which are some of the hairstyles. There's a great deal of entries without filenames though.
If there's missing files, then it might simply break the dats being replaced, as every ingame model consists of a dozen or so files for 3d geometry/2d texture/material definitions (shinyness/etc)

Most of the work is getting the filenames and the offsets once you know the filenames.

If you can find the hairstyle's texture in textools, the filename of the texture is a good hint on the full file name/path of the rest of the models.
nice thank you!

Default hair: i.imgur.com/21UiiqO.png

Lightning hair: i.imgur.com/a7h6Lq9.png

idk if you need the files so I uploaded them anyway: mega.nz/#!AokAUZKT!5iDXzv62EAn1MEjoegpt1bd_E3oblmL4yMGmRRk fqj8
Shinobu is offline  
Reply With Quote
Old 11-10-2016, 12:43 PM   #5
Guy Incognito
Regular Forum User
Forum Member
 
Join Date: Sep 2006
Posts: 102
Thanks: 0
Thanked 57 Times in 27 Posts

Default

Quote:
Originally Posted by Shinobu View Post
nice thank you!

Default hair: i.imgur.com/21UiiqO.png

Lightning hair: i.imgur.com/a7h6Lq9.png

idk if you need the files so I uploaded them anyway: mega.nz/#!AokAUZKT!5iDXzv62EAn1MEjoegpt1bd_E3oblmL4yMGmRRk fqj8

Hmm, there's another problem with dat swapping this way: c0201h0101_hir.mdl is simply larger then c0201h0015_hir.mdl, 0101 has 50% more polys which makes it larger.

Manually dat swapping requires the new model to be equal/smaller then the one it's replacing. It would be possible in the future if you could also place models/things that are not textures into dat3 and have the index use that instead (which is what textools does for textures).

But right now your current request isnt possible short of opening up the model in vrs and making it smaller.

If it wasnt for this issue: knowing the filename means you can find the file offset and size. It would be as simple as using that to copy and paste the data from one dat into another.
Guy Incognito is offline  
Reply With Quote
Old 11-10-2016, 12:59 PM   #6
Shinobu
Forum Lurker
Forum Lurker
 
Join Date: Nov 2016
Posts: 6
Thanks: 4
Thanked 0 Times in 0 Posts

Default

Quote:
Originally Posted by Guy Incognito View Post
Hmm, there's another problem with dat swapping this way: c0201h0101_hir.mdl is simply larger then c0201h0015_hir.mdl, 0101 has 50% more polys which makes it larger.

Manually dat swapping requires the new model to be equal/smaller then the one it's replacing. It would be possible in the future if you could also place models/things that are not textures into dat3 and have the index use that instead (which is what textools does for textures).

But right now your current request isnt possible short of opening up the model in vrs and making it smaller.

If it wasnt for this issue: knowing the filename means you can find the file offset and size. It would be as simple as using that to copy and paste the data from one dat into another.
how about using a longer default hair?
Shinobu is offline  
Reply With Quote
Old 11-10-2016, 01:24 PM   #7
Guy Incognito
Regular Forum User
Forum Member
 
Join Date: Sep 2006
Posts: 102
Thanks: 0
Thanked 57 Times in 27 Posts

Default

Quote:
Originally Posted by Shinobu View Post
how about using a longer default hair?
If the dat is big enough and the material file is compatable: then yes I think it would be possible (I have not really worked though the details of swapping this way, as this guide assume that the new dat is a custom one intended to replace a specific dat, and this small enough to fit).

If you look at c0201h0101_hir.mdl in data explorer and go to the raw hex tab, it's 0x2143F (the final row is 0x21430, which is the 1st byte in that column, the last byte is 0x2143F, hence that size) bytes in size, converted to decimal that's 136255 bytes.

You also need to make sure that the material file is compatible(?).
mt_c0201h0101_hir.a.mtrl and mt_c0201h0101_acc_b.mtrl looks identical to the mtrl of 0015, except for the filenames of the textures inside the file.

If you can find a large enough donor model with a compatible mtrl, I think c0201h004_hir.mdl might be suitable. It's mtrl file also seems compatible (I have not really dealt with texturing of models, so I dont know if this is common/uncommon)

I'll write a 2nd guide in the future on how to find the offsets, but in this example you would swap the mdl manually and use textools to swap all the textures. As I've stated: textures have no issues with sizes as textools places them in a new dat.
Guy Incognito is offline  
Reply With Quote
Old 11-10-2016, 04:12 PM   #8
Guy Incognito
Regular Forum User
Forum Member
 
Join Date: Sep 2006
Posts: 102
Thanks: 0
Thanked 57 Times in 27 Posts

Default

I got it working:




The hairstyle is invisible because I cant swap the textures, textools seems to have issues loading the hair textures even with completely unmodified dats.
You can see the untextured model loaded correctly in data explorer.


(I wouldn't be surprised if someone actually wants a completely bald female hairstyle though, but that's for another time)

Here's the details for swapping the mdls.
  • c0201h0004_hir.mdl (shared female hairstyle "#04", not all hairstyles are available for all races/clans, so this shows up as midlander 2)
    • Location: 040000.win32.dat0
    • Offset: 1509461120
    • Length: 143955
  • c0201h0101_hir.mdl (shared female hairstyle "#101" - lightning's hairstyle
    • Location: 040000.win32.dat0
    • Offset: 742718208
    • Lenght: 136255

You'll have to figure out how to get the texture working on your own, beyond the fact I can tell you the physical locations of any arbitrary dat inside the game, I don't know much more then you do with regards to these specifics.

You still need to swap the contents of:
  • DX9 Textures:
    • c0201h0101_hir_s.tex
    • c0201h0101_hir_n.tex
  • DX11 Textures:
    • --c0201h0101_hir_s.tex
    • --c0201h0101_hir_n.tex
  • The color map textures
    • c0201h0101_acc_d.tex
    • c0201h0101_acc_s.tex
    • c0201h0101_acc_n.tex

I will add additional instructions in the OP for swapping retail -> retail dats, so bear with me.

Last edited by Guy Incognito; 11-10-2016 at 06:26 PM.
Guy Incognito is offline  
Reply With Quote
The Following User Says Thank You to Guy Incognito For This Useful Post:
Shinobu (11-10-2016)
Old 11-10-2016, 07:35 PM   #9
Shinobu
Forum Lurker
Forum Lurker
 
Join Date: Nov 2016
Posts: 6
Thanks: 4
Thanked 0 Times in 0 Posts

Default

Thanks again for the help!

I will try to swap those files.
Shinobu is offline  
Reply With Quote
Old 02-18-2017, 03:17 PM   #10
ANON00101011
Member
Forum Member
 
Join Date: Feb 2017
Posts: 11
Thanks: 0
Thanked 5 Times in 2 Posts

Default

For those looking for a way to get around the serial key requirement for the naughtyWeaver patch, check out my post in General Discussion.

It will be labeled "naughtyWeaver Missing Serial Key 'Fixed'".
ANON00101011 is offline  
Reply With Quote
Reply

Lower Navigation
Go Back   Neko-Sentai » FFXIV DAT Section » General Discussion

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -5. The time now is 04:17 PM.

design by: Themes by Design


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
punch-dnaAll company, product, system names and/or company logos and marks are the registered trademarks or trademarks of their respective owners. If you are the copyright holder of any material found on this site and believe it has been used unfairly please contact one of the forum administrators.