Skip to content

Syncing HAK contents

Background if you don't know me, was on DLA as one of the modelers, where we ended up making WyvernCrown of Cormyr. Made the horse system, as well as a bunch of other features. Ended up getting hired at Bioware to handle content for the Premium Modules as well as the last patches.

Had an idea for keeping the client and server in sync for HAK contents that could have kept it going, but sadly, any further development on NWN was shut down and those of us on the Live Team got moved onto another projects. :(

For the connection, the idea was to have the NWN client look for and run an batch file, passing the IP of the remote server to it. The purpose is to have it run something like rsync in said batch file that would connect to the server's IP, since it's also running an rsyncd server, and sync any HAK files prior to actually launching the client connection. This saves having to hunt for the right version HAKs to install, and it would always match whatever the server is using.

However, HAK packs sit in your /nwn/hak/ folder and is a container format that packs a number of other files into one, to ease sharing as well as use up less files on the HDD from large allocation units. The big problem is that even if one file in the HAK changes, it often means you have to download the whole thing again, and we know HAKs can get quite big - Especially with the push for higher resolution textures and such.

One solution was to replicate the method we used for development on WyvernCrown of Cormyr (and also testing the 1.69 patch contents) was to use rsync to sync the individual files into a folder, then if there were any updates, use an ERF tool to pack the folder's contents into an updated HAK of the same name as the folder. Drastically reduced the download time as you're only updating a handful of changes files instead of the whole thing again, and just need some time for the packing step.

The other idea on top of this, was to basically allow NWN to read a folder of unpacked content as if it was a HAK file, saving the step of repacking. This could also come in handy for mod authors as they can speed up their development time as they'd only have to make the actual HAK pack at the end prior to distribution.

Obviously there's security issues in regards to running the external batch file, as it would be much better if the download and sync features were built into the client and server. It's been awhile since I've had to think about this obviously, but I'll share what we were thinking and hopefully the people at Beamdog can maybe make something like this a reality!

Comments

  • CablefishCablefish Member Posts: 37
    Would that work something like NWN2 client automattically downloads HAK files and other custom content when connecting to a server? Such a feature would make the whole process of joining custom multiplayer servers so much easier and is definitely on my top10 wishlist!
  • T0R0T0R0 Member Posts: 86
    Just an idea , on the server list when connecting/finding PW's to play. Include a column titled something like "haks required" yes or no. Maybe even have links if yes.

    Does anyone even read the server descriptions anymore ?
  • TsaisTsais Member Posts: 11
    Automated syncing of assets would be fantastic - I'd put this on the top of my wish list.
  • PlasmaJohnPlasmaJohn Member Posts: 31
    T0R0 said:

    Does anyone even read the server descriptions anymore ?

    Not even in NWN1's heyday.

  • TheGmorkTheGmork Member Posts: 37
    @ThriKreen long time no see. I used to DM on Krynn Haven and then you were helping us to create a new PW just before 1.69 came out. We helped bug test 1.69 on the server. I don't know if you recall. I was using the handle Djanga back then.
    Anyway, good to see you. Are you planing on doing anything with the new EE?
    Also, a hak sync would be good. I recall we were trying out the bat update system back then but there were some problems with it.
    With this being released on steam, having access to the steam workshop will make getting haks much more simple I think, at least, but something that auto detects what you need for the server you are joining and downloading it all for you would be sweet.
  • TemplarDrakeTemplarDrake Member Posts: 44
    However it is done this is so much on my wishlist
  • WheldrakeWheldrake Member Posts: 3
    Hey, Thrikreen! Good to see you still in the NWN community. Obviously the ability to autosync content at connection time with an online server would be a huge bonus. Those of us who are less technically savvy would benefit a lot from not having to doublecheck hakpack compatibility.
Sign In or Register to comment.