RemovePerk
From GECK
A function included in the GECK for Fallout 3.
Contents
Description
Removes the specified Perk from the calling Actor.
- When called on the Player character, this function will remove the perk from the player, unless the optional argument forTeammates is non-zero, in which case it will remove the perk from all teammates.
- When called on any actor other than the player, this function will work correctly only if the uNPCPerks optional JIP LN feature is toggled in Data\NVSE\plugins\jip_nvse.ini.
Syntax
ActorRef.RemovePerk perk:form forTeammates:1/0
Example
Player.RemovePerk LittleSlugger
Removes the LittleSlugger perk from the Player.
Player.RemovePerk LittleSlugger 1
Removes the LittleSlugger perk from all the Player's teammates.
ActorRef.RemovePerk LittleSlugger
Removes the LittleSlugger perk from ActorRef.
Notes
- In Fallout: New Vegas, the Player is implemented as a special Actor type that has additional capabilities, including having perks. The Player has two lists of perks, one list which applies to the Player and one list which is applied to all current Teammates (GetPlayerTeammate == 1). Perks for companions can be added to the Player via Player.AddPerk PerkEditorID 1. Perk entry points can be given conditions such as GetIsID if their effects should not apply to all companions. Perk requirements have no effect on companion perks and only apply to the players ability to take the perk at level up. Abilities in a perk should also be conditioned to check for GetPlayerTeammate == 1 or GetIsID.
- Using RemovePerk in an Effect Script on a perk that has an "ability" type Perk Entry defined will crash Fallout 3, so long as it has an ability specified. Instead, use AddItem to add a scripted token that removes the perk via RemovePerk and then calls RemoveMe:
ref rContainer Begin OnAdd set rContainer to GetContainer rContainer.RemovePerk MyPerk RemoveMe End
See Also
- AddPerk
- HasPerk
- GetPerkRank to check the rank of a perk on the player.
- GetAltPerkRank to check the rank of a perk on all teammates.