techPowerUp! Forums

Go Back   techPowerUp! Forums > Software > Games

Reply
 
Thread Tools
Old Jan 25, 2010, 10:09 AM   #1
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

Tropico 3/4 HPK Archiver

Everything for Tropico 3 are stored in HPK files except movies. This application can extract and archive data into and out of the HPK formatted file.




You need .NET Framework 3.5 or Mono to run it.

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
File Type: zip hpk_archiver_1_0_3.zip (86.2 KB, 4120 views)
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }

Last edited by FordGT90Concept; Feb 1, 2013 at 01:52 PM.
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
The Following 6 Users Say Thank You to FordGT90Concept For This Useful Post:
Old Jan 28, 2010, 11:10 AM   #2
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

As far as I can tell, Extracting is complete in beta 4. Next is archiving, followed by multithreading and other GUI improvements.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
The Following User Says Thank You to FordGT90Concept For This Useful Post:
Old Jan 28, 2010, 01:38 PM   #3
ShiBDiB
2000 Posts
 
ShiBDiB's Avatar
 
Join Date: Jul 2008
Location: Clifton Park, NY
Posts: 3,131 (1.77/day)
Thanks: 98
Thanked 612 Times in 459 Posts
Send a message via AIM to ShiBDiB

System Specs

i dont get why we'd need this
__________________
ShiBDiB is offline  
Reply With Quote
Old Jan 28, 2010, 05:59 PM   #4
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

If you want to mod the game, you need it.

Beta 5 uploaded. I'm going to start work on the archiving component soon.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
The Following User Says Thank You to FordGT90Concept For This Useful Post:
Old Jan 29, 2010, 10:22 PM   #5
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

Beta 6 upload. The application is now fully functional and fully featured.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
The Following User Says Thank You to FordGT90Concept For This Useful Post:
Old Oct 1, 2010, 05:51 AM   #6
sharpegg
 
Join Date: Oct 2010
Posts: 1 (0.00/day)
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks

Thanks for this great tool. I was able to extract the music from the game using this.
sharpegg is offline  
Reply With Quote
Old Oct 1, 2010, 05:53 AM   #7
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

Heh, finally someone uses it. XD

You are welcome.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
The Following User Says Thank You to FordGT90Concept For This Useful Post:
Old Oct 4, 2010, 12:58 PM   #8
madames
 
Join Date: Oct 2010
Posts: 1 (0.00/day)
Thanks: 0
Thanked 0 Times in 0 Posts

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.
madames is offline  
Reply With Quote
Old Oct 4, 2010, 08:03 PM   #9
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

Heh, yeah I remember you. Stick around.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
The Following User Says Thank You to FordGT90Concept For This Useful Post:
Old Nov 6, 2010, 12:29 PM   #10
Ignasius
 
Join Date: Nov 2010
Posts: 4 (0.00/day)
Thanks: 9
Thanked 1 Time in 1 Post

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 by Ignasius; Nov 6, 2010 at 01:00 PM. Reason: add text
Ignasius is offline  
Reply With Quote
Old Nov 6, 2010, 04:05 PM   #11
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

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.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
The Following User Says Thank You to FordGT90Concept For This Useful Post:
Old Nov 6, 2010, 05:37 PM   #12
Ignasius
 
Join Date: Nov 2010
Posts: 4 (0.00/day)
Thanks: 9
Thanked 1 Time in 1 Post

Please, try to decompress and re-archiving.

Please try this file. HPK
unpack and wrap

http://www.megaupload.com/?d=S2D8ROSO

after unpacking, you will receive two components

Last edited by Ignasius; Nov 6, 2010 at 05:38 PM. Reason: add text
Ignasius is offline  
Reply With Quote
Old Nov 6, 2010, 05:42 PM   #13
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

It says it is unavailable.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
The Following User Says Thank You to FordGT90Concept For This Useful Post:
Old Nov 6, 2010, 05:44 PM   #14
Ignasius
 
Join Date: Nov 2010
Posts: 4 (0.00/day)
Thanks: 9
Thanked 1 Time in 1 Post

download here: http://no-mercy.byl.cz/Data.hpk

Last edited by Ignasius; Nov 6, 2010 at 05:54 PM.
Ignasius is offline  
Reply With Quote
Old Nov 7, 2010, 03:32 AM   #15
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

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).
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }

Last edited by FordGT90Concept; Nov 7, 2010 at 09:59 AM.
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
The Following User Says Thank You to FordGT90Concept For This Useful Post:
Old Nov 7, 2010, 08:06 AM   #16
Ignasius
 
Join Date: Nov 2010
Posts: 4 (0.00/day)
Thanks: 9
Thanked 1 Time in 1 Post

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
Ignasius is offline  
Reply With Quote
The Following User Says Thank You to Ignasius For This Useful Post:
Old Nov 29, 2010, 09:13 AM   #17
kenji_03
 
Join Date: Nov 2010
Posts: 1 (0.00/day)
Thanks: 1
Thanked 0 Times in 0 Posts

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.

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 by kenji_03; Nov 29, 2010 at 09:14 AM. Reason: adding the "edit"
kenji_03 is offline  
Reply With Quote
Old Nov 29, 2010, 12:13 PM   #18
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

I don't have a custom music pack but I know there are instructions on the official forum for how to add Tropico (original game) music to Tropico 3 if you want to do that.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
Old Sep 6, 2011, 12:29 AM   #19
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

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.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }

Last edited by FordGT90Concept; Sep 6, 2011 at 08:42 AM.
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
Old Sep 7, 2011, 09:06 AM   #20
zbug
 
Join Date: Sep 2011
Posts: 1 (0.00/day)
Thanks: 1
Thanked 0 Times in 0 Posts

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.
zbug is offline  
Reply With Quote
Old Sep 7, 2011, 09:34 AM   #21
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

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).
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
Old Apr 6, 2012, 09:11 AM   #22
Frejoh466
 
Join Date: Apr 2012
Posts: 2 (0.00/day)
Thanks: 0
Thanked 0 Times in 0 Posts

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.
Frejoh466 is offline  
Reply With Quote
Old Apr 6, 2012, 05:56 PM   #23
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

I don't have Modern Times yet (in transit). I could take a look at it when it arrives.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
Old Apr 11, 2012, 12:58 AM   #24
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,583 (6.28/day)
Thanks: 1,755
Thanked 2,600 Times in 1,962 Posts

System Specs

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.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }

Last edited by FordGT90Concept; Apr 11, 2012 at 01:39 AM.
FordGT90Concept is online now  
Crunching for Team TPU
Reply With Quote
Old Apr 11, 2012, 09:38 AM   #25
Frejoh466
 
Join Date: Apr 2012
Posts: 2 (0.00/day)
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks for the update, and for the great tool.
Frejoh466 is offline  
Reply With Quote
Reply


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tropico 3 Decompress Config FordGT90Concept Games 6 May 2, 2012 03:49 PM
Tropico 4 Confirmed! TheMailMan78 Games 31 Aug 27, 2011 07:16 AM
EVERCOOL HPK-10025EA Low-Profile btarunr Reviews 5 Apr 4, 2011 07:12 AM
Tropico 3 MRCL Games 56 Jan 11, 2010 04:30 AM
Tropico 3 PC Demo with screens! TheMailMan78 Games 7 Sep 15, 2009 06:43 PM


All times are GMT. The time now is 09:42 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
no new posts