Difference between revisions of "Talk:Perk Entry Point"

Jump to navigation Jump to search
Line 28: Line 28:
== Bottom Lable for Add Activation Perk Entry ==
== Bottom Lable for Add Activation Perk Entry ==
This is currently broken in the 64 bit version of the Creation Kit. --[[User:Lisselli|Lisselli]] ([[User talk:Lisselli|talk]]) 2016-11-15T15:30:15 (EST)
This is currently broken in the 64 bit version of the Creation Kit. --[[User:Lisselli|Lisselli]] ([[User talk:Lisselli|talk]]) 2016-11-15T15:30:15 (EST)
== Reverse engineering ==
I wrote a script to dump the game's Perk Entry Point information from Skyrim Classic. Should be basically the same for SSE.
The way perk entry points work is that the game calls a varargs function, CalculatePerkData, which has two non-varargs arguments: the entry point to use (an enum) and the [[actor]] that owns the perk. The varargs arguments that follow are grouped into two sets: the first ''n'' varargs are the perk's normal arguments, and the ''n''th argument and the next ''u - 1'' arguments are special arguments. The precise operational definition of "special" is unknown, except that if any of them are null pointers, then the entire operation is aborted and no perk entry points are run.
The value of ''u'' is determined by an unidentified enum (<code>unk0C</code> in the dump below) on the perk. In practice it's always 1 or 0, but there exists an unused enum value that maps to there being three special arguments.
My current (completely untested) hypothesis is that the perk arguments influence context-specific conditions. For example, [[GetSpellCastingPerk]] returns 1 if ''some spell'' has a specific perk, but it doesn't let you specify ''which'' spell to test; it tests whatever spell happens to be relevant at the moment. For a "Mod Spell Cost" entry point, that's the spell being cast. What other entry points have a "relevant spell?" I think it's ''either'' any perk with a Spell argument, or any perk with a Spell special argument. Testing would be needed to determine which is the case.
In summary: for each perk entry point below, all of the arguments listed are the "normal" argument, and when a perk is listed as having "1 args required," the last argument is ''also'' a special argument.
<pre>
Calculate Weapon Damage: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Target
Calculate My Critical Hit Chance: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Target
Calculate My Critical Hit Damage: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Target
Calculate Mine Explode Chance: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Item
Adjust Limb Damage: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Attacker
    - Attacker Weapon
Adjust Book Skill Points: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Recovered Health: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Get Should Attack: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Attacker
Modify Buy Prices: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Add Leveled List On Death: 2 extra args
- unk0C: 1 (maps to last 0 args required)
- Args:
    - Perk Owner
    - Target
Get Max Carry Weight: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Addiction Chance: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Addiction Duration: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Positive Chem Duration: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Activate: 2 extra args
- unk0C: 2 (maps to last 0 args required)
- Args:
    - Perk Owner
    - Target
Ignore Running During Detection: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Ignore Broken Lock: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Enemy Critical Hit Chance: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Target
Modify Sneak Attack Mult: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Target
Modify Max Placeable Mines: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Bow Zoom: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
Modify Recover Arrow Chance: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Skill Use: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Telekinesis Distance: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Telekinesis Damage Mult: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Telekinesis Damage: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Mod Bashing Damage: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Mod Power Attack Stamina: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
Mod Power Attack Damage: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Target
Mod Spell Magnitude: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
    - Target
Mod Spell Duration: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
    - Target
Mod Secondary Value Weight: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
    - Target
Mod Armor Weight: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Item
Mod Incoming Stagger: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Attacker
Mod Target Stagger: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Mod Attack Damage: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Target
Mod Incoming Damage: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Attacker
    - Attacker Weapon
Mod Target Damage Resistance: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Target
Mod Spell Cost: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Mod Percent Blocked: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Mod Shield Deflect Arrow Chance: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Mod Incoming Spell Magnitude: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Mod Incoming Spell Duration: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Mod Player Intimidation: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Mod Player Reputation: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Mod Favor Points: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Mod Bribe Amount: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Mod Detection Light: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Mod Detection Movement: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Mod Soul Gem Recharge: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Item
Set Sweep Attack: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
Apply Combat Hit Spell: 3 extra args
- unk0C: 4 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Target
Apply Bashing Spell: 2 extra args
- unk0C: 4 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Apply Reanimate Spell: 3 extra args
- unk0C: 4 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
    - Target
Set Boolean Graph Variable: 1 extra args
- unk0C: 5 (maps to last 0 args required)
- Args:
    - Perk Owner
Mod Spell Casting Sound Event: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Modify Pickpocket Chance: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
    - Item
Modify Detection Sneak Skill: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Modify Falling Damage: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Lockpick Sweet Spot: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Locked Ref
Modify Sell Prices: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Can Pickpocket Equipped Item: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
    - Item
Modify Lockpick level allowed: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Set Lockpick Starting Arc: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Set Progression Picking: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Make lockpicks unbreakable : 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Alchemy Effectiveness: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Apply Weapon Swing Spell: 3 extra args
- unk0C: 4 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Attacker
    - Attacker Weapon
Modify Commanded Actor Limit: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Apply Sneaking Spell: 1 extra args
- unk0C: 4 (maps to last 1 args required)
- Args:
    - Perk Owner
Modify Player Magic Slowdown: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Modify Ward Magicka Absorption Pct: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Modify Initial Ingredient Effects Learned: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Purify Alchemy Ingredients: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Filter Activation: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
Can dual cast spell: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Modify Tempering Health: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Item
Modify Enchantment Power: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Enchantment
    - Item
Modify Soul Pct Captured to Weapon: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
    - Item
Mod Soul Gem Enchanting: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Enchantment
    - Item
Mod # applied enchantments allowed: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Set Activate Label: 2 extra args
- unk0C: 6 (maps to last 0 args required)
- Args:
    - Perk Owner
    - Target
Mod Shout OK: 1 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
Mod Poison Dose Count: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Weapon
    - Spell
Should Apply Placed Item: 3 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
    - Item
Modify Armor Rating: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Item
Modify lockpicking crime chance: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Locked Ref
Modify ingredients harvested: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Item
Modify Spell Range (Target Loc.): 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Modify Potions Created: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Spell
Modify lockpicking key reward chance: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Locked Ref
Allow Mount Actor: 2 extra args
- unk0C: 0 (maps to last 1 args required)
- Args:
    - Perk Owner
    - Target
</pre>
[[User:DavidJCobb|DavidJCobb]] ([[User talk:DavidJCobb|talk]]) 21:39, 15 August 2024 (EDT)
142

edits

Navigation menu