Neverwinter Nights:Tutorials:Toolset:Customizing the Palettes

From TBotR Wiki

Customizing the Toolset Palettes

Necessary Tools

  • Neverwinter Nights (PC version, as the Mac version does not have the toolset)
  • NWN Explorer - You will need this to view and extract the palette files you wish to customize.
  • GFF Editor - You will need this or a similar tool from the Vault in order to actually edit the palette file.
  • NWhak - You should find this in your NWN/utils directory. You will need this to create a hakpak after you have finished editing your palette file(s).

Step One: Extracting the Palette File

Assuming you have extracted and properly set up the tools needed, let's begin.

Open NWN Explorer.
Expand NWN Main Data, data/templates.bif, for those of us without expansions.
Expand NWN : SoU Main Data, data/xp1_templates.bif, for those of us with the Shadows of Undrentide expansion.
Expand NWN : HotU Main Data, data/xp2_templates.bif, for those of us with the Hordes of the Underdark expansion. (Since I have both expansions installed the rest of this tutorial will be using the itempal.itp from the HotU expansion. There will be minor differences if you don't have the expansions but you should be able to muddle through it.)
Expand Blueprint Palettes. This is where you find all the toolset palette files. For the purpose of this tutorial we will focus on the Item Palette (itempal.itp).

Right-click itempal.itp, select Export. Browse to your desired location and click the Save button. Do not change the file name.

Close NWN Explorer.

Step Two:Edit the Palette File

Open GFF Editor.
Click on File in the menubar, click on Open, browse to the location where your palette file is saved. Because .GFF is the only file type associated with GFF Editor you will not see your palette file in the Open dialog window. In the File Name field type *.itp and hit enter. All your palette files should now be visible. Select itempal.itp and click the Open button.

You should see this:

Lrgpalettes001.jpg

After opening itempal.itp

Expand -1 [TopLevelStruc], expand Main [List], expand 5 [User-defined Struct: 1].

This is just to give you an idea of what the structure of the palette looks like.

We're going to add a new category and sub-category to palette.

Right-click on Main, select Add [User-defined Struct: 0].

There should now be an 8 in your list:

Lrgpalettes002.jpg

After adding a User-defined Struct

Right-click on 8, select Add [CExoString]
Right-click on 8 again, this time select Add [List]
Right-click on 8 once more, this time select Add [BYTE]

Expand 8 and this is what you should see

Lrgpalettes003.jpg

After adding Category Structure elements

Click on 0 [CExoString], in the Field ID field type DELETE_ME (When I remember the significance of this I'll edit this, for now follow my lead)

In the large text box below Data Value type your category name, I'll use My Weapons Do not hit enter.

Click on DELETE_ME below 8

Notice the changes

Lrgpalettes004.jpg

After editing your category name

Click on 2, in the Field ID field type TYPE (And when I remember the significance of this I'll edit this)

In the large text box below Data Value type 2. Do not hit enter.

Click on TYPE

Notice the changes

Lrgpalettes005.jpg

Click on 1, in the Field ID field type LIST (This one is pretty self-explanatory, as it will eventually hold a list of sub-categories).
Click on 1, it will change to LIST

Now, we'll create a sub-category.

Right-click LIST, select Add [User-defined Struct: 0]
Expand LIST
Right-click 0, select Add [CExoString]
Right-click 0, select Add [BYTE]
Expand 0

This is what you should see

Lrgpalettes006.jpg

After adding Sub-category Structure elements

Click on 0 [CExoString], in the Field ID field type DELETE_ME

In the large text box below Data Value type your sub-category name, I'll use My Swords Do not hit enter.

Click on DELETE_ME

Notice the changes

Click on 1 [BYTE], in the Field ID field type ID

The second element from the bottom is labeled NEXT_USEABLE_ID, on the right side of the equal sign you'll see a number. Type that number into the large text box below Data Value. Do not hit enter.

Finished Editing

We are now finished customizing our Item Palette. If you wanted to, you could repeat the above for as many categories and sub-categories you feel you need. One thing to keep in mind. The NEXT_USEABLE_ID does not update on its own. Continue to increment your IDs with every new one you add. Once you are finished adding your categories edit the NEXT_USEABLE_ID to be, well, the next useable id.

Save the file and we'll move on to the next part.

Using Your New Palette File

Now that you've customized your palette I'm sure that you'd like to start using it. There are two ways you can do this.

Override

First, if you want to use this palette for every module you open in the toolset, put your saved itempal.itp into your NWN/override directory. Start a new module and your palette will be there when you want to use it. Open an existing module, click on Build in the menubar, select Build Module from the menu. Once that process has finished your new palette will be ready for use. Make sure to save your module, and every time thereafter when you open the module your new palette will be there.

Hakpak

Second, if you want to use this palette for a module you wish to distribute, it would be best to add the file to a hakpak and distribute it along with your module. This way any builders who look into your module can have the pleasure of seeing the palettes the way you like them. Also if you add any items to this palette make sure you export the palette and distribute the .erf file along with everything else.

Personal tools