Difference between revisions of "Perk Fragments"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Plplecuyer
 
imported>Qazaaq
Line 1: Line 1:
[[Category:Papyrus]]
[[Category:Scripting]]
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Fragments]]
[[Category:Fragments]]
[[Category:Actor]]
'''Editor:''' [[Perk]]


== Type ==
== Type ==
Line 22: Line 24:


== See Also ==
== See Also ==
*[[:Category:Actor|Actor Category]]
*[[Perk Script]]
*[[Perk Script]]
*[[OnEntryRun - Perk]]
*[[OnEntryRun - Perk]]

Revision as of 02:24, 13 June 2016

Editor: Perk

Type

Perk fragment scripts extend Perk.

Run Time

  • Activate entries:
    • Run Immediately: Fragment is run every frame conditions are met.
    • Not Run Immediately: Fragment is run when the player picks the appropriate option in the popup menu.
  • Value entries: Run whenever conditions are met.

Important Notes

Perk fragments should be avoided if at all possible. While activate entries not set to run immediately should be ok in most cases, the rest of the perk types can fire very fast without regard for Papyrus' load. This can quickly overwhelm the script system. Therefore it is highly recommended that if you must use one of these fast-firing perk fragments that you conditionalize them with something that won't be true very often (i.e. low random chance) and make the fragment as short as possible.

This also applies to the fragment event which will run for every valid fragment location on the perk when conditions pass, regardless of whether a fragment is attached or not.

Special Variables

  • akActor: This is the Actor that has the perk on him.
  • akTargetRef: The ObjectReference that the actor above has activated. (If a value perk entry, this will be empty)

See Also