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

Notices

Reply
 
Thread Tools
Old 01-25-2017, 02:43 PM   #1
Guy Incognito
Regular Forum User
Forum Member
 
Join Date: Sep 2006
Posts: 101
Thanks: 0
Thanked 57 Times in 27 Posts

Default [TUT][Naughtywvr Installer] Making addons

Requirements:
  1. A compiled version of: [SRC][Naughtywvr Installer] Annotations for Naughtywvr Installer
  2. An existing dat.raw (tex.raw, mdl.raw)
  3. The location offset and size of the file you're replacing
  4. A hex editor and understanding on how to use it.
  5. Ability to do basic math in hex (hint: use a calculator)


Details:
You will need a compiled version of the annotated version of the installer to generate an encrypted version of the index.
The unmodified installer only accepts encrypted addons, and ones generated by the annotated version will work on it.


You will also need the raw version of the asset you're replacing. Currently the only tool that can can turn assets into their raw versions (compressed + header)
is textools, and this guide assumes you're either using textools to generate tex.raw's or vrs to generate mdl.raws.

Extracting the tex.raw generated with textools:
  1. You will need to have a previously working install of a texture in tex tools (there's too many steps needed to convert a tex into a tex.raw manually and no other tools (yet) besides textools to do it automatically)
  2. Navigate to your <xiv root folder>\game\sqpack\ffxiv and open 040000.modlist with a text viewer
  3. In this example, this is it's contents:
    Code:
    {"name":"--c0201b0001_n","origOffset":"58A47910","modOffset":"00000830","folder":"","textureName":"Body"}
    {"name":"--c0401b0001_n","origOffset":"584D5C90","modOffset":"00085D30","folder":"","textureName":"Body"}
    {"name":"--c1401b0001_n","origOffset":"57E10810","modOffset":"0011A330","folder":"","textureName":"Body"}
  4. Note that there are 3 textures listed, and note their offsets. As textools stores it's assets in 040000.win32.dat3, you must subtract 30 from the offset as that identifies which dat it's stored in.
    The resulting offsets would be thus: 800, 85D00, and 11A300.
  5. The filesize of the tex.raw is simply <offset of next tex entry> - <offset of tex entry>, so the size of --c0201b0001_n.tex.raw in this example would be:
    Code:
    --c0401b0001_n: 0x00085D00
    --c0201b0001_n: 0x00000800
    ------------------------
    size:  0x00085D00 - 0x00000800 = 0x00085500 
    Converted back to decimal: 546048‬ bytes
  6. Now that you have the offsets for --c0401b0001_n.tex.raw, open 040000.win32.dat3 with a hex editor and pull the contents of it:
    Code:
    Start at: 0x0000800
    End at:   0x0085CFF (0x0085D00 -1)
  7. Save that data as --c0401b001_n.tex.raw
  8. Done


Extracting the mdl.raw generated with vrs:
(todo: need a sample generated by it, I don't know how/if it injects it into the game)

Creating a new addon entry:
  1. Assume the following:
    • Mod Name: example
    • Mod comments: an example comment
    • preview screenshot filename: example.bmp
    • original filename: --c0401b001_n.tex.raw
    • dat container of original file: 040000.win32.dat1 (see the other guides on how to find this)
    • offset of original file: 0x58A47910 (1487173904 in decimal) (see same guide as above)
    • Size of replacement file: 546048 bytes (see previous steps)
  2. Navigate to <naughtywvr root>\mods and make a folder named example
  3. Create a file named example.npindex2 inside the example folder and open it with notepad
  4. Place the following inside it:
    Code:
    Name : example ; comments : an example comment ; thumbImg : example.bmp
    c0401b001_n_DX11:040000.win32.dat1:1487173904:546048
    The format for the above is:
    Code:
    Name : <the name of the folder> ; comments : <text> ; thumbImg : <the name of the folder>.bmp
    <a description of the file>:<the dat container it goes in>:<the dat container offset>:<size of replacement file>
    (The file description simply to generate status log messages inside the installer, it is not actually used by the game)
  5. Copy --c0401b001_n.tex.raw to the example folder and rename it to example.dat
  6. Open the annotated version of the installer and select the addon from the list (you do not need to install it yet), this will generate an encrypted version of the addon
  7. Test the addon
  8. If it works: you are done, copy and zip up the entire example folder you made and you can redistribute it

Notes:
  1. This guide implicitly assumes that the replacement file is smaller then the one it replaces, there is (currently) no trivial way to check the size of the original file with 100% certainty, the file size as stated/implied by ffxiv file explorer is for the UNCOMPRESSED file size. The file size is listed in the header, but requires more math to calculate.
  2. This guide also assumes that the replacement file is compatible, there are no safety/sanity checks included, so it is possible to write invalid data to the game
  3. A compiled version of the annotated installer is not provided, you will have to compile it yourself

Last edited by Guy Incognito; 01-25-2017 at 02:49 PM.
Guy Incognito is offline  
Reply With Quote
Old 02-18-2017, 02:16 PM   #2
ANON00101011
Member
Forum Member
 
Join Date: Feb 2017
Posts: 11
Thanks: 0
Thanked 5 Times in 2 Posts

Default

Nice tutorial. 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 09:01 AM.

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.