
Versus Books Official Neverwinter Nights World Builder's Perfect Guide

Dungeons & Dragons 3rd Edition Player's Handbook

Dungeons and Dragons 3rd Edition Dungeon Master's Guide
In this tutorial I''ll explain how to duplicate an entire NWN tileset. 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. It will also not have any tileset specific doors. The new tileset is placed in a Hak Pak file that can be distributed to other players. I also present a Batch file that when combined with the gsar (general search and replace) tool will make duplicating a tileset a breeze.
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 DOS and windows skills are necessary to complete these steps.
Before you start you will need three things:
The files for a particular tile set 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 |
The extract the following files from several locations:
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.
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 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).
Note: Steps 3 and 4 can be eliminated by using the dupe_set batch file and the gsar tool as discussed below listed below.
This is probably the most difficult part. The file references in the MDL and WOK files are in upper case but can actually be either case. The file references in the other files, however, must match the case of your files. Therefore, if your file names are lowercase (ttr02 for example) then you''ll need to reference ttr02 in all files other then the .MDL and .WOK files. Your best bet is to replace all cases of the old prefix with the lowercase version of the new prefix.
You need to replace all references in these files with references to the files with your new prefix. You have two methods to chose from (method two is much easier and avoids some additional complications):
1) You need to insure that you replace every instance of the old prefix with the new prefix while preserving the case (upper or lower)
or
2) replace all prefixes (regardless of case) with the lower case version.
Method one is more difficult to do and has problems with some mixed case prefixes (example tDC or Tdc). I''ll assume that you chose method two.
Use your search and replace tool to replace every instance of "ttr01" and "TTR01" (or "TTr01" and "ttR01") with your new prefix ("ttr02" for example). You may wish to exclude the TGA files from the search and replace.
Now if you wish to duplicate the mini-map images you need to do a search and replace inside the .SET file replacing the old map-images prefix with your new one. For example replace all mitr01 with mitr02.
Now you have to rename all the files to match your new prefix. Example: rename every ttr01 file to with the new prefix ttr01. At the command prompt type:
ren ttr01*.* ttr02*.*to rename the files. You need to make sure that the new prefix is lower case.
If you are duplicating the mini-map images then you need to also issue the following command:
ren mitr01*.TGA mitr02*.TGA
Note: Steps 3 and 4 are combined in the following batch file. To use the batch file simple place the batch file and the gsar executable in the same directory as your tileset files. Then issue the following commands:
dupe_set ttr01 ttr02or
dupe_set ttr01 ttr02 /miif you wish to duplicate the map images.
| dupe_set.bat |
@echo off if "%1" == "" goto usage if "%2" == "" goto usage gsar -st%1 -rt%2 -o -i *.INI gsar -st%1 -rt%2 -o -i *.SET if "%3" == "/mi" gsar -smi%1 -rmi%2 -o -i *.SET rem ^^^ to duplicate the map images. gsar -st%1 -rt%2 -o -i *.WOK gsar -st%1 -rt%2 -o -i *.MDL gsar -st%1 -rt%2 -o -i *.ITP gsar -st%1 -rt%2 -o -i *.2DA ren t%1*.* t%2*.* if "%3" == "/mi" ren mi%1*.* mi%2*.* rem ^^^ to duplicate the map images. goto end :usage echo . echo Usage: dupe_set tr01 tr02 [/mi] echo Only accepts the four letter prefix. The beginning t is appended automatically. echo /mi option will duplicate the map images. echo This will replace the existing tileset (ttr01) to a new tileset (ttr02). echo . echo This version will duplicate the tileset and map images. echo You need to extract *.TGA, *.MDL, *.WOK, and *.INI from the aurora_tXX.bif file echo tXX01*.itp from the templates.bif file. echo miXX01*.tga from the textures_01.bif for map images echo . :end |
At this point you have successfully duplicated the tileset. However, the two tile sets are sill identical. You can now reskin your new tile set (see my tutorial Retexturing a NWN tileset).
Zoligato''s NWN NWN Viewer allows you to search for strings in the dialog.tlk file. If you want to distinguish your custom tileset from the original you can just search for a replacement name in the dialog.tlk. For example if I search for snow I get the following:
4995: Snowy 5000: snowy 5817: Snowdrift4995 or 5817 might be a decent title for the winter tileset. Just set DisplayName to 4995 in the [GENERAL] section of the .SET file and the new tile set shows up as "Snowy" rather then "rural".
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.
Note: There is currently a bug in the way the NWN game handles Hak Paks and saved games. Games save 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.
Good luck and have fun!
Here are some optional steps to add more content to your custom tileset.
The areag.ini file contains the default visual and sound settings for each tileset. If you wish to add default settings for your new tileset do the following (paraphrased from a post by Zilax on the Bioware forums).
Extract areag.ini from the bt_ini.bif file to the Override directory. Open areag.ini in notepad (or other text editor). Find the "[ENTRIES]" section. Add the line "Name011=ttr02" (or whatever you prefix is) to the bottom of the section in accordance with the pattern you see in that section. Go to the bottom of the file and locate the "[ttr01]" (or other section whose default settings you wish to copy) section. Copy and paste that whole section to the end of the file. Change the new sections name to "[ttr02]" (or whatever you prefix is).
The dootypes.2da file contains the tileset specific doors. If you wish to add tileset specific doors for your new tileset do the following (paraphrased from a post by Zilax on the Bioware forums).
Extract the dootypes.2da from the bt_2da.bif file. Open the file in notepad (or other text editor). Copy numbered lines 1 thru 5 (if you are duplicating the rural tileset) in their entirety to the bottom of the list. Renumber the lines starting from the last number in the list. Edit the TTR01''s in the tileset column of the copied lines to match your prefix.