Giter VIP home page Giter VIP logo

Comments (8)

nickelc avatar nickelc commented on June 17, 2024 1

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.

nickelc avatar nickelc commented on June 17, 2024

Also I noticed that the first header in the repacked archive does have 0x000000FF instead of 0xFFFFFFFF.

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.

zocker-160 avatar zocker-160 commented on June 17, 2024

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.

nickelc avatar nickelc commented on June 17, 2024

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.

zocker-160 avatar zocker-160 commented on June 17, 2024

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.

nickelc avatar nickelc commented on June 17, 2024

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.

zocker-160 avatar zocker-160 commented on June 17, 2024

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.

zocker-160 avatar zocker-160 commented on June 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.