Perk Fragments

From the Fallout4 CreationKit Wiki
Revision as of 23:34, 29 October 2017 by imported>Qazaaq (category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Extends: Perk Script
Editor: Perk

Type[edit | edit source]

Perk fragment scripts extend Perk.

Run Time[edit | edit source]

  • 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[edit | edit source]

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[edit | edit source]

  • 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[edit | edit source]