Page 1 of 2 1 2 LastLast
Results 1 to 20 of 35

Thread: Creating a World - Unpacking the Game

  1. #1
    Gigantus's Avatar I came, I saw, I tutored
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    44,431
    Blog Entries
    13

    Default Creating a World - Unpacking the Game

    The following article is available as download in PDF format with additional graphics, supporting BAT files are included in the download.

    Attention Linux (Ubuntu) users, there is now a similar tutorial available for the M2TW version for your operating system.

    Unpacking the Game Introduction

    The reason
    I decided to make this manual after having answered the “I have unpacked and now my battles crash!” question for the 217th time. As there were other queries as well to be addressed made it worthwhile.

    General Information

    The unpacking of the game and its campaigns takes up a good amount of additional hard drive space (6.6GB for the main game, 4.0GB for the campaigns). Removing unused files after modding may cause the game to malfunction as there are already ‘unpacked’ files present in the folders. Due to this all the attached unpack files will extract the files into the C:\Unpack folder. This will make it unnecessary to delete the pesky ‘geography’ files which otherwise would cause crashes in battle. It also creates a backup for any file that you transfer into your mod folder and the unpack folders can be deleted after use without problems.

    Requirements

    To run the unpacker requires a minimum of patch 1.02 to be installed. For the purpose of this tutorial I will assume that you have at least this version.

    Editing of BAT files

    To edit batch (BAT) files is relatively easy: simply right click the file and choose ‘Edit’ from the drop down menu, afterward simply ‘Save’.

    Attachment

    The attachment contains the following BAT files:

    • files_individual – sample file for unpacking individual files (export_descr_units.txt) into C:\Unpack
    • files_type - sample file for unpacking files of a defined type (TXT files) into C:\Unpack
    • list_contents – will create a file with the complete list of files in the main game’s pack file
    • unpack_all_Unpack – will unpack the main game into C:\Unpack
    • unpack_americas_Unpack - will unpack the americas campaign into C:\Unpack
    • unpack_britannia_Unpack - will unpack the britania campaign into C:\Unpack
    • unpack_crusades_Unpack- will unpack the crusades campaign into C:\Unpack
    • unpack_teutonic_Unpack - will unpack the teutonics campaign into C:\Unpack

    All files contain the ‘pause’ command which will leave the DOS window open until input from the user. This will enable you to read any possible error messages
    Extract the attachment into the tools\unpacker folder of your game.

    Use of attached Files


    General
    Double click the file of your choice. A small black window (DOS window) will appear. You are supposed to answer ‘Yes’ (Y) three times – but you can cut that short by typing ‘Yes’ three times (YYY) and then pressing ‘Enter’.
    Depending on which file you are using the unpacking process can take some time. Do not close the window until you see the ‘Successfully extracted all pack files’ message.

    Restricted unpacking

    The unpacker cannot handle the extracting of complete folders, but it is possible to restrict unpacking to individual files or types of files.

    Individual Files

    The files_individual BAT file contains as example the export_descr_units.txt file of the main game. This can be altered to extract other individual files from other packs as well.
    Example provided:
    Code:
    unpacker.exe --source=..\..\packs\*.pack --destination=C:\Unpack --filter=export_descr_unit.txt
    Other file from Americas campaign:
    Code:
    unpacker.exe --source=..\..\mods\americas\packs\*.pack --destination=C:\Unpack --filter= battle_models.modeldb

    File Types

    The files_types BAT file contains as example the TXT files of the main game. As discussed in the’Individual Files’ section this can be changed to different types and from different packs.
    Example provided:
    Code:
    unpacker.exe --source=..\..\packs\*.pack --destination=C:\Unpack --filter=*.txt
    Other file type from Americas campaign:
    Code:
    unpacker.exe --source=..\..\mods\americas\packs\*.pack --destination=C:\Unpack --filter= *.TGA
    Troubleshooting

    Missing DLL file prevents the unpacker from running

    • Copy the missing file from the game’s main directory into the tools\unpacker directory


    Success message and no files


    • If you use the provided BAT files then the files will be in C:\Unpack
    • If the files are not in that directory and you have modified the provided files, check the spelling and syntax
    • If all else fails then the files may have ended up in the VirtualStore, check this tutorial to solve this issue.


    Error message about unpacking a file


    • The file in the pack is corrupt. You will need to re-install the game.



    Download Link
    .
    Last edited by Gigantus; January 09, 2017 at 02:02 AM. Reason: Added link for Linux version


  2. #2

    Default Re: Creating a World - Unpacking the Game

    Seems that some of the commands you listed have a superfluous space between "--" and "source" ?

    Shameless plug, you can also use the PACK tool I wrote for johnwhile to extract files from packs as well as regenerate packs (if you need that).
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει Kratinos in Dionysalexandros.

  3. #3
    Gigantus's Avatar I came, I saw, I tutored
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    44,431
    Blog Entries
    13

    Default Re: Creating a World - Unpacking the Game

    That is a typo in the manual (now corrected) - I checked the files and they have the correct syntax. Thanks for pointing it out.


  4. #4

    Default Re: Creating a World - Unpacking the Game

    There are already similar tutorials on it.
    http://www.twcenter.net/forums/showthread.php?t=355307
    http://www.twcenter.net/forums/showthread.php?t=405322

    @Tellos
    Yeah your pack tool is awesome.
    Last edited by Ishan; August 01, 2012 at 10:57 PM.

  5. #5
    Gigantus's Avatar I came, I saw, I tutored
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    44,431
    Blog Entries
    13

    Default Re: Creating a World - Unpacking the Game

    My bad - only realized it after I had posted this one. Just got tired of explaining the pitfalls\remedies over and over again. I must have been preaching 'unpack into a different folder' for years...


  6. #6

    Default Re: Creating a World - Unpacking the Game

    It's alright sometimes a user needs to read multiple tuts to get the thing. Btw:
    The unpacking of the game and its campaigns takes up a good amount of hard drive space (6.6GB for the main game, 4.0GB for the campaigns)
    The extracted vanilla data folder is around 11.7 GB while for kingdoms campaigns, they all are less than 2GB. So you should confirm that.

  7. #7
    Gigantus's Avatar I came, I saw, I tutored
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    44,431
    Blog Entries
    13

    Default Re: Creating a World - Unpacking the Game

    Confirmed - this is how I know (I'll rephrase to 'additional' to avoid confusion):

    Vanilla - additional size of unpacked files





    Campaigns - additional size of unpacked files




    .


  8. #8

    Default Re: Creating a World - Unpacking the Game

    It says 10.3 GB for me, and that's after deleting the extracted sounds from .dat files. And ah, yeah for campaigns in total, yeah that's roughly around 4GB.

  9. #9
    Gigantus's Avatar I came, I saw, I tutored
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    44,431
    Blog Entries
    13

    Default Re: Creating a World - Unpacking the Game

    The vanilla extraction is just what I have in the first pic, it does not include files from the original\base installation. The sounds folder only has a few EVT files in the effect_evt subfolder - no DAT (they are in the base installation, not the PACK files).


  10. #10
    Ayyubid's Avatar Tiro
    Join Date
    Aug 2012
    Location
    Seattle, WA
    Posts
    233

    Default Re: Creating a World - Unpacking the Game

    Spoiler Alert, click show to read: 
    Quote Originally Posted by Gigantus View Post
    The following article is attached as PDF file with additional graphics, supporting BAT files are in the separate attachment.

    Unpacking the Game Introduction

    The reason
    I decided to make this manual after having answered the “I have unpacked and now my battles crash!” question for the 217th time. As there were other queries as well to be addressed made it worthwhile.

    General Information

    The unpacking of the game and its campaigns takes up a good amount of additional hard drive space (6.6GB for the main game, 4.0GB for the campaigns). Removing unused files after modding may cause the game to malfunction as there are already ‘unpacked’ files present in the folders. Due to this all the attached unpack files will extract the files into the C:\Unpack folder. This will make it unnecessary to delete the pesky ‘geography’ files which otherwise would cause crashes in battle. It also creates a backup for any file that you transfer into your mod folder and the unpack folders can be deleted after use without problems.

    Requirements

    To run the unpacker requires a minimum of patch 1.02 to be installed. For the purpose of this tutorial I will assume that you have at least this version.

    Editing of BAT files

    To edit batch (BAT) files is relatively easy: simply right click the file and choose ‘Edit’ from the drop down menu, afterward simply ‘Save’.

    Attachment

    The attachment contains the following BAT files:

    • files_individual – sample file for unpacking individual files (export_descr_units.txt) into C:\Unpack
    • files_type - sample file for unpacking files of a defined type (TXT files) into C:\Unpack
    • list_contents – will create a file with the complete list of files in the main game’s pack file
    • unpack_all_Unpack – will unpack the main game into C:\Unpack
    • unpack_americas_Unpack - will unpack the americas campaign into C:\Unpack
    • unpack_britannia_Unpack - will unpack the britania campaign into C:\Unpack
    • unpack_crusades_Unpack- will unpack the crusades campaign into C:\Unpack
    • unpack_teutonic_Unpack - will unpack the teutonics campaign into C:\Unpack

    All files contain the ‘pause’ command which will leave the DOS window open until input from the user. This will enable you to read any possible error messages
    Extract the attachment into the tools\unpacker folder of your game.

    Use of attached Files


    General
    Double click the file of your choice. A small black window (DOS window) will appear. You are supposed to answer ‘Yes’ (Y) three times – but you can cut that short by typing ‘Yes’ three times (YYY) and then pressing ‘Enter’.
    Depending on which file you are using the unpacking process can take some time. Do not close the window until you see the ‘Successfully extracted all pack files’ message.

    Restricted unpacking

    The unpacker cannot handle the extracting of complete folders, but it is possible to restrict unpacking to individual files or types of files.

    Individual Files

    The files_individual BAT file contains as example the export_descr_units.txt file of the main game. This can be altered to extract other individual files from other packs as well.
    Example provided:
    Code:
    unpacker.exe --source=..\..\packs\*.pack --destination=C:\Unpack --filter=export_descr_unit.txt
    Other file from Americas campaign:
    Code:
    unpacker.exe --source=..\..\mods\americas\packs\*.pack --destination=C:\Unpack --filter= battle_models.modeldb

    File Types

    The files_types BAT file contains as example the TXT files of the main game. As discussed in the’Individual Files’ section this can be changed to different types and from different packs.
    Example provided:
    Code:
    unpacker.exe --source=..\..\packs\*.pack --destination=C:\Unpack --filter=*.txt
    Other file type from Americas campaign:
    Code:
    unpacker.exe --source=..\..\mods\americas\packs\*.pack --destination=C:\Unpack --filter= *.TGA
    Troubleshooting

    Missing DLL file prevents the unpacker from running

    • Copy the missing file from the game’s main directory into the tools\unpacker directory


    Success message and no files


    • If you use the provided BAT files then the files will be in C:\Unpack
    • If the files are not in that directory and you have modified the provided files, check the spelling and syntax
    • If all else fails then the files may have ended up in the VirtualStore, check this tutorial to solve this issue.


    Error message about unpacking a file


    • The file in the pack is corrupt. You will need to re-install the game.




    Hi, so I got the crusades expansion unpack_crusades bat file into my unpacker folder. Have ran it with the packer. However, when the window pops up with the 3 y/n questions for the unpacking it, I answer them all Y, but then the window closes and nothing happens.
    Last edited by Gigantus; October 06, 2012 at 08:21 PM. Reason: added spoiler

  11. #11
    Ayyubid's Avatar Tiro
    Join Date
    Aug 2012
    Location
    Seattle, WA
    Posts
    233

    Default Re: Creating a World - Unpacking the Game

    Also, where is the "unpack" folder located? I know where the "unpacker" folder is in the tools section, but not the "unpack" folder.

  12. #12
    Gigantus's Avatar I came, I saw, I tutored
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    44,431
    Blog Entries
    13

    Default Re: Creating a World - Unpacking the Game

    Due to this all the attached unpack files will extract the files into the C:\Unpack folder.
    If you use the provided BAT files then the files will be in C:\Unpack
    Please extract the attachment in the first post into your tools\unpacker and then use the unpack_crusades_unpack.bat file. The DOS window (black window) will only close after you press space so you will be able to see any error messages.
    Last edited by Gigantus; October 06, 2012 at 08:25 PM.


  13. #13

    Default Re: Creating a World - Unpacking the Game

    Despite having the UAC and Virtual Storage problem fixed I cannot unpack the game, even though I have already previously unpacked it.

    I have a suspicion the problem is a part of a much larger one which I will put in spoilers below (I guess it's slightly off-topic)

    Spoiler Alert, click show to read: 

    Here is the problem: I have played Med2 and various mods for around 2 years, but last year I started experiencing campaign and battlemap lag. I have no idea how this happened other than perhaps my use of NPE. As Med2 is the only game I play this problem could be universal for my computer, but after I noticed the difference and looked at my options, such as using System Restore.

    System Restore seemed not to work as it always had, and I could not use it to revert the computer to previous capability.

    So I when I tried to continue to play the game and mods such as Stainless Steel and Third Age, the reduced framerate is unplayable, this is odd because I was able to play fine before. I tried to resolve the issue to uninstalling Medieval 2, but the problem persisted when I reinstalled. And now, the unpacker won't work!

    Any suggestions? I know this could be completely unrelated to Med2, but any help will be appreciated.

  14. #14
    irishron's Avatar Cura Palatii
    Moderator Emeritus

    Join Date
    Feb 2005
    Location
    Cirith Ungol
    Posts
    47,024

    Default Re: Creating a World - Unpacking the Game

    Yeah, it could be the problem.
    Uninstall the game, delete all traces, run a good free registry cleaner (NPE is not one, Eusing Free Registry Cleaner and Ccleaner are), reboot and reinstall.
    If you feel there is a virus or Trojan on your computer, Malwarebytes in Safe Mode works good and HijackThis has proven effective on occasion.

  15. #15
    Gigantus's Avatar I came, I saw, I tutored
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    44,431
    Blog Entries
    13

    Default Re: Creating a World - Unpacking the Game

    Don't forget to clean out the virtual store as well before re-installing.


  16. #16

    Default

    Thank you Gago(Gigantus) you are cool, just what is this?
    [IMG]0000[/IMG]

    Sorry i not know that put image.
    Last edited by Gigantus; May 28, 2014 at 08:29 AM. Reason: multiple posts merged

  17. #17
    Gigantus's Avatar I came, I saw, I tutored
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    44,431
    Blog Entries
    13

    Default Re: Creating a World - Unpacking the Game

    Upload your picture to a provider like Photobucket.
    Copy the link to the picture you uploaded.
    Click the little image here on top of your reply box (to the right of the blue globe with the red cross)
    Paste your picture link
    Click OK


  18. #18

    Default Re: Creating a World - Unpacking the Game

    Just wanted to say thanks, I am fairly new to modding and was having issues with extracting the files from the Teutonic and Britannia campaigns due to an error with the unpacker. The version of the unpacker I downloaded from this though, with saving to a separate file allowed me to finally unpack my game after googling how to unpack the files for 3 days and individually unpacking some files. Like I said at the start though, just wanted to say thanks as now I can bring units from Teutonic into my base game since I wanted to make my own version instead of any of the mods out there for experience/ a personal challenge and personal satisfaction of being able to figure it out.

  19. #19
    Gigantus's Avatar I came, I saw, I tutored
    Artifex

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    44,431
    Blog Entries
    13

    Default Re: Creating a World - Unpacking the Game

    Glad you found this tutorial\resource of mine useful.


  20. #20
    Socrates1984's Avatar Decanus
    Citizen

    Join Date
    Jun 2014
    Location
    Athens, Greece
    Posts
    555

    Default Re: Creating a World - Unpacking the Game

    Hello everyone!

    I come back with more problems to share. After diligently reading through the manual, both the one in the OP and the pdf (and finding out they are the same), I realized I bypassed an instruction:

    Extract the attachment into the tools\unpacker folder of your game.
    At first this was unintentional, but later it became semi-intentional, meaning that I couldn't follow this instruction, since there is no "tools\unpacker" folder anywhere in my pc to extract the file to. I mean nowhere literally.

    I believe this is the reason why I cannot execute the .bat file, because it can't direct the command to the right folder. I am currently trying to unpack a specific file (descr_auto_optimise_options.txt) in order to solve my not-so-much-fullscreen window problem. I have tried various different edit schemes to make it work (changed the destination, changed the source, changed both, tried with / between folders, tried with \ between folders, tried with DOS emulator, tried without, retried with no edits - the list goes on), but nothing seems to be working.

    To recap, I want to unpack a specific file and it seems that I cannot unpack anything at all. Considering the fact that I have verified the integrity of the games cache in Steam, what else is there to do? I have a feeling I am missing something terribly obvious.

    P.S.: I still happily run Ubuntu. I am not so sure for how long this "happily" condition will continue though.

Page 1 of 2 1 2 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •