Vous êtes sur la page 1sur 6

Step-by-Step : Adding Toolset Menu Categories

By : Deus of the Apocalypse (DotA)

Ok even though I included the official guide to changing the Toolset menus around Im sure it will be confusing
as hell to someone who is just learning about this stuff. So let me make it a little easier on you guys by doing a
simple little walk-through, that will only involve a few steps (& trust me it only looks difficult) ;-)
(Please note that the .itp files that I included in with this guide are split into 2 different folders on purpose. One
folder has the .itps necessary for moding a module that has CEP 2.2 integrated into it, & the other folder has the
.itps for moding a module that has not been merged with CEP of any version). Also...
Do NOT mix the .itp files from the CEP itps to the Core itps, (or vice versa), or over-write them you will completely
frag this whole process if you do). ** The .itp files must remain named as they are for the modifications to work
correctly, (this is why you must make sure that you do not accidentally over-write these files especially after
youve moded them).
In both the CEP Menu folder & Core Menu folder, you should have 8 files, (in each one) :
creaturepal.itp
doorpal.itp
encounterpal.itp
itempal.itp
placeablepal.itp
soundpal.itp
storepal.itp
custom_tlk (which is a dialogue type of file)
(The tlk file in the CEP Menu folder is called cep22_custom)
Creating custom menus in the Aurora Toolset, using either the CEP files or Core files, require the same steps so
Ill be writing this guide in universal form; in other words, by following the steps below, the outcome will be the
same, regardless of which type of itp file you are using.
Youll need both the TLK Editor & GFF Editor, (included in this Campaign Builder pack), to make this work.

Now on to step 1
Lets start by opening up the TLK Editor. You should see a window like this:

Now lets open up one of those .itps (with the GFF Editor) so you can see what it looks like, (Im going to use the
Core Menu folders itempal.itp for reference). Once its open, youll see a 1 with a [TopLevelStruct] beside it & to
the left of that line, theres a little box, with a plus sign shape in it click that little box to expand the menu structure.
Again youll see a line that states MAIN [List], with a little box beside it & again youre going to click on that box
to expand the menu.
NOW you should see something like this :

Go ahead & click on a box beside one of those numbers, (lets say #3) & heres the view :

Alright, now do you see where it says STRREF, (under the 3rd treenode there)?
THAT is what the tlk files are for. The itp files use those STRREFs, (or String References), to govern what text will
show up on your menus. Whatever text you type, (& I recommend that its short, so you can see it on the toolset
menu, without having to scroll back & forth), will appear in your toolset menu.
Now lets make it all work together. First, you need to re-open, (if its not still open), your TLK Editor & open up
whichever tlk file, (CEP or Core), you plan to use: *And note that the CEP tlk will have a TON of lines, & some of
the lines will already be filled with text do not, I repeat, DO NOT delete any of those lines, or your CEP add-on
will probably lose some text files & some of your palettes may not load).
Next you need to start adding some text to your tlk: Using line 3, or greater, if its the Core tlk, & using whichever
lines are open on the CEP tlk. Ill make a new menu category with you, so you can either follow along or make your
own, based on these next few steps. (Also, youll notice a little * symbol beside whatever text you add to your tlk
dont worry, this just pops up whenever youve edited one of the lines).
Using the Core tlk file, heres what Ive decided to add:

Now, keep in mind that you have to add a line of text for every, single, menu category that you want to add so,
with this in mind, Im going to prepare for future categories by adding some more lines, (which I wont paste add an
image of) Seeing it isnt really important, just as long as you know that youll probably have to add more lines ;-)
And, just for your reference, Ive added Alchemy to line 11 & Blacksmithing to line 12.
Alright lets flip back over to the GFF Editor.
A couple of patterns you should notice right off the bat
All of the these brackets [User-defined Struct: 1] have a 1 at the end of the line.
The typical format for any of the menus (inc. #4, 5, 6, 7, etc.), is :
DELETE_ME
[CExoString]
= The Name of the Category Here
STRREF
[DWORD]
= Various Numbers
TYPE
[BYTE]
= More Various Numbers
And some of the tree nodes (another name for those numbers), even have something in there called :
LIST
[List]
=

But well cover Lists later.

Ok do you still remember that number beside the tlk line you edited? Doh that is important to remember, so
either keep the TLK Editor open, or make a note of which numbers are associated with which lines on your tlk.
** Just wanted to keep you on your toes that number isnt needed right now, but will be very soon ;-) **
Now that all the preparations have been made, lets made a new category for your toolset menu. The first thing you
want to do is right click on the MAIN treenode, & select Add [User-defined Struct: 0].
You should get a new node that is numbered 8, (or
whatever number is next in line on your menu).
Left click on that new #8 node & look to the right of your
screen there, youll see something that says :
Type: 0x00000000
<User Defined>
Simply replace the last 0, (underlined above), with a 1.
(this just allows you to make changes, like sub
categories, under this node).

Alright, next you want to right click the #8 node, &


select Add [CExoString].
Right click the #8 node again, & select Add [DWORD].
Finally, right click the #8 node again, & select
Add [BYTE].
The end result should look like this :
Now the rigorous task of renaming everything, so the
scripts will work right.
Lets start with the CExoString. All you need to do is
left click that line, & youll see the window to your right
change a little bit.
In the Field ID Slot, you need to type DELETE_ME,
& in the Basic Field Data window, you should type
whatever category you want this to be called, (for
example, if this was to be my Tradeskills node, thats
exactly what I would type there). Now that line is finished.
The next line to edit is the DWORD line & this is where
it gets a bit more complicated. First, you need to left click
the DWORD line & change the Field ID to STRREF.
Do you still remember that line you edited in the tlk file, (like mine is #10, & is Tradeskills)? Good, then the next thing
you should be aware of is that the line in that tlk file is NOT the same number you will use for your STRREF. Without
going into all the reasons why you cant use the same number, (to keep thing simpler), lets just say that you have to
add the number 16777216 to whatever number is listed next to your text in your tlk file, (where 16777216 represents
zero).
For example, the text in my tlk file is as follows: Tradeskills = #10, Alchemy = 11, & Blacksmithing = 12.
If Tradeskills is on the number 10 line, & 16777216 represents 0 in a custom tlk file, then I would simply add 10
to that number resulting in 16777226, (& my Alchemy would be 16777227, & Blacksmithing would be
16777228). Get the idea?
Whenever youre talking about creating or editing custom tlk files, you have to use the 16777216 number as your
custom tlk files default 0.

So now your itp menu should look something like this :


You should be getting the idea by now but just in
case
The next thing is to left click the #2 node, (or BYTE), &
type ID in the Field ID & in the Basic Data Field
well
Do you see, (in the picture to the left), the line called
NEXT_USEABLE_ID [BYTE] ?
Well, that is your ID, (& what you would put in the
Basic Data Field of your ID / Byte) though, I would
highly suggest breezing through the other nodes &
lists real fast, just to make sure that it IS the next
useable ID. CEP is great & all, dont get me wrong, but when I started making changes to MY menus, the toolset
said uhn uh lol. All because CEP had mis-typed which ID was next an easy fix & no big deal but again, I
think its worth checking to avoid having to exit the toolset repeatedly, to fix simple errors. (Oh, & dont forget to
change the next useable ID line yourself, when your finished making adjustments just to make it easier on you,
if you decide that you ever want to add more & save the trouble of scanning all of the nodes again).
So now, your nodes should look something like this :
All thats left is to through your itempal.itp in a hak file,
& put your tlk file in the tlk folder, (wherever your NwN
game is installed).
Oh, but wait, how does one create sub-categories
We still have to go over how to add those other 2
lines I added in the tlk file.
Well, that means weve got to add more to our little
Tradeskill treenode.
The first thing we have to do is right click on the #8
node, & select Add [List].
Now, left click the new #3, (or [List] ) node, & edit the List Name, (in the window to the right), to change the #3 to
LIST. (Note that no text is added to the Basic Field Data window).
Now right click the LIST node, & select Add [User-defined Struct: 0]. Expand the tree, so you can see the
user-defined node, & do your thing, (change the 0x00000000 to 0x00000001).
Right click the User-defined Struct: 1, & start this
process all over again (by adding the
CExoString, DWORD, & BYTE. & change them
to their appropriate texts). And NOTE that you
must add a new User-Defined Struct: 0 to each
sub-category you want in your main category. By
the time youre done, it should look something like
the picture to the left.

Each main category you want must be created,


(using the user-defined), under the MAIN node,
& every sub-category you want must be created
under the main node, (i.e. #8 in this instance),
that you have created, through the use of a LIST.

The last thing to keep in mind is that all of the toolsets category types, (i.e. Creatures, Encounters, Items, etc.), are
all on separate .itps, (which is why I included the other ones ;-)
So if you want to create new categories for your worlds items, etc., in each category type, then youll have to edit
each .itp respectively.
As far as the tlk is concerned it doesnt care which .itps are which, it works in the reverse actually. Each .itp will
look for that custom tlk in your mod to try & find the corresponding text line, (as explained when using the STRREF
line in your tree nodes).
Now to make all your efforts work in your mod all you need do is take all of the .itps that you edited & throw
them in a custom hak pack. ** NOTE that when you mod the CEP .itps, you will need to open the hak associated
with CEP, called cep2_top_v22, & add all of the .itps youve edited to it but DO NOT re-save the hak as
cep2_top_v22 name it something like cep22_top_custom, so that you dont over-write the original files.
After youve made your hak pack, take the tlk file that you edited / made & throw it in the tlk folder, (found in your
NwN root folder or wherever you installed NwN).
When you load your mod, add your hak & tlk file to the mod, (in mod properties / custom content), & youre done.

I hope you enjoyed this little tutorial on adding custom categories to your toolset, & hope that it serves
you well.
And please if you would like to give a little feedback or have any questions, list them as comments on
my Vault page, (until I see the need to get a forum going, lol) :-P

Later

Vous aimerez peut-être aussi