BACK TO MAIN PAGE
Server is important, not hakpaks
This is a guide for server admin, who wants to use hakpaks in his modules.
I would first like to share my opinion about game hosting, which has heavily
influenced design of Hak Updater. Each server is unique. Ok, you might want
to download module from web, put random hakpak and open it to public, but
sooner or later, you will want to have your very own server, which is different
from every other server out there. This is why I think, that anybody who
uses hakpaks, will at some point stop to use ready/prepackaged solutions
and start to merge components from different sources. New tileset will appear
- instead of downloading 25in1 pak, just grab this new tileset and add it
yourself. Then add another model/reskin. Few spells and icons. Etc, etc.
So, with this tool, very one of you will have to create your own hakpak.
Please do not worry - if you just want to use ready-to-use hakpak, it will
be quite simple to import it. But somewhere behind the scenes, your truly
unique hakpak will be prepared.
Prepare contents
- Decide what you want to have. Grab some hakpak from the net and see
if you like it. This will be a basis for your own hakpak
- Name your hakpak. Even if you have grabbed winter.hak, please rename
it. In other case, there will be problems with other servers using hakpaks
with same names but different contents. Hak Updater WILL handle it at some
point, but for now, it can be quite unfriendly for client, as every update
overwrites same file there and back. Just rename file using explorer
or other tool, giving it name which has something to do with your server.
For example if your server is called Dire Wolf Den, direwolfden.hak is a
good name. But if it is called My Server, then you will better name your
hakpak like JohnRomeroPak.hak (if you happen to be called John Romero).
- Run hak updater and please note where you have created hakpak util
temporary directory. There you will play with contents of your hakpak. You
can change this location at any point by selecting 'Config/Select storage
directory', but remember that in such case you will loose your cache (unless
you copy it by hand - it will work if done correctly, but I'm not supporting
it...). Let's suppose that this directory is name c:\games\nwn\hakupdater
(in other case, substitute your own directory every time I'll write this
one).
- Select 'Hakpak/Unpack other hakpak'. Then point to your choosen hakpak.
After some time (depending on size of hakpak,number of files inside and speed
of your computer) unpacking will take from one second to one minute. Now,
please look into c:\games\nwn\hakupdater\unpack. You should see a directory
name like your unpacked hakpak. Inside, there are files which were inside
hakpak.
Now you can play with contents. Delete any files you want, import new ones
etc. If you want to merge it with different hakpak, just unpack this other
hakpak in same way and then copy files between directories, using Explorer
or other tool you like.
If you would like to start from scratch, you can create directory yourself
and fill it with contents by hand. It does not have to be in c:\games\nwn\hakupdater\unpack
and it does not have to be named like your hakpak - but sticking to it will
make your life easier.
Create info file
You need information file. This is most important part. Please put your pakinfo.txt
file in your unpacked hakpak directory and edit it's contents. You can download
template here [pakinfo.txt].
HakName=Hak Pak Name
HakFile=NameYourPak.hak
Description=First line\nSecond line\nNext line
Author=Revinor
AuthorEmail=abies@pg.gda.pl
Version=1.0
UpdateURL=http://this.should.point.to.your.server/with/directory/
UpdateCompressed=false
InfoURL=http://this.should.point.to.your.server/with/directory/
LibraryURL=
ServerName=Dire Wolf Den
ServerHost=dire-wold.den.com
ServerPort=5121
Override=
DialogDiff=
Please fill it out. You will do it only once. You DO NOT need to update Version
every time you edit contents - this field is not used for now, you can put
anything you want there, for example data (it is for your information - you
can as well delete this field).
Which fields are REALLY important ?
- HakFile - this is VERY important, it will control how your hakpak is
named. Please set it to same name as you used in above steps (direwolfden.hak
for example)
- InfoURL - more on that in next steps, but it needs to point to URL
on web server which contains pakinfo.txt file (which you are creating at
this very moment)
- UpdateURL - if you will omit it, InfoURL will be used - but maybe you
want to offload your web server with traffic and point it somewhere else.
It should point to place on web server where all contents of hakpak
are placed, together with paklist.txt file (yes, paklist, not pakinfo). In
most cases it is perfectly ok to have same URL in both cases.
- ServerName - name of your server. It will be displayed to user in Hak
Updater, so it is important that he can identify your server by this name.
It is best to use similar name as in NWN server settings
Rest of fields are more or less optional. HakName should describe your hakpak
(like John Romero models and textures). Description should be info which
will be embedded into hakpak - multiple lines are possible here, \n means
newline (but in this file it has to be all in one line). Author/AuthorEmail
is obvious. Please put your own email (server admin contact), as for Author,
probably also your name, unless you want to also mention original content
creator. But there is no way you can place all authors for more complicated
hakpaks. If you want to stay fair, just put thanks.txt file in your hakpak
with any text you like inside. Version, as I have already said, is not important
for tool - put there anything you like. ServerHost and ServerPort should
point to your running NWN server - it is used by HakPak to enable direct
connection to your server, instead of going through NWN selection system.
UpdateCompressed and LibraryURL are advanced
properties. For now, leave UpdateCompressed as false and do not enter LibraryURL.
Override and DialogDiff allow you to play with parts of NWN which are not
yet supported by Bioware - some of files does not work in hakpaks and have
to be placed in override dir and for some extra content, dialog.tlk file
has to be modified. For more info, look into advanced
section, for now leave it empty.
After you have put pakinfo.txt in your hakpak contents directory (c:\games\nwn\hakupdater\unpack\direwolfden.hak\
for example), you are done with this step. You will never have to modify
this file again, unless you will move your web page or server.
Test if everything works
Now please select 'Hakdir/Pack directory to hakpak'. Point program to your
pakinfo.txt file and hakpak will be created. It is inside your nwn hak directory
- ready to be used by game. Now you can play with toolset and game, and check
if everything is ok. It is possible to crash a game with bad contents in
hakpak, so please always do a check before giving it to public. You will
probably also want to put new content inside your module.
Generate paklist
This is VERY important step. It determines if people will see your updated
hakpak or not. Please select 'Hakdir/Generate listing' and once again choose
your unpacked directory (program will reuse directory you packed recently,
so in most cases it is enough to press OK). 'Generating MD5 sums' dialog
will appear and you have to wait a bit. This step creates paklist.txt file
in your directory - it contains list of all files together with length and
checksum.
Copy contents to web server
You need a place on web server to host your files. What you need is a single
directory. Let's suppose it is at http://my.nwn.server.com/hakcontents/.
Copy all files from your unpacked hakpak directory to this directory on server.
pakinfo.txt should be visible as http://my.nwn.server.com/hakcontents/pakinfo.txt
and paklist.txt as http://my.nwn.server.com/hakcontents/paklist.txt. Please
doublecheck it when you do it for the first time, just for sanity check.
All other files also have to be copied there. How do you copy files to your
server is up to you - sometimes you need to use ftp, sometimes scp, sometimes
you have web server on your computer and you just need to copy files with
explorer. IMPORTANT NOTE: If you happen to host your web server on your computer,
do not point download directory directly to c:\games\nwn\hakupdater\unpack\direwolfden.hak\
!!! If you will do it, then at the moment you are recreating you hakpak,
people could get corrupted contents. Copy it to other, dedicated web directory.
Thats all
Please put 'http://my.nwn.server.com/hakcontents/' (however it is called
for you server) URL visible somewhere on your webpages, so people could enter
it to Hak Updater before play. It would be also good to have packed hakpak
available somewhere for people not using this tool, plus link to http://nwn-j3d.sf.net for clients that
want to install it.
You can pretend that you are a client to check if everything works correctly.
Choose 'Hakpak/Add hakpak from URL' and enter your info URL - (http://my.nwn.server.com/hakcontents/
for example) and watch in awe. You will probably want to read client info for exact steps for hakpak download.
One note - if you are a server admin, please make sure you have autoupdate
checked off. In other case, every time you run Hak Updater, you hakpak will
be replaced with version available on your web site - which is bad for testing
new content :)
You can contact me at abies@pg.gda.pl
Hosted by: