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.
Zero Tolerance for Disrespect

Torque game engine HHA (Game: Penny Arcade Adventures: On the Rain-Slick Precipice of Darkness: Episode One) ?

Featured Replies

Solved by wq223

  • Localization

Please upload more than one sample (I'd recommend 3+) 
Edit: Just looked and the game does have another common.hha so I'll need that please

Edited by NeoGT404

  • Supporter
  • Solution
2 hours ago, Sirduckdude said:

The there is an HHA which is bigger than the other files in the folder (other than the Sounds folder) so It might be the stuff containing the character parts for the game
https://drive.google.com/file/d/171iCBn_qa0-JwuOTSD6KOsp4GqBv6Qul/view?usp=sharing

The file structure is very clear
uint32 magic;
uint16 padding;
uint16 version;
uint32 string_pool_size;
uint32 file_count;

char string_pool[string_pool_size];

struct FileEntry {
    uint32 folder_name_offset;
    uint32 file_name_offset;
    uint32 flags; // 0 = uncompressed, 1 = zlib (-15)
    uint32 data_offset;
    uint32 decompressed_size;
    uint32 compressed_size;
};

    file_data[];

I wrote a python script that can extract the data, it only requires file parameters, it looks like the texture is in .dds and the mesh is in .dts

hha.py

Edited by wq223

  • Localization

Yeah I know, I already got that far as well but since my tool supports a lot of format and needs to detect them, how can you be sure the magic isn't just something like a hash? Also decompressing the .swf files might be undesirable if you want an untouched output (and it also doesn't decompress them if they're compressed with flag == 1 as well)

  • Supporter
23 minutes ago, NeoGT404 said:

Yeah I know, I already got that far as well but since my tool supports a lot of format and needs to detect them, how can you be sure the magic isn't just something like a hash? Also decompressing the .swf files might be undesirable if you want an untouched output (and it also doesn't decompress them if they're compressed with flag == 1 as well)

It doesn't matter, you can also choose not to decompress. cws is a compression type header. After decompressing it, I restored it to fws. You don't need to do this step. In addition, it doesn't matter whether the main patch file header has a hash or a magic number, because it can be skipped directly during parsing. It is really not very friendly to your tool that needs to accurately detect the magic number.

  • Author
1 hour ago, wq223 said:

The file structure is very clear
uint32 magic;
uint16 padding;
uint16 version;
uint32 string_pool_size;
uint32 file_count;

char string_pool[string_pool_size];

struct FileEntry {
    uint32 folder_name_offset;
    uint32 file_name_offset;
    uint32 flags; // 0 = uncompressed, 1 = zlib (-15)
    uint32 data_offset;
    uint32 decompressed_size;
    uint32 compressed_size;
};

    file_data[];

I wrote a python script that can extract the data, it only requires file parameters, it looks like the texture is in .dds and the mesh is in .dts

hha.py 3.24 kB · 1 download

Thank you!!!

image.png.282ab107c5a6c84329478f6e3bc82408.png

  • 2 weeks later...

i was able to get as far as sirduckdude, but i don't know how to convert the files to a format usable by other programs that arent torque3d (something like obj). that one dts converter plugin for blender, alongside shaper, throw up errors.

 

image.png

image.png

  • Localization

I'm not an expert on the 3D formats at all, but I can see there are 1-or-more vertex sections approximately like this :

// VERTICES
  4 - Unknown (1/3)
  4 - Number of Vertices
  
  // for each vertex
    4 - Point X (Float)
    4 - Point Y (Float)
    4 - Point Z (Float)
    
  4 - Number of UVs
  
  // for each UV
    4 - Texture U (Float)
    4 - Texture V (Float)

 

and down towards the end there seems to be a single block of face indices, simply as:

  4 - Number of Face Indexes
  
  // for each face Index
    2 - Point ID

 

eg, for the SPskull.dts:

image.png.61ffa872b00b5fe1e2ed2831e470ffd8.png

 

There's a lot of other data before and between these sections though, can't currently determine how to accurately find these data blocks.

 

Over to the 3D experts now 🙂

Create an account or sign in to comment

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.