FANDOM


///////////////////////////////////////////////////////////////////////////////
// FeatAdd
///////////////////////////////////////////////////////////////////////////////
// Created By:  Brock Heinz - OEI
// Created On:  01/19/06
// Description: Adds a feat to the target creature. with an option to check or
//              bypass the feat's requirements
// Arguments:
//  oCreature           - The creature to which you want to add a feat
//  iFeatId             - The Feat ID which you want to add, from Feats.2DA   
//  bCheckRequirements  - Whether or not the game should check to see if the 
//                      creature meets the feat's prerequisites before adding
// bFeedback 			- Whether or not to display feedback in chatlog
// bFeedback			- Whether or not to display "notice" text in center of
//						  the screen
// Returns:	TRUE if the feat was added to the creature, otherwise, FALSE
///////////////////////////////////////////////////////////////////////////////
int FeatAdd( object oCreature, int iFeatId, int bCheckRequirements, int bFeedback=FALSE, int bNotice=FALSE );

Like many feats that return a value, FeatAdd cannot be used outside of a conversation unless you first place it in a wrapper function. Such as:

void FeatAddWrapper(object oCreature, int FeatID, int bCheckRequirements, int bFeedback=FALSE, int bNotice=FALSE )
{
    FeatAdd(oCreature, nFeatID, bCheckRequirements, bFeedback, bNotice);
}

A typo exists in the toolset's description of the last parameter, bNotice. bFeedback has been duplicated twice, but fortunately the description has not.

On an interesting side note, this function's counterpart FeatRemove returns a void and therefore should not require a wrapper to be used outside of a conversation.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.