Comments (8)
thanks for the help, might be good to document that in the readme. Should I close issue then?
I'll add a parameter --no-compression
and mention the problem for SM DLCs in the readme.
OT: would you be interested in a PKGBUILD generating a DEB for Debian systems? Would make installation a single click.
sure, PR is welcome.
from hpk.
Also I noticed that the first header in the repacked archive does have
0x000000FF
instead of0xFFFFFFFF
.
What happens when you change these four bytes to 0xFFFFFFFF
?
I also noticed, that there is a size difference between the original and the repacked file (the bak is the original one)
The different file size comes from residual data in the original file. The data is not used and is some leftover from how Haemimont edits the files instead of re-creating the files.
The command hpk print --header-only armstrong.hpk.bak
should show the residual info from the header and looks like this for armstrong.hpk
.
fragments_residual_offset: 0x0
fragments_residual_count: 0
from hpk.
original file:
$ ./hpk print --header-only armstrong.hpk.bak
reading file: armstrong.hpk.bak
header:
data_offset: 0x24
fragments_residual_offset: 0x0
fragments_residual_count: 0
fragments_per_file: 1
fragments_filesystem_offset: 0x47A26CA
fragments_filesystem_length: 1352
filesystem entries: 169
generated wtih hpk:
$ ./hpk print --header-only armstrong.hpk
reading file: armstrong.hpk
header:
data_offset: 0x24
fragments_residual_offset: 0x0
fragments_residual_count: 0
fragments_per_file: 1
fragments_filesystem_offset: 0x472B06E
fragments_filesystem_length: 1352
filesystem entries: 169
What happens when you change these four bytes to 0xFFFFFFFF?
Sadly no difference, the game still fails to load.
from hpk.
Did you extract the file with --fix-lua-files
?
Because then you have to use --cripple-lua-files
on creation.
--fix-lua-files
makes it possible to decompile the lua files with unluac
or luadec
.
from hpk.
Do I didn't, all I did was use hpk extract
and hpk create
with no additional parameters or changes to the files.
from hpk.
I could reproduce it with DLC/dde.hpk
and I think I found the problem.
It seems SM doesn't like compressed lua files in the DLCs.
With the parameter --extensions ""
no files are compressed and SM should load.
hpk create armstrong DLC/armstrong.hpk --extensions ""
The newly created file though does contain two BPUL headers and then the data for the first file, which then starts later (0x48 I guess?)
The armstrong.hpk contains other hpk files and the re-creation writes the files in a different order.
from hpk.
With the parameter --extensions "" no files are compressed and SM should load.
hpk create armstrong DLC/armstrong.hpk --extensions ""
that works! 🎉
thanks for the help, might be good to document that in the readme. Should I close issue then?
from hpk.
OT: would you be interested in a PKGBUILD generating a DEB for Debian systems? Would make installation a single click.
from hpk.
Related Issues (18)
- Support _filedates file
- Surviving Mars zstd compression HOT 8
- FYI: For OSX, upgrade to zstd required HOT 3
- error: Could not compile `hpk` HOT 5
- SIGSEGV: invalid memory reference while cargo build --release HOT 8
- Help with offsets HOT 5
- Access denied HOT 9
- Add option to switch between zlib and lz4 for compressing chunks
- The First Templar HOT 9
- Jagged Alliance 3 hpk archiving issue HOT 3
- Inject file into package HOT 5
- Stranded Alien Dawn : UnexpectedEof
- Add option to specify file extensions for compressing files
- Add option to compress the whole hpk file
- Victor Vran crashes with newly created files and lz4 compressed chunks HOT 1
- This does not properly extract Surviving Mars files HOT 2
- Surviving mars corrupt extraction HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hpk.