Author Topic: Point me in the right direction...  (Read 971 times)

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Point me in the right direction...
« on: March 28, 2012, 03:53:15 am »


               I am returning to NWN after a long absence,

I am starting work on a module and want to use Q as my foundation. There are a number of placeables, monsters, and doors in other haks that I would like to incorporate, a few of which are CEP. I know that I will need to bundle those into a new hak with name changes (and whatever else) in order to get it all to load together properly... but I don't know how to do all that.

I have been looking for an idiot-proof tutorial or walk-thru of that process so I can figure it all out. So far, I have found posts and tuts that talk about the process but seem to leave steps out, are tuts for old versions of utilities that are no longer helpful, or assume knowledge I lack.

Please, if you know of a tutorial or walk-thru a 5 year old could use, point me to it.

If you don't know of such a tut, but can give me precise directions on how to do this, please do!

Extra points for anybody willing to mentor me through the process and allow me to pick your brain from time time.
               
               

               
            

Legacy_Vivienne L

  • Full Member
  • ***
  • Posts: 130
  • Karma: +0/-0
Point me in the right direction...
« Reply #1 on: March 28, 2012, 09:19:19 am »


               Try reading the CEP guides, sorry I don't have the links on where to download those but try the vault! They tell how to make other stuff compatible with the cep, but the same process would apply in making cep stuff compatible with project Q.  It is time consuming but not exactly impossible. But before getting into the lengthy process, try adding the cep haks and placing them under the project Q ones in the hak list and see how that turns out! You might get enough of the placeables and stuff you want without the hassle of meddling with 2das and tlk files. I learned how to combine 2das in detail from the cep guides but haven't meddled with any tlk files yet!  Good luck!
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Point me in the right direction...
« Reply #2 on: March 28, 2012, 10:23:34 am »


               First, welcome back.

Now, as far as editing 2da files goes, there are several programs floating around that will do that.  I personally use NWN2daTool, an Excel file that contians helpful scripting for importing, merging, editing, and exporting (with nicely lined up columns) 2da files.  Just found a NWNWiki page for it that could be useful.

I recommend downloading NWN Explorer Reborn (by Acaos), an updated version of NWN Explorer, which will allow you to more easily dig into the game's resources and any hak files you have installed in your NWN/hak folder.  I use it all the time, even to dig into my owh haks.  You can use it to export just the files you'll want to work with.

Using NWN Explorer, find the Project Q placeables.2da file and export it somewhere easy to access.  Also find and export the same file from other sources that you're taking placeables from for your merge hak...just give them different prefixes so you don't overwrite the one from Project Q.  You'll use these other ones as sources of 2da lines for the placeables you're merging.

Find and export all of the model files you want to merge.  Take a look at the ascii tab for each one in NWN Explorer and look for the "bitmap" references...these are the names of the texture files for those models.  You'll need to export those as well, or your new models may just end up a blank white.  If your search finds both a .dds and .tga texture file of the same name, go with the .dds version.

You can do a search within NWN Explorer...the shortcut is Ctrl+S (not Ctrl+F!).  You can use this to find partial or full file names.

To export, just right-click on the file in the left panel list and pick Export.  Send the files all to the same folder for easy finding later.  For placeables, be sure to do a search for the same file name as the model, but ending in .pwk instead of .mdl...this is the "placeable walkmesh" file that controls the space occupied by the placeable that PCs and others can't walk through.  You'll want this or creatures will be able to walk through your placeables as if they aren't there.

Now, in the Excel file (or your choice of 2da editors), import the Project Q placeables.2da.  You  want to use this one as a base since you're using it as the base hak set for your module.  Import the 2da files from the other haks that had your desired placeables.  Copy the lines for you new placeables out of those other haks and paste them into your merge version 2da, into a blank line space.  Change the line number to match the order of the merge 2da...this line number doesn't really matter to NWN, but does make it easier for us humans to read and use.

Once you've copied all of the 2da lines for all of your desired placeables, save your work (a good idea to do several times along the way).  Export your finished placeables.2da file where it won't get overwritten (or lost).

Note on model names:  In both placeables.2da and appearance.2da, the column right after the line number is used for the model name in the toolset unless it appears as four asterisks (****).  Just make sure you surround your words with quotation marks if the model name you want to use includes spaces or other special characters, otherwise the game will try to read the different words as if they are in different columns.  You could avoid this by using a custom .tlk file entry for the model name...but that's a lot more work than is necessary for your own use.

Open NWHak.exe (found in your NWN/utils folder).  Drag and drop you new placeables.2da file on the program window (which will add it to a new hak).  Do a Save As... to save your new custom hak to the NWN/hak folder.  Go to your folder with all of the additional models and their textures.  Select them all and drag them all onto the NWHak window so they get added as well.  Save again!  Then close the program.

Do the same procedure for monster models as with placeables.  The 2da in this case is appearance.2da.  In the end, instead of starting another new hak for monsters, just run NWHak.exe and open your recently saved one (with all the placeables).  Now your can drag other new files into it and save again.

For doors, I think the 2da file you want might be doortypes.2da.  I haven't done much merging of doors over the years, so I'm not up on the procedure, though I think it must be similar.  I do know the walkmesh file for doors end in .dwk.

Once you get all of your 2da files, texture files (.dds and/or .tga), and model files (.mdl .pwk and .dwk) into your new hak and saved, close NWHak.

Open your module in the toolset.  If you haven't already, go to Edit > Module Properties > Custom Content.  Add the Project Q haks in the proper order.  Then add your new hak above the Project Q haks (so that your updated 2da files are used by the game instead of the same-named ones from Project Q).  Be sure to add the project Q .tlk file in this same screen!

After letting the toolset add the contents of the haks to the module (you can cancel the "build" after a few moments to save lots of time), you can use all of the custom content for building.




If you have more questions, feel free to ask.  I'm definitely not the only one around here that can help.  I'm not a Project Q expert, so others may prove more useful in that regard.
               
               

               


                     Modifié par The Amethyst Dragon, 28 mars 2012 - 09:24 .
                     
                  


            

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Point me in the right direction...
« Reply #3 on: March 28, 2012, 10:29:41 am »


               thank you! I will report back soon!
               
               

               


                     Modifié par Leurnid, 28 mars 2012 - 09:31 .
                     
                  


            

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Point me in the right direction...
« Reply #4 on: March 30, 2012, 06:54:31 am »


               Ok, I am getting ready to bundle just a couple of things into a brand spankin' new hak to get my feet wet... and some things occurred to me:

If I start with the project Q placeable.2da for my placeable hak, and project Q adds content, will I need to update my placeable.2da to reflect their updates and changes?

I have read about 'padding' resources for things like CEP or Q, what does that mean, and do I need to be concerned with it? (I assumed that had to do with the StrRef number)

Is it possible to NOT use the project Q placeable.2da, and still be compatible with it? (I thought that was what 'padding' the StrRef was for)

I have tried looking this up and wound up spending hours spinning around in circles (curse my ADHD).
               
               

               
            

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Point me in the right direction...
« Reply #5 on: March 30, 2012, 08:15:00 am »


               Oh, bad news! I am on an expired trial for Excel, so the import function isn't working in NWN2daTool.xls

Is there a good idiot-friendly second choice?
               
               

               


                     Modifié par Leurnid, 30 mars 2012 - 07:15 .
                     
                  


            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
Point me in the right direction...
« Reply #6 on: March 30, 2012, 11:33:54 am »


               Google

Libre Office

or

Open  Office
               
               

               
            

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Point me in the right direction...
« Reply #7 on: March 30, 2012, 04:11:52 pm »


               Open office won't run the script that imports 2da's for me either.

I am able to open 2da's in excel still, hell, I can open a 2da in notepad, but I don't know what I am doing, so I would rather use a 'smart' tool and do it right the first time.
               
               

               


                     Modifié par Leurnid, 30 mars 2012 - 03:21 .
                     
                  


            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
Point me in the right direction...
« Reply #8 on: March 30, 2012, 05:22:13 pm »


               There are several other 2da editors available.  You should be able to find them with a search on the Vault.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Point me in the right direction...
« Reply #9 on: March 30, 2012, 05:39:35 pm »


               notepad works too. Although I also use a few other 2da editors from the vault. I like lots of options. '<img'>
               
               

               
            

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Point me in the right direction...
« Reply #10 on: March 31, 2012, 07:20:07 am »


               I am using the 2DA/TLK Editor, I considered notepad, but until I know what I am doing, and more importantly, why I am doing it, I am going to be a lot more confident using a tool designed for the job. Otherwise, I will spend an absurd amount of time getting lost in the smear of data and obsessing that I put too many or too few spaces, failed to use a hard-enter, or messed something else up along the way.
               
               

               


                     Modifié par Leurnid, 31 mars 2012 - 09:59 .
                     
                  


            

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Point me in the right direction...
« Reply #11 on: March 31, 2012, 01:37:57 pm »


               I found the padding info I needed, and have successfully made a Q friendly placeable HAK!

I ran into a line number mismatch that was crashing the 2da utility, but I was able to fix that by opening the 2da in notepad and fixing the line numbers. I wound up doing the last edits in notepad.

The models loaded in but they were not loaded into the pallet. I am able to do manually build them for that, but I would rather they were already there... so what do I need to do to get them to load into the custom pallet when I load the HAK?
               
               

               


                     Modifié par Leurnid, 31 mars 2012 - 12:43 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Point me in the right direction...
« Reply #12 on: March 31, 2012, 02:26:00 pm »


               Models do not appear in the plaette, Blue prints show up in the palette. you will need to create the blueprints for them to show up in the palette.   You may want to post this more on the CC board.  the people who watch that board will be able to help you more and faster.

As far as editing the 2da line number,  i hope that was not just editing the first number on the 2da line.  That number is just there for convenience of reading the 2da, its value is totaly ingnored by the toolset/game.
               
               

               
            

Legacy_Leurnid

  • Sr. Member
  • ****
  • Posts: 473
  • Karma: +0/-0
Point me in the right direction...
« Reply #13 on: March 31, 2012, 08:51:24 pm »


               It was the first number... so I wasted time messing with that? I wasn't going to worry about it, but I read that Project Q had reserved values up to x for different 2da's, and the editor I was using had an option to 'pad to x' so I did so.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Point me in the right direction...
« Reply #14 on: April 01, 2012, 03:01:35 pm »


               

Leurnid wrote...

It was the first number... so I wasted time messing with that? I wasn't going to worry about it, but I read that Project Q had reserved values up to x for different 2da's, and the editor I was using had an option to 'pad to x' so I did so.


Ok, let me explain this a little better.   That first number in the row is there so that the Human editing the line Knows what line it is.  Informating in the 2da needs to be on the correct line.   Padding is adding unused lines normaly with a **** for all the entries, on that line, to reserve space in the 2da without just using the next line in the file. 

The first number represents a way for a human reading the 2da to know what line number it is, if the number is incorrect,  a human reading the file in a text editor, could program other things incorrectly based on the misinformation. 

When the game reads the 2da, It reads the first line in as line 0,  the second line in as line 2, ect...  If the line number on the 5 line is 10,  it does not matter to the game,  It is the 6th line therefore it will be given an index value of  5,