CCG V3-1 Conversion:Part 6 Armor

From NWN1 Custom Content Guide

Jump to: navigation, search

Contents

Custom Armor and Clothing

Neverwinter nights provides a very customizable process for building armor for PCs and NPCs in the Aurora toolset. If you find even this dizzying array of choices is not enough for you, this tutorial will walk through the steps necessary to create armor more to your liking.

We will introduce one new skill to complete this tutorial: using .plt files. The bulk of the effort to build custom armor is a variation of what you have already learned for custom weapons and other items.

I have already created an oriental weapon pack. I want to create Samurai-style armor to go along with this pack to give my module an Eastern flavour. In this tutorial we will start by creating a new chest plate to test it out. We will take this tutorial in two steps. First, we will override an existing model to make it look like a new type of armor. Then we will modify the models themselves and the .2da files that stand behind them to create an entirely new piece of armor.

Part 1: Understanding How NWN Represents Armor

Let’s look at how NWN represents the different components of a weapon by actually building an existing one in the Aurora Toolset. Try this exercise:

  1. Open up the Aurora Toolset.
  2. Create a new Module (we will call it Armor Tutorial for lack of a better name). Use the Area Wizard to create at least one Area. Use the defaults to set up the area and choose something simple like a Castle Interior.
  3. Select Wizards | Item Wizard.
  4. For Item Type select Armor. Click Next.
  5. Enter a name (Yoroi). Click Next.
  6. Add to the Armor, Heavy category. Click Next.
  7. Check the Launch Item Properties checkbox.
  8. Click Finish.
  9. Select the Appearances Tab.

You can now modify the appearance of the item. The options you choose correspond to the different Model Ids. Figure 27 is the closest I could get to Samurai armor without doing my own customization. It will need some work.

Take a closer look at the Appearance tab. Note that there is both a 3D model (used in the game engine to render a character wearing the armor) and a 2D icon (used in the game engine for the inventory functions). There are some other unique features as well.

Image:Ccg fig 31.jpeg

A suit of armor in NWN is made up of eighteen (yes, 18 – there are duplicate pieces for thighs, shins and feet as well) distinct pieces from Neck down to Feet. It does not include the head/helmet – that is a separate item in the game. By mixing and matching the other 18 pieces, you can create a vast array of unique armors with the basic items included in the game.

Note
  • Harliquinn_Whiteshadow points out that while the standard pallets show you 56 colors, there are actually 64. If you draw your mouse down below the last row of boxes on the regular palette in the game or toolset, you can actually access a hidden row of colors including metallics, pure black and pure white.

While we are here, note the two other options: Male/Female and Color… Try changing these values. By toggling back and forth between Male and Female you get the same set of armor modeled for a male or female character. Using the Color button, you can change the basic color of the cloth, leather and metal components of the armor (there are two types of each so you have a lot of room to mix and match your wardrobe) – this is what the .plt files do for you.

Now that you understand the different parts of an armor model, let’s compare those to a typical set of Japanese Yoroi armor. There are seven major pieces to a typical Yoroi armor. Before you bother to write in to me and tell me how you have been studying Japanese armor since the age of 3, how there are actual 43 different major pieces, how armor styles have evolved over the last 800 years, and that I have no idea what I’m talking about, let me say one thing. You’re probably right. Having said that, I want armor that reflects the style. I want a reasonable model – something neither too fantastical nor something that is so historically accurate as to correctly include to the placement of the 11th stitch on the 3rd plate of the Do in the period between 1494 and 1527A.D.

So with that behind us, we’ll talk about those seven major pieces.

Image:Ccg fig 32.jpeg

These pieces correspond closely to some of the major parts of the Bioware model. The Kabuto and Menpo are part of the helmet so we won’t cover them in this section.

Part 2: That Rose Thing Again

We are going to base our armor pieces on existing models - fire up NWN Explorer and select data/models_02.bif from NWN Main Data which contains the armor pieces.

Model Type

Scroll down, way down. What you want are the models that start with p. P represents player model pieces.

The files that NWN uses for all player pieces follow a strict naming scheme. These items are named pxyn_<type><id>. For example, the torso piece we will be working with is called pmh0_chest004.

Race, Gender and Phenotype

After the p, the next three characters represent the race, gender and phenotype of the model. The values of these characters are as follows:

x Male (m) or female (f)
y Race
a=Halfling
d=Dwarf
e=Elf
g=Gnome
h=Human and half Elf
o=Half-Orc 
n Phenotype of the model
0 is normal
2 is large 

Armor Description and Model ID

After these characters, the remainder of the name describes where the piece fits and its ID.

<type> Is the description of the piece.
<id> Model #. All pieces use a three digit number.

For example, pmh0_chest004 equates to:

p for player
m for male
h for human
0 for regular size
chest for the torso piece
004 for the fourth torso piece

Here are the standard <type>’s and the piece they correspond to in the Aurora toolset we looked at earlier.

Type Maps to
neck 
Neck
chest 
Torso
belt 
Belt
pelvis 
Pelvis
shor 
Right Shoulder
shol 
Left Shoulder
bicepr 
Right Bicep
bicepl 
Left Bicep
forer 
Right Forearm
forel 
Left Forearm
handr 
Right Hand
handl 
Left Hand
legr 
legl 
Thighs
shinr 
shinl 
Shins
footr 
footl 
Feet
Hints
  • Be innovative! Some folks have come up with really novel ways to massage the basic armor parts to get what they want. Here are a few examples.
  • There are no cloaks in the game and no inventory slot to put on a cloak. What is a person to do? Kinarr Greycloak created a cloak model that attaches to the neck node of your armor. Others have started to do this with things like hats, etc.
  • Bioware did not include robes because of clipping issues (on animation the legs of your character fly right through the material). Lisa included invisible body parts to add to her robes and dresses hak. You select the robe as part of the armor, make the feet and legs invisible so they don’t clip, and away you go.

If you look closely in NWN Explorer you will notice a head model as well using this same naming standard. It is not part of the armor models though because it is chosen once, at the beginning of the game, and not changed later. The only way to change the head model is to equip a helmet. I will talk more about making new heads and helmets at the end of this section.

You might also ask at this point why the Aurora Toolset gives you the choice of having different armor types for the left and right arms and shoulders but not the thighs, shins or feet. The answer is expediency. It would be rare to see somebody with mismatched legs. But if you look at historical armor it is not so rare a thing to see different arm and shoulder plates. Samurai, for example, often had different plates on the right side to allow them to fire a bow without getting the string caught in the rivets and ties of their armor. European jousting armor is similarly asymmetrical.

The final observation to make would be that a simple calculation tells you that you need an astounding 24 models just to make one new armor piece. That would be 2 for gender x 6 for race x 2 for phenotype. To make a completely new set of armor, multiply that by the 18 different pieces in one set. That is a lot of work! The good news is that a program now exists to help you create all of these extra parts – look for NWNArmory on the vault at http://nwvault.ign.com/Files/other/data/1053910703210.shtml. This program will cut down on the amount of work you need to do considerably.




Hint
  • I built NWNArmory to address this exact problem of having to duplicate all of the armor parts for all of the races. Refer to the section at the end of this tutorial for details on how to use this program.

If you are making a new armor piece for player-characters, I would suggest not scrimping on the 24 pieces you will need. The last thing you want is armor that does not work for some characters because you did not include their phenotype, race, or gender combination. However, if you are making an armor piece for an NPC, you can focus just on the models you need for your NPC race and exclude the rest.

Special Models

There is only one special model type. It has the simple format pxyn. There is one for each gender, race and phenotype armor model but it does not vary according to the armor pieces. What is this model for? It is the template for how you assemble a PC from these component parts. It contains one node for each of the PC parts we have described here. By replacing this node with the corresponding armor piece you can build up a complete character. I will discuss this more in the section of this tutorial on Custom Races.

Other Files

In addition to the model files there are five other armor-specific files you will need for each armor piece.

There is one texture file per gender for each armor part (but only one for both phenotypes and all races). These two files have the same naming standard as the model for the default-sized, human male and female models. This is not a .tga texture file. It is a PLT.

There is also one 2D icon file per gender for some of the armor parts. These are only needed for the upper body armor parts. These two files have an abbreviated naming standard which is ipx_<type><id>.plt.

i Icon
p Player
x Male (m) or female (f)

Finally, there is an item resource definition (.2da file) for each type of part. The .2da that needs to be edited is parts_<type>.2da.

Part 3: Finding the Armor Model and Texture

Back to our tutorial – we want to create a banded Do for our armor. Some of you may be jumping ahead. You’ve already exported the model piece (pmh0_chest042 from the diagram above for my Yoroi), you fire up your modeling tool, import the model and… what the? It is the wrong piece. To model the piece I’ve shown, you actually need to open pmh0_chest052. Unlike the weapons where the model #’s in the Aurora Toolset GUI mapped directly back to the model #’s in the BIF files, armor does not follow the niceties of this convention.

How do I get the right model file then? Here is a trick from Harliquinn_Whiteshadow. In the Aurora toolset, create a set of armor using the piece or pieces that you want to take as a starting point for your new armor. Then export the erf file. The erf file tells you the proper model #’s. Here are the steps:

  1. Open up the Aurora Toolset.
  2. Open the Armor Tutorial module we created earlier.
  3. Select Wizards | Item Wizard.
  4. For Item Type select Armor. Click Next.
  5. Enter a name (test). Click Next.
  6. Add to the Armor, Heavy category. Click Next.
  7. Check the Launch Item Properties checkbox.
  8. Click Finish.
  9. Select the Appearances tab.
  10. Using the drop-downs, modify the armor pieces that you want to use as a base for your creation. In my case, all I care about is the Torso piece # 042 (refer to Figure 29).
  11. Click OK to save the updated armor.
  12. Right click on your new Template_Armor. Select Export.
  13. Save the resource file (the .erf) as Template_Armor.erf.
  14. Open NWN Explorer.
  15. Select File | Open… (the other Open option below Open Neverwinter Nights).
  16. Navigate to your Template_Armor.erf file and open it.
  17. There are two lines in the left pane: ExportInfo.GFF and a UTI file which is your actual exported item. Select the UTI file. In the right pane, scroll down until you see the line corresponding to your armor part (s). In this case I have circled the line I want in red pen.

Image:Ccg fig 33.jpeg

From this you can see that if I want to use my chosen model as a starting point I need chest052, not chest042.

Note
  • Open up the female model file and take a look at the texture – it refers to pfh0_chest014.tga not pfh0_chest052.tga like you might expect. It doesn’t matter. The game engine tells it to use pfh0_chest052.PLT regardless of what the model file says. Each armor part model uses the corresponding PLT regardless of what the model tells it.

Fire up NWN Explorer again; from within the data\textures02 directory look for the 24 instances of p***_chest052.mdl files and extract them. These are the model files you need.

You also need the PLT files. As previously discussed, there are only two of them: pmh0_chest052.plt and pfh0_chest052.plt. You will find them in data\textures02.bif - sort of. The problem is that these are small files - very small. How does Bioware get so much texture into your model from such small texture file?

The answer is that they don’t. NWN is designed to scale the size and complexity of its textures to what your PC (your Personal Computer, not your Player Character) can handle. The detailed textures can be found outside of the usual bif files.

  1. Open up NWN Explorer.
  2. Use File | Open… and navigate to the \texturepaks sub directory.
  3. Select Textures_Tpa.erf (the largest, highest resolution textures).
  4. Jackpot. Now you can navigate to your PLT files.
  5. Export it by right clicking on the plt name in the left tree window.
  6. Now you are ready to make changes.

Part 4: Creating a New Texture

Taking a close look at the torso model files you may notice that the 52 armor pieces in NWN Explorer are, in fact, only about a dozen unique models combined with different textures. We will take a similar approach – I don’t need a new chest model for my Do. What I really need is a new texture to make it looked like banded mail. For now, we will replace the existing chest model piece 052. This means for now I do not need to actually change the 24 model files. I only need to change the two PLT files. In the next section I will show you how to add my Do as a new armor in its own right, including the model files.

The general process for each PLT will be to:

  1. Convert the PLT to a bitmap. Use pltcon for this.
  2. Edit the bitmap with your preferred image program. It must be a program that supports color channels.
  3. Convert the bitmap back to a PLT. Again, use pltcon.

Editing the Bitmap

I mentioned that you needed an image program that handles color channels. After you have used pltcon to extract the bitmap, load it into your image-editing program. It will be a mixture of odd colors.

Note

A refresher on basic color theory. The color you see in a 24-bit color image is made up of three channels: Red, Green and Blue (RGB). Each pixel has 3 bytes of color information: a byte depicting the intensity of the color Red with a value between 0 (no red) and 255 (bright red), Green between 0 and 255, and Blue between 0 and 255. By combining these three ‘channels’ into a single pixel you see a single color in the spectrum.

Image:Ccg fig 36.jpeg

Convert the bitmap into its component Red, Green, and Blue color channels. Using Picture Publisher I do this with Image | Channels | Split RGB. You will get three grayscale images:

Image:Ccg fig 36b.jpeg

Note the areas of pure white and pure black. These are the keys to understanding which parts of the PLT correspond to the different texture types in the game engine. For example, there is a pure white patch in the same section of the R and G images – this represents Leather 2. There is a pure black section only in the Blue image – this represents Metal2.

Note
  • A bit more of a refresher. A 256-bit greyscale image has a value between 0 (pure black) and 255 (pure white) in each pixel. What your image edit program does to get these three separations is take the RGB color image and break each channel into a separate image. The pure black through pure white value in the greyscale image comes from the intensity of the corresponding color in the original channel.

Why do we do it this way? Because it is much easier to edit the grayscale channels and mask off the sections we don’t need for each texture type than it would be to try and do this work in color and maintain the color separation we need.

We will start with this base and edit our image from here. Once we have created the texture we want, we map the final image to the different textures we want for each section. To do that, block out the color channels with pure black (0) or pure white (255) according to the following chart:

Channel
Texture RED GREEN BLUE
Cloth1 255 Active Greyscale
Cloth2 Active 255 Greyscale
Leather1 Greyscale Active 255
Leather2 255 255 Active
Tattoo 1 255 Active 255
Tattoo 2 Active 255 255
Metal1 Active 0 Greyscale
Metal2 Active Greyscale 0
Hair 0 Active Greyscale
Skin Active Greyscale Greyscale
Note

For example, to get Leather2, put pure white (255) in both the Red channel and the Green channel. Put the edited image in the Blue channel (what I have shown as Active).

To get Metal1, put pure black (0) in the Green channel. Put the edited image in the Red channel (what I have shown as Active). The Blue channel (what I have shown as Greyscale) can be anything except pure white or pure black (the Bioware images seem to put a copy of the Red channel in the Blue but this is not strictly necessary).

To get Skin, put the edited image in the Red channel. Again, Bioware tends to copy this same image into the Green and Blue channels as well and this is fine. As long as they are not pure white or pure black it should be fine.

Note when I indicate a greyscale image, I mean a value between 1 and 254.

When you have done all of this masking on each channel, recombine the greyscale images into a color image. With Picture Publisher, you can do this using Image | Channels | Recombine. Then use pltcon to turn the bitmap image back into a PLT file.

You don’t have to start with a Bioware PLT file. You could also begin with your own texture. Convert it to greyscale and make three copies. Mask out the areas I have indicated above with white or pure black by hand and then recombine the images into a single color image.

Don’t Forget the Icon

Let’s not forget to update our 2D icon files as well. Again, you only need a male and female version of these. They share a scaled-down version of the full model naming standard: ipx_<type><id>.plt.

i Icon
p Player
x Male (m) or female (f)

Note the .plt extension. These are not Targa bitmaps like other icons. By making them PLT files, the game engine can automatically apply your color selections to the icon as well as the model itself. In our example the names of the icon files we need are ipf_chest052.plt and ipm_chest052.plt. Note that you do not need icons for all pieces. They are only required for belt, chest, pelvis, and left and right shoulder pieces (take a close look at a piece of armor in your inventory – it does not show the entire suit).

Extract your 2d icons. Convert them to bitmaps using pltcon. Separate the channels and edit them. Recombine them. And finally convert them back to PLT files.

That is all there is too changing the texture of your armor (well, okay, I admit it is fairly complex). Now all you need to do is load your new PLT’s into a hakpak and import them into a module.

Image to PLT

A common question people ask is how to create a texture that can then be mapped to a PLT file. The answer is that you create the texture like any other image. A couple of points to keep in mind:

  • you typically want a fairly broad range of shades in your image – a bright white image will make for a washed-out PLT file
  • don’t worry so much about the actual colors as the pattern and texture – working in greyscale can be a good way to do this although you can work in full colour if that is better for you

Once you are satisfied with your image, you will use it to create the PLT:

  1. Convert the image to greyscale.
  2. Convert the greyscale image a full RGB again.
  3. Split the greyscale image into R, G, and B components. Note that they will be identical – this is intentional.
  4. Mask, dodge and edit the R, G, and B components to make separate metal from cloth and cloth from hair, etc. It is easiest to do this when the images are identical because you want all the 2-d texture details in whatever layer you choose to keep them in. This is why you go through steps 1 and 2 first.
  5. Recombine them into one RGB image. They will come out in funky colours courtesy of the merge process.
  6. Save as a bitmap.
  7. Run pltcon on the bitmap. The resulting file is a working PLT with your texture.

Part 5: The Armor Resource Files

Like our first example of creating a new weapon, the process I walked you through has some limitations. The biggest one is that you have replaced an existing model. What if I want to add my armor piece as a new model? There are a couple of steps I did not talk about. You need to edit the model files themselves and the armor 2da files. Let me take you through an example of turning the armor we just created into a separate item.

Crack open those pxyz_chest052 model files.

Option 1: Editing by Hand

I can actually get away without using a modeling tool if I do the editing by hand. I’m going to assume that I don’t need to change the actual shape of the armor.

Note
  • The only parts_<name>.2da file that affects your armor’s AC bonus is parts_chest.2da. The other files have an AC Bonus column but it does not appear to be used. It may have been part of a scheme to allow other armor pieces to impact the total AC value of the final product that was abandoned because the method was too complicated.
  1. Use NWNMDLComp to decompile the binary model files into ASCII files (see the section on Weapons for more detail on how to do this).
  1. Edit each model file by hand. Change any instances of chest052 to chest054 (the next highest model #). For the chest piece there are typically three places where you need to do this. If you have a utility like BK ReplaceEm, this is a simple process.

Option 2: Modeling

If you actually want to change the shape of the armor (adding big nasty spikes, or a peacock-plumed tail, etc.) fire up your modeling tool and go wild. Save the results of all 24 changes as p<xyz>_chest054.mdl and don’t forget to change those internal references.

Rename your 2 PLT icons and your 2 PLT texture files as well.

Extract and open up the 2da file as well. In our example it is parts_chest.2da:

Column Description Values
The ID number Start at 54, after Bioware’s last piece. I would normally tell you to start much higher but this figure must match to the armor ID number and we want it to be consecutive.
CostModifier Change to the cost figures for this part. Leave it as zero.
ACBonus The AC bonus you get for wearing this armor. Because Yoroi is like banded mail (not a solid plate), I used 6.00.
Notes
  • If you import your new model into the existing module we created earlier, you will get a better feel for why the numbering scheme between the Aurora toolset and your model number is different. By adding this new model it does not go at the end of the existing list, it goes somewhere in the middle (# 38 to be precise)! Everything after it gets pushed out by one.
  • Why? Because we gave it an AC Bonus of 6. The toolset sorts armor pieces by AC first and then model second. So it puts our banded mail in the list ahead of the original half plate. Confusing? A bit. But it makes things easier for a module creator because they know the lower value armors are the lower AC ones.

The last few lines of my new 2da file now read:

52         0              7.00
53         0              8.00
54         0              6.00

That is it. Now package up your armor pieces, your 2da files, and your textures and put them in a hakpak. Load everything into your module and give it a try.

When number your own parts, there are some reserved spaces. Refer to the section near the end of this tutorial for information on padding 2da files to allow for future expansion by Bioware. Also, it seems all parts numbered 200 to 255 are pre-fixed to be custom NPC torsos rather than armor. You can make a model and name it pfh0_chest235.mdl and with no 2da support at all the game will automatically enter it in the creature set-up appearance as a new human chest option. It will not show up under the armor creation appearance automatically though. However, if you pad out and add line 235 to the parts_chest.2da it will show up as both a creature choice torso and an armor choice torso. This is kind-of messy and could lead to conflicts with some custom parts.

Part 6: NWNArmory

NWN Armory is a tool that performs renaming, scaling and rotating on NWN PC model parts to generate other model parts. Why would you ever want to do this? It is intended for two main reasons although there may be other applications for it as well

  1. Creating all race models from a human template. Let's say you create this new chest piece for our Yoroi. You need to model it for a human male and create another version for a human female. There are also two phenotypes (phenotype = body size, standard and large) so you need to create these as well. That part you need to do as I’ve just shown. Now there are five more race models (halfing, gnome, elf, dwarf and half-orc). You would need to make twenty more of those armour pieces just to be able to have one for all the elves, halflings, etc. NWNArmory will do most of that work for you based on your four starting models.
  2. Creating all armour models for a new race. Let's say you want to create a brand new race. Maybe it will be slightly taller and skinnier than an elf (a githerzai, say). There are hundreds of model pieces out there if you want your new race to be able to wear all available types of armor. But you can tell NWN Armory how your new race differs from one of the standard races (say an elf) and it will transform those hundreds of pieces for you.

How do you make it work? We’ll talk about the first scenario above, creating all race models from a human template. In the section of this tutorial on Custom Races we’ll discuss the second scenario.

  1. Download NWNArmory.
  2. Install it by unpacking all the files in the .zip into a single directory.
  3. The NWNArmory.ini file contains the standard transforms when you first install the program (the transforms were graciously provided by BearThing). This is the default although if you have modified it you will need to copy standard.ini in place of NWNArmory.ini. I probably should make a wizard to do this. Maybe next version.
  4. Fire up NWN Armory and tell it which models to use as base models. These models must follow the standard NWN naming conventions (e.g., pfh0_belt009.mdl). They must also be ASCII model files. If they are not ASCII model files, use NWNMdlComp to make them into ASCII model files if they are binary.
  5. Tell NWN Armory which directory to put the transformed models into.
  6. Go. What this program will do is compare each input file against the standard list of transform groups. Where there is a match, it will rename the model and apply the racial transforms and save the resulting model in the output directory.
  7. Done.

Part 7: Additional Notes

There are a couple of other 2da files that you may be interested in. The first is Armor.2da. This file describes, by AC Bonus value, the characteristics of each set of armor. In general, you would not need to edit this file unless you wanted to change some of the basic considerations for each AC class. Why? Because the existing file already covers the 9 basic AC types. This table is not a reference by piece or by armor type.

Column Description Values
The ID number
ACBonus The AC bonus you get for wearing this armor. This is not actually used to identify the AC bonus for the armor – the AC bonus value appears to come from the parts_chest.2da file. This file, armor.2da is used to identify the other statistics of a piece of armor with that AC.
DEXBonus The maximum dexterity bonus for wearing this armor.
ACCheck The penalty to using some of your skills when wearing this armor (e.g., Moving Silently in full plate). Applied as a negative to your skill success roll.
ArcaneFailure% The chance that a spell cast when wearing the armor fails. Rolled on a d20.
Weight Weight of the armor in pounds.
Cost Base cost of the armor.
BaseItemStatRef The STRREF for the statistics of this armor in dialog.tlk.

Armorparts.2da and armortypes.2da are the other two files although I have to admit I don’t know what the values in these files means. Armortypes, for example, only includes 42 different types. I’m not sure what these relate to. Rabbithail mucked about with that idea of trying to add new armor parts for cloaks a while back. The capart.2da controls the swapping out of multiple moving components for baseitems, namely just one baseitem, "armor." Apparently a baseitem can be one of 4 modeltypes:

0 Single item (shields, miscellaneous stuffs)
1 Single item (helms) only diff seems to be that these use .PLTs
2 3-component model (weapons, boots)
3 18-component model specified by capart.2da (armor)

Adding a cloak part would still make it part of the armor though and not a separate rendering item.

Adding parts might be more useful for creatures with tails that can be armored. The creatures would likely need those part_g nodes there though. Rabbithail theorized though (experimenting would take a bit of effort just to verify) that there are two likely possibilities:

  1. Creatures with a tail_g would render this tail part (or whatever part is in question) just fine. Creatures without tails would work just fine because they have no such nodes in their models anyhow.
  2. Creatures without tails would not render or animate properly because of confusion over the nodes.

In some previous experiments of attempting to attach new nodes for cloaks, he ended up getting certain races that had their upper bodies properly animated, but their lower bodies not animating at all and just being dragged around with the rest of the creature.

The second issue is that you still need some separate way of making the custom parts selectable in the toolset – this may be what armorparts.2da actually does. However this is laid out in one long row of many columns. So far as we have been able to tell, you cannot arbitrarily add columns to a .2DA file (another example is for spellcasting classes where you cannot add new spell tables).

Part 8: A note on clothing

There is no difference between armor and clothing. Clothing in NWN is simply armor with an AC of 0 (zero). The same applies to actual body parts (a bare arm, leg, etc.) The models work the same way and follow the same standards. The biggest difference is in the modeling: clothing typically includes a Flex modifier so that it moves somewhat independently of the wearer. I will talk more about Flex modifiers in the Creatures section.

Part 9: Notes on heads and helmets

Earlier I mentioned that heads share the same naming standard as other armor components. In most respects, heads and helmets are the same as other armor pieces. There are multiple head models, for each race and phenotype. They use PLTs instead of .tga texture files. And so on.

There is one significant difference though: recall that armor models for the different races and phenotypes all share one PLT file (based on the pmh0_ or pfh0_ PLT file). Head pieces are different for each race (so there is one PLT file for the pma0 version, another for the pmh0 version, etc.) This is how NWN minimizes space with armor files but gives a wide array of unique appearances for the different race types. The same PLT texture is stretched across the different armor pieces but we get unique textures for heads and helmets to ensure that elf heads do not look like skinny half-orc heads.

If you add new heads, they must be numbered consecutively (i.e., start at the highest Bioware head number and add from there – if you do not, they will not be selectable for PCs).

Let me talk for a moment about helmets as well to discuss some limitations with the NWN game engine. When you don a helmet you replace your character’s head model. NWN does not support layering of multiple head models. This is why all of the NWN helmets are closed-face: it does not matter which character head you have chosen, you get the same helmet plopped down on your character’s shoulders when you choose to wear a helmet. The helmet does not sit on top of your character’s head model – instead, it completely replaces your character’s head model.

Not surprisingly, this is annoying for people who play mages, monks, etc. It would be nice to have a mage who can take advantage of the properties of special headgear while, at the same time, not look like (s)he is wearing an upturned bucked over her/his head. There have been requests for non-replacing headgear (for example, a headband that does not show up in-game at all but can be placed in your character’s helmet slot and can be given special powers). Don’t hold your breath waiting – this does not seem to be a high priority request with Bioware.

Some modelers have tried innovative approaches to getting the same effect - including helmets with partial face veils – with varying degrees of success. One possible solution is to produce a helmet model specific to each character head model but without GetAppearance() and SetAppearance() to ensure the right model is put in place when your character dons a helmet, these cannot be implemented today. And, to be honest, they are quite kludgy. There are other thresholds for weirdness with heads:

  1. All heads are available for PC Chargen (character creation).
  2. All heads except 50-99 are available in the Aurora Toolset for custom NPC creation. Heads 50-99 do not show up.

Now, there are some additional quirks/behaviour that impact this:

  1. To be used in PC Chargen, heads must be sequentially numbered. As soon as there is a break in the numbering, NWN assumes that is the end of the PC heads.
  2. This limitation (sequential numbering) does not impact NPC heads in the Aurora Toolset. They show up fine even if they are not sequentially numbered.
  3. There are 32 helms in the male, human, phenotype 0 that take up slots 50-81.

Together these things seem to explain all the weird behaviour you will find; i.e.,

1. and 3. mean if you add male, human heads up to and including slot 49, you suddenly open up access to a bunch of helms for heads in PC Chargen.


2. and 4. mean if you just put a head in slot 100 without filling in slots up to 99, it works fine for NPCs in the toolset but not for chargen.

1. and 5. causes some grief for male humans if you exceed 48.


« Spells | Custom Armor and Clothing | Creatures »

Main Page | CCG TOC

Personal tools