Note: This information is very old and may be invalid.

Duplicating a NWN tileset (Using NWN Tileset Duplicator)


Overview

In this tutorial I'll attempt to explain how to duplicate an entire NWN tileset using the NWN Tileset Duplicator application. Once a tileset is duplicated, modifications can be made to the new tileset without affecting the original. Your newly created tileset will not have any default visual or sound settings. The new tileset can be placed in a Hak Pak file that can be distributed to other players.

Note: I have made every attempt to make this tutorial as easy as possible. However, it is impossible to list every click and keystroke. I think basic windows skills are necessary to complete these steps.


Before you start

Before you start you will need three things:

  1. The NWN Game
  2. A BIF extractor. Try the NWN Viewer by Zoligato
  3. NWN Tileset Duplicator application (here)


1) Extract necessary files

The files for a particular tileset are easy to find. First identify the tileset you wish to extract from the following list.

Name Tileset Prefix Mini-map Prefix BIF File
City Exterior tcn01 micn01 aurora_tcn.bif
Crypt tdc01 midc01 aurora_tdc.bif
Dungeon tde01 mide01 aurora_tde.bif
Mines and Caverns tdm01 midm01 aurora_tdm.bif
Sewers tds01 mids01 aurora_tds.bif
Castle Interior tic01 miic01 aurora_tic.bif
City Interior tin01 miin01 aurora_tin.bif
MicroSet tms01 mims01 aurora_tms.bif
Forest ttf01 mitf01 aurora_ttf.bif
Rural ttr01 mitr01 aurora_ttr.bif

Using whatever BIF extraction tool you prefer extract the following files from several locations. If your not familiar with BIF extraction look for help at theBioware forums. In these examples XXX should be replaced with the three letter prefix listed in the above table.

  1. aurora_XXX.bif: Extract every file from the listed BIF file. For example looking at the above table if we wish to duplicate the rural tileset the prefix is ttr01, the bif file listed is aurora_ttr.bif. Extract every file from the aurora_ttr.bif. These are the models, model textures, walkmeshes, and tileset specific doors.
  2. bt_templates.bif: Extract every files that begins with the listed prefix from the bt_templates.bif BIF file. Every tileset should have two ITP files in bt_templates.bif. These are the palette files. They control the list that appears on the right side of the toolset.
  3. 2da.bif: Extract the XXX01_edge.2da file from the 2da.bif. This will allow the effect where the edges appear to continue off to infinity near the area edges.
  4. textures_01.bif(optional): You may also wish to duplicate (and modify) the images used in the in game mini-map. The map images are located in the textures_01.bif BIF file. They are prefixed with "mi" and then the tileset prefix minus the first "t". Example: the rural tileset is prefixed with ttr01, the map images associated with this tileset are prefixed with mitr01. The map images prefix is listed in the table above. Extract every file that begins with that prefix.

You will probably want to keep a master copy of the extracted files in permanent location as you may duplicate the same tileset more then once. Every time you want to make a new duplication make a copy of that directory.


2) Chose a new prefix

Since you don't want to replace the existing tileset you will need to rename the files. If you are duplicating the rural tileset you may wish to use a prefix like ttr02 but any prefix with a similar pattern will do. You will need to keep your prefix 5 letters long and may wish to keep the aaa## pattern. Obviously avoid prefixes that duplicate existing tilesets. I suggest that you keep the first "t" as this stands for tileset (this becomes important when duplicating the mini map images). Choose a lower case prefix.


3) Running NWN Tileset Duplicator

First open the NWN Tileset Duplicator tool either by dbl-clicking on the NWNTilesetDuplicator.exe file or select programs, NWNTilesetDuplicator, NWNTilesetDuplicator if your did a full installation. Navigate to your desired working directory in the directory window. The working directory is the place you extracted all the files to in step one (or a copy of it).


4) Copy the directory (Optional)

If you haven't yet made a copy of this directory you can click "Copy All To...", navigate to another directory or create a new one and hit OK. All the files will be copies to the new directory. You can now modify these files without fear of doing anything wrong.


5) Do the search and replace

Duplicating a tileset is really just renaming all the files so that they contain the new prefix you selected in step 2. The tricky part is that you also have to modify all references to these files to match your new prefix. This is what the NWN Tileset Duplicator is designed to do.

Enter the old prefix into the "Old tileset prefix" textbox and enter your prefix in the "New Tileset Prefix" textbox. Hit the "Begin" button.

You will now see the "Duplicate NWN Tileset" options dialog box. Select "Search and replace" if you are ready to actually duplicate the tileset. Select "Search Only" if you simply want to see what files will be modified.

The search files box controls which files the search and replace will look through. If you don't have a reason to change this leave it as it.

Select "Include Map Images" if you want to duplicate and modify the in game map images. If you did not extract the map images in step one DO NOT check this button or your tileset will not work.

Select "Include Short Prefix" if you want to duplicate and modify the in tileset default doors. This is optional. A tileset doesn't need to include tileset specific doors.

Hit the begin button. You will see a results window that will keep you informed of the current actions. Wait tell the words "Tileset Duplication complete" appear. You will hear a beep in the latest version.


5) Reskin the tileset

At this point you have successfully duplicated the tileset. However, the two tilesets are sill identical. You can now reskin your new tileset (see my tutorialRetexturing a NWN tileset). Reskinning is the process of changing the images to make a tileset look differently. You will also be able to add or delete tiles from this tileset. The NWN Tileset Duplicator, while it's main purpose is now complete, can help with these tasks. Tutorials on how to do this using this tool will come later.


6) Changing tileset name

At this point the two tilesets (your custom skinned tileset and the original) have the same display name in the toolset. The display name is controlled by the DisplayName=XXXX line in the .SET file. The XXXX is a StrRef. A StrRef is an integer number that refers to a text string in the dialog.tlk file. To add your own display name without editing the dialog.tlk file (a very tricky process) replace the DisplayName=XXXX with the following lines:
DisplayName=-1
UnlocalizedName=MY DISPLAY NAME
where "MY DISPLAY NAME" is the name you want the tileset to appear as in the toolset. Do not place any spaces around any of the equal signs.

7) Place files in a Hak Pak

To get custom content into the toolset (or game) you need to place all the files into a Hak Pak. The Hak Pak editor is located in the "utils" directory of your NeverwinterNights installation.

  1. Open the Hak Pak editor. Dbl-click on the nwhak.exe.
  2. Click Resource - Add (or press Ctrl-A).
  3. Select all the files you just created.
  4. Place the Hak Pak in the HAK directory of your NeverwinterNights HAK directory.

With the latest version of the tool (v0.3.x) and HakEdit you can just hit the Make HakPak button.

Note: There is currently a bug in the way the NWN game handles Hak Paks and saved games. Games saved while using a Hak Pak that contains ITP files cannot be loaded. The current workaround is to place the two ITP files in the override directory and do not place them in the Hak Pak. The ITP files are only needed for the toolset. So you can distribute the Hak Pak without ITP files to the players and they never need to touch the ITP files. This should be fixed in an upcoming patch.


7) Create a Module using the Hak Pak

Now you will get to see the pay off of all your work.
  1. Open the NWN toolset
  2. Create a new Module (use any tileset)
  3. Select Edit - Module Properties
  4. Select the advanced tab.
  5. Select your Hak Pak from the drop down menu.
  6. Create a new area with your new tileset.

Good luck and have fun!

Problems


Missing Palette

If you are missing the tileset palette (the list of tiles on the right) it may be because you forgot to extract the ITP files.