Hafen-Res : .res file parser from Appdata with a change log

Forum for alternative clients, mods & discussions on the same.

Hafen-Res : .res file parser from Appdata with a change log

Postby Girth » Mon May 11, 2026 6:45 pm

hafen res files. where is the repo, loftar?

I'm making a custom client and got tired of guessing at whatever ideas loftar has about how a log should be placed on the ground.
In the pursuit of trying to find resources for this I found out that everyone has been begging for some sort of resource repo. the evident resting issue, according to loftar, is that the modders are not tracking versions.
I think that the problem is deeper. Without "seeing" the object in game, you cannot write code for it because you know nothing about it and can only make guesses. All res repos created by users for reference are subject to drift, and most are not shared. I believe that it is loftar's role to at least offer us the current version so that developers do not have to wait for user reports such as "I crash when a troll appears"

Regardless, I've vibe-coded this little tool in Rust that accepts 3 types of files, and can accept individual files or entire directories, while preserving structure:
Raw .res files (downloaded mirrors, shared repos)
.cached files (the official client's FileCache extension)
HashDirCache-wrapped .0/.1/.2 files (the format used at %APPDATA%\Haven and Hearth\data\ on Windows and ~/.haven/data/ on Linux)

After the initial scan is complete, future scans are near instant and will produce a changelog in .hafen-extract. keep in mind that you still need to see or interact with the thing in order to obtain its data

https://github.com/ancientchina/hafen-res

I'm not a software developer and I offer my apologies from any resultant misunderstandings, but I hope that this tool helps anyone at all in the future.


With enough playtime, you could possibly capture every conceivable asset file that the Haven server can give you.

the tool also captures player made paintings that you have seen before, naturally.
crafting recipes are dished out in packets instead of res files so I'll have to work out how to cache these client-side.


Update: the res extractor now exports a blender-readable 3d model. -- example here is just a lazy model viewer that didnt map the texture properly, but it works.
now, modders can enjoy a new level of freedom, when it comes to making custom models for the game. or i guess machinima or video content can be made more easily?

Image
Last edited by Girth on Sat May 30, 2026 5:28 pm, edited 2 times in total.
another stupid day of my worthless hermit life
User avatar
Girth
 
Posts: 62
Joined: Sun Jan 19, 2025 6:30 pm

Re: Hafen-Res : .res file parser from Appdata with a change

Postby APXEOLOG » Wed May 27, 2026 2:08 am

Nice. Maybe you can also add some UI and the ability to edit the resources (at least the version). You can check viewtopic.php?f=49&t=57708 it has some edit capabilities (even model import/export) and source code available
W10 Meme Plot | W9 Mantis Garden | W8 Core | W7 Ofir | W6 the City of Dis | W5 Vitterstad | W4 A.D. | W3 Mirniy
jorb wrote:All your characters will be deleted, and I will level every village any one of them were ever members of.
User avatar
APXEOLOG
 
Posts: 1300
Joined: Fri Apr 23, 2010 7:58 am
Location: Somewhere on Earth

Re: Hafen-Res : .res file parser from Appdata with a change

Postby Girth » Sat May 30, 2026 5:36 pm

APXEOLOG wrote:Nice. Maybe you can also add some UI and the ability to edit the resources (at least the version). You can check viewtopic.php?f=49&t=57708 it has some edit capabilities (even model import/export) and source code available


It wouldn't be too hard to make a res repacker but a moddable haven client is another thing altogether. in my head i think the structure of the app would be to target a client of choice, and then have the UI inject custom res files by preserving file dir structure, but im pretty sure you would need to rebuild the client every time you wanted to try it out. takes about 30-90 seconds per build + login time.


do you think enough people care to do this to their game? to have goofy models and textures for everything? it's a considerable project but if someone wants a client of haven that replaces every texture with shrek, then i'm here to say that it can be done.
another stupid day of my worthless hermit life
User avatar
Girth
 
Posts: 62
Joined: Sun Jan 19, 2025 6:30 pm

Re: Hafen-Res : .res file parser from Appdata with a change

Postby Halbertz » Sat May 30, 2026 10:56 pm

Girth wrote:do you think enough people care to do this to their game? to have goofy models and textures for everything? it's a considerable project but if someone wants a client of haven that replaces every texture with shrek, then i'm here to say that it can be done.

Sure. The maximum customization right now is texture swapping - if we can properly swap out resources, it will open up a whole new world of possibilities.
At the very least, we'll be able to replace the ugly models. I'm also sure a whole catalog of new resources will appear on the forum, which "maybe" will help us get more content in patches. Devs are super lazy, and the ability to simply select an asset, tweak it, and shove it into the next patch gives hope that there will be more of these patches (no).
User avatar
Halbertz
 
Posts: 567
Joined: Fri Aug 28, 2015 11:03 pm

Re: Hafen-Res : .res file parser from Appdata with a change

Postby Girth » Sat Jun 06, 2026 5:50 am

Halbertz wrote:
Girth wrote:do you think enough people care to do this to their game? to have goofy models and textures for everything? it's a considerable project but if someone wants a client of haven that replaces every texture with shrek, then i'm here to say that it can be done.

Sure. The maximum customization right now is texture swapping - if we can properly swap out resources, it will open up a whole new world of possibilities.
At the very least, we'll be able to replace the ugly models. I'm also sure a whole catalog of new resources will appear on the forum, which "maybe" will help us get more content in patches. Devs are super lazy, and the ability to simply select an asset, tweak it, and shove it into the next patch gives hope that there will be more of these patches (no).


-delay on my part: debated on whether i should commit. i apologize for sitting on it but i like playing video games with my friends, so i got selfish

seriously? just textures?
here i thought people had custom emotes by now(client side)

I'll look into making some cursed client or tool. my vision is that one should be able to hotswap stuff for random blender models/res packages.
another stupid day of my worthless hermit life
User avatar
Girth
 
Posts: 62
Joined: Sun Jan 19, 2025 6:30 pm

Re: Hafen-Res : .res file parser from Appdata with a change

Postby Halbertz » Sat Jun 06, 2026 12:49 pm

Girth wrote:seriously? just textures?
here i thought people had custom emotes by now(client side)

I'll look into making some cursed client or tool. my vision is that one should be able to hotswap stuff for random blender models/res packages.

Haven't seen anything more crazy than rat slippers and black mguard from Snail's client. Every other private client I've used had default assets. Oh wait, Nightdawg have changed faces of the borka. That's kinda it.
User avatar
Halbertz
 
Posts: 567
Joined: Fri Aug 28, 2015 11:03 pm

Re: Hafen-Res : .res file parser from Appdata with a change

Postby Nightdawg » Sat Jun 06, 2026 5:39 pm

loftar gave me this when meeku was trying to make a good res tool and miserably failed:

https://pastebin.com/hjTpfMwy

it's what he uses for the resource layers. I don't understand this crap.

loftar said he doesn't have a res tool, but instead he compiles the models into resources when he builds the server or some crap, idk.
jorb wrote:I do not want to over-promise or hype up stuff that could be months out.

"Our primary development direction is toward object-controlled-objects"
User avatar
Nightdawg
 
Posts: 2502
Joined: Fri Feb 28, 2020 12:31 am


Return to The Wizards' Tower

Who is online

Users browsing this forum: Claude [Bot] and 10 guests