Technical / Radial Feats

Radial feats are "active" feats that can be activated by selecting them through the radial menu. Examples are Barbarian Rage or Turn Undead.

Note: most of the information in this entry is taken verbatim from Georg Zoeller's post here:

http://nwn.bioware.com/forums/viewtopic.html?topic=294127&forum=48&highlight=sub+radial

How to Add a Feat to Radial Menus

You can only add feats to the so called "Class Radials" in NWN (and the "Epic Spells Radial" in Hordes of the Underdark), which are located on the "special abilities" radial (9 O'Clock from the main radial). In order to add a new feat to the radial you need to perform the following steps:

  1. Add a new feat to feat.2da (after row 2000!).
  2. Add the feat to the class specific feat lists (cls_feat_*.2da) of the classes that you want to have access to the feat. In order to make a feat appear in the class specific radial, you need to put a value into the OnMenu column in the cls_feat_*.2da you are editing. OnMenu == 1 will make the feat appear on the class abilities radial. OnMenu == 2 will make the spell appear on the Epic Spell Radial (HotU only).
  3. Add a new spell to spells.2da (after row 1500) and put the Feat's row number from feat.2da into the FeatID column in spells.2da and the spell's row number from spells.2da into the SpellID column in feat.2da.
  4. Create a script for the spell that will be 'cast' when the feat is triggered from the radial menu and put it's name into the spells.2da "ImpactScript" column.

How to Create Feat Subradials

With Hordes of the Underdark you can create subradial feats (like the wildshape feats). The process for this is a bit trickier than adding a standard radial feat.

Steps:

  1. Enter the feat in the cls_feat_*.2da as normal.
  2. Create the master feat in feat.2da. Set the SpellID to be the spell number of the master spell.
  3. Create the master spell in spells.2da. Set the SubRadSpell1-5 numbers to point to the sub spells for the feat.
  4. Set the FeatID on each of the subspells as follows: (65536 * subfeat) + FeatID. The top 16 bits is used for subfeat, the bottom for feat.

Basically any feat that uses a spell that has subspells listed will be turned into a radial menu.

Subfeat number selection is up to you, I would suggest starting around 5000 or so and going up from there. Current internal subfeat numbers go from 1000 to about 1012, avoid those.

Original NWN subradial feats: The older polymorph/shapeshift feats are still hardcoded, so they can not be changed to use this system- but they could probably be reimplemented with new feats.

Subfeat ID Advisory: I would suggest the community should use subfeat numbers starting above 2999 for their projects. Consider anything below that number Bioware reserved space.

Potential uses: Subradial feats are a nice way of implementing feats that offer multiple choises (like wildshape) or just grouping similar abilities (i.e. if you would create feats that allow you to give commands to your henchmen, you could use a subradial menu to group them)

Example:

You added a feat at line 3000 that points to a new spell at line 2000 that has 3 subradial spells, lets say at 2001, 2002 and 2003 in spells.2da.

  • feat[3000].spellid = 2000 // point to the master spell
  • spell[2000].featId = 3000 // masterspell point back to feat
  • spell[2000].subradial1 = 2001 // register subradial 1
  • spell[2000].subradial2 = 2002 // register subradial 2
  • spell[2000].subradial3 = 2003 // register subradial 3
  • spell[2001].featid = (65536 * X ) + 3000 // link to feat
  • spell[2002].featid = (65536 * Y ) + 3000 // link to feat
  • spell[2003].featid = (65536 * Z ) + 3000 // link to feat

Bioware Subfeat IDs

The following table lists the Feat and Subfeat IDs used by Bioware through HotU.

SpellID Label FeatID SubfeatID
658 Wild_Shape_Wyrmling_Red 327746434 5001 * 65536 + 898
659 Wild_Shape_Wyrmling_Blue 327811970 5002 * 65536 + 898
660 Wild_Shape_Wyrmling_Black 327877506 5003 * 65536 + 898
661 Wild_Shape_Wyrmling_White 327943042 5004 * 65536 + 898
662 Wild_Shape_Wyrmling_Green 328008578 5005 * 65536 + 898
670 Greater_Wild_Shape_Basilisk 328139653 5007 * 65536 + 901 (greater wildshape III)
671 Greater_Wild_Shape_Beholder 328074119 5006 * 65536 + 903 (greater wildshape IV)
672 Greater_Wild_Shape_Harpy 328205188 5008 * 65536 + 900 (greater wildshape II)?
673 Greater_Wild_Shape_Drider 328270725 5009 * 65536 + 901 (greater wildshape III)
674 Greater_Wild_Shape_Manticore 328336261 5010 * 65536 + 901 (greater wildshape III)
678 Greater_Wild_Shape_Gargoyle 328401796 5011 * 65536 + 900 (greater wildshape II)
679 Greater_Wild_Shape_Medusa 328467335 5012 * 65536 + 903 (greater wildshape IV)
680 Greater_Wild_Shape_Minotaur 328532868 5013 * 65536 + 900 (greater wildshape II)
682 Humanoid_Shape_Drow 328598406 5014 * 65536 + 902 (Humanoid Shape)
682 Greater_Wild_Shape_Mindflayer 328663943 5015 * 65536 + 903 (greater Wildshape IV)
693 Greater_Wild_Shape_DireTiger 328729479 5016 * 65536 + 903 (greater Wildshape IV)
683 Humanoid_Shape_Hobgoblin 328795014 5017 * 65536 +902 (Humanoid Shape)
704 Undead_Shape_lich 328860520 5018 * 65536 + 872 (Undead Shape)
705 Undead_Shape_vampire 328926056 5019 * 65536 + 872 (Undead Shape)
706 Undead_Shape_spectre 328991592 5020 * 65536 + 872 (Undead Shape)
707 Dragon_Type_Red 329057129 5021 * 65536 + 873 (Dragon Shape)
708 Dragon_Type_blue 329122665 5022 * 65536 + 873 (Dragon Shape)
709 Dragon_Type_Green 329188201 5023 * 65536 + 873 (Dragon Shape)
684 KoboldCommando 329253766 5024 * 65536 + 902
733 Outsider1 329319460 5025 * 65536 + 1060 (outsider shape)
734 Outsider2 329384996 5026 * 65536 + 1060 (outsider shape)
735 Outsider3 329450532 5027 * 65536 + 1060 (outsider shape)
733 Construct1 329516069 5028 * 65536 + 1061 (outsider shape)
734 Construct2 329581605 5029 * 65536 + 1061 (outsider shape)
735 Construct3 329647141 5030 * 65536 + 1061 (outsider shape)

Hints

  • Up to patch 1.32 you can only have 7 class feats in the radial menu, feats gained after that point will not show up. This cap is no longer present in Hordes of the Underdark.
  • Feats now (Hordes of the Underdark) honor the TargetType column from spells.2da for targeting. If you want a feat to be not targetable, you need to set the TargetSelf column in feat.2da to 1.
  • If you want to grant Radial Feat abilities dynamically based on something else besides class (say, subraces), add the feat to all cls_feat_*.2da files, add an entry into iprp_feats.2da, and stick the feat on an item as a bonus feat. Equipping Creature Hides is especially effective.