adding toolset menu categories

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… I’m 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 .itp’s necessary for mod’ing a module that has CEP 2.2 integrated into it, & the other folder has the .itp’s for mod’ing a module that has not been merged with CEP… of any version). Also………... Do NOT mix the .itp files from the CEP itp’s to the Core itp’s, (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 you’ve mod’ed 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 I’ll 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. You’ll need both the TLK Editor & GFF Editor, (included in this Campaign Builder pack), to make this work. Now… on to step 1 Let’s start by opening up the TLK Editor. You should see a window like this:

Upload: tomas-skinner

Post on 28-Sep-2015

52 views

Category:

Documents


14 download

DESCRIPTION

Great for builders on the Aurora Toolset, this guide explains menu categories.

TRANSCRIPT

  • Step-by-Step : Adding Toolset Menu CategoriesBy : Deus of the Apocalypse (DotA)

    Ok even though I included the official guide to changing the Toolset menus around Im sure it will be confusingas hell to someone who is just learning about this stuff. So let me make it a little easier on you guys by doing asimple 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. Onefolder 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 completelyfrag this whole process if you do). ** The .itp files must remain named as they are for the modifications to workcorrectly, (this is why you must make sure that you do not accidentally over-write these files especially afteryouve 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 soIll be writing this guide in universal form; in other words, by following the steps below, the outcome will be thesame, 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 1Lets 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 theCore Menu folders itempal.itp for reference). Once its open, youll see a 1 with a [TopLevelStruct] beside it & tothe 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 boxto 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 willshow up on your menus. Whatever text you type, (& I recommend that its short, so you can see it on the toolsetmenu, 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 upwhichever tlk file, (CEP or Core), you plan to use: *And note that the CEP tlk will have a TON of lines, & some ofthe lines will already be filled with text do not, I repeat, DO NOT delete any of those lines, or your CEP add-onwill 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 whicheverlines are open on the CEP tlk. Ill make a new menu category with you, so you can either follow along or make yourown, based on these next few steps. (Also, youll notice a little * symbol beside whatever text you add to your tlkdont 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 animage 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, soeither 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 youwant 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, (orwhatever number is next in line on your menu).

    Left click on that new #8 node & look to the right of yourscreen there, youll see something that says :Type: 0x00000000

    Simply replace the last 0, (underlined above), with a 1.(this just allows you to make changes, like subcategories, 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, & selectAdd [BYTE].

    The end result should look like this :Now the rigorous task of renaming everything, so thescripts will work right.

    Lets start with the CExoString. All you need to do isleft click that line, & youll see the window to your rightchange a little bit.

    In the Field ID Slot, you need to type DELETE_ME,& in the Basic Field Data window, you should typewhatever category you want this to be called, (forexample, if this was to be my Tradeskills node, thatsexactly what I would type there). Now that line is finished.

    The next line to edit is the DWORD line & this is whereit gets a bit more complicated. First, you need to left clickthe 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 thingyou should be aware of is that the line in that tlk file is NOT the same number you will use for your STRREF. Withoutgoing into all the reasons why you cant use the same number, (to keep thing simpler), lets just say that you have toadd the number 16777216 to whatever number is listed next to your text in your tlk file, (where 16777216 representszero).

    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 10to that number resulting in 16777226, (& my Alchemy would be 16777227, & Blacksmithing would be16777228). Get the idea?

    Whenever youre talking about creating or editing custom tlk files, you have to use the 16777216 number as yourcustom tlk files default 0.

  • So now your itp menu should look something like this :

    You should be getting the idea by now but just incase

    The next thing is to left click the #2 node, (or BYTE), &type ID in the Field ID & in the Basic Data Fieldwell

    Do you see, (in the picture to the left), the line calledNEXT_USEABLE_ID [BYTE] ?

    Well, that is your ID, (& what you would put in theBasic Data Field of your ID / Byte) though, I wouldhighly 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 toolsetsaid uhn uh lol. All because CEP had mis-typed which ID was next an easy fix & no big deal but again, Ithink its worth checking to avoid having to exit the toolset repeatedly, to fix simple errors. (Oh, & dont forget tochange 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 NwNgame is installed).

    Oh, but wait, how does one create sub-categoriesWe still have to go over how to add those other 2lines I added in the tlk file.

    Well, that means weve got to add more to our littleTradeskill treenode.

    The first thing we have to do is right click on the #8node, & 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 toLIST. (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 theuser-defined node, & do your thing, (change the 0x00000000 to 0x00000001).

    Right click the User-defined Struct: 1, & start thisprocess all over again (by adding theCExoString, DWORD, & BYTE. & change themto their appropriate texts). And NOTE that youmust add a new User-Defined Struct: 0 to eachsub-category you want in your main category. Bythe time youre done, it should look something likethe 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 createdunder 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.), areall 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 editeach .itp respectively.

    As far as the tlk is concerned it doesnt care which .itps are which, it works in the reverse actually. Each .itp willlook for that custom tlk in your mod to try & find the corresponding text line, (as explained when using the STRREFline 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 & throwthem in a custom hak pack. ** NOTE that when you mod the CEP .itps, you will need to open the hak associatedwith CEP, called cep2_top_v22, & add all of the .itps youve edited to it but DO NOT re-save the hak ascep2_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 yourNwN 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 servesyou well.

    And please if you would like to give a little feedback or have any questions, list them as comments onmy Vault page, (until I see the need to get a forum going, lol) :-P

    Later