Difference between revisions of "AddPerk"

135 bytes removed ,  03:27, 20 April 2009
no edit summary
imported>DewiMorgan
m (→‎Notes: oops. fixed.)
imported>Quarn
Line 1: Line 1:
{{Function
=='''Description'''==
|origin = GECK1
 
|summary = Increments the rank of the specified perk on an Actor.  If the specified Actor doesn't already have the perk, then it will be added with rank 1.
Increments the rank of the specified perk on an Actor.  If the specified Actor doesn't already have the perk, then it will be added with rank 1.
|referenceType = Actor
 
|arguments = {{FunctionArgument
=='''Syntax'''==
    |Name = PerkID
 
    |Type = ref
''[ActorID.]''AddPerk ''PerkID''
  }}
 
|example = BuddyRef.AddPerk LittleSlugger
=='''Examples'''==
 
BuddyRef.AddPerk LittleSlugger


Buddy now has the benefits of the little slugger perk.
Buddy now has the benefits of the little slugger perk.
}}


==Notes==
==Notes==
* Loading a savegame in which the player has a mod-ceated perk, when the mod that created it is no longer installed, may crash the game. If you know the FormId of the Perk, you can remove it from yourself using the console. Modders are also strongly advised to provide an in-game means for players to remove perks, should they wish to uninstall.
* Loading a savegame in which the player has a mod-ceated perk, when the mod that created it is no longer installed, may crash the game. If you know the FormId of the Perk, you can remove it from yourself using the console. Modders are also strongly advised to provide an in-game means for players to remove perks, should they wish to uninstall.


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:
* 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:
     ScriptName MyPerkRemovalQuestScript
     ScriptName MyPerkRemovalQuestScript
      
      
Line 22: Line 23:
         StopQuest MyPerkRemovalQuest
         StopQuest MyPerkRemovalQuest
     End
     End
*This function is new in the GECK, and was not available in the TES4 Construction Set.


==See Also==
==See Also==
Anonymous user