Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Dune: Spice Wars (.pak)

Featured Replies

  • Author
  • Localization

spiritovod, posted Tue Apr 26, 2022 9:24 pm (71298)


Here is script for unpacking pak file from Dune: Spice Wars. It's not valid for re-import because there are checksums for every file (adler32) and also because it has workaround for offsets over 2GB (those fields are actually double in binary64 format).
Update: Checksums are not validated against files, so it's possible to modify package (proof).

Also, files are using extensions of their sources instead of actual ones: png are dds of various types, fbx are hmd, and so on.

=====================================

Script for repacking added. You need to place modified file, script and pak archive in the same folder and run script on modified file - it will be appended to selected archive (can be specified in the script), if original file was there. Make sure to backup original archive and extracted files, as modified archive can't be extracted anymore (you can still add other modified files to it though). You can find example of how the script should be used in this post - also, reimport mode is not required, script is created to be used directly on modified file.
It may be updated in the future, since current script is built with workarounds due to quickbms limitations.

Alternatively you can use native build tool from the engine as explained here, or other standalone tool from here.

Update: Repacking script is updated to handle all files, though currently modified data.cdb should be smaller or equal to original file.

dune_spice_wars_repack_v2.bms

dune_spice_wars_extract.bms

  • Author
  • Localization

spiritovod, posted Wed Apr 27, 2022 11:28 am (71305)


If anyone wonders, the game is built with Heaps engine and native IDE for it (hide) works more or less fine with basic formats, if they're properly renamed/converted, including animations.
  • Author
  • Localization

spiritovod, posted Thu Apr 28, 2022 6:30 pm (71332)


Script for repacking added to the first post. It has limitations, such as only one file can be packed at once and only archives smaller than 4GB can be processed, but in general it works. Tested on text files.
  • Author
  • Localization

hrsr, posted Fri Apr 29, 2022 6:42 pm (71348)


thanks for the script, indeed it works for as in texts.xml file and texts inside that

however upon modifing another file ,either hexedit or with an notepad, an unit cost from 20 man to 19 the game doesnt start , i rekon some/or one? checksums are kicking in?

yes the archive size increases slightly if any text is modified here > texts.xml
or unit hex/text edit in the coresponding file, however the game doesnt start anymore if an modified unit/building file is repacked.

of course restoring the original archive , the game launches ok.
  • Author
  • Localization

spiritovod, posted Fri Apr 29, 2022 11:02 pm (71351)


@hrsr: I've updated the script and added support for all files (previously not all of them could be packed back). As for data.cdb, there are additional checks in hlboot and hlbootdx, but it's covered by the script now - though modified file must be smaller or equal to original file at the moment. For other files there shouldn't be any size limits.
  • Author
  • Localization

hrsr, posted Sat Apr 30, 2022 11:40 am (71353)


thank you for your work.
  • Author
  • Localization

Spid3rCZ, posted Sat Apr 30, 2022 8:40 pm (71360)


Hi guys, I?ve extracted all files, edited it - but I still can?t put the texts in the game. I run the repack, but it goes blank... :-/
  • Author
  • Localization

spiritovod, posted Sat Apr 30, 2022 9:46 pm (71362)


@Spid3rCZ: Could you provide more info about your problem, like quickbms logs and more detailed explanation of the issue? You need to put modified texts (for example, texts.xml for english or texts_xx.xml for other languages), bms script and pak file in the same folder, use repack script on xml file, then rename result _mod file to original pak name (you can backup or move somewhere original file).

Also, there is other standalone tool for the game in xentax topic, but it seems it can't handle cdb properly yet.
  • Author
  • Localization

Multicor, posted Mon May 09, 2022 7:23 pm (71474)


spiritovod wrote:
@Spid3rCZ: Could you provide more info about your problem, like quickbms logs and more detailed explanation of the issue? You need to put modified texts (for example, texts.xml for english or texts_xx.xml for other languages), bms script and pak file in the same folder, use repack script on xml file, then rename result _mod file to original pak name (you can backup or move somewhere original file).

Also, there is other standalone tool for the game in xentax topic, but it seems it can't handle cdb properly yet.



Hi!

Thanks for the script, but the import does not work for me! :( I just try to put back the "texts.xml" file, but I don't understand how to import it back. Could you describe the method step by step please?

I have the xml file, the pak file and the bms file in one folder. I am using the reimport3_localizations.bat file, but I tried the others, but it does not create the new pak_mod file.

(I tried the other toolt that works for the xml, but the .cdb doesn't work there.)
Thank you.
  • Author
  • Localization

spiritovod, posted Mon May 09, 2022 11:33 pm (71477)


@Multicor: But it's already explained in my previous post above. You don't need to use reimport mode, script is written to be used directly (like, open quickbms, choose repack script -> choose modified file you want to put back -> choose output folder). In case of data.cdb you need to place hlboot.dat and hlbootdx.dat in same folder as well, it will be written in logs.
  • Author
  • Localization

Arqwell, posted Tue May 10, 2022 9:11 am (71480)


Hi, I'm trying to reimport a text.xml file - I'm following the instructions. One directory, select script - select file.pak, choose directory. Whatever I try, it always ends with an error message ... "Selected archive doesn't contain this file". But it contains it, it must contain it! :?:
  • Author
  • Localization

spiritovod, posted Tue May 10, 2022 12:38 pm (71483)


@Arqwell: Please read this post carefully, it was already explained there.
  • Author
  • Localization

Arqwell, posted Tue May 10, 2022 1:19 pm (71486)


Thanks, I already understood that it is necessary to change the order compared to the normal reimport... :idea:
  • Author
  • Localization

hrsr, posted Thu Sep 22, 2022 5:27 pm (73546)


Error: impossible to write 0x8f727db8 bytes (total 0x8f727db8)
Check your disk space or the script is wrong

Last script line before the error or that produced the error:
89 log ARCHIVE BASE_OFF TMP2 1

after dune spice wars corino house update
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.