2DA

From NWN1 Custom Content Guide

(Redirected from .2da)
Jump to: navigation, search

Contents

General

2DA stands for "2 Dimentional Array", it is a text file listing out indexed rows and columns which contain fields of data. The game engine uses this data to configure the behavior of various subsystems.

Usage

They are used in override or in HakPaks to supersede the default 2DA information in NWN with the custom content you are including. For instance, when you create a new creature, you have to add or modify a line in the appearance.2da file to tell NWN information such as what model file the creature uses, the colour of the blood, movement speed, footstep sounds when its walking.

Format

2da files, when written (custom or otherwise) must be in an exact format, as defined by Bioware - and saved to a filename of no more then 16 characters ("XXXXXXXXXXXXXXXX.2da"), and is really a plain text file (edited, in say, Textpad) interpreted as a 2 dimensional array.

The format consists of 2DA V2.0 at the very top. Then, seperated by a new line, the labels of each column in the 2da file, with one column, the first, being an unnamed "Label" column. Next, on the line below, it will have each row of information. Each column is seperated by one or more "Whitespaces", just a regular space. If a row doesn't exactly match the column headers, errors occur.

This is a perfectly normal (custom) 2da file:

2DA V2.0

    Label              ResRef
0   GNOME_SORCEROR     gnome_1
1   HAPPY_ELF          creature_happyguy
2   DEATH_STAR         ****
3   ****               ****
4   LUNCH              plate_chips

Partly nonsensical, noteworthy things a 2da file must conform to include (some of which are above):

  • 4 stars **** designate an empty data field (eg: there is no "ResRef" for the "DEATH_STAR" labeled row. Nor is there any data on row 3)
  • Each row must have a number reference (here, 0 to 4) that increments by one, leaving no gaps. Line 3 is a valid use of stars to extend a 2da file (padding) to make sure that the line with LUNCH one doesn't jump a row. We cannot add a new row which is numbered 7 here, without rows 5 and 6.
  • Each new row is on a new line.
  • Each data field is seperated by one or more spaces " ", but it doesn't matter how many. TABs will not work, stick to spaces

Note: this 2da file will do exactly the same as the one above:

2DA V2.0

 Label                         ResRef
0 GNOME_SORCEROR      gnome_1
1      HAPPY_ELF creature_happyguy
2        DEATH_STAR                  ****
3 ****   ****
4   LUNCH plate_chips

However, readability is very important in some cases - so it is nice to have it properly formatted with readable columns, like Bioware uses.

Types of 2DAs

Most of the 2DAs in a default installation of NWN are engine 2DAs. These 2DAs are read directly by the engine on both the client and the server. Their formats (i.e. the number and names of the columns) are fixed and already set by the expectations of the game engine. You cannot add new columns to such 2DAs (you can, but they won't be read and will probably crash the game).

Design 2DAs are not read by the client engine. The data in these is only read by scripts using calls to Get2DAString(). Design 2DAs are only read by the server and thus do not need to be distributed within any HakPaks! These 2DAs can be used to configure custom-made systems. The format of these 2DAs is created by the designer. The number and names of the columns can be whatever suits the designer's purpose. Examples of these that come in the default installation are all the 2DAs beginning with "des_" which are used for some of the new crafting and treasure systems in HotU.

In all 2DAs, you can normally change the number and contents of rows so long as you remember that some rows may have special meaning to other subsystems in the engine.

Note that the filenames of 2da files may not exceed 16 characters in length.

Engine 2DAs

Here are all the engine .2DA's in NWN:

2DA Used for Available in Max Index
actions.2da Defines the icon shown in upper left when given action is done NWN, SoU, HotU  ?
ambientmusic.2da Music, Areas NWN, SoU, HotU  ?
ambientsound.2da Sound, Areas NWN, SoU, HotU  ?
ammunitiontype.2da Projectiles NWN, SoU, HotU  ?
appearance.2da Creatures NWN, SoU, HotU  ?
appearancesndset.2da Creature sounds NWN, SoU, HotU  ?
areaeffects.2da Legacy/Precursor to vfx_persistent.2da NWN, SoU, HotU doesn't matter
armor.2da Armor Traits NWN, SoU, HotU  ?
armorparts.2da  ? NWN, SoU, HotU  ?
baseitems.2da Item categories NWN, SoU, HotU 0-255
bodybag.2da Corpses NWN, SoU, HotU  ?
caarmorclass.2da  ? NWN, SoU, HotU  ?
capart.2da Change Armor Parts NWN, SoU, HotU  ?
categories.2da Categories of.. effects? NWN, SoU, HotU  ?
catype.2da  ??? NWN, SoU, HotU  ?
chargenclothes.2da Character Generation Clothes NWN, SoU, HotU  ?
classes.2da Classes NWN, SoU, HotU 0-255
cls_atk_.2da Class Base Attack Bonus Tables NWN, SoU, HotU  ?
cls_bfeat_.2da Class Bonus Feats Tables HotU  ?
cls_feat_.2da Class Feat Tables NWN, SoU, HotU  ?
cls_pres_.2da Prestige Class Requirement Tables SoU, HotU  ?
cls_savthr_.2da Class Save Throw Tables NWN, SoU, HotU  ?
cls_skill_.2da Class Skills Tables NWN, SoU, HotU  ?
cls_spgn_.2da Class Spells Gained Tables NWN, SoU, HotU  ?
cls_spkn_.2da Class Spells Known Tables NWN, SoU, HotU  ?
combatmodes.2da Combat Modes/States NWN, SoU, HotU  ?
creaturesize.2da Creature Size Table NWN, SoU, HotU  ?
creaturespeed.2da Creature Speed Table NWN, SoU, HotU  ?
crtemplates.2da Creature Templates Table(NPC only) NWN, SoU, HotU  ?
cursors.2da In-game Mouse Cursors NWN, SoU, HotU  ?
damagehitvisual.2da Weapon VFX NWN, SoU, HotU  ?
defaultacsounds.2da Sound, Items, Armor NWN, SoU, HotU  ?
diffsettings.2da Difficulty Settings Configs NWN, SoU, HotU  ?
disease.2da Diseases NWN, SoU, HotU  ?
domains.2da Cleric Domains NWN, SoU, HotU  ?
doortypes.2da Tileset Doors NWN, SoU, HotU  ?
effectanim.2da Legacy/Precursor to some VFX NWN, SoU, HotU  ?
effecticons.2da Creature Effect Icons NWN, SoU, HotU  ?
encdifficulty.2da Encounter Difficulty NWN, SoU, HotU  ?
encumbrance.2da Encumbrance NWN, SoU, HotU  ?
environment.2da Area Settings(Lighting, Day/Night, Weather) NWN, SoU, HotU  ?
epicattacks.2da Epic Base Attack Bonus Table HotU  ?
epicsaves.2da Epic Save Throw Table HotU  ?
excitedduration.2da Excited Duration NWN, SoU, HotU  ?
exptable.2da Experience Table NWN, SoU, HotU  ?
feat.2da Feats, Racial Abilities NWN, SoU, HotU 65k?
footstepsounds.2da Sound, Creatures, Footsteps NWN, SoU, HotU  ?
fractionalcr.2da Fractional Challenge Rating NWN, SoU, HotU  ?
gamespyrooms.2da GameSpy Room IDs NWN, SoU, HotU  ?
gender.2da Genders NWN, SoU, HotU  ?
genericdoors.2da Generic Doors NWN, SoU, HotU  ?
hen_companion.2da Henchmen, Animal Companions NWN, SoU, HotU  ?
hen_familiar.2da Henchmen, Familiars NWN, SoU, HotU  ?
inventorysnds.2da Inventory Sounds NWN, SoU, HotU  ?
iprp_costtable.2da Item Properties Cost Table NWN, SoU, HotU  ?
iprp_paramtable.2da Item Properties Parameters Table NWN, SoU, HotU  ?
itempropdef.2da Item Properties Definitions Table NWN, SoU, HotU  ?
itemprops.2da Item Properties Table NWN, SoU, HotU  ?
itemvalue.2da Max Single/Total Item Values Table NWN, SoU, HotU  ?
itmwizammo.2da Item Wizard, Ammo NWN, SoU, HotU  ?
itmwizarmor.2da Item Wizard, Armor NWN, SoU, HotU  ?
itmwizhelmet.2da Item Wizard, Helmet NWN, SoU, HotU  ?
itmwizmelee.2da Item Wizard, Melee Weapons NWN, SoU, HotU  ?
itmwizpotion.2da Item Wizard, Potions NWN, SoU, HotU  ?
itmwizranged.2da Item Wizard, Ranged Weapons NWN, SoU, HotU  ?
itmwizrods.2da Item Wizard, Rods NWN, SoU, HotU  ?
itmwizscroll.2da Item Wizard, Scrolls NWN, SoU, HotU  ?
itmwizstaves.2da Item Wizard, Staves NWN, SoU, HotU  ?
itmwizthrow.2da Item Wizard, Throwing Weapons NWN, SoU, HotU  ?
itmwiztrap.2da Item Wizard, Traps NWN, SoU, HotU  ?
itmwizwands.2da Item Wizard, Wands NWN, SoU, HotU  ?
keymap.2da Key Map NWN, SoU, HotU  ?
lightcolor.2da Light RGB Values NWN, SoU, HotU  ?
loadhints.2da Loadscreen Hints NWN, SoU, HotU  ?
loadscreens.2da Loadscreens NWN, SoU, HotU  ?
masterfeats.2da Feats, Master NWN, SoU, HotU  ?
metamagic.2da Feats, Metamagic NWN, SoU, HotU  ?
namefilter.2da Filter, Names NWN, SoU, HotU  ?
nwconfig.2da NWN Config, Hardware NWN, SoU, HotU  ?
nwconfig2.2da NWN Config, Software? NWN, SoU, HotU  ?
packages.2da Package List NWN, SoU, HotU  ?
packeq.2da Package, Equipment NWN, SoU, HotU  ?
packft.2da Package, Feats NWN, SoU, HotU  ?
packsk.2da Package, Skills NWN, SoU, HotU  ?
packsp.2da Package, Spells NWN, SoU, HotU  ?
parts_belt.2da Parts, Belt AC NWN, SoU, HotU  ?
parts_bicep.2da Parts, Bicep AC NWN, SoU, HotU  ?
parts_chest.2da Parts, Chest AC NWN, SoU, HotU  ?
parts_foot.2da Parts, Foot AC NWN, SoU, HotU  ?
parts_forearm.2da Parts, Forearm AC NWN, SoU, HotU  ?
parts_hand.2da Parts, Hand AC NWN, SoU, HotU  ?
parts_leg.2da Parts, Leg AC NWN, SoU, HotU  ?
parts_neck.2da Parts, Neck AC NWN, SoU, HotU  ?
parts_pelvis.2da Parts, Pelvis AC NWN, SoU, HotU  ?
parts_robe.2da Parts, Robe AC & Hiding NWN, SoU, HotU  ?
parts_shin.2da Parts, Shin AC NWN, SoU, HotU  ?
parts_shoulder.2da Parts, Shoulder AC NWN, SoU, HotU  ?
phenotype.2da Phenotypes NWN, SoU, HotU  ?
placeableobjsnds.2da Sound, Placeable Objects NWN, SoU, HotU  ?
placeables.2da Placeables NWN, SoU, HotU  ?
placeabletypes.2da Placeable Categories NWN, SoU, HotU  ?
poison.2da Poisons NWN, SoU, HotU  ?
polymorph.2da Polymorph Settings NWN, SoU, HotU  ?
portraits.2da Portrait Index NWN, SoU, HotU  ?
pregen.2da Pregenerated PCs NWN, SoU, HotU  ?
prioritygroups.2da Sound, Priority Settings NWN, SoU, HotU  ?
pvpsettings.2da PvP IDs NWN, SoU, HotU  ?
race_feat_.2da RacialType Feat Tables NWN, SoU, HotU  ?
racialtypes.2da RacialTypes NWN, SoU, HotU  ?
ranges.2da Spell, Weapon, Perception Ranges NWN, SoU, HotU  ?
repadjust.2da Factions, Reputation Adjustments NWN, SoU, HotU  ?
replacetexture.2da Typos? NWN, SoU, HotU  ?
repute.2da Factions, Reputation NWN, SoU, HotU  ?
restduration.2da Rest Durations NWN, SoU, HotU  ?
rrf_nss.2da ResRef Filter, NWScripts NWN, SoU, HotU  ?
rrf_wav.2da ResRef Filter, Sounds NWN, SoU, HotU  ?
skills.2da Skills NWN, SoU, HotU  ?
skillvsitemcost.2da Use Magic Device Skill NWN, SoU, HotU  ?
skyboxes.2da Skybox Models HotU  ?
soundcatfilters.2da Sound, Categories? NWN, SoU, HotU  ?
sounddefaultspos.2da Sound, Default Positions? NWN, SoU, HotU  ?
sounddefaultstim.2da Sound, Default Timing NWN, SoU, HotU  ?
soundeax.2da Sound, EAX Settings NWN, SoU, HotU  ?
soundgain.2da Sound, Gain Settings? NWN, SoU, HotU  ?
soundprovider.2da Sound, Driver Prefs? NWN, SoU, HotU  ?
soundset.2da Sound, Sound Sets NWN, SoU, HotU  ?
soundsettype.2da Sound, Sound Set Types NWN, SoU, HotU  ?
soundtypes.2da Sound, Legacy/Leftovers? NWN, SoU, HotU  ?
spells.2da Spells, Feat Abilities, Scriptable Abilities NWN, SoU, HotU  ?
spellschools.2da Spells, Schools NWN, SoU, HotU  ?
statescripts.2da State Scripts NWN, SoU, HotU  ?
stringtokens.2da Conversation String Tokens NWN, SoU, HotU  ?
surfacemat.2da Tileset Surface Materials NWN, SoU, HotU  ?
swearfilter.2da Filter, Swearing NWN, SoU, HotU  ?
tailmodel.2da Tail Models NWN, SoU, HotU  ?
_edge.2da Tileset Edgetile Settings NWN, SoU, HotU  ?
tilecolor.2da Tile Color? NWN, SoU, HotU  ?
traps.2da Trap Configs NWN, SoU, HotU  ?
treasurescale.2da Treasure Scale NWN, SoU, HotU  ?
vfx_persistent.2da VFX, Persistent & Mobile NWN, SoU, HotU  ?
videoquality.2da Video Option Settings NWN, SoU, HotU  ?
visualeffects.2da VFX, Duration, Fire 'N Forget, Impact, Beam, Combat, TileMagic NWN, SoU, HotU  ?
waypoint.2da Waypoint Models NWN, SoU, HotU  ?
weaponsounds.2da Weapon Combat Sounds NWN, SoU, HotU  ?
wingmodel.2da Wing Models NWN, SoU, HotU  ?
xpbaseconst.2da XP CR Diff Modifiers NWN, SoU, HotU  ?
xptable.2da XP per CR Tables NWN, SoU, HotU  ?

(max indices later...)

Item Properties, SubType Tables 2DAs

2DA Used for Available in Max Index
iprp_abilities.2da IProps, Ability Bonuses NWN, SoU, HotU  ?
iprp_acmodtype.2da IProps, AC Modifier Types NWN, SoU, HotU  ?
iprp_aligngrp.2da IProps, Alignment Groups NWN, SoU, HotU  ?
iprp_alignment.2da IProps, Alignments NWN, SoU, HotU  ?
iprp_ammotype.2da IProps, Ammo Types NWN, SoU, HotU  ?
iprp_combatdam.2da IProps, Combat Damage NWN, SoU, HotU  ?
iprp_damagetype.2da IProps, Damage Type NWN, SoU, HotU  ?
iprp_feats.2da IProps, Bonus Feats NWN, SoU, HotU  ?
iprp_immunity.2da IProps, Immunities NWN, SoU, HotU  ?
iprp_monsterhit.2da IProps, Creature OnHit? NWN, SoU, HotU  ?
iprp_onhit.2da IProps, OnHits NWN, SoU, HotU  ?
iprp_onhitdur.2da IProps, OnHit Duration (UNUSED?) NWN, SoU, HotU  ?
iprp_onhitspell.2da IProps, OnHitSpell NWN, SoU, HotU  ?
iprp_protection.2da IProps, Damage Reduction NWN, SoU, HotU  ?
iprp_saveelement.2da IProps, Save Throw Vs. Type NWN, SoU, HotU  ?
iprp_savingthrow.2da IProps, Saving Throw Type NWN, SoU, HotU  ?
iprp_spells.2da IProps, Cast Spell NWN, SoU, HotU  ?
iprp_spellshl.2da IProps, Spell School NWN, SoU, HotU  ?
iprp_terraintype.2da IProps, Use Limit TerrainType (UNUSED) NWN, SoU, HotU  ?
iprp_traps.2da IProps, Trap Strength NWN, SoU, HotU  ?
iprp_visualfx.2da IProps, Visual Effects NWN, SoU, HotU  ?
iprp_walk.2da IProps, Special Walk NWN, SoU, HotU  ?

Item Properties, Cost Modifier Tables 2DAs

ID 2DA Used for Available in Max Index
0 iprp_base1.2da Base Default NWN, SoU, HotU  ?
1 iprp_bonuscost.2da Ability Bonus NWN, SoU, HotU  ?
2 iprp_meleecost.2da Melee Weapon NWN, SoU, HotU  ?
3 iprp_chargecost.2da Charges/Uses Per Day NWN, SoU, HotU  ?
4 iprp_damagecost.2da Damage NWN, SoU, HotU  ?
5 iprp_immuncost.2da Immunity NWN, SoU, HotU  ?
6 iprp_soakcost.2da Damage Soak NWN, SoU, HotU  ?
7 iprp_resistcost.2da Damage Resistance NWN, SoU, HotU  ?
8 iprp_bladecost.2da Blade NWN, SoU, HotU  ?
9 iprp_slotcost.2da Slot?(UNUSED?) NWN, SoU, HotU  ?
10 iprp_weightcost.2da Weight Reduction NWN, SoU, HotU  ?
11 iprp_srcost.2da Spell Resistance NWN, SoU, HotU  ?
12 iprp_staminacost.2da Stamina (UNUSED) NWN, SoU, HotU  ?
13 iprp_spelllvcost.2da Spell Level NWN, SoU, HotU  ?
14 iprp_ammocost.2da Ammo NWN, SoU, HotU  ?
15 iprp_redcost.2da Weight Reduction NWN, SoU, HotU  ?
16 iprp_spellcost.2da Spell Immunity NWN, SoU, HotU  ?
17 iprp_trapcost.2da Trap NWN, SoU, HotU  ?
18 iprp_lightcost.2da Light NWN, SoU, HotU  ?
19 iprp_monstcost.2da Creature Damage NWN, SoU, HotU  ?
20 iprp_neg5cost.2da Decrease -1 to -5 NWN, SoU, HotU  ?
21 iprp_neg10cost.2da Decrease -1 to -10 NWN, SoU, HotU  ?
22 iprp_damvulcost.2da Damage Vulnerability NWN, SoU, HotU  ?
23 iprp_spelllvlimm.2da Spell Level Immunity NWN, SoU, HotU  ?
24 iprp_onhitcost.2da OnHit NWN, SoU, HotU  ?
25 iprp_skillcost.2da Skill Bonus, Thief Tools, Turn Resist NWN, SoU, HotU  ?
26 iprp_spellcstr.2da Spel Caster Level NWN, SoU, HotU  ?
27 iprp_arcspell.2da Arcane Spell Failure NWN, SoU, HotU  ?
<none> iprp_kitcost.2da IProps, KitCost? (UNUSED) NWN, SoU, HotU  ?

Item Properties, Parameter Tables 2DAs

ID 2DA Used for Available in
0 iprp_damagetype.2da Type of Item Damage NWN, SoU, HotU
1 iprp_onhitdur.2da OnHit Durations (UNUSED) NWN, SoU, HotU
2 iprp_abilities.2da Abilities (UNUSED) NWN, SoU, HotU
3 iprp_aligngrp.2da Alignment Groups (UNUSED) NWN, SoU, HotU
4 iprp_alignment.2da Alignments (UNUSED) NWN, SoU, HotU
5 racialtypes.2da Racialtypes (UNUSED) NWN, SoU, HotU
6 disease.2da Diseases (UNUSED) NWN, SoU, HotU
7 iprp_amount.2da Amount (no idea - UNUSED) NWN, SoU, HotU
8 poison.2da Poisons (UNUSED) NWN, SoU, HotU
9 iprp_color.2da Colors NWN, SoU, HotU
10 iprp_poison.2da Poison Damage NWN, SoU, HotU
11 iprp_weightinc.2da Weight Increase NWN, SoU, HotU


Design 2DAs

Here are all the design .2DA's in NWN. Max Index is not limited as are in engine .2DAs. These are specific to the HotU OC modules though are useable elsewhere or not as the designer wishes:

2DA Used for Available in
des_blumburg.2da  ? SoU, HotU
des_conf_treas.2da Treasure Table HotU
des_crft_amat.2da Craft Skills, ? HotU
des_crft_aparts.2da Craft Skills, ? HotU
des_crft_appear.2da Craft Skills, ? HotU
des_crft_armor.2da Craft Skills, ? HotU
des_crft_bmat.2da Craft Skills, ? HotU
des_crft_drop.2da Craft Skills, ? HotU
des_crft_mat.2da Craft Skills, ? HotU
des_crft_poison.2da Assassin Poison? HotU
des_crft_props.2da Craft Skills, ? HotU
des_crft_scroll.2da Feat, Scribe Scroll HotU
des_crft_spells.2da Feats, Brew Potion, Scribe Scroll, Craft Wand HotU
des_crft_weapon.2da Craft Skills, Weapons HotU
des_cutconvdur.2da Cutscene Conversation Durations? HotU
des_feat2item.2da Treasure Generation? HotU
des_matcomp.2da Spells, Material Components HotU
des_mechupgrades.2da Easter Egg? HotU
des_pcstart_arm.2da PC Starting Armors HotU
des_pcstart_weap.2da PC Starting Weapons HotU
des_prayer.2da Something prayer related (Likely Prayerbag recipies) SoU, HotU
des_restsystem.2da Rest System HotU
des_treas_ammo.2da Treasure Table, Ammo HotU
des_treas_disp.2da Treasure Table, ? HotU
des_treas_enh.2da Treasure Table, ? HotU
des_treas_gold.2da Treasure Table, ? HotU
des_treas_items.2da Treasure Table, ? HotU
des_xp_rewards.2da XP Rewards HotU

Main Page | 2DA

Personal tools