Difference between revisions of "SetNthEntryValue - Perk"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>A.ellis
(Created page with "Category:Scripting Category:Papyrus Category:SKSE '''SKSE Member of:''' Perk Script {{SKSEFunction|1.06.07}} == Syntax == <source lang="papyrus"> bool Funct...")
 
imported>Egocarib
 
(2 intermediate revisions by 2 users not shown)
Line 6: Line 6:
{{SKSEFunction|1.06.07}}
{{SKSEFunction|1.06.07}}


Used to set a Perk's Entry Point ''Value'' field(s).


== Syntax ==
== Syntax ==
Line 11: Line 13:
bool Function SetNthEntryValue(int n, int i, float value) native
bool Function SetNthEntryValue(int n, int i, float value) native
</source>
</source>
== Parameters ==
n: the index of the Entry Point in the '''Perk Entries''' list (0 indicates the first entry)
i: the index of the value to be set (0 to set the first value, 1 to set the second value if there is one)
value: the new value to be set.


== Return Value ==
== Return Value ==


== Examples ==
== Examples ==
Edit the Enchanting Perk "Extra Effect" so that it allows placing three enchantments on a single item:
<source lang="papyrus">
Perk Property ExtraEffect auto
;...
ExtraEffect.SetNthEntryValue(0, 0, 3.00)
</source>


== Notes ==
== Notes ==
* Changes made with this function will persist across separate save loads but not across full game restarts.
* This function allows setting Entry Point values more precisely than in the CK - which rounds decimal values to the nearest hundreth.


== See Also ==
== See Also ==
[[GetNthEntryValue - Perk]]

Latest revision as of 22:44, 22 November 2013

SKSE Member of: Perk Script

Minimum required SKSE Version: 1.06.07


Used to set a Perk's Entry Point Value field(s).

Syntax[edit | edit source]

bool Function SetNthEntryValue(int n, int i, float value) native

Parameters[edit | edit source]

n: the index of the Entry Point in the Perk Entries list (0 indicates the first entry)

i: the index of the value to be set (0 to set the first value, 1 to set the second value if there is one)

value: the new value to be set.

Return Value[edit | edit source]

Examples[edit | edit source]

Edit the Enchanting Perk "Extra Effect" so that it allows placing three enchantments on a single item:

Perk Property ExtraEffect auto
;...
ExtraEffect.SetNthEntryValue(0, 0, 3.00)

Notes[edit | edit source]

  • Changes made with this function will persist across separate save loads but not across full game restarts.
  • This function allows setting Entry Point values more precisely than in the CK - which rounds decimal values to the nearest hundreth.

See Also[edit | edit source]

GetNthEntryValue - Perk