Difference between revisions of "AddPerk"

1,072 bytes added ,  18:21, 17 July 2015
no edit summary
imported>Cipscis
(Undo revision 13439 by Pshieldsy19 (Talk))
imported>JT
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
=='''Description'''==
{{Function
'''AddPerk''' Adds a [[:Category:Perk|perk]] to a CharacterIt is called on a reference and the parameter is the perk to add.
|origin = GECK1
 
|summary = Increments the rank of the specified perk on an ActorIf the specified Actor doesn't already have the perk, then it will be added with rank 1.
=='''Syntax'''==
|name = AddPerk
 
|returnType = void
  [''ActorREF''.]AddPerk ''PerkID''
  |referenceType = [ActorRefID]
 
|arguments =
=='''Examples'''==
  {{FunctionArgument
 
  |Name = PerkID
  BuddyRef.AddPerk LittleSlugger
  |Type = ref
  }}
  |example = BuddyRef.AddPerk LittleSlugger
Buddy now has the benefits of the little slugger perk.
Buddy now has the benefits of the little slugger perk.
}}


==Notes==
* With Fallout 3 version 1.4 or older: Loading a savegame in which the player has a mod-created perk, when the mod that created it is no longer installed, may crash the game. That issue was fixed in Fallout v1.5. If you know the FormId of the Perk, you can remove it from yourself using the console. Modders are also advised to provide an in-game means for players to remove perks, should they wish to uninstall while keeping older versions of FO3, or at least provide instructions on how to remove the perks.


=='''See Also'''==
* One simple way is to provide an "uninstaller" esm file, that the user must install, load their game, and save it, before they remove the mod. The esm will do nothing but remove the perks, and contains one quest, called something like "MyPerkRemovalQuest", set to "start game enabled", with a Quest-type script:
[[RemovePerk]]
    ScriptName MyPerkRemovalQuestScript
   
    Begin GameMode
        player.RemovePerk MyExamplePerk
        StopQuest MyPerkRemovalQuest
    End


=='''Reference'''==
==See Also==
None provided.
*[[RemovePerk]]
<!-- [[AddPerk_Reference|List of functions that use AddPerk]] (wiki) -->
*[[HasPerk]]


[[Category:Functions]]
[[Category:Functions]]
[[Category:Functions (GECK 1.1)]]
[[Category:Player Functions]]
[[Category:Player Functions]]
[[Category:Player Functions (GECK 1.1)]]
[[Category:Perk]]
[[Category:Perk]]
Anonymous user