Page 1 of 1

Initial D Special Stage .PAC 3D Files

Posted: Wed Oct 29, 2014 6:02 pm
by Argonaut
Extracted from an .AFS Archive, this is the standard model type for this game for cars/courses (.PAC) and I know it's been covered before with many other games but i've had no luck using the same tools on these. Can someone give me a hand? I'm sure this will be pretty quick compared to other things.

Sample course file (full size 2MB, not a large download, smallest one):

https://www.dropbox.com/s/elqkfwgnh8gzt ... Y.PAC?dl=0


And a sample car file (1MB):
https://www.dropbox.com/s/6gwyb6hk02cb2bt/FC3S.PAC?dl=0

Thanks!

Re: Initial D Special Stage .PAC 3D Files

Posted: Thu Nov 06, 2014 12:07 am
by barti
This QuickBMS script unpacks content from the PAC files:

Code: Select all

idstring "PAC\0"
get FILES long
get DUMMY long
get SSIZE long
getdstring FOLDERNAME 16

for i = 0 < FILES
    getdstring NAME 16
    get OFFSET long
    get SIZE   long
    get FOLDER long
    get DUMMY  long

    savepos TMP
    goto OFFSET
    getdstring SIGN 3
    if SIGN == "GIM"
	string NAME p= "%s.%s" NAME SIGN
    elif SIGN == "CMD"
        string NAME p= "%s.%s" NAME SIGN
    else
        string NAME += ".DAT"
    endif
    goto TMP

    log NAME OFFSET SIZE
next i
CMD files are models, and GIM files are textures. I can't find a program that can read them though.

Re: Initial D Special Stage .PAC 3D Files

Posted: Thu Nov 06, 2014 2:52 am
by chrrox
the cmd looks like a modified version of folklore's model format.

Re: Initial D Special Stage .PAC 3D Files

Posted: Fri Nov 07, 2014 1:30 am
by Argonaut
chrrox wrote:the cmd looks like a modified version of folklore's model format.
Cheers for both of your replies guys, didn't expect this to take off so quickly :) That script functions perfectly on the car Models but only creates .dats and .gims on the Course. All the dats feature the same header here: (It also produces correct file names IE lodxx and named objects, which is nice I guess)

Image

With a few pointers to a program which could read folklore's model format (to be used on these if the modifications aren't too extensive), I could get the car models and textures working just fine.

Here's a sample .dat LOD file just incase you can identify the file's header. Thanks for your input! :]

https://www.dropbox.com/s/mj4aybneigehx ... 1.DAT?dl=0

EDIT: In addition, Noesis won't read the produced .gim files for either car or course model. Hmm. :constipated:

Re: Initial D Special Stage .PAC 3D Files

Posted: Fri Nov 07, 2014 2:37 pm
by barti
The .dat file looks like it might be encrypted - "SMD" could be a garbled version of "CMD" and "KINA_NI˙T254_000" looks like it might be some kind of a model or material name.

Re: Initial D Special Stage .PAC 3D Files

Posted: Wed Apr 08, 2015 7:11 pm
by KarinFutoGT
So you can open the car models and textures? And how extract the .afs?
:keke: