Understanding the File Tree Structure of Legend of Zelda Twilight Princess (GameCube)

Discussion in 'Misc Gamecube Discussion' started by videogameman, Apr 14, 2012.

  1. videogameman

    videogameman New Member

    Messages:
    21
    Likes Received:
    1
    After asking (here on EmuForums) for help with extracting Models (Level/Terrain Based Model Data and Other Models) from Legend of Zelda: Twilight Princess and not getting any solid and helpful information, I decided to keep looking (with little to no help pointing me in the right direction) and see if I could find the needed resources for extracting and studying the Game that Nintendo built for the GameCube and the Wii. But alas I looked for about half a days worth of time and found very little to work with. So I had put aside that task, but only to re-pickup the project.
    It was about a day to two days after I had put down the project when I accidentally (yes I really mean accidentally) found a treasure trove of information about the process to extract, view and export models from the Legend of Zelda: Twilight Princess.
    So, I am going to share with you all how Nintendo setup their File Tree Structure for what they call "Stage" files or directories. Which in-turn means the terrain and BSP the player walks on (i.e. Hyrule Field or the Gerudo Desert). This information tutorial will not be going over how to categorize Object Based models. This is because I have been (and still am) trying to categorize Object files. All I can say is that Objects are combined into one single directory which contains both Items/Equipment (i. e. Swords, Shields, Armor & Secondary Items) & Characters (Zelda, Midna, Zant & Ganondorf). My best guess as to why Nintendo combined Items/Equipment with Characters into one place is because that might have made coding a lot more simpler, as well as when you are attacking an enemy it would make coding combat situations a lot easier because everything is all in one place instead of two or three different directories. But that is just my guess.

    Anyways here is what I have found out about the "Stage" File Tree Setup.

    First off, there are three different type of stages.
    The First one is called "D" (without the quotation marks). I was not sure at first what "D" stood for, but as I opened more of this type of file is seemed that "D" represents or stands for the word "Dungeon". In Twilight Princess dungeons would include The Forest Temple, Goron Mines, Lakebed Temple and so on.

    The second file type in the tree was labeled as "F". Again after opening this file type "F" could only mean "Field". A Field file type would be represented by a location such as Faron Woods, Lake Hylia, Gerudo Desert (AKA Arbiter Desert), Hyrule Field and many others places. Though many would think that "Field" would only be represented by Hyrule Field, apparently Nintendo thinks the word Field as a place were people (Non-Enemy Based Characters) would be located and where their is a very low amount of Enemies.

    The third and final file type of the "Stage" Directory is refereed to as the "R" File Type. Here is why I did a Process of Elimination. If we have a location that it large and heavily infested with enemies and we also have large area most occupied by non-lethal characters, then there was only one place that started with the letter "R". Apparently "R" stands for "Room", a room would be represented by the inside of Links House, or inside of Bomb Shop in Kakariko Village and other such places.

    Here is a picture showing the three different File Tree Types.

    [​IMG]

    As seen in my comments in the image there are two types of dungeons . There are the main dungeons (which are represented by the "MN" and there are the Sub-Dungeons which are represented by the "SB" in the file name. I also forgot to say (in the image) that the "MN" could actually mean Main Number or even Master Number, thus telling the game engine that these are what it needs to looks for and use instead of use the Sub-Dungeons, considering that both types of dungeons are scripted and written into the Legend of Zelda: Twilight Princess disc.

    Also for those of you who want to see "Proof" of the ability to extract and use the files that are written on the game disc. Here is your proof.

    [​IMG]

    This first image is what you would see when you are singing with the Golden Wolf (AKA The Hero's Shade). This location could be considered high above Hyrule or even some sort of different Realm where the Golden Wolfs spirit dwells. Here is a more well known location to most Legend of Zelda Fans as well as for those who have played Twilight Princess.

    [​IMG]

    If you cannot guess this location then.....I have no words for you and will just end this tutorial.....just kidding! This screenshot is of the location where the Blade of Evil's Bane resides. The sword is the Master Sword (of course). As you can see by the image the textures of level are a repeating pattern. This could be because since the Legend of Zelda: Twilight Princess was built for the GameCube to handle, they might have had to use lower graphical textures and thus used a sort of repeating pattern. Ether way.....there is you proof.

    I might (that's a might) in the future add to this informational tutorial describing how the folder that contains all of the Items/Equipment and Characters is organized and how to find what you need from that folder. I say "might" because I might never even figure it out myself. Ether way I will keep trying.

    Also on a side note, please do not ask for the programs that I used to extract the contents from the Legend of Zelda: Twilight Princess ISO file because I am not sure (at this time) if it is against or ok with the rules here at Emuforums. So for right now I am going to play it safe and not post any program links. If the Administrators and Moderators give the green light I might go ahead and post the links.

    I hope this has been a helpful tutorial for better understanding the File Tree and File Structure of the Legend of Zelda: Twilight Princess game. If anyone would like to post this information elsewhere on the Internet that you MUST ask. This took a lot (and I mean A LOT) of work to figure it out and understand how the File Structure works and since I had no help with this still progressing project, it was a real pain to figure it out. Thank you for asking first.

    Videogameman
    47iscool likes this.
  2. NGEmu.com Advertisement

  3. yome4

    yome4 New Member

    Messages:
    1
    Likes Received:
    0
    hmmm interesting i'll keep that in mind
  4. videogameman

    videogameman New Member

    Messages:
    21
    Likes Received:
    1
    I am glad I could help. I just hope more people find it helpful and useful.
  5. TheWhiteMaiden

    TheWhiteMaiden New Member

    Messages:
    1
    Likes Received:
    0
    Thank you for this thread, it was very well written.

    After I've extracted and decompressed the ISO files (using GC Tool and Thakis' other tools) and gotten the archive from the rarcdump, I use BMDview2 to view and export the models.

    First, I'm sure you've noticed that the D_ folders seem to contain only the Entry, Mini-Boss and Boss rooms of each temple. Do you know where the other rooms of the temples are? It seems as if there is a great deal missing.

    Also, some models seem to be missing certain textures when I view them. Have you had this problem?
  6. videogameman

    videogameman New Member

    Messages:
    21
    Likes Received:
    1
    First of all, you will want to use Dolphin Emulator for extracting many of the required files. That might be your first problem. Second of all, it has been some time since I did any extracting. Let me dig (yes dig) through my hard drive and find the files and remember what I did to get the screenshots above to show as they do. Well, better get started *cracks fingers and knuckles* and check you PM box ASAP. For I will be sending you some helpful information rather soon.
  7. Marioman'

    Marioman' New Member

    Messages:
    1
    Likes Received:
    0
    This is a very helpful tutorial as I am trying to extract the models from twilight princess as well, have you been able to identify the files in the object folder representing their true name? Because I can't find link, I think he's under a different arc name.

Share This Page