×
Create a new article
Write your page title here:
We currently have 78,515 articles on Fallout Wiki. Type your article name above or click on one of the titles below and start writing!



Fallout Wiki
78,515Articles

Perk Entry Point Documentation (Fallout 4)

FO76 ui workshop team.png Independent Fallout Wiki - Resources FO76 ui workshop team.png

Perk Entry Point Documentation is a resource guide written by Alegendv1.

Introduction

This resource’s purpose is to:

  1. To define each perk entry point’s function in Fallout 4 Creation Kit
  2. To expose what conditions/scenarios the OnEntryRun event will fire for each perk entry point
  3. To provide the Condition Tab name(s) and corresponding integer(s) for each perk entry point

Number 3 is particularly valuable for xEdit users. The Condition Tab integer is not visible in CK, but is visible in xEdit. However, the Condition Tab name is only visible in CK UI, but is not visible in xEdit. Thus, attempting to write a perk solely in xEdit is a dangerous task because you could easily mess up the Condition Tabs, simply by not being aware of the tab count and integer position of the tab. At best, your perk would not function, at worst, you could crash the game.

Disclaimer

I, alegendv1 (yoyoma3010 on NexusMods) personally tested nearly every perk entry (I note which ones I could not test, such as entries that seem to be remnants from Skyrim).

As such, there are probably incorrect assumptions I made in the testing process, or the information is incomplete. There’s only so much I can do to test, and no one is quality checking my work. Thus, this is an open resource for others to edit as well.

All testing of perk entries has been done primarily on the Player character. This was the easiest way to test perks, and additionally, many perk entries can only apply to the Player character (i.e. VATS perk entries). Certain perk entries (like the “Mod Incoming ______” were also tested on NPCs.

I make no claims that this resource is perfect, and I will likely update it in the future should I or others make further discoveries. Besides the CK wiki, I am unaware of anyone providing a resource regarding perk entries to this extent, so it is possible this resource is the first to record this information.

There are certainly many mod authors who may have this knowledge already, but have not logged it anywhere (if we exclude forum threads or Discord servers). Hopefully this resource will be of benefit to various modders in the future.

Very Important Information

Regarding Perk Script (OnEntryRun event) and Perk Script Fragment:

The CK wiki highly recommends keeping perk scripts and perk fragment scripts very short, to reduce papyrus load. This is because many entries will rapid fire the fragment script and/or OnEntryRun event, even if their perk entry CK conditions are falsified/no longer fulfilled.

The events appear to rapid fire based on frame rate. At a frame rate of 60 fps, an entry can fire 60 times in one second (according to trace logs). Whenever I say “this entry rapid fires” or “this entry rapid fires # times” in this resource, this is what I am referring to.

There are ways around this, however. One method is to use StartTimer() with the same aiTimerID, and have the OnEntryRun start the same timer. Then use the OnTimer event to run the code you want to run. This assumes that 1: The entry doesn’t continue to rapid fire, and possibly 2: you will run code previously or somewhere else to falsify the perk entry condition immediately. Otherwise you’ll be calling StartTimer() infinitely as long as the perk entry conditions are fulfilled and the event is firing, so your OnTimer event will never fire.

Another method (arguably better) is to use Papyrus States, and utilize the OnBeginState event. When the default state OnEntryRun fires, you immediately enter a processing state. The processing state, ideally, would have an empty OnEntryRun event, and you would use your OnBeginState to run your code. When you’re ready to evaluate the conditions on the perk entry again (i.e., you’ve finished whatever you needed to do in your code), you can return to the default state.

While an empty OnEntryRun event is not very taxing on Papyrus, the event is still getting called, and at 60 calls per second, I recommend falsifying the CK conditions immediately if you’re using an entry that rapid fires constantly while conditions are true (i.e. Mod Breath Timer). Entries that only rapid fire 2-4 times per entry run, are arguably safe to handle with an empty state (i.e Mod Outgoing Explosion Limb Damage).

More info about Papyrus states can be found here

These methods that work around the game engine rapid firing OnEntryRun Papyrus event are still subject to Papyrus lag. However, these methods will aid in reducing the likelihood of rapid firing/spamming your code, or firing code when you do not want it to. These methods should allow you to use perk/perk fragment scripts more freely.

The AkTarget and AkTargetRef arguments in OnEntryRun and perk fragment appear to be None in every case except the Activate/Add Activate Choice perk entry. I haven’t tested every case, but this was true for various perk entries that have a Target condition tab, such as Mod Weapon Attack Damage.

Fallout 4 Perk Entry Points

Perk Entry Information: CK Wiki link: https://falloutck.uesp.net/wiki/Perk_Entry_Point

Note - For entries that use the Absolute Value or Negative Absolute Value math functions, the perk fragment script is unavailable, which means OnEntryRun will also not fire.
Entry Point Name Function Script Event Condition Tabs
Activate / Add Activate Choice
Button Label
  • If Run Immediately is not flagged, changes activation text to what is in this field
  • If Replace Default is flagged, changes default activation text to what is in this field (using E)
  • If Replace Default is not flagged, an additional activate choice appears and uses text in this field.

Certain objects can handle up to 2 additional activate choices (E, R, space). Having exactly 4 total activate choices will prompt the Multi-Activate menu to appear (companion command menu is like this).

Start Script Flags
  • Replace Default - replaces default activation. Can easily break normal activation of items, so best to add an Activate() to your code if you still need default activation.
  • Run Immediately - OnEntryRun and perk fragment will run as soon as activate text would normally appear. If not aiming in IronSights, this means you’re looking at the target and within activation distance. If looking through Iron Sights, this range is much greater. Run Immediately is dangerous script-wise because it will rapidly fire the OnEntryRun and perk fragment events.

Even if you scripted it that the CK conditions would not be true anymore (i.e. perk entry conditioned for not having keyword, your fragment immediately adds the keyword, thus falsifying the perk entry condition), the script event can still fire off multiple times before this happens, even more so if the game is experiencing papyrus lag. Be very careful with Run Immediately, and consider using the suggested methods listed at the beginning of this resource.

  • Perk Owner (0)
  • Target (1)
Entry Point I am a function! I am a script event! Here is a condition tab or integer!
Entry Point I am a function! I am a script event! Here is a condition tab or integer!
Entry Point I am a function! I am a script event! Here is a condition tab or integer!