CCG V3-1 Conversion:Part 11 Other 2da Files
From NWN1 Custom Content Guide
Notes on Other .2da Files
I am including in this section notes on the contents of other .2da files that may be of value to custom content creators. These may fit into a currently-unwritten tutorial section to be addressed later. Or not. These are generally untested (by me, anyway).
Feats.2da
|
The Feats.2da file is used to define new feats, their requirements and how they show up in the game. Note that this file does not actually include code for the new feat.
There are three types of feats in NWN (I am classifying them based on the way you activate the feats in NWN):
- Automatic feats or what I call “Combat” feats because they are active all the time and take effect when appropriate (like Improved Critical xxx feats)
- Special ability feats or Radial-type feats which appear in the radial menus (like Cleave)
- Spell-like feats
You can only really add spell-like feats and even they will only be selectable or automatically granted at level up but they don’t show up in the GUI during the game. So players cannot use them easily. So we need a workaround: create a custom item that has:
ActionUseFeat(<ID of your feat in feats.2da>);
as its OnActivate script.
You cannot add new combat feats because the combat engine is hidden from us in the internals of the game. You cannot add new buttons to radial menus so those feats are not available either.
| Column | Description | Values |
| The first column is the ID of the feat | ||
| LABEL | The internal name of the feat. | |
| FEAT | STR_REF to the name of the feat referenced in dialog.tlk. | If you put **** in this space it should use your Label in place of the string reference in dialog.tlk (but does not, yet). |
| DESCRIPTION | STR_REF to the name of the feat referenced in dialog.tlk. | |
| ICON | The icon you see in the game for the feat. | |
| MINATTACKBONUS | The minimum attack bonus needed to qualify for the feat, | |
| MINSTR
MINDEX MININT MINWIS | Minimum strength, dexterity, intelligence or wisdom needed to qualify for the feat. | |
| MINSPELLLVL | Minimum spell caster level needed to qualify for the feat. | |
| PREREQFEAT1
PREREQFEAT2 | Prerequisite feats needed to qualify for the feat (references back to column 0, the ID) | |
| GAINMULTIPLE | Can the feat be gained multiple times? |
0 for no 1 for yes |
| EFFECTSSTACK | Do the effects of the feat stack with other feats? |
0 for no 1 for yes |
| ALLCLASSESCANUSE | Can all classes use this feat? If yes, it is not necessary to put this feat in the cls_feat_<class>.2da tables. |
0 for no 1 for yes |
| CATEGORY | This is the type of feat for use by the AI (refer to spells) so that NPCs and monsters use it properly. | |
| MAXCR | Not sure. | |
| SPELLID | Points to spells.2da (column 0, the ID) for the spell characteristics and script used to implement this feat. All of your custom-created feats will typically have this reference (it is the only way you can implement a feat). | |
| SUCCESSOR | What feat comes next in the feat progression (mainly used for class abilities that were made into feats, like Barb Rage/Bard Song, etc.) | |
| CRValue | I believe this is used to determine the CR value of a creature when you add this feat to the creature, part of the behind the scenes work when creating monsters. | |
| USESPERDAY | How many times the feat can be used between rests. | |
| MASTERFEAT | ||
| TARGETSELF | Does the feat work on only the person using it? (bardsong no, most others yes) |
**** for no 1 for yes |
| OrReqFeat0
OrReqFeat1 OrReqFeat2 OrReqFeat3 OrReqFeat4 | Feats needed as prerequisites(?) | Uses column 0, the feat ID |
| REQSKILL | Skills needed for the feat | Uses column 0, the skill ID, from skills.2da. |
| Constant | The constant the feat uses in the scripting language (especially nwscript.nss) | |
| TOOLSCATEGORIES | Represents the ‘Type’ column in the Aurora toolset, categorizing feats when creating NPCs. |
1 Combat Feats 2 Active Combat Feats 3 Defensive Feats 4 Magical Feats 5 Other Feats 6 Class/Racial Feats |
| HostileFeat | Is the feat used on a hostile creature (Called Shot is an example). |
**** for no 1 for yes |
There are two other 2da files you will need to know about.
Cls_Feat_<classname>.2da describes the feats that are allocated to a class and at what level. You only need to put feats in this table if they are not available to all classes (see ALLCLASSESCANUSE in feats.2da above).
| Column | Description | Values |
| The first column is the ID of this entry | ||
| FeatLabel | The internal name of the feat. | |
| FeatIndex | A reference back to column 0, the ID, of feat.2da | |
| List | Which list of feat types the feat appears in. | 0 : means that the feat will have to be selected at creation or level up.
1 : this is a pure guess, but a reasonable one I think, this value is only used for wizards and fighter to specify the class related feats they can get as bonus feats every two (correct me if I'm wrong) levels. 2 : I won't even try to guess what that one does: suffice to say it is only used for the ranger favored enemy feats (I.e. against dragon, against undead etc), and for the high level rogues' feats (crippling strike). So this would be the "automatically granted but that you still need to choose category". 3 : the feat will be automatically granted for this class, at the level specified in the GrantedOn column |
| GrantedOnLevel | Defines which Level the Feat will be automatically granted at. | -1 Only used if List does not have a value of 3.
>= 1 is only used if List does have a value of 3 |
Race_Feat_<racename>.2da describes which feats are automatically allocated to a particular race.
| Column | Description | Values |
| The first column is the ID of this entry | ||
| FeatLabel | The internal name of the feat. | |
| FeatIndex | A reference to feat.2da indicating which feats the race gets automatically. | A reference back to column 0, the ID, of feat.2da |
If you want to check for the existence of a feat in a script, you will need to assign a CONSTANT to it. Remember adding FEAT_<featname> to the CONSTANT column in feats.2da? Well now we use it. Add to your script file the following line:
int FEAT_<featname> = <nnn>; //put the actual value from feats.2da in place of nnn
Make sure you use underscores "_" instead of spaces in name.
Padding for 2da files
To reduce future grief for 2DA updates for the HotU expansion and other game updates, we are declaring the following index line values in the following files are for Community Content. If you pad out the following 2DA files and start your content at these numbers or higher, HotU and any other BioWare content will not touch these numbers. This does still mean, just like in previous NWN Updates, that you will need to update your 2DA files for any content that we release in future Updates. We will try to identify them in each Update to make your changes easier.
The list, in the format [2DA file name] - [index line to start your content at]:
ambientmusic.2da - 150 ambientsound.2da - 200 ammunitiontypes.2da - 75 appearance.2da - 750 appearancesndset.2da - 50 baseitems.2da - 200 bodybag.2da - 20 chargenclothes.2da - 40 classes.2da - 50 creaturesize.2da - 20 crtemplates.2da - 20 defaultacsounds.2da - 20 disease.2da - 30 domains.2da - 50 doortypes.2da - 300 effecticons.2da - 175 environment.2da - 50 feat.2da - 2000 footstepsounds.2da - 30 genericdoors.2da - 20 hen_companion.2da - 20 hen_familiar.2da - 20 iprp_feats.2da - 50 iprp_spellcost.2da - 300 iprp_spells.2da - 750 itempropdef.2da - 150 itemprops.2da - 150 loadscreens.2da - 150 masterfeats.2da - 30 metamagic.2da - 20 packages.2da - 150 parts_belt.2da - 30 parts_bicep.2da - 30 parts_chest.2da - 75 parts_foot.2da - 30 parts_forearm.2da - 40 parts_hand.2da - 20 parts_legs.2da - 30 parts_neck.2da - 20 parts_pelvis.2da - 50 parts_shin.2da - 30 parts_shoulder.2da - 50 placeableobjsnds.2da - 50 placeables.2da - 1000 poison.2da - 75 polymorph.2da - 150 portraits.2da - 2000 racialtypes.2da - 50 skills.2da - 50 spells.2da - 1500 spellschools.2da - 20 surfacemat.2da - 50 traps.2da - 100 vfx_persistent.2da - 50 visualeffects.2da - 750
« Other Tutorials | Notes on Other .2da Files | The CEP »
