Recent changes Random page
GAMING
Gaming
 
WoWWiki
Halopedia
FFXIclopedia
Age of Conan
Warhammer Online
Grand Theft Wiki
See more...

Nwn2datool

From NWNWiki

Jump to: navigation, search

Contents

[edit] General

NWN2daTool is a Microsoft Excel spreadsheet workbook designed for manipulating 2da files. It is an easy tool for beginners to use, and is very flexible and powerful for those users who understand Visual Basic programming. Knowledge of programming is not required to use this tool.

Original Author: Syrus Greycloak
Contributing community members:

[edit] Usage

All functions run from buttons located on the NWN2daTool tab of the workbook. Unless the user has familiarity with Visual Basic for Applications (VBA) and can edit macros, the spreadsheet tool cannot be renamed.

[edit] Importing a 2da file

  1. Click the Import 2da File button.
  2. In the Open File dialog, navigate to the directory where the 2da file is stored, and choose the file to open.
  3. It will ask for a "prefix" to prepend to the name of the 2da file. This functionality is used for keeping multiple copies of the same 2da. For instance, if both the Bioware and CEP versions of appearance.2da are to be imported, a prefix of BIO can be added the Bioware file, and a prefix of CEP can be added to the CEP file. The prefix added to the name of the 2da file will be the name visible on the new worksheet created.
  4. The import function will then import the 2da, properly splitting the 2da columns into the spreadsheet columns.

[edit] Creating mergeable sheets

  • The sheets containing all the information to be merged must still have the same 3 header lines, i.e. the line stating the file type (2DA V2.0), a blank line, and the line containing the column headers.
  • Only information that is different from the original file needs to be kept in the sheet(s) that is/are to be merged.

[edit] Merging sheets together

  1. Click the Merge 2da Files button.
  2. Select the sheet into which the new information is to be merged, usually the original Bioware file.
  3. Select the sheet with the new information that will be merged.
  4. Click OK.
  • The two sheets will be merged together. This is done by creating a copy of the original sheet, copying the new data at the bottom, and performing a sort. Any lines with duplicate line numbers result in the previous line being deleted. Thus the new information is kept if there are duplicate lines.

[edit] Notes on merge process

  • This process can be repeated multiple times on the new sheets that are created. Each merge will create a new sheet and the color highlighting the new data will change.
  • The sheet to which the new data is being added must be properly padded so that line numbers run consecutively.

[edit] Exporting 2da files

  1. Click the Export 2da File button.
  2. Choose the sheet to be exported.
  3. Use the Save File dialog to choose where the file will be exported.
  • The export routine will then write the 2da file to the chosen location, in the proper format, properly lining up the columns contained in the file for easier reading in other programs. For new sheets created by the merge process, the export routine will automatically strip off the occurrences of "new" that were appended to the 2da sheet name.

[edit] Extension and Use Possibilites

Users with a knowledge of VBA can tailor this tool to achieve much greater functionality. Examples of what can be done include, but are not limited to, the following:

  • Stripping out padding lines and comparing sheets to the original Bioware sheets to automate the process of making mergeable sheets.
  • Automatically padding a sheet to the proper length required
  • Automating the import, merge, and export routines to build multiple 2da files.

Other uses not requiring knowledge of VBA include:

  • By keeping a copy of a custom tlk file in the workbook and using the values of those tlk entries and the known custom tlk offset, formulae can be used in the individual 2da sheets to calculate the proper values for tlk references.
  • Custom 2da files can be created with ease to be referenced by the Get2DAString function from scripts in the game.
  • New columns can be added to existing 2da files, which can then be referenced by the Get2DAString function from scripts in the game.

[edit] External Links/Download

NWN2daTool can be downloaded from NWVault.

Rate this article:
Share this article: