Background for Skyrim SE

_Q2C_Functions


Inheritance Tree

No indexed scripts extend this script.

Properties
Events
Functions
PotionfunctionWornObjectGetPoison(ActorakActor, intaiHandSlot, intaiSlotMask)Global

this is already done by SKSE, so just forward on to that version

intfunctionWornObjectSetPoison(ActorakActor, intaiHandSlot, intaiSlotMask, PotionakPoison, intaiCharges=1)NativeGlobal

Applies akPoison to weapon in aiHandSlot. Note the item MUST be a weapon, or the function will fail and return -1
Returns: The number of poison charges the weapon now has (which should be the same as aiCharges)
or -1 if unsuccessful

voidfunctionWornObjectRemovePoison(ActorakActor, intaiHandSlot, intaiSlotMask)NativeGlobal

Remove the poison from the weapon in aiHandSlot

intfunctionWornObjectGetPoisonCharges(ActorakActor, intaiHandSlot, intaiSlotMask)NativeGlobal

Get the number of poison charges on the weapon in aiHandSlot
Returns: The number of charges, or -1 if unsuccessful for any reason
(eg the item is not a weapon, or no poison applied)

intfunctionWornObjectSetPoisonCharges(ActorakActor, intaiHandSlot, intaiSlotMask, intaiCharges=1)NativeGlobal

Set the number of poison charges on the weapon in aiHandSlot
Returns: The number of poison charges now on the weapon in aiHandSlot (which should be the same as aiCharges)
or -1 if unsuccessful for any reason (eg the item is not a weapon, or no poison applied)

PotionfunctionGetPoison(ObjectReferenceakObjRef)Global

this is also already done by SKSE, so just forward on to that version

intfunctionSetPoison(ObjectReferenceakObjRef, PotionakPoison, intaiCharges=1)NativeGlobal

Applies akPoison to akObjRef. Note the item MUST be a weapon, or the function will fail and return -1
Returns: The number of poison charges the weapon now has (which should be the same as aiCharges)
or -1 if unsuccessful

voidfunctionRemovePoison(ObjectReferenceakObjRef)NativeGlobal

Remove the poison from the weapon akObjRef

intfunctionGetPoisonCharges(ObjectReferenceakObjRef)NativeGlobal

Get the number of poison charges on akObjRef
Returns: The number of charges, or -1 if unsuccessful for any reason
(eg the item is not a weapon, or no poison applied)

intfunctionSetPoisonCharges(ObjectReferenceakObjRef, intaiCharges=1)NativeGlobal

Set the number of poison charges on akObjRef
Returns: The number of poison charges now on the weapon in aiHandSlot (which should be the same as aiCharges)
or -1 if unsuccessful for any reason (eg the item is not a weapon, or no poison applied)

PotionfunctionWornGetPoison(ActorakActor, intaiHandSlot)Global

These are all just shortcuts to the full WornObject versions above, sending aiSlotMask as 0

intfunctionWornSetPoison(ActorakActor, intaiHandSlot, Potionpoison, intaiCharges=1)Global
voidfunctionWornRemovePoison(ActorakActor, intaiHandSlot)Global
intfunctionWornGetPoisonCharges(ActorakActor, intaiHandSlot)Global
intfunctionWornSetPoisonCharges(ActorakActor, intaiHandSlot, intaiCharges=1)Global
intfunctionGetNumItemsWithKeyword(ObjectReferenceakObjRef, KeywordakKeyword)NativeGlobal

          Inventory Functions

Q2C's original functions, updated for SKSE64
Note that GetNumItemsWithKeyword groups by item type
ie, a stack of ten daggers counts as ONE toward the total, NOT ten

FormfunctionGetNthFormWithKeyword(ObjectReferenceakObjRef, KeywordakKeyword, intaiItemIndex)NativeGlobal
intfunctionGetNumItemsOfType(ObjectReferenceakObjRef, intaiType)NativeGlobal

added by Kalivore - type is the SKSE itemType (eg 26 for armour, or 46 for potion)
full list at Form.GetType()

FormfunctionGetNthFormOfType(ObjectReferenceakObjRef, intaiType, intaiItemIndex)NativeGlobal
intfunctionGetTotalBaseGoldValue(ObjectReferenceakObjRef)NativeGlobal

get total of the base gold values of items in container
'base' means the extra value of enchantments/improvements on items is ignored

voidfunctionSetIsBolt(AmmoakAmmo, boolabIsBolt)NativeGlobal

Sets whether this ammo is a bolt

voidfunctionSetProjectile(AmmoakAmmo, ProjectileakProjectile)NativeGlobal

Sets the projectile associated with this ammo
--WARNING!!-- Highly untested! >:$

voidfunctionSetDamage(AmmoakAmmo, floatafDamage)NativeGlobal

Sets the base damage of this ammo

stringfunctionSpellSchoolAny()Global

returns an empty string ""

stringfunctionSpellSchoolAlteration()Global

returns "Alteration"

stringfunctionSpellSchoolConjuration()Global

returns "Conjuration"

stringfunctionSpellSchoolDestruction()Global

returns "Destruction"

stringfunctionSpellSchoolIllusion()Global

returns "Illusion"

stringfunctionSpellSchoolRestoration()Global

returns "Restoration"

intfunctionSpellLevelAny()Global

returns -1

intfunctionSpellLevelNovice()Global

returns 0 (all Novice spells I found were level 0)

intfunctionSpellLevelApprentice()Global

returns 25

intfunctionSpellLevelAdept()Global

returns 50

intfunctionSpellLevelExpert()Global

returns 75

intfunctionSpellLevelMaster()Global

returns 100

intfunctionSpellLevelComparisonLt()Global

returns -2. Means spell level must be lower than specified aiLevel to be counted

intfunctionSpellLevelComparisonLtEq()Global

returns -1. Means spell level must be less than or equal to specified aiLevel to be counted

intfunctionSpellLevelComparisonEq()Global

returns 0. Means spell level must be equal to specified aiLevel to be counted

intfunctionSpellLevelComparisonGtEq()Global

returns 1. Means spell level must be equal to or greater than specified aiLevel to be counted

intfunctionSpellLevelComparisonGt()Global

returns 2. Means spell level must be greater than specified aiLevel to be counted

Spell[]functionActorGetSpells(ActorakActor, KeywordakKeyword=NONE, stringasSchool="", intaiLevel=-1, intaiLevelComparison=1, boolabSearchBase=true)NativeGlobal

[DEV SERVER] Loading description...

Spell[]functionActorBaseGetSpells(ActorBaseakActorBase, KeywordakKeyword=NONE, stringasSchool="", intaiLevel=-1, intaiLevelComparison=1)NativeGlobal

Scans the MagicEffects of the Actor's spells, adding the Spell to the returned array if the MagicEffect matches the criteria.
Use the default values to ignore that condition (eg sending asSchool as "" means 'of any School')
NOTE: sending just the akActorBase (or sending all additional arguments as their default values) will now return ALL spells set on the ActorBase - rather than an empty list as before

Shout[]functionActorBaseGetShouts(ActorBaseakActorBase, KeywordakKeyword=NONE)NativeGlobal

Returns an array of Shouts that match the specified Keyword.

boolfunctionActorHasSpell(ActorakActor, KeywordakKeyword=NONE, stringasSchool="", intaiLevel=-1, intaiLevelComparison=1, boolabSearchBase=true)Global

Scans the MagicEffects of the Actor's spells, returning true at the first one that matches any of the supplied criteria.
NOTE: sending just the akActor (or sending all additional arguments as their default values) will return TRUE if the actor has any spell at all
Optionally will also check through the relevant ActorBase (which is more likely to be the one with the spells)

boolfunctionActorBaseHasSpell(ActorBaseakActorBase, KeywordakKeyword=NONE, stringasSchool="", intaiLevel=-1, intaiLevelComparison=1)Global

Scans the MagicEffects of the ActorBase's spells, returning true at the first one that matches any of the supplied criteria.
NOTE: sending just the akActorBase (or sending all additional arguments as their default values) will return TRUE if the ActorBase has any spell at all

boolfunctionActorBaseHasShout(ActorBaseakActorBase, KeywordakKeyword)Global

Scans the ActorBase's shouts, returning true at the first one that matches the specified Keyword.

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.