XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Feb 19, 2018 2:42 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: FFXII .vbf format
PostPosted: Fri Feb 02, 2018 7:30 pm 
Offline
ultra-n00b

Joined: Mon Jul 06, 2015 3:10 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time

Anyone mind looking into the .vbf format Final Fantasy XII: The Zodiac Age (Steam) uses for it's data? None of the tools for .vbf's from FFX|X-2 work.

Thanks!

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: FFXII .vbf format
PostPosted: Sun Feb 04, 2018 1:39 pm 
Offline
beginner

Joined: Fri Dec 15, 2017 5:21 pm
Posts: 21
Has thanked: 1 time
Have thanks: 22 times
Actually, the vbftool1.1 by tek547 works just fine. It's slow (unpacking and repacking on a single HDD takes like 2.5 hours, it's much faster with two separate drives or SSD). It's fully functional for now, though. I'm working right now on my own tool that can reinsert files muuuch faster. Will update you once it's ready.

viewtopic.php?f=10&t=14340&start=15


Top
 Profile  
 
 Post subject: Re: FFXII .vbf format
PostPosted: Wed Feb 07, 2018 12:03 am 
Offline
n00b
User avatar

Joined: Fri Sep 09, 2016 5:19 am
Posts: 15
Has thanked: 2 times
Have thanks: 0 time
I was also looking for a different solution, though the old tool works, it takes quite some time. I'd love to see what you can come up with ffgriever. If you update on it, would it be on the forums here or elsewhere? :keke:


Top
 Profile  
 
 Post subject: Re: FFXII .vbf format
PostPosted: Wed Feb 07, 2018 12:13 am 
Offline
ultra-n00b

Joined: Wed Feb 07, 2018 12:06 am
Posts: 5
Has thanked: 0 time
Have thanks: 0 time
I Have Looked in It. on Steam to learn what we know right Now https://steamcommunity.com/linkfilter/? ... 21&t=17648 a LIcense Board Editor Mod has been Made, and i am Researching the Character Model Files to see if i can Play as Unplayable Characters. Join The Modding Discussion on that Page. And Also, and someone open some of the game's character Phyre Files? Because i don't know how to do it.


Top
 Profile  
 
 Post subject: Re: FFXII .vbf format
PostPosted: Mon Feb 12, 2018 2:42 am 
Offline
beginner

Joined: Fri Dec 15, 2017 5:21 pm
Posts: 21
Has thanked: 1 time
Have thanks: 22 times
As promised, a tool to quickly insert changed files into FF12 vbf archive. Please note it's still WORK IN PROGRESS. Keep a copy of your original file, just in case.

So what's the problem? Repacking 30GB archive can take even two hours (eg. with both unpacked directory and vbf on the same HDD).

With this tool it takes a few seconds at most (though it depends on number of files and their size).

The general idea of vbf:
1. All files are compressed (with uncompressed chunks whenever compression wasn't viable).
2. Static sections written one after another (header, md5s, file data, names, block data, compressed files).
3. If a file is modified and compressed, few issues are possible:
a). the original file is the same size, the compressed file is of a greater size.
b). the original file is of a greater size.

In case of a) there is a problem, because the file doesn't fit into space available. My solution is to move the file to the end of VBF archive, leave the original space unused.
In case of b) there is a problem, because the file has more blocks (64kB each block), so the block data is larger, yet doesn't fit into space available. My solution is to move few first files in archive to the end of VBF archive to make some room for all the additional header data (trying to free at least 10MB but have to always move whole files).

Now, the file data contains sizes and offsets, but in case a modified file compresses to a smaller size, we don't know anymore, what was the original space available (you can't subtract offsets of two consecutive files, as these do not have to be placed one after another). So let's say the next time the file after additional modifications is slightly larger but sill would fit within original boundaries. But since we don't know what the boundaries were, the file would be relocated to the end anyway.

To solve that, I've added additional file to the VBF archive, that keeps track of original offsets and sizes, so such an issue won't happen (the files when relocating, are getting some additional padding, so further alleviate the issue). If VBF doesn't contain this "vbf_extra.bin" file, it will be automatically created. If it exists, it will be read and used during reinsertions. This extra file is uncompressed to make it easier to read/modify.

Basically, only headers are recalculated each time. Only files present in patch directory are compressed and inserted.

Code:
FF12 Zodiac Age (PC) vbf tool v1.0 by ffgriever

Usage: ff12-vbf option input output

Options:
        -r              replace files in output vbf with files in input dir
                        (output defaults to {input}.bin)
        -u              unpack vbf into output dir
                        (output defaults to {input}_dir)


As you see it lacks "creation" mode (full repack). I will add that later for completion sake, but I'm actually trying to avoid the hassle of rebuilding whole archive - that's the whole point of the tool, to save time :D.

Typical output (first time, creating vbf_extra.bin):
Code:
ff12-vbf -r "D:\ff12 hd\pliki_gotowe" FFXII_TZA.vbf
Reading file structure...
Reading directory structure
gamedata/d3d11/artdata/font/us/fontex_subtitle.dds.phyre (5546.47kB)
ps2data/plan_master/us/plan_map/naf_a/naf_a01/global/naf_a01.ebp (50.62kB)
Creating indexes
vbf_extra.bin not found. Creating and moving files around.
Freed 172803635 bytes, vbf_extra.bin written at 0x74d4e1e9e
Patching gamedata/d3d11/artdata/font/us/fontex_subtitle.dds.phyre
Not enough space, file has been relocated to 74d661e9e...
Patching ps2data/plan_master/us/plan_map/naf_a/naf_a01/global/naf_a01.ebp
Not enough space, file has been relocated to 74d68d4ea...
Done!


Typical output (consecutive times):
Code:
ff12-vbf -r "d:\ff12 hd\pliki_gotowe" FFXII_TZA.vbf
Reading file structure...
Reading directory structure
gamedata/d3d11/artdata/font/us/fontex_subtitle.dds.phyre (5546.47kB)
ps2data/plan_master/us/plan_map/naf_a/naf_a01/global/naf_a01.ebp (50.62kB)
Creating indexes
Patching gamedata/d3d11/artdata/font/us/fontex_subtitle.dds.phyre
Patching ps2data/plan_master/us/plan_map/naf_a/naf_a01/global/naf_a01.ebp
Done!


In my case the structure of "pliki_gotowe" was:
Code:
├───gamedata
│   └───d3d11
│       └───artdata
│           └───font
│               └───us
│                       fontex_subtitle.dds.phyre

└───ps2data
    └───plan_master
        └───us
            └───plan_map
                └───naf_a
                    └───naf_a01
                        └───global
                                naf_a01.ebp


Basically, all the files you want to insert, all in appropriate directories. The insertion took less than three seconds instead of 50 minutes.

Here is the link: http://ff12.pl/down/ff12-tools-20180212.7z

Let me know if you find any bugs.


Top
 Profile  
 
 Post subject: Re: FFXII .vbf format
PostPosted: Mon Feb 12, 2018 3:10 am 
Offline
n00b
User avatar

Joined: Fri Sep 09, 2016 5:19 am
Posts: 15
Has thanked: 2 times
Have thanks: 0 time
Holy cow ffbriever! Thank you! I'm going to test it now with one of the license board mods the Steam community created and tell you how it went! :)

By the way, they are keeping an eye out on this thread as well apparently! Thank you for creating the tool for the community, we appreciate it man! :D


Top
 Profile  
 
 Post subject: Re: FFXII .vbf format
PostPosted: Mon Feb 12, 2018 3:26 am 
Offline
ultra-n00b

Joined: Wed Feb 07, 2018 12:06 am
Posts: 5
Has thanked: 0 time
Have thanks: 0 time
Great Work ffGriever!


Top
 Profile  
 
 Post subject: Re: FFXII .vbf format
PostPosted: Mon Feb 12, 2018 5:02 am 
Offline
n00b

Joined: Wed Jun 10, 2015 11:19 pm
Posts: 16
Has thanked: 7 times
Have thanks: 1 time
Great work, is it possible to make a version for FFX HD ?


Top
 Profile  
 
 Post subject: Re: FFXII .vbf format
PostPosted: Mon Feb 12, 2018 9:00 am 
Offline
beginner

Joined: Fri Dec 15, 2017 5:21 pm
Posts: 21
Has thanked: 1 time
Have thanks: 22 times
Beyond69 wrote:
Great work, is it possible to make a version for FFX HD ?

If the file format is the same, it should work. And since FFX tools work just fine with FFXII, I'd say just give it a try.


Top
 Profile  
 
 Post subject: Re: FFXII .vbf format
PostPosted: Mon Feb 12, 2018 5:22 pm 
Offline
n00b

Joined: Wed Jun 10, 2015 11:19 pm
Posts: 16
Has thanked: 7 times
Have thanks: 1 time
Works for FFX as well thank you



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group