1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Tropico 3/4 HPK Archiver

Discussion in 'Games' started by FordGT90Concept, Jan 25, 2010.

  1. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    This application can extract and archive data into and out of the HPK formatted file.
    [​IMG]
    You need .NET Framework 3.5 or Mono to run it.

    Works with:
    • Grand Ages: Rome
    • Tropico 3
    • Tropico 4
    • Omerta: City of Gangsters
    • Tropico 5

    Example, argument command:
    -extract "D:\Steam\SteamApps\common\Tropico 4\dlc\Expansion.hpk" "C:\Users\Admin\Desktop\Expansion" -wait

    Produced this result:
    [​IMG]

    Commands currently supported (you should be able to do many at once)...
    -extract "path to HPK" "path to folder to create/fill"

    -archive "path to folder to pack (will be consumed)" "save HPK here"
    Optional: Adding -zip to -archive will pack it. Do not do this on Tropico 5 because it won't be able to load it. Note: -zip only has to appear once to apply to ALL -archive commands after it. For example -archive INPUT 1.hpk -zip -archive INPUT 2.hpk would cause 1.hpk to be unzipped and 2.hpk to be zipped.

    -unzip "path of file to unzip" "place to save unzipped file"

    -wait
    Special: This command only needs to appear once and if it does, it will stop the console from closing and show "Press any key to close program."

    If no console arguments, the console will hide and the GUI will pop up.

    Tropico 3:
    File DataOffset Fragments/File Unknown2 Unknown5 ResidualOffset ResidualCount FileSystemOffset FileSystemLength
    1 \Local\English.hpk 36 1 -1 1 0 0 263 32
    2 \Local\voice\English.hpk 36 1 -1 1 106277036 1 106273020 4016
    3 \Packs\billboard.hpk 36 1 -1 1 2608 2 2560 48
    4 \Packs\binassets.hpk 36 1 -1 1 0 0 36716553 48
    5 \Packs\Missions.hpk 36 1 -1 1 71394371 161 114040864 11304
    6 \Packs\boot\Assets.hpk 36 1 -1 1 5225492 1 5224052 1440
    7 \Packs\boot\lscr.hpk 36 1 -1 1 0 0 4356591 112
    8 \Packs\boot\Music.hpk 36 1 -1 1 0 0 78894087 144
    9 \Packs\boot\Sounds.hpk 36 1 -1 1 0 0 161989661 4760
    10 \Packs\boot\UI.hpk 36 1 -1 1 34544014 1 34537454 6560
    11 \Packs\boot\persist\Data.hpk 36 1 -1 1 2328328 160 2319872 8456
    12 \Packs\boot\persist\Shaders.hpk 36 1 -1 1 287908 1 287380 528
    13 \Packs\dirs\Cliffs.hpk 36 1 -1 1 0 0 131553463 744
    14 \Packs\dirs\Decors.hpk 36 1 -1 1 133098388 1 133096564 1824
    15 \Packs\dirs\Roads.hpk 36 1 -1 1 0 0 16006495 120
    16 \Packs\dirs\Rocks.hpk 36 1 -1 1 73094527 1 73094143 384
    17 \Packs\dirs\Sky.hpk 36 1 -1 1 0 0 11752989 160
    18 \Packs\dirs\Structures.hpk 36 1 -1 1 932185482 1 932179458 6024
    19 \Packs\dirs\Terrains.hpk 36 1 -1 1 40213493 1 40218162 512
    20 \Packs\dirs\Units.hpk 36 1 -1 1 0 0 37894176 1864
    21 \Packs\dirs\Vegetation.hpk 36 1 -1 1 51296531 1 51302993 960
    22 \Packs\dirs\Vehicles.hpk 36 1 -1 1 0 0 90817648 808
    23 \Packs\Patches\binassets.hpk 36 1 -1 1 0 0 31063851 32
    24 \Packs\Patches\Boot\Data.hpk 36 1 -1 1 6052084 1 6043628 8456
    25 \Packs\Patches\Preload\fallback.hpk 36 1 -1 1 1298208 1 1297776 432
    26 \Packs\persist\memAssets.hpk 36 1 -1 1 0 0 528754 112
    27 \Packs\Preload\fallback.hpk 36 1 -1 1 0 0 18446486 1816
    28 \Packs\Preload\prefabs.hpk 36 1 -1 1 42821 15 48971 424

    Tropico 4:
    File DataOffset Fragments/File Unknown2 Unknown5 ResidualOffset ResidualCount FileSystemOffset FileSystemLength
    1 \AppData\ShaderCache\shaders.322.hpk 92 8 -1 1 0 0 28387582 192320
    2 \AppData\ShaderCache\shaders.345.hpk 92 8 -1 1 0 0 26374638 180736
    3 \dlc\Construction.hpk 36 1 -1 1 0 0 259 24
    4 \dlc\EastPoint.hpk 36 1 -1 1 0 0 34054631 14096
    5 \dlc\Expansion.hpk 36 1 -1 1 340834527 1164 652571224 41576
    6 \dlc\Megalopolis.hpk 36 1 -1 1 9920912 232 9907248 13664
    7 \dlc\Military.hpk 36 1 -1 1 0 0 247 24
    8 \dlc\NuclearTakedown.hpk 36 1 -1 1 0 0 34064418 13704
    9 \dlc\PirateHaven.hpk 36 1 -1 1 13028123 288 17502658 15336
    10 \dlc\Plantation.hpk 36 1 -1 1 0 0 253 24
    11 \dlc\Propaganda.hpk 36 1 -1 1 0 0 51597997 15632
    12 \dlc\Update1.hpk 36 1 -1 1 0 0 61791883 12112
    13 \dlc\Vigilante.hpk 36 1 -1 1 22771213 246 24299220 14648
    14 \dlc\Voodoo.hpk 36 1 -1 1 0 0 39943410 14176
    15 \Local\English.hpk 36 1 -1 1 0 0 383776 48
    16 \Local\voice\English.hpk 36 1 -1 1 170113460 1 170098652 14808
    17 \Packs\billboard.hpk 36 1 -1 1 2143 2 2095 48
    18 \Packs\binassets.hpk 36 1 -1 1 0 0 40570184 56
    19 \Packs\fallback.hpk 36 1 -1 1 25170884 1 25169636 1248
    20 \Packs\prefabs.hpk 36 1 -1 1 42867 19 72857 560
    21 \Packs\ShaderCache.hpk 92 8 -1 1 0 0 26374638 180736
    22 \Packs\boot\Assets.hpk 36 1 -1 1 5013667 1 5012891 776
    23 \Packs\boot\Music.hpk 36 1 -1 1 0 0 112238237 168
    24 \Packs\boot\palettes.hpk 36 1 -1 1 13728 1 13416 312
    25 \Packs\boot\Sounds.hpk 36 1 -1 1 169620401 1 169615481 4920
    26 \Packs\boot\UI.hpk 36 1 -1 1 0 0 60834301 9112
    27 \Packs\boot\UI2.hpk 36 1 -1 1 0 0 174091 112
    28 \Packs\boot\persist\Game.hpk 36 1 -1 1 4750554 164 4739962 10592
    29 \Packs\boot\persist\Shaders.hpk 36 1 -1 1 369922 1 369378 544
    30 \Packs\dirs\Cliffs.hpk 36 1 -1 1 0 0 219581270 1056
    31 \Packs\dirs\Decors.hpk 36 1 -1 1 0 0 293346439 2640
    32 \Packs\dirs\Grass.hpk 36 1 -1 1 0 0 32630 32
    33 \Packs\dirs\Helpers.hpk 36 1 -1 1 0 0 3276 32
    34 \Packs\dirs\Roads.hpk 36 1 -1 1 21048371 1 21048043 328
    35 \Packs\dirs\Rocks.hpk 36 1 -1 1 0 0 116241387 592
    36 \Packs\dirs\Sky.hpk 36 1 -1 1 0 0 11965846 184
    37 \Packs\dirs\Structures.hpk 36 1 -1 1 0 0 1229858634 6736
    38 \Packs\dirs\Terrains.hpk 36 1 -1 1 51699038 1 51698534 504
    39 \Packs\dirs\Units.hpk 36 1 -1 1 42016918 1 42031318 1616
    40 \Packs\dirs\Vegetation.hpk 36 1 -1 1 37713141 1 37716967 376
    41 \Packs\dirs\Vehicles.hpk 36 1 -1 1 115157962 1 115157122 840
    42 \Packs\maps\8c.hpk 36 1 -1 1 36138 3 36026 112
    43 \Packs\maps\Alianza.hpk 36 1 -1 1 24507 3 47661 112
    44 \Packs\maps\DLC-SaltoAngel.hpk 36 1 -1 1 1083676 1 1188000 112
    45 \Packs\maps\dlcElDorado.hpk 36 1 -1 1 29710 2 29598 112
    46 \Packs\maps\dlcExodus.hpk 36 1 -1 1 711549 2 818176 96
    47 \Packs\maps\DoroDoro.hpk 36 1 -1 1 857379 2 964485 112
    48 \Packs\maps\DoroDoro2.hpk 36 1 -1 1 185861 2 199968 112
    49 \Packs\maps\first.hpk 36 1 -1 1 15937 2 110206 120
    50 \Packs\maps\ForoForo.hpk 36 1 -1 1 872729 2 965498 112
    51 \Packs\maps\ForoForo2.hpk 36 1 -1 1 15113 2 41304 112
    52 \Packs\maps\Fossil.hpk 36 1 -1 1 27361 2 27241 120
    53 \Packs\maps\Fossil2.hpk 36 1 -1 1 25093 2 161115 120
    54 \Packs\maps\HoroHoro.hpk 36 1 -1 1 15165 2 107161 112
    55 \Packs\maps\HoroHoro2.hpk 36 1 -1 1 15115 2 105693 112
    56 \Packs\maps\last.hpk 36 1 -1 1 15879 2 110205 112
    57 \Packs\maps\RandomMap.hpk 36 1 -1 1 0 0 40417 88
    58 \Packs\maps\RedCanyon.hpk 36 1 -1 1 818626 1 901121 112
    59 \Packs\maps\RedCanyon2.hpk 36 1 -1 1 817938 1 901337 112
    60 \Packs\maps\second.hpk 36 1 -1 1 16133 3 41052 120
    61 \Packs\maps\second2.hpk 36 1 -1 1 16135 2 41739 120
    62 \Packs\maps\specJurassic.hpk 36 1 -1 1 0 0 1086149 104
    63 \Packs\maps\specMalva.hpk 36 1 -1 1 862120 1 862016 104
    64 \Packs\maps\specNirvana.hpk 36 1 -1 1 10001 2 9905 96
    65 \Packs\maps\third.hpk 36 1 -1 1 1226796 1 1339870 112
    66 \Packs\maps\third2.hpk 36 1 -1 1 815045 2 924138 112
    67 \Packs\maps\Tutorial1.hpk 36 1 -1 1 848927 2 950002 112
    68 \Packs\maps\Tutorial2.hpk 36 1 -1 1 849960 2 849848 112
    69 \Packs\maps\Tutorial3.hpk 36 1 -1 1 13618 3 31688 112
    70 \Packs\maps\Tutorial4.hpk 36 1 -1 1 13618 3 29980 112
    71 \Packs\maps\Uone.hpk 36 1 -1 1 10930 2 10818 112
    72 \Packs\maps\Utwo.hpk 36 1 -1 1 10929 2 10817 112
    73 \Packs\persist\memAssets.hpk 36 1 -1 1 0 0 716936 144
    74 \Packs\Preload\mapTextureData.hpk 36 1 -1 1 0 0 137 32
    75 \Packs\Preload\materials.hpk 36 1 -1 1 0 0 1416137 920

    Tropico 5 (redacted elevation HPKs--too many to list here):
    File DataOffset Fragments/File Unknown2 Unknown5 ResidualOffset ResidualCount FileSystemOffset FileSystemLength
    1 \dlc\steam.hpk 92 8 -1 1 0 0 461 192
    2 \Local\English.hpk 92 8 -1 1 28485 4 28293 192
    3 \Local\French.hpk 92 8 -1 1 17785 6 17593 192
    4 \Local\German.hpk 92 8 -1 1 21856 5 21664 192
    5 \Local\Italian.hpk 92 8 -1 1 23214 5 23022 192
    6 \Local\Russian.hpk 92 8 -1 1 40163 2 39971 192
    7 \Local\Spanish.hpk 92 8 -1 1 22966 5 22774 192
    8 \Local\Voices\English.hpk 92 8 -1 1 0 0 106226251 102912
    9 \Local\Voices\French.hpk 92 8 -1 1 0 0 111004831 106432
    10 \Local\Voices\German.hpk 92 8 -1 1 0 0 110413471 102848
    11 \Local\Voices\Italian.hpk 92 8 -1 1 0 0 109543371 102848
    12 \Local\Voices\Russian.hpk 92 8 -1 1 0 0 98995439 93184
    13 \Local\Voices\Spanish.hpk 92 8 -1 1 0 0 105442268 102848
    14 \Packs\Animations.hpk 92 8 -1 1 0 0 13886857 65856
    15 \Packs\BinAssets.hpk 92 8 -1 1 111035 4 635062 640
    16 \Packs\CommonAssets.hpk 92 8 -1 1 98943 3 602909 23360
    17 \Packs\Data.hpk 92 8 -1 1 914326 1 1574786 30912
    18 \Packs\Fonts.hpk 92 8 -1 1 0 0 148213 384
    19 \Packs\LoadingScreens.hpk 92 8 -1 1 413116 12 412732 384
    20 \Packs\Lua.hpk 92 8 -1 1 1133018 1 3672329 53696
    21 \Packs\Meshes.hpk 92 8 -1 1 313093 37 21707144 81216
    22 \Packs\Music.hpk 92 8 -1 1 0 0 44911542 1216
    23 \Packs\Prefabs.hpk 92 8 -1 1 137743 68 4438253 2880
    24 \Packs\ShaderCache.hpk 92 8 -1 1 3207876 11 4557051 57408
    25 \Packs\ShaderCached3d11.hpk 92 8 -1 1 6802508 13 7309197 54912
    26 \Packs\ShaderCacheGL.hpk 92 8 -1 1 11567639 10 11991070 56512
    27 \Packs\Shaders.hpk 92 8 -1 1 0 0 127261 4480
    28 \Packs\Sounds.hpk 92 8 -1 1 0 0 20919808 20160
    29 \Packs\TextureLists.hpk 92 8 -1 1 0 0 7371 256
    30 \Packs\Textures.hpk 92 8 -1 1 157094837 771 168703046 42304
    31 \Packs\Textures0.hpk 92 8 -1 1 31935682 411 75924566 13568
    32 \Packs\Textures1.hpk 92 8 -1 1 49455321 426 98561809 12800
    33 \Packs\Textures2.hpk 92 8 -1 1 48662271 414 94536271 11520
    34 \Packs\Textures3.hpk 92 8 -1 1 38987629 305 58377304 9984
    35 \Packs\Textures4.hpk 92 8 -1 1 57006692 353 85083002 11648
    36 \Packs\Textures5.hpk 92 8 -1 1 9468177 286 55466991 9792
    37 \Packs\Textures6.hpk 92 8 -1 1 5616779 230 42458386 7296
    38 \Packs\Textures7.hpk 92 8 -1 1 5161181 264 51404847 9088
    39 \Packs\Textures8.hpk 92 8 -1 1 4545755 222 49468231 8512
    40 \Packs\Textures9.hpk 92 8 -1 1 690504 208 44093288 7872
    41 \Packs\UI.hpk 92 8 -1 1 7526143 91 22772181 40320
    42 \Packs\Maps\DosRios.hpk 92 8 -1 1 431126 20 28376515 1152
    43 \Packs\Maps\Duplicado.hpk 92 8 -1 1 300793 19 17166371 1088
    44 \Packs\Maps\Insulo Infierno.hpk 92 8 -1 1 357996 22 12188521 1152
    45 \Packs\Maps\Isla grande lago T1.hpk 92 8 -1 1 171520 21 17815973 1088
    46 \Packs\Maps\Isla grande lago T2.hpk 92 8 -1 1 171601 21 17001977 1088
    47 \Packs\Maps\Isla grande lago T3.hpk 92 8 -1 1 171679 22 16950960 1088
    48 \Packs\Maps\Isla grande lago.hpk 92 8 -1 1 727342 18 18065095 1088
    49 \Packs\Maps\LaIsladesierta.hpk 92 8 -1 1 363682 13 4157890 1152
    50 \Packs\Maps\MP_AkvofaloParadizo.hpk 92 8 -1 1 287004 14 9312688 1088
    51 \Packs\Maps\MP_Enorme.hpk 92 8 -1 1 258084 20 16485212 1088
    52 \Packs\Maps\MP_FelizHerradura.hpk 92 8 -1 1 262405 22 20703856 1216
    53 \Packs\Maps\MP_Haba.hpk 92 8 -1 1 313776 22 15557036 1344
    54 \Packs\Maps\MP_LaPlayaPlana.hpk 92 8 -1 1 231553 16 9486366 1088
    55 \Packs\Maps\MP_OjoSoleado.hpk 92 8 -1 1 259744 16 24423397 1152
    56 \Packs\Maps\MP_TurtleIsland.hpk 92 8 -1 1 574610 23 13662648 1088
    57 \Packs\Maps\MP_Upigano.hpk 92 8 -1 1 246399 22 22727267 1088
    58 \Packs\Maps\NagaPulau.hpk 92 8 -1 1 322298 20 11808765 1152
    59 \Packs\Maps\Pequenio.hpk 92 8 -1 1 263147 24 18543781 1152
    60 \Packs\Maps\PlanetaAlienigenaSteam.hpk 92 8 -1 1 259046 23 6144672 1088
    61 \Packs\Maps\RandomMap.hpk 92 8 -1 1 0 0 661 128
    62 \Packs\Maps\SwampBay.hpk 92 8 -1 1 277867 25 7039072 1088

    1.0.12: Fixed 1333 out of 1334 errors in Tropico 4: Modern Times' Expansion.hpk
    1.0.11: Writes data to output that doesn't inflate (fix for DLC).
    1.0.10: Separated Tropico 5 game option which disables "Compress It" when checked because the game doesn't support it.
    1.0.9: Lots of minor tweaks in the code.
    1.0.8: Cleaned up file system code (part of FragmentedFile now) and renamed a lot of variables to more accurately reflect what it represents.
    1.0.7: Catches some files that lie about being compressed and dumps the headerless contents.
    1.0.6: No longer creates a temporary file for fragmented files and handles all files as fragmented files.
    1.0.5: Removed a temp file and cleaned up code relating to all of the temp files (three of them now).
    1.0.4: Now handles fragmented files properly.
    1.0.3: Tons of bug fixes including the ability to decompress/extract challenges and ShaderCache.hpk.
    1.0.2: No longer crashes if the output directory doesn't exist. It will simply create it.
    1.0.1: Added bug fixes for abnormal files in Game.hpk.
    1.0.0: Fixed a bug with the time stamps when archiving and also added support for Tropico 4 (experimental).
    Beta 7: Fixed a bug in the archival code.
    Beta 6: Archive feature is now functional, it automatically saves/loads settings, and many other tweaks.
    Beta 5: Overhauled the GUI. It now shows statistics about the file and how far along it is while extracting.
    Beta 4: It applies the "_filedates" to the files (modified date) and deletes the _filedates file because it is now irrelevant. Made the Zip decompression algorithm more efficient (one output stream per file).
    Beta 3: Added Unix support for use on Mono.
    Beta 2: Extracts all files successfully via C#ZipLib.
    Beta 1: Erred on some files during extracting using zlib.
     

    Attached Files:

    Last edited: Oct 7, 2014
    Zur13, nmihaiv, jianeddie and 6 others say thanks.
    Crunching for Team TPU
  2. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    As far as I can tell, Extracting is complete in beta 4. Next is archiving, followed by multithreading and other GUI improvements.
     
    Ignasius says thanks.
    Crunching for Team TPU
  3. ShiBDiB

    ShiBDiB

    Joined:
    Jul 21, 2008
    Messages:
    4,087 (1.79/day)
    Thanks Received:
    767
    Location:
    Clifton Park, NY
    i dont get why we'd need this
     
  4. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    If you want to mod the game, you need it.

    Beta 5 uploaded. I'm going to start work on the archiving component soon.
     
    Ignasius says thanks.
    Crunching for Team TPU
  5. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    Beta 6 upload. The application is now fully functional and fully featured.
     
    jianeddie and Ignasius say thanks.
    Crunching for Team TPU
  6. sharpegg New Member

    Joined:
    Oct 1, 2010
    Messages:
    1 (0.00/day)
    Thanks Received:
    0
    Thanks

    Thanks for this great tool. I was able to extract the music from the game using this.
     
  7. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    Heh, finally someone uses it. XD

    You are welcome.
     
    Ignasius says thanks.
    Crunching for Team TPU
  8. madames New Member

    Joined:
    Oct 4, 2010
    Messages:
    1 (0.00/day)
    Thanks Received:
    0
    HEY FORDGT90!

    This is going to make you double-take, but it's Michael Adames. I used to moderate Hardware Analysis. Ya.

    Big Tropico 3 player here, really enjoying the game! Found myself quite bothered with El Presidente's annoying sayings as well as some of the ambient files such as the seagull and rooster.

    This tool worked perfectly for me and did just as you said. This has made the game infinitely more enjoyable, thanks again.

    When I downloaded this and saw your name I was like "OH SHI---" clicked on your name and recognized a few people from Hardware Analysis and knew it was you. Hope all is well with you. Thanks again for the tool.
     
  9. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    Heh, yeah I remember you. Stick around. ;)
     
    Ignasius says thanks.
    Crunching for Team TPU
  10. Ignasius New Member

    Joined:
    Nov 5, 2010
    Messages:
    4 (0.00/day)
    Thanks Received:
    1
    Hello, thank you for this program, but I need two components to the archive file .hpk someone advise me how to do it?

    Please reply. Thank


    I need to archive two folders.

    How do I do?

    it must be in format .hpk
     
    Last edited: Nov 6, 2010
  11. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    Code:
    selected folder
      -> folder 1
        -> file 1
        -> file 2
      -> folder 2
        -> file 1
        -> file 2
      -> file 1
      -> file 2
    I'm pretty sure "selected folder" is consumed (it is implied in the format but doesn't actually exist). Just make sure to have multiple subfolders in there and it should work fine.
     
    Ignasius says thanks.
    Crunching for Team TPU
  12. Ignasius New Member

    Joined:
    Nov 5, 2010
    Messages:
    4 (0.00/day)
    Thanks Received:
    1
    Last edited: Nov 6, 2010
  13. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    It says it is unavailable.
     
    Ignasius says thanks.
    Crunching for Team TPU
  14. Ignasius New Member

    Joined:
    Nov 5, 2010
    Messages:
    4 (0.00/day)
    Thanks Received:
    1
    Last edited: Nov 6, 2010
  15. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    Ah, I see the problem. Archive should not include the given directory, only everything inside. For instance, if you extracted to C:\Stuff and you archived the contents of C:\Stuff, "Stuff" shouldn't appear in the output HPK file where currently it does.

    I am working on it and will get a fix up as soon as possible but it could take a week or two.


    Edit: It was easier to fix than I thought but I'm not 100% certain Tropico will like it. I attached the modified version to this post. Try it out and let me know if it works as expected or not (specifically, will Tropico read the outputs from it).
     
    Last edited: Nov 7, 2010
    Ignasius says thanks.
    Crunching for Team TPU
  16. Ignasius New Member

    Joined:
    Nov 5, 2010
    Messages:
    4 (0.00/day)
    Thanks Received:
    1
    Yes, this correction is already functional

    Thank you so much, now you can, pack more components into a file .hpk

    game is fully functional, even after adjusting file
    I'm working on another language version in this game

    thanks very much
    Sincerely, Ignasius


    Czech Republic
     
    FordGT90Concept says thanks.
  17. kenji_03 New Member

    Joined:
    Nov 29, 2010
    Messages:
    1 (0.00/day)
    Thanks Received:
    0
    Music Pack

    To make sure you know your work is appreciated I wanted to let you know that your tool is the only way to add music to Tropico 3 and that I am very grateful for your efforts. :respect:

    I've been playing Tropico 3 for just a few hours and already the (offensively small) music track is getting repetitive, so you just made T3 infinitely more fun by allowing me to add more music to the game.

    I am at work right now, but as soon as I get home I'll be installing this program and adding more songs to the game. Thank you!

    If you happen to have your own, custom, Tropico3 music pack I'd LOVE for you to upload it btw.

    Edit: I almost forgot, people on Steam Forums appreciate your work too btw.
     
    Last edited: Nov 29, 2010
  18. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    Crunching for Team TPU
  19. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    Updated to support Tropico 4, theoretically.

    Edit: FYI, the only difference is in the _filedates file. All the filetimes in Tropico 3 are standard Windows FileTimes. In Tropico 4, it appears they divided them by 2000 so that's what I did. The reason why it crashed was because without multiplying by 2000, it would produce an invalid filetime so when it tries to work with it when archiving, the numbers would be all wrong. It was a pretty easy fix but a very strange change they made there.
     
    Last edited: Sep 6, 2011
    Crunching for Team TPU
  20. zbug New Member

    Joined:
    Sep 7, 2011
    Messages:
    1 (0.00/day)
    Thanks Received:
    0
    It's a nice tool you've made, but it seems it cant extract big files (1mb+), or is it only bugging on my computer? Been trying to extract some hpk extension files in AppData/Roaming/Tropico 4/Challenges.
     
  21. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    I don't even have an Challenges folder. I'll need specifics in order to debug it (how you obtained one that fails and the name of it).
     
    Crunching for Team TPU
  22. Frejoh466 New Member

    Joined:
    Apr 6, 2012
    Messages:
    2 (0.00/day)
    Thanks Received:
    0
    Are you going to update it so it works with modern times? Trying to extract Game.hpk but the program just keep crashing all the times.
     
  23. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    I don't have Modern Times yet (in transit). I could take a look at it when it arrives.
     
    Crunching for Team TPU
  24. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    13,729 (6.24/day)
    Thanks Received:
    3,634
    Location:
    IA, USA
    I think I see the problem. There is a file (Game\CommonEntities.txt) that is...messed up. The file is supposedly compressed but compressed files require at least 16 bytes just for the header and more for the data. This has 12 bytes total (header + data) making my algorithm run into the next file entry causing it to eventually crash when. The data literally is: 0000000000800000

    That 8 in there is suspicious (value of 128) but I don't know if that belongs in the file or if it is part of the broken header. I think what I'm going to do is simply create an empty file and hopefully all will be good.

    Will edit this post soon...


    Edit: The 8 is the chunksize which is more or less always set to 32768. In other words, it is, in fact, a blank file.

    There's a problem with another file...a batch file (HGO\SRP\srp-init.bat) which has the ZLIB header for compression but is, in fact, not compressed. I'm trying to find a solution that problem now. Other than those two hiccups, it appears to be working fine on Game.hpk.


    Edit: To address the batch problem, it looks for that file specifically, checks if it is 70 bytes in length, compares it with what it stores internally, if a match, it cuts off the ZLIB header and outputs the remaining 54 bytes. If not a match, it outputs it normally.


    In both cases, I would think that Tropico would crash if it tried to access them. Fortunately, the batch file looks like a dev tool and the text file is useless so it doesn't access them. I'll update the op with the updated executable shortly.
     
    Last edited: Apr 11, 2012
    Crunching for Team TPU
  25. Frejoh466 New Member

    Joined:
    Apr 6, 2012
    Messages:
    2 (0.00/day)
    Thanks Received:
    0
    Thanks for the update, and for the great tool.
     

Currently Active Users Viewing This Thread: 3 (0 members and 3 guests)

Share This Page