Information on 2da files, which are essentially 2 dimensional array tables of information. See the left hand bar for a list of information on specific 2da files.

Note a lot of information on specific 2da files are on different pages, such as Spells and Abilities for spells.2da.

2da Format

The 2da format is relatively simple:

This all comes together to mean some very odd looking 2das can be completely valid.

You can find notes on reading 2DA files in scripts at the Lexicon page for Get2DAString. Main thing to note is on error (no column or row matching etc.) and on blank entries it returns an empty string.

Missing Columns versus Blank Columns (****)

There is different behaviour for certain columns where the column is missing entirely (eg; using a old 1.69 version of a 2da) versus the column being present but blanked (****). A notable example is the additional columns in racialtypes.2da which defaults to the 1.69 implementations if the columns are not present to maintain comatibility, and where **** can actually be counted as "Empty value" instead of "Missing value" meaning different behaviour.

Order of Columns

The game generally won't care what order columns are in except for two exceptions;

Adding Columns

Most game read 2da files (if not all) can have custom columns added but these are only useful for Get2DAString (and it's a much better idea to create a custom 2DA file for additional metadata).

In one instance in NWN:EE this has a valid use case the engine recognises: Additional "Spellbook" columns in spells.2da, which are now referenced by column name in classes.2da.

2DA List

This is a list of the different core 2da files (we're ignoring tileset specific ones but there will be a generic entry for them) with a note about the usage for client or server, and line limits (if known). Anything in this list is used by the game, the unused ones are listed later on this page.

There are a limit to the amount of lines the engine will properly use for 2da files. This is restricted due to network traffic (even in SP there is a "server" running) since the game was made for dialup so Bioware coded in a lot of practical limits to lower packet sizes (presumably...)

2da fileBrief DescriptionClient LoadedServer LoadedToolset LoadedLine LimitLine Limit Notes
actions.2daList of actions and associated icons / TLK strings used by the GUIYesYesNoHardcodedThis file cannot have alterations to lines made, the references are all hardcoded.
ambientmusic.2daAmbient music tracksYesNoYesUnknownNeeds testing. GFF field is stored as INT (-2147483648 to 2147483647).
ambientsound.2daAmbient sound tracksYesNoYesUnknownNeeds testing. GFF field is stored as INT (-2147483648 to 2147483647).
ammunitiontypes.2daFor the hardcoded ranged weapons, what models to use for certain ammo types (eg; Fire Arrows)YesNoNoUnknown / HardcodedLikely hardcoded, so no changes to line amounts allowed.
appearance.2daCreature appearances and base properties like size etc.YesYesYesUnknownGFF field is stored as WORD (0 to 65535).
appearancesndset.2daAppearance Sound Set eg what ambient sound they play, referenced by SOUNDAPPTYPE in appearance.2daYesNoYes?UnknownNeeds testing. More can be added but not sure about the line limit.
armor.2daList of armor values, although some of this is hardcoded.YesYesYesUnknownNeeds testing. New AC values can be added but only incrementally (so higher AC, eg: 8, 9, 10 could be added next).
armorparts.2daUsed for the toolset to set how many of each part of armor there are.NoNoYesHardcodedThere is a single line used by the toolset, no additional lines are even needed.
baseitems.2daAll the item types in the game (eg: longsword, torch, scroll)YesYesYes255Hardcoded due to network limitations; items may not function as intended.
bodybag.2daThe bodybag a creature will leave around.NoYesYesLikely 255Needs testing. GFF field is stored as BYTE (0 to 255)
chargenclothes.2daClothing available at character generation.YesYesNoUnknownNeeds testing. No GFF field, is purely loaded by the engine (at chargen client side and on the server side when the client sends over what clothing choice at the end of chargen for that item to load).
classes.2daCharacter classes and main class optionsYesYesYes254Hardcoded due to network limitations plus "255" number is reserved as "CLASS_TYPE_INVALID"
cloakmodel.2daCloaks model references and options for each model.YesYesYesUnknownNeeds testing.
cls_atk_xxx.2daStandard name for classes.2da "AttackBonusTable" 2da value, defining the Base Attack Bonus progressionYesYesYes60Classes are limited to 40 levels for PCs and 60 levels (mostly) for NPCs. In any case epic levels (21+) have static progression from epicattacks.2da
cls_bfeat_xxx.2daStandard name for classes.2da "BonusFeatsTable" 2da value, defining the bonus feats a class getsYesYesYesUnknownNeeds testing but likely the limit here is same as feat.2da
cls_feat_xxx.2daStandard name for classes.2da "FeatsTable" 2da value, defining the feat availability for a classYesYesYesUnknownNeeds testing but likely the limit here is same as feat.2da
cls_pres_xxx.2daStandard name for classes.2da "PreReqTable" 2da value, defining the prerequisits for taking this (Prestiege) classYesYesYesUnknownNeeds testing but this is hardly going to ever be the longest file.
cls_savthr_xxx.2daStandard name for classes.2da "SavingThrowTable" 2da value, defining the saving throw (Fortitude, Will, Reflex) progressionYesYesYes60Classes are limited to 40 levels for PCs and 60 levels (mostly) for NPCs. In any case epic levels (21+) have static progression from epicsaves.2da
cls_skill_xxx.2daStandard name for classes.2da "SkillsTable" 2da value, defining the skills the class has availableYesYesYesUnknown (likely 255)Needs testing but is likely limited to the same size as skills.2da (255 or 32 depending on bugs)
cls_spgn_xxx.2daStandard name for classes.2da "SpellGainTable" 2da value, defining the spells gained each level (How many can be cast per level). Every spellcaster needs this.YesYesYes60

Classes are limited to 40 levels for PCs and 60 levels (mostly) for NPCs.

Note in EE that spellcasters are typically limited to level 40 in the engine.

cls_spkn_xxx.2daStandard name for classes.2da "SpellKnownTable" 2da value, defining how many spells are known (Eg; for Bards and Sorcerers)YesYesYes60

Classes are limited to 40 levels for PCs and 60 levels (mostly) for NPCs.

Note in EE that spellcasters are typically limited to level 40 in the engine.

cls_stat_xxx.2daStandard name for classes.2da "StatGainTable" 2da value, defining the stat increases for the class (Eg; Dragon Disciple, Pale Master)YesYesYes60Classes are limited to 40 levels for PCs and 60 levels (mostly) for NPCs.
creaturesize.2daFile is hardcoded (engine values in ruleset.2da) and only used by the toolset for the names of sizesNoNoYesHardcodedNoted in description this is basically hardcoded and is for toolset only use.
creaturespeed.2daFile defining the speed of PCs and NPCsYesYesYesUnknownNeeds testing. This file can be extended but some lines are hardcoded. See creaturespeed.2da
crtemplates.2daThis defines some "creature templates" for NPCs such as "Half-Celestial" used in the toolset only. Links to ini files that load items and stat changes onto the creature blueprint.NoNoYesUnknownNeeds testing. Solely for Toolset usage.
cursors.2daNot a complete list of cursors, but used for trigger objects to define some mouse over cursors.YesNoYesLikely 255Needs testing. GFF field is stored as BYTE (0 - 255)
damagehitvisual.2daDamage VFX line sent to the client when a particular damage is inflicted by a weapon.NoYesNoHardcodedThe amount of damage types is hardcoded.
damagelevels.2daDamage levels, such as "Uninjured" or "Near Death". The amount of HP each level is for is hardcoded, this is purely for clientside TLK loading.YesNoNoHardcodedThe damage levels are set in the engine, this just displays the right localised TLK string.
defaultacsounds.2daThe sounds of each armor when hit, thus leather armour when hit by a sword has the impact effect sound like leather.YesNoNoUnknownNeeds testing. New AC values can be added but only incrementally (so higher AC, eg: 8, 9, 10 could be added next).
des_xxx.2daThese 2da files were used by Bioware designers to have custom systems that work with Get2DAString() in scripts, eg for crafting.NoYesNoN/ANo limits as such apart from what limits 2DA files have naturally
diffsettings.2daDifficulty Settings used by the game, at least the ones Bioware made editable.YesYesNoHardcodedThe amount of difficulty options and what options are editable is hardcoded.
disease.2daDiseases defined by the game for EffectDisease or On Hit: Disease item properties. Clients are sent completed effects, not the information loaded in this file, except the name used On Hit item properties most likely.YesYesYesUnknownNeeds testing.
domains.2daDomains that by default only Clerics use, but now in EE any spellcaster can be assigned if setup.YesYesNoLikely 255Needs testing. GFF field is stored as BYTE (0 - 255)
doortypes.2daList of doors tied to various tilesets. Clients will load it for most likely the sound reference.YesYesYesUnknown
effecticons.2daEffect icons used by the game, now extendable massively in EE with EffectIcon.YesYesNo255This 255 limit was set properly in EE for EffectIcon. Previously all effect icons were hardcoded.
encdifficulty.2daEncounter difficulty. Used by servers for a multiplier on the "difficulty", and in toolset to set the difficulty.NoYesYesUnknownNeeds testing. Not sure if more can be added.  GFF field is stored as INT (-2147483648 to 2147483647).
encumbrance.2daEncumberance levels for amount of strength a creature has. Client uses this to show the amount you can carry. Server it is used where the speed is worked out.YesYesNoUnknownNeeds testing. Rows go up to 100 but potentially could be extended.

environment.2da

Contains the area lighting environmental presets available in the toolset only.NoNoYesUnknownNeeds testing. May be hardcoded.
epicattacks.2daAttack progression for epic levels (21+). Clients and toolset is just for showing numbers.YesYesYes60Classes are limited to 40 levels for PCs and 60 levels (mostly) for NPCs. Note the epic levels are 21+ so first 20 lines would be ignored usually.
epicsaves.2daSave progression for epic levels (21+). Clients and toolset is just for showing numbers.YesYesYes60Classes are limited to 40 levels for PCs and 60 levels (mostly) for NPCs. Note the epic levels are 21+ so first 20 lines would be ignored usually.
excitedduration.2da"Excited" duration, ie; combat music time! Both options are the same, clients say it loads but is it used for anything? Probably not. It is also probably not worth altering this since...who knows what might happen in the engine. If you know maybe post it here!Yes but not used?YesNoHardcodedThe entries here are hardcoded.
exptable.2daUsed to figure out when the characters levelup.NoYesNo41Line 41 is actually making level 40 the highest. EE has some bugs if you go over 40 levels for PCs around spellcasting.
feat.2da



32,768

uint16 used in network however not recommended to go over 32K even if 65,536 is absolute maximum. There are likely problems with subdial feats if you do this.

footstepsounds.2da





fractionalcr.2da





gender.2da





genericdoors.2da





hen_companion.2da





hen_familiar.2da





inventorysnds.2da





iprp_abilities.2da
















































































































































































































































































































































iprp_damagecost.2da



127 (or possibly 128)

Certainly going to line 129 or higher works for the server end (damage is done correctly) but the client won't show it correctly in the character sheet because it looks up 2da line as a negative (impossible). Line 159 was tested which had the string "-97 Magical Damage" since 159 - 128 = 31, and 128 - 31 = 97.

It shows correctly on items, and higher lines are safe for NPCs to use.








skills.2da



32Hardcoded due to network limitations to 255 but GUI issues make it a 32 skill limit. May only affect the "Untrained" column however? https://github.com/Beamdog/nwn-issues/issues/171
spells.2da



4096Possibly the limit - needs testing, but is to do with 12 bits available for the "spell radial" entry being sent over the network. May have been removed at some point but needs fully testing.
surfacemat.2da



640 through 63 are valid lines for this in patch 1.84.8193.29 and up.







tbc





tbc





Unused 2da files

Bioware left in some 2da files from early development (before game release). These files are not loaded by the game, toolset or Get2DAString at all and can be ignored. They do get confusing however.

Designer 2da files

These are strictly used by Get2DAString and not used by the game inherently. However the systems they relate to are things like crafting, which is called by default game scripts and conversations the PCs can activate.

They are all prefixed des_ - and being only used by Get2DAString they are serverside only.

There is one special case here: x3restrict.2da is used in the default game spells to restrict polymorph spells when casting on a horse. Added for horse support.

Toolset only 2da files

These are only used by the toolset, not directly by the game:

Client and Serverside 2das

The game as a whole is made up of the client and the server. A singleplayer game essentially runs both at once for the local user - of course other players may still join if it is created as a network game. Therefore it is important to understand which is which, since some 2da files you don't need to include at all in hakpack or nwsync resource lists, and can be left in the .mod or override folder on a PW server perfectly fine.

The client ones tend to be based around levelling up, appeareances, visuals (icons, vfx, textures, etc.) and sounds (the latter 3 servers don't even load of course). Servers need to know about all the resources loaded by the game in regards to objects, spells, etc.

It is recommended of course for the server to have copies of everything (if only for Get2DAString lookups) while you can lessen the amount put in client hakpacks or on nwsync if sending certain ones to the client.

Note: If a file is not listed here (or above as a toolset only, or unused one) it might still be used!

Client and Server

2da load reference2da NameNotes
m_paIPRPCostTables // all of themAll cost tables in iprp_costtable.2da column "Name"Example: iprp_bonuscost.2da
m_pAppearanceTableappearance.2da
m_pGenderTablegender.2da
m_pSurfaceMaterialTablesurfacemat.2daLoaded at game start so you cannot change it in a hakpack file, only in the override folder
m_pVisualEffectTablevisualeffects.2da
m_pPersistentVisualEffectTablevfx_persistent.2da
m_pCreatureSpeedTablecreaturespeed.2da
m_pDoorTypesTabledoortypes.2da
m_pGenericDoorsTablegenericdoors.2da
m_pPlaceablesTableplaceables.2da
m_pAreaTransitionTableloadscreens.2da
m_pIPRPSpellsiprp_spells.2da
m_pIPRPLightTableNot sure - probably iprp_lightcost.2da ?
m_pIPRPColoriprp_color.2da
m_pIPRPMeleeiprp_meleecost.2da
m_pItemPropDefTableitempropdef.2da
m_pItemPropsTableitemprops.2da
m_pCreatureSizeTablecreaturesize.2da
m_pArmorTablearmor.2da
m_pEncumbranceTableencumbrance.2da
m_pPortraitTableportraits.2da
m_pPartsChestparts_chest.2da
m_pSpellSchoolTablespellschools.2da
m_pTrapTabletraps.2da
m_pLightColorTablelightcolor.2da
m_pIPRPDamageTableiprp_damagecost.2da
m_pPartsRobeparts_robe.2da
m_pItemValueitemvalue.2da
m_pPackagespackages.2da

Presumably also all the relevant class package 2das


chargenclothes.2daClothing items must be part of the base game, or included in the hak as UTI resources

feat.2da

masterfeats,2da

Likely needed for both (chargen needs feat.2da, and server obviously needs it for backend stuff)

namefilter.2daNo bad words, naughty! Probably char gen only?

swearfilter.2daNo swearing for you!

prioritygroups.2daSound related but may be just client side (along with some others) usually never edited by hakpacks anyway.

Client Only

While many of these are only loaded by the game client, the toolset would still make regular use of them, for instance, to be able to have a blueprint reference a particular wing model on a suitable NPC.

It is always recommended to have these available on the server if only for Get2DAString lookups.

2da load reference2da NameNotes
m_pPartTableNot sure?Model appearance related
m_pArmorTypesTablearmourtypes.2daSounds loading (cloth, leather, plate, chain)
m_pTileColorTabletilecolor.2daTexture loading
m_pReplaceTextureTablereplacetexture.2daTexture loading
m_pTailModelTabletailmodel.2daModel appearance related
m_pWingModelTablewingmodel.2daModel appearance related
m_pCloakModelTablecloakmodel.2da

Model appearance related

Note: CopyItemAndModify() may use this server-side in some instances (non-PLT based ones which there are none in the base game).

m_pCursorTablecursors.2daFor the cursors for certain default game actions.
m_pActionsTableactions.2daFor GUI icons list (player action list top left)
m_pAmbientMusicTableambientmusic.2daServer tells client which line to load, which refers to this for the sound files
m_pAmbientSoundTableambientsound.2daServer tells client which line to load, which refers to this for the sound files
m_pFootstepSoundsTablefootstepsounds.2daSounds loading
m_pAppearanceSoundsTableappearancesndset.2daSounds loading
m_pWeaponSoundsTableweaponsounds.2daSounds loading
m_pDefaultACSoundsTabledefaultacsounds.2daSounds loading
m_pAmmunitionTypesTableammunitiontypes.2daSounds loading
m_pKeymapTablekeymap.2daClient GUI default keys/shortcuts
m_pPlaceableSoundsTableplaceableobjsnds.2daSounds loading
m_pDamageLevelTable

damagelevels.2da

GUI showing how damaged something is (Formats the text over creatures heads)
m_pEffectIconsTableeffecticons.2daGUI effect icons (top right, inspect panel on items/characters, character sheet)
m_pLoadHintsTableloadhints.2daLoading string text loading
m_pSwearFilterTableswearfilter.2daIt's funny how this is here. I presume it alters incoming messages not outgoing ones? Needs testing. Servers can implement changes to PC chat to implement a filter using OnPlayerChat event.
m_pPhenoTypeTablephenotype.2daModel appearance related
m_pIPRPVisualFxTableiprp_visualfx.2daVisual effects
m_pWeatherTypesTableweathertypes.2daClient is just told which line to load

Server Only

2da load reference2da NameNotes
Any custom 2daeg: des_crft_aparts.2daLoaded with Get2DAString so entirely script based access



m_pStateScriptsTablestatescripts.2daRuns specific scripts
m_pPoisonTablepoison.2daApplies effects / timings of effect changes
m_pDiseaseTabledisease.2daApplies effects / scripts / timing of effect changes
m_pRepAdjustmentsTablerepadjust.2daEngine changes to "reputation" ie; if they're hostile or not.
m_pFractionalCRTablefractionalcr.2daWorks out how much a goblin with 1/4CR is "worth" in the engine XP system/"difficulty" tags (eg; "Easy" enemy when inspected)
m_pEncounterDifficultyTableencdifficulty.2daThe "value" column is loaded when referenced from the encounters GFF
m_pCategoryTablecategories.2daUsed by the functions for talents. Some is hardcoded (eg; potion lines). So yeah.
m_pExcitedDurationTableexcitedduration.2daPresumably amount of time in milliseconds (so 10 seconds) the thing is considered in combat after the events listed
m_pRestDurationTablerestduration.2daAmount of milliseconds to sit on the ground for
m_pPartsBeltparts_belt.2da
m_pPartsBicepparts_bicep.2da
m_pPartsFootparts_foot.2da
m_pPartsForearmparts_forearm.2da
m_pPartsHandparts_hand.2da
m_pPartsLegsparts_legs.2da
m_pPartsNeckparts_neck.2da
m_pPartsPelvisparts_pelvis.2da
m_pPartsShinparts_shin.2da
m_pPartsShoulderparts_shoulder.2da
m_pXpBaseexptable.2daLevelling up chart
m_pAssociatesAnimalCompanionTablehen_companion.2da
m_pAssociatesFamiliarTablehen_familiar.2da
m_pSkillVsItemCostTableskillvsitemcost.2da
m_pRangesTableranges.2da

Note the "45.0M" range for streaming in usable placeables is hardcoded, and a maximum of visibility regardless of values here of any creature object.

m_pPolymorphTablepolymorph.2da
m_pDamageHitVisualTabledamagehitvisual.2daSends a relevant visualeffect.2da line number to the client
m_pBodyBagTablebodybag.2daReferences a placeables.2da line
m_pIPRPFeatsTable

iprp_feats.2da


m_pIPRPMonsterDamageTableiprp_monsterdam.2da
m_pOnHitTableiprp_onhit.2daNote this pretty much is hardcoded
m_pOnHitSpellTableiprp_onhitspell.2da
m_pOnHitDurationTableiprp_onhitdur.2da
m_pIPRPACModTypeTableiprp_acmodtype.2da
m_pIPRPWeightIncTableiprp_weightinc.2da
m_pIPRPArcSpelliprp_arcspell.2da
m_pIPRPBonusCostTableiprp_bonuscost.2da
m_pIPRPSRCostTableiprp_srcost.2da

NWNX Reference

Source of what is referenced by the game engine (not complete - some 2da files seem to be loaded from elsewhere such as swear filters). It relates to this file: https://github.com/nwnxee/unified/blob/master/NWNXLib/API/API/CTwoDimArrays.hpp


    // client+server
    m_paIPRPCostTables // all of them
    m_pAppearanceTable
    m_pGenderTable
    m_pSurfaceMaterialTable
    m_pVisualEffectTable
    m_pPersistentVisualEffectTable
    m_pCreatureSpeedTable
    m_pDoorTypesTable
    m_pGenericDoorsTable
    m_pPlaceablesTable
    m_pAreaTransitionTable
    m_pIPRPSpells
    m_pIPRPLightTable
    m_pIPRPColor
    m_pIPRPMelee
    m_pItemPropDefTable
    m_pItemPropsTable
    m_pCreatureSizeTable
    m_pArmorTable
    m_pEncumbranceTable
    m_pPortraitTable
    m_pPartsChest
    m_pSpellSchoolTable
    m_pTrapTable
    m_pLightColorTable
    m_pIPRPDamageTable
    m_pPartsRobe
    m_pItemValue
    m_pPackages
    m_pRuleset

    // client only
    m_pPartTable
    m_pArmorTypesTable
    m_pTileColorTable
    m_pReplaceTextureTable
    m_pTailModelTable
    m_pWingModelTable
    m_pCloakModelTable
    m_pCursorTable
    m_pActionsTable
    m_pAmbientMusicTable
    m_pAmbientSoundTable
    m_pFootstepSoundsTable
    m_pAppearanceSoundsTable
    m_pWeaponSoundsTable
    m_pDefaultACSoundsTable
    m_pAmmunitionTypesTable
    m_pKeymapTable
    m_pPlaceableSoundsTable
    m_pDamageLevelTable
    m_pEffectIconsTable
    m_pLoadHintsTable
    m_pSwearFilterTable
    m_pPhenoTypeTable
    m_pIPRPVisualFxTable
    m_pWeatherTypesTable
    m_pProgFxTable

    // server only
    m_pStateScriptsTable
    m_pPoisonTable
    m_pDiseaseTable
    m_pRepAdjustmentsTable
    m_pFractionalCRTable
    m_pEncounterDifficultyTable
    m_pCategoryTable
    m_pExcitedDurationTable
    m_pRestDurationTable
    m_pPartsBelt
    m_pPartsBicep
    m_pPartsFoot
    m_pPartsForearm
    m_pPartsHand
    m_pPartsLegs
    m_pPartsNeck
    m_pPartsPelvis
    m_pPartsShin
    m_pPartsShoulder
    m_pXpBase
    m_pAssociatesAnimalCompanionTable
    m_pAssociatesFamiliarTable
    m_pSkillVsItemCostTable
    m_pRangesTable
    m_pPolymorphTable
    m_pDamageHitVisualTable
    m_pBodyBagTable
    m_pIPRPFeatsTable
    m_pIPRPMonsterDamageTable
    m_pOnHitTable
    m_pOnHitSpellTable
    m_pOnHitDurationTable
    m_pIPRPACModTypeTable
    m_pIPRPWeightIncTable
    m_pIPRPArcSpell
    m_pIPRPBonusCostTable
    m_pIPRPSRCostTable
    m_pIPRPNeg5CostTable