You are here

Editing a .ITP File

Author: 
Janus

What is a .ITP file? ITP files are simply files that define what shows up on the selection lists for tiles, creatures, placeables, and the other lists within the toolset. Tileset ITP files are really the only ones you would want to edit, since Bioware provided a custom list for every other type of list.

So why would I want to edit it? If you are editing tilesets to make your own, or adding new things to an existing tileset then this is one file you'll have to edit to get your new tileset parts to show up in the toolset under the tile list.

Editing an .itp file is one of the lesser understood things in the community.  It's not terribly difficult, it just takes some getting used to.   To be able to complete this tutorial you will need:

  • ITP Tools by Stephen Goldberg (Chanteur)& Seg Falt

  • A copy of the ttr01stdpal.itp file (the rural tileset itp file).  You can get it with NWN Viewer from the Template.bif file.

There are 2 parts to this tutorial:  

In part 1 we are going to take an existing feature or group and duplicate it

In part 2 we are going to make an entry from scratch

For Part 1, we will make a copy of an existing feature from the rural tileset and add it to the list.  This assumes that the tile in question (a 1 tile house) has been extracted, re-textured, and the .set file modified to have it added.  Each of these things is outside the scope of this tutorial.

Lets run the ITP Tools application.

Once it is open you'll notice only one Menu option: File.  Click it, then select Open.

For this tutorial I mentioned we were adding something to the rural tileset.  To add to it you'll need to open the ttr01stdpal.itp file.  After you open it you'll have this:

Every tileset itp file has only one Element=0 section at the very top of the file.  Double click on the Element=0 folder to expand it, then click the + next to LIST MAIN to expand the list.  You'll have this screen.

Each Element=0 folder corresponds to the 3 lists that you see in the Toolset: Features, Groups, Tiles, in that order.  So to add to a Feature you'll need to expand the first element, then the LIST LIST.  You'll see a screen like this:.

Now, for this tutorial we are trying to duplicate the entry for the the 1 tile house in the rural tileset, or ttr01_s07_01.  For other entries you want to duplicate you'll have to hunt through the entries to find the one you need.  Hint: The default itp files are exactly like the lists in the toolset, so you can count the number of entries in the toolset feature list until you get to the desired entry, and the same number will apply to the itp.  Count down to that entry, and hit the + next to us.  For us it's the 16th tile:

For this tutorial we are just going to copy an existing entry and alter it.  Left click on the Element=0 so that it is highlighted.  Now right click it, and select Copy Current Element. (NOTE: Be sure you left click on the Element before right clicking and copying it.. the ITP Tool will copy the last thing you had highlighted, so if you want to get your element and not the entire list, make sure you have the element highlighted).:

Now, scroll back up and left click the LIST LIST to highlight it, then right click on it, and select Paste Element:

Now you should have a new element at the very bottom of this list that is a duplicate of the original:

Now we need to make some changes.  First thing we need to do is get rid of the UINT32 STRREF entry.  Left click it, then right click it and select Delete Current Item:

Now left click on Element = 0 again, then right click and select Add Data Item to Element:

Once you do that you will see the following dialog box:

Under Data Item Type select STRING from the pull down.  Next to Data Item Name type NAME.  Next to Data Item Value type in what you want this called, for our example we'll call it "House Tile".  It should look similar to this:

Now click OK.  Next we need to edit the RESREF entry.  Left click that entry, then right click it and select Edit Current Item:

Change the tile name here to whatever you named your altered tile when you were editing it.  For this example we used ttr01_s07_02.  So your entry should look like this now:

If it looks ok, then all that is left is saving it.  Click the File menu, and select Save As (NOTE: There is not a save option).  Since our tile is going into an existing tileset we just need to save it over the old ttr01stdpal.itp file.  Navigate to the file, double click it and select Yes to overwrite.  Thanks it, you're done.  It's not overly difficult, but getting used to the application is the key :)

 

Part 2:  How to add an entry from scratch

There isn't a lot of differences between part 1 and part 2, just a few small things.  We are going to add the modified City Gate 2x2 group that I modified to add grass, and add it to the rural tileset.  This part will not work if you just throw it in a hak at the end, the City Gate Rural wasn't really desinged to go in the rural tileset, but in the Rural/City Combo tileset, but it works for demonstration purposes.

If you closed down the ITP application, open it back up, if you didn't then you should still have the ttr01stdpal.itp file open.  So that we get a fresh start, click File, then select Open, and re-open the file.  It will bring you back to this screen:

Double click the Element=0 item, then open the LIST MAIN.  This time we are going to click the + next to the Element for Groups instead of Features.

Now click the + next to LIST LIST to expand the list:

Now left click on LIST LIST to highlight it, then right click it and select Add New Element:

You'll get the following dialog without the numbers added:

Type 0 next to Element Item ID, and 2 next to Number of Element Data Items, then hit OK.  You are going to see 2 additional dialog boxes coming up (or however many you put in Number of Element Data Items).  In the first one set it to the following:

Select RESREF from the pull down for Data Item Type, then type RESREF in Data Item Name, and set the Data Item Value to tcn01_o17_02 (this is where the mdl file you use goes), then hit OK.  You'll see a second dialog box.  Set it to the following:

Select STRING from the pull down for Data Item Type, then type NAME in Data Item Name, and set the Data Item Value to City Gate Rural 2x2 (this is what it will show up as in the toolset) , and hit OK.  You'll notice there is a new addition to the bottom of the list and it should look like this.

Again that's it.  Since we are adding this to the existing rural tileset click File, Save As, and save over the ttr01stdpal.itp again.  Now if you had all the necessary files for the hakpak (mdl files, tga files, and a modified .set file) then you would be ready to roll.  I hope this has helped you learn a little about the .itp file and the ITP Tools program.

Migrate Wizard: 
First Release: 
  • up
    100%
  • down
    0%