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

Tropico 3/4/5 HPK Archiver

Joined
Mar 17, 2018
Messages
11 (0.00/day)
i think i had no issues with GA: Rome and zlib, but for some reason i can't use lz4 to create archives for Victor Vran.
but it's not a problem because Victor Vran accepts zlib compressed chunks.
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
I know a long time ago, I ended up including the game zlib.dll in my binary so that the implementation of the compression would match what the game expects. If it's possible for you to do the same with the DLL Victor Vran uses to handle LZ4, that might be the best solution.

My guess is I would have to go back to zlib to fix GA:Rome but in doing so, I might break other games. It just isn't worth it at this point.
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
Joined
Aug 29, 2004
Messages
24 (0.00/day)
i686 if on a 32bit OS, x86_64 otherwise. I'd assume the difference between gnu and msvc is the compiler used, so either or?
 
Joined
Aug 29, 2004
Messages
24 (0.00/day)
That's the version I used to extract that example image on the previous page, could be the .hpk archive is corrupt?
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
Just extract and run.
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
SharpZipLib is baked into the executable so not sure why you're asking?

LZ4.dll needs to be in the same folder as the executable.
 
Joined
Aug 29, 2004
Messages
24 (0.00/day)
Has anyone had any luck decompiling the Victor Vran lua files?
My copy of luadec gives this error:
file.lua: float format mismatch in precompiled chunk
unluac's error:
Exception in thread "main" java.lang.IllegalStateException: The input chunk is using an unrecognized floating point format: 9.057787542654976E15

I tried inserting some 00? bytes to match them up, but that didn't work :)
luadec: memory allocation error: block too big
Exception in thread "main" java.lang.IllegalStateException: The input chunk reports an unsupported instruction size: 8 bytes

headers.png
 

Attachments

  • lua.zip
    19 KB · Views: 307
Last edited:
Joined
Mar 17, 2018
Messages
11 (0.00/day)
For Victor Vran you have to insert 0404 instead of 0408.

Edit: Some details
Code:
00000000: 1b4c 7561 5300 1993 0d0a 1a0a 0404 0878  .LuaS..........x
00000010: 5600 0000 0000 0000 2877 4001 1740 436f  V.......(w@..@Co
00000020: 6d6d 6f6e 4c75 612f
When you look at the byte sequence 04 04 xx xx 08 in the header of vic_console.lua then you can see that the sequence is followed by two check numbers, 32bit integer 22136 (0x7856) and 64bit float 370.5. In the Survival Mars files 22136 is saved as 64bit integer.

So, you have to insert 04 xx where xx defines the size of the datatype for the integer number.
 

Attachments

  • patched.zip
    19.8 KB · Views: 271
Last edited:
Joined
Aug 29, 2004
Messages
24 (0.00/day)
What cmd are you running and on what archive from what game?

Edit: double clicking on it won't do anything since it's a cmd line program, there's no GUI for you to click.
 

CarlosGf

New Member
Joined
Apr 3, 2019
Messages
2 (0.00/day)
I tried them all, but they all opened and closed. I am trying to extract the hpk from Tropic 5, I extract with what I put in this post but it has parts that stay in codes ..

How does it work then?
 
Top