Jump to content
Karybdis

DISCOVERY: File Formats, The Unknown Formats (EDIR,AB,AE etc.)

46 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     

    The character table for INFO.

    INFO files seem to use a non-standard maxis created character format, so you can't simply decode, you have to switch one bit of hex for another

    --------------------------------------------------------------------------------------

    Character Table

    --Numbers 0-9
    4b,4a,49,48,4f,4e,4d,4c,43,42

    --Characters A-Z (capitals)
    3a,39,38,3f,3e,3d,3c,33,32,31,30,37,36,35,34,2b,2a,29,28,2f,2e,2d,2c,23,22,21

    --Characters a-z (lowercase)
    1a,19,18,1f,1e,1d,1c,13,12,11,10,17,16,15,14,0b,0a,09,08,0f,0e,0d,0c,03,02,01

    --Special Chars (table)
    (space),- ,~ ,. , { ,} ,| ,` ,[ ,_ ,^ ,] ,\ ,@ ,; ,: ,? ,> ,= ,5b ,56,05,55,04,06,07,1b,20,24,25,26,27,3b,40,41,44,45,46,47
    ----------------------------
    + ,' ,) ,( ,/ ,, ,# , ,! ,* ,& ,% ,$
    50,51,52,53,54,57,58,59,5a,5c,5d,5e,5f

    --------------------------------------------------------------------------------------

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    INFO format completed after many hours of stupidly boring work 23.gif. Spec below ---

    ------------------------

    INFO

    The info format is basically a storage for all the data in the picture albums. The description of the picture is kept in a text file, but all the rest of the data, including city name, mayor and other data is stored inside this format to save room.

    There appear to be two types of info files. City pictures and region pictures which have different structures. Each info file is comprised of sections identified by a 1 byte section header.

    A note on the Picture/INFO type section seen below. This was deduced in the following way. No known settings ingame of any sort (night, underground etc) change this. It is the same for all cities in all regions. It is confirmed to be the same on other people's copies of the game. It doesnt change anything with the display. The picture/INFO type is all that's left. It might describe the next section ingame, but since maxis doesnt display the next section ingame anyways, that's unconfirmable, and it would still be picture/INFO type even if it did.

    ---------------- City

    11 BYTES - SanityCheck (failed apparently ;-) )
    BYTE - 71 (Start Username)
    X BYTES - User name from your config-log in the simcity4 apps dir
    BYTE - 71 (Start City name)
    X BYTES - City name one byte per letter including spaces
    BYTE - 71 (Start Mayor Name)
    X BYTES - Mayor Name, One byte per letter
    BYTE - 71 (Start Date of picture)
    X BYTES - Date of picture
    BYTE - 71 (Start Population)
    X BYTES - Population
    BYTE - 71 (Start Funds)
    X BYTES - City Funds
    BYTE - 71 (Start Picture/Info Type)
    X BYTES - Picture/INFO type (should be 27)
    BYTE - 71 (Start picture info)
    X BYTES - Picture info (Zoom,Rotation,X position,Z position)
    BYTE - 71 (End File)

    --------------- Region (Picture file name as data stored)

    X BYTES - Region name
    BYTE - 56 (-)
    10 BYTES - Timestamp for Time picture was taken
    BYTE - 55 (.)
    3 BYTES - PNG

    --------------------------------------------------------------------------------------

    Character Table

    --Numbers 0-9
    4b,4a,49,48,4f,4e,4d,4c,43,42

    --Characters A-Z (capitals)
    3a,39,38,3f,3e,3d,3c,33,32,31,30,37,36,35,34,2b,2a,29,28,2f,2e,2d,2c,23,22,21

    --Characters a-z (lowercase)
    1a,19,18,1f,1e,1d,1c,13,12,11,10,17,16,15,14,0b,0a,09,08,0f,0e,0d,0c,03,02,01

    --Special Chars (table)
    (space),- ,~ ,. , { ,} ,| ,` ,[ ,_ ,^ ,] ,\ ,@ ,; ,: ,? ,> ,= ,5b ,56,05,55,04,06,07,1b,20,24,25,26,27,3b,40,41,44,45,46,47
    ----------------------------
    + ,' ,) ,( ,/ ,, ,# , ,! ,* ,& ,% ,$
    50,51,52,53,54,57,58,59,5a,5c,5d,5e,5f

    --------------------------------------------------------------------------------------

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Well, after chatting with Ardecila, he managed to talk me into working on the AE filetype, so here's a complete structural breakdown of it 1.gif

     

    --Header (8 bytes)
    WORD
    WORD
    WORD
    WORD - Size of the Index

    --Index
    WORD - Section 1 Count
    WORD - Section 2 Count
    WORD - Section 3 Count
    WORD - Section 4 (Table) Count
    DWORD - Section 1 Offset
    DWORD - Section 2 Offset
    DWORD - Section 3 Offset
    DWORD - Section 4 Offset

    --Section 1 (24 bytes each) (Repeating)
    DWORD
    DWORD
    WORD
    WORD
    DWORD
    WORD
    WORD
    WORD
    WORD

    --Section 2 (16 bytes each) (Repeating)
    WORD
    WORD
    DWORD
    WORD
    WORD
    WORD
    WORD

    --Section 3 (32 bytes Each) (Repeating)
    DWORD
    DWORD
    DWORD
    DWORD
    DWORD
    DWORD
    DWORD
    DWORD

    --Section 4 (Tables - first 2 are 1024 bytes, Third is 484) (Repeating)
    DWORD x 256 (for first 2)
    or
    DWORD x 121 (for the third)

    --Section 4 (Aftertables) (Section 4 repeat times)
    DWORD
    DWORD (I Count++)

    --Section 4 (I Counts) (Add up the value of all I Counts from the aftertables to get the count of DWORDS here)
    DWORD x ICount
    -----------------------------------------------------
     
    We still dont know exactly what it does, but that's the way it stores its info.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     
    Date: 7/24/2005 12:43:59 AM
    Author: Karybdis
    We still dont know exactly what it does, but that's the way it stores its info.
    quote>

    Shush - that's my job. Now I gotta divide, cross-reference, and otherwise analyze the hell out of this thing.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I, Tracker, would like to proudly say that the complete formats of this list are going to FILExt, the file extension database! I submitted MXF already (given some original stuff off the site).

    The formats going to FILExt:

    .info
    .del (.de-l or .del?)
    .id

    Tracker

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    whoa. why didnt this move to the top of the page...

    actually delocalizers are only inside Dat's, so they arent really an extension.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    dude.... threadomancy.... 4 and a half years, please do not revive old threads.... unless you have a significant contributon to make...

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    How to get a work about Effect Dir Script, so please help me how to do it with LUA file to eff.file works then?

    I am learning difficult about the scripts how to do it to get a working on the scripting with Effect Dir file on ilive reader.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 1/17/2010 at 6:24 AM, mightygoose said:

    dude.... threadomancy.... 4 and a half years, please do not revive old threads.... unless you have a significant contributon to make...

    I'll necro this thread... with a significant contribution: I have decoded MXF files. As it turns out, MXF files are really simple, and I even was able to convert https://www.fontsquirrel.com/fonts/pacifico to a working MXF (picture attached).

    I created https://wiki.sc4devotion.com/index.php?title=MXF with the details, but I will copy the definition here:

    CHAR[4]
     Magic Identifier. Always "MXFN"
    DWORD
     Unknown Bytes. Always "02 62 5A 00" in SimCity 4
    BYTE
     Mask Byte. Always 0x9D in SimCity 4
    
    

    Following this, the remainder of the data is an enciphered font blob, padded out to the next multiple of (decimal) 10000 bytes with random data. This isn't checked by the game, and is apparently only an anti-reverse enginering feature, so modded fonts can leave this padding off.

    The enciphered font blob is a standard font (PFB or TTF) that has been xor'd with the mask byte.

     

    See the wiki for the python script I used to convert pacifico to mxf for the attached screenshot.

     

    pacificofontsc4.jpg

    • Like 6

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 11/27/2022 at 12:49 PM, simonpat said:

    I'll necro this thread... with a significant contribution: I have decoded MXF files. As it turns out, MXF files are really simple, and I even was able to convert https://www.fontsquirrel.com/fonts/pacifico to a working MXF (picture attached).

    What a discovery! Who's going to be the first to make SimCity 4: Comic Sans edition? *:yes:

    • Like 1

    Want to bring the Colossus Addon Mod back to its former glory? Join the CAM Revival Project.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 27/11/2022 at 5:49 AM, simonpat said:

    I'll necro this thread... with a significant contribution: I have decoded MXF files. As it turns out, MXF files are really simple, and I even was able to convert https://www.fontsquirrel.com/fonts/pacifico to a working MXF (picture attached).

    I created https://wiki.sc4devotion.com/index.php?title=MXF with the details, but I will copy the definition here:

    
    CHAR[4]
     Magic Identifier. Always "MXFN"
    DWORD
     Unknown Bytes. Always "02 62 5A 00" in SimCity 4
    BYTE
     Mask Byte. Always 0x9D in SimCity 4
    
    

    Following this, the remainder of the data is an enciphered font blob, padded out to the next multiple of (decimal) 10000 bytes with random data. This isn't checked by the game, and is apparently only an anti-reverse enginering feature, so modded fonts can leave this padding off.

    The enciphered font blob is a standard font (PFB or TTF) that has been xor'd with the mask byte.

     

    See the wiki for the python script I used to convert pacifico to mxf for the attached screenshot.

     

    pacificofontsc4.jpg

    This is the way!

    • Like 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 11/28/2022 at 4:56 PM, deezedgod said:

    What a discovery! Who's going to be the first to make SimCity 4: Comic Sans edition? *:yes:

    image.png.9ae99856c381635a250c5dfd4d2b8fd8.png

    image.png

     

    :)

     

    Also - this is relevant to the discussion, but a lot of work has been done over at SC4D's Discord by a few of us deciphering the SC4 save game file structure.

    -SA

    • Like 4

    Nine degrees of separation??

    NAM Team member | NYBT Member | NHP Member

    Download the Network Addon Mod and its related components here.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    On 11/27/2022 at 12:49 PM, simonpat said:

    MXF files

    Off topic but MXF is another format used in the cinematography world, right?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 hours ago, Jidan said:

    Off topic but MXF is another format used in the cinematography world, right?

    They are probably different formats. The MXF format used in SC4 is an enciphered font format, MXF is probably short for MaXis Font.

    • Like 1

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections