CCG V3-1 Conversion:Part 4 NoModel
From NWN1 Custom Content Guide
Contents |
Items without Models
In the first section of this tutorial we looked at adding a specific type of item: a weapon. NWN represents a wide variety of items with models, not just weapons. And it allows you to add new miscellaneous items, not just modeled items. This mostly requires skills with 2d images to create the icons that show up in your inventory. For example, take a look at the new FRCS gem icons (http://nwvault.ign.com/Files/hakpacks/data/1037972170390.shtml) that Shade Shadowbane created to replace the ones in the main game.
Part 1: Understanding How NWN Represents Items
Let’s look at how NWN represents an item like a gem, and how it is different than a weapon, by actually building an existing one in the Aurora Toolset. Try this exercise:
- Open up the Aurora Toolset.
- Create a new Module (we will call it Item 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.
- Select Wizards | Item Wizard.
- For Item Type select a Gem (we will talk about the standard types later in this section).
- Click Next.
- Enter a name (Soldier’s Eye).
- Click Next.
- Add to the Miscellaneous, Gems category.
- Click Next.
- Check the
checkbox. - Click Finish.
- Select the Appearances Tab.
You can now modify the appearance of the item by selecting the appropriate icon. Notice the names of the icons – yes, Virginia, naming standards do matter for these items as well. In this case, all of the gem icon names have the format iit_gem_001, iit_gem_002, etc.
|
Now, my 2D icons probably don’t look the same as yours. I’m using Shade Shadowbane’s hak in this example.
Now that you understand the different parts of a basic item, let’s get started.
Part 2: New Icons for Existing Items
Probably the best place to start to understand all the different models you can add is through baseitems.2da. So fire up NWN Explorer and take a look. There are a series of items with ItemClass = it_<whatever>. If you look in the models_01.bif and models_02.bif files, you will not find item models with these names. Scroll a little to the right of baseitems.2da. You will find another column named DefaultModel. Some of these items have a default model of it_potion_000 or it_trap_001 but most are it_bag. These are the default models used when the item is laying around in a scene.
The basics of adding new icons to an existing item type are very similar to the process for creating a new weapon, without worrying about the model. Let’s add an icon for a new ring. Find the item in baseitems.2da (in the case of the ring, it is the item with ID # 52). Get the ItemClass value (it_ring). The icon name will be this ItemClass value with a prefix of i and a suffix of _0nn.tga where nn goes from 01 to 50 (existing ring icons have the names iit_ring_001.tga to iit_ring_035.tga).
|
Look at the InvSlotWidth and InvSlotHeight values for this item. Remember from the weapon section of this guide that icons must be InvSlotWidth x 32 pixels wide and InvSlotHeight x 32 pixels high. Sure enough, if we use NWN Explorer to open the Textures01.bif file we will see that an iit_ring_nnn.tga item is, in fact, a 32 x 32 pixel tga file. If you want, you can use an existing icon as a starting point.
Create your new icons using this naming standard and size. If you want to replace existing icons with your new ones, use the exact same name. If you want to add new selectable icons, add them after the highest existing icon number (e.g., starting at iit_gem_016 for gems because the highest existing value is iit_gem_015).
I am going to create a 3-stoned ring. Once I have done that, I put a mask around the ring and stones, and save it. Now I put them in a new hakpak and create a module that includes this hakpak:
- Bundle up your new icons in a hakpak (refer to the section on hakpaks for details on how to do this if you haven’t picked up on it yet).
- Open up the Aurora Toolset.
- Create a new Module (we will call it Item 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.
- Set the module to point to your new hakpak in Edit | Module Properties | Advanced. Save, close and re-open your module to load the hakpak.
- Select Wizards | Item Wizard.
- For Item Type select your particular item. Click Next.
- Enter a name. Click Next.
- Add to an appropriate category. Click Next.
- Check the Launch Item Properties checkbox. Click Finish.
- Select the Appearances Tab.
- Your new icons should now be available in the 2D icon view.
Part 3: New Item Resources
You can also add brand new items through baseitems.2da. Before we do that, let’s talk about your alternatives. There are already miscellaneous items in baseitems.2da. You can create a small item (1 x 1 inventory squares), a mid-sized one (2 x 2), a large one (2 x 3), or a thin one (1 x 2). My first suggestion would be to use these resources and only create a brand new item if you these don’t meet your needs. To do that, use one of the existing icons or add a new one using the process I just described.
|
Now, let’s assume we really need to create a new item – in our case, we really want an item type for a musical instrument for our bards. Lutes. Harps. Bagpipes. Tubas (tubi?) You name it. The problem with the miscellaneous items is that the weight and cost is all wrong for musical instruments. So we are going to create our own entry in baseitems.2da.
Get a copy of baseitems.2da out of \source\2dasource.zip. Copy an existing line item similar to the one you are creating. I have several choices. If I wanted to create models for my instruments and then have the character actually wield the model, I might use something like a Magic Rod as a template (you cannot equip a rod but it does have a model and is used briefly when activated). This animation probably does not fit a lute or harp well though, and I said this section was for items without models, so I will use a book instead. Books only show up in your inventory. We’ll start by making a copy of the book line and adding it in at the bottom. My new item is not going to be like a book, but a book is a good item to start with when modifying this file because it shares the same characteristics that we want.
- Copy the new baseitems.2da file to the directory with your model and icons.
- Open baseitems.2da using a text editor (Notepad works fine although some people use Helios Software Solutions' TextPad). Turn wrapping off so everything aligns nicely.
- Go ahead and take a look at it. Scroll down until you get to the necklace entry. You should see this:
74 531 book 2 2 75 532 spellscroll 1 1 76 535 gold 2 2
- Copy the book entry and paste it at the bottom.
- Modify the entries as appropriate for your new item. I won’t go through all of the different options (refer to the weapons tutorial for more detail) but here are the key ones:
| Column | Values |
| Name | Same issues as for a weapon. This should be **** (should tell the game engine to use the label for a name). However, this does not work. I could not find the text Instrument in dialog.tlk. I’m going to use 1592 which is simply ‘Miscellaneous’ for now. |
| Label | Use ‘_’ underscore if you want spaces in the label. |
| InvSlotWidth
InvSlotHeight | Inventory slot width and height. Make sure it matches the size of the icon you created earlier (in our case 2 x 4 because our icon is going to be 64 x 128). |
| EquipableSlots | I probably want to leave this as 0x00000 (not equipable) because I don’t want it going into one of the pre-figured slots. For details, refer to the weapons section where I explain the different types. |
| ItemClass | it_musicin (add a new item type). The icons will be iit_musicin_001 to _050. |
| WeaponType | Leave the weapon columns alone |
| Stacking | Number of identical items that can be stacked together in your inventory (this is why you get 99 arrows in a bundle, 10 potions, etc.) |
| Description | 1592 (this makes the description ‘Miscellaneous’ as well because there is no entry for an instrument description in dialog.tlk). |
- Back through the same routine. Save the .2da file, load it into your hakpak.
- Make sure your icon files have the right names.
- Load all of these into your hakpak. You should have, at a minimum, the following:
- Load up your module in the Aurora Toolset.
- Now you can create a new instrument using the Item Wizard. You will find the template under “Miscellaneous” in the selection list.
- Modify the Description of your new instrument to reflect the type of instrument it is.
Part 4: Other Items
With the technique we have covered here, and in the section on weapons, you should have the skills and tools to handle just about any other kind of item there is. Some are multi-part like weapons (potions, keys, boots to name a few). And some are singular (rings, amulets, etc.). The steps are simple:
- Use the Item Wizard in the Aurora toolset to create a basic template and understand how it goes together.
- You can usually also get the naming standard from the Aurora toolset. If not, look in baseitems.2da for the default and other model names.
- Go to the source using NWN Explorer to find the models and the textures.
- Create!
With this basic set of tools I will cover only a few more types of item specifically in this tutorial because their complexity begs separate treatment (I am referring to the armor models in the next section).
« Voice Sets | Items Without Models | Spells »
