## OBSE v0015 Command Documentation

New values and functions available in v0015 are marked with an asterix ()
OBSE @ Oblivion Construction Set Wiki
New v0015 functions:
GetRefCount
SetRefCount
SetHasBeenPickedUp
GetProjectileType
GetMagicProjectileSpell
GetArrowProjectileEnchantment
GetArrowProjectileBowEnchantment
GetArrowProjectilePoison
SetMagicProjectileSpell
SetPlayerProjectile
GetProjectileSource
GetModIndex
GetNumLoadedMods
GetSourceModIndex
GetCalcAllLevels
GetCalcEachInCount
GetChanceNone
CalcLeveledItemNR
GetNumLevItems
GetNthLevItem
GetNthLevItemCount
GetNthLevItemLevel
AddItemNS
RemoveItemNS
EquipItemNS
UnequipItemNS
AddSpellNS
RemoveSpellNS
GetHair
GetEyes
GetHairColor
GetOpenSound
GetCloseSound
GetLoopSound
SetOpenSound
SetCloseSound
SetLoopSound
GetCreatureSound
IsPlayable2
IsFormValid
IsReference
ToggleCreatureModel
SetMessageSound
SetMessageIcon
GetVariable
GetRefVariable
HasVariable
GetFullGoldValue
GetNumDetectedActors
GetNthDetectedActor
SetDetectionState
GetHotKeyItem
ClearHotKey
SetHotKeyItem
OffersWeapons
OffersArmor
OffersClothing
OffersBooks
OffersLights
OffersIngredients
OffersApparatus
OffersMiscItems
OffersMagicItems
OffersSpells
OffersPotions
OffersTraining
OffersRecharging
OffersRepair
OffersServicesC
GetTrainerSkill
GetTrainerLevel
SetOffersWeapons
SetOffersArmor
SetOffersClothing
SetOffersBooks
SetOffersIngredients
SetOffersSpells
SetOffersLights
SetOffersMiscItems
SetOffersMagicItems
SetOffersApparatus
SetOffersPotions
SetOffersTraining
SetOffersRecharging
SetOffersRepair
SetOffersServicesC
GetServicesMask
SetTrainerSkill
SetTrainerLevel
GetNumPackages
GetNthPackage
IsBlocking
IsAttacking
IsRecoiling
IsDodging
IsStaggered
IsMovingForward
IsMovingBackward
IsMovingLeft
IsMovingRight
IsTurningLeft
IsTurningRight
GetOBSERevision
IsInAir
IsJumping
IsOnGround
IsFlying
GetFallTimer
GetGodMode
CompareScripts
IsPowerAttacking
IsCasting
IsAnimGroupPlaying
AnimPathIncludes
ClearLeveledList
GetLevItemByLevel
RemoveLevItemByLevel
IsSpellHostile
SetSpellHostile
FileExists
IsModelPathValid
IsIconPathValid
IsBipedModelPathValid
IsBipedIconPathValid
GetPCMajorSkillUps
GetPCAttributeBonus
GetTotalPCAttributeBonus
GetProcessLevel
SetNameEx
GetActiveMenuMode
GetActiveMenuSelection
GetActiveMenuFilter
GetActiveMenuRef
GetActiveMenuObject
GetEnchMenuSoulgem
GetEnchMenuEnchItem
IsBarterMenuActive
GetSoundPlaying
GetAlchMenuIngredient
GetAlchMenuIngredientCount
GetAlchMenuApparatus
GetContainerMenuView
CloseAllMenus
SetControl
SetAltControl
GetAltControl2
Table of Contents

- Function Syntax Format
- Function Calling Conventions
- Qualities
- Types
- General Functions
- Cloning Functions
- Flow Control Functions
- Console Functions
- Input Functions
- Math Functions
- Mod Functions
- Trig Functions
- Output Functions
- Spam-Blocking Functions*
- Mod Functions*
- Hotkey Functions*
- File Functions*
- UI Functions*
- Type Codes
- Function Index

Function Syntax Format
(returnValueName:returnValueType) reference.FunctionName parameter1:type parameter2:type
optional - optional parameters or references are in italics
Parameter Types: designated after colon
float a positive or negative decimal number
long a positve whole number with large values
short a positive whole number with smaller values
ref a ref (usually an objectID)
chars a 4 character magic effect code (for example: FIDG, Z001)
string a set of characters in quotes
bool a short with only 2 values: 1 for true and 0 for false
Function Calling Conventions:
By Reference or ObjectID
reference.FunctionName someParameters objectID:ref
Examples:
(health:long) reference.GetObjectHealth objectID:ref
(oldEnchantment:ref) reference.SetEnchantment nuEnchantment:ref objectID:ref
These functions can either be called on a reference or have an objectID passed in as an argument. If an objectID is passed in, it takes precedence over a calling reference.
By Reference only:
reference.FunctionName someParameters
Examples:
(oldPoison:ref) reference.SetEquippedWeaponPoison nuPoison:ref
These functions must be called on a reference.
By ObjectID only
FunctionName someParamters objectID:ref
(masterLevel:short) GetSpellMasteryLevel spell:ref
(effectCode:long) GetNthEffectItemCode magicItem:ref whichEffect:long
Qualities
Qualities are a set of related values and functions which apply to multiple Oblivion object types. For documentation purposes I have gathered the related values together. Any type which has a given quality has all of values listed and all of the quality's functions may be applied to the type.

- Actor
- Attacking
- Audible*
- Breakable
- Class
- Container
- Edible
- Enchantable
- Equippable
- Inventory
- Lockable
- Magic
- Magic Target
- Named
- Ownable
- Race
- Simple
- Scriptable
- Wearable

Actor
Includes creatures and NPCs. All changes to actor flags such as Respawn and Low Level Processing are saved in the savegame.
Functions:
IsRefEssential - returns whether the referenced actor is essential
(isEssential:bool) reference.IsRefEssential
SetRefEssential - sets the calling ref to be essential or not
reference.SetRefEssential isEssential:bool
HasSpell - returns whether the actor has the specified spell
(hasSpell:bool) reference.HasSpell spell:ref
GetActorValueC - returns the actor value specified by the actor value code
(actorValue:long) reference.GetActorValueC actorValueCode:short
(actorValue:long) reference.GetAVC actorValueCode:short
ModActorValueC - modifies the actor value without changing the base value. Acts like a spell: a negative number reduces the value which can be restored and a positive value restores values without exceeding the maximum of the stat.
(nothing) reference.ModActorValueC actorValueCode:short value:long
(nothing) reference.ModAVC actorValueCode:short value:long
SetActorValueC - sets the actor value specified by the actor value code
(nothing) reference.SetActorValueC actorValueCode:short value:long
(nothing) reference.SetAVC actorValueCode:short value:long
ModActorValue2 - modifies the current value without changing the base value. Acts like a spell: a negative number reduces the value which can be restored and a positive value restores values without exceeding the maximum of the stat.
(nothing) reference.ModActorValue2 actorValueName:string value:long
GetActorLightAmount - returns a float describing the amount of light falling on an actor, or 100 if the actor is not in high/medium-high process.
(lightAmount:float) reference.GetActorLightAmount
CanCorpseCheck - returns 1 if the Can Corpse Check flag is set on the actor
(canCoprseCheck:bool) reference.CanCorpseCheck actor:ref
GetActorMinLevel - returns the minimum level of the actor if the PC Level Offset flag is set
(minLevel:short) reference.GetMinLevel actor:ref
GetActorMaxLevel - returns the maximum level of the actor if the PC Level Offset flag is set
(maxLevel:short) reference.GetMaxLevel actor:ref
GetNumFactions - returns the number of factions to which the actor belongs
(numFactions:short) reference.GetNumFactions actor:ref
GetNthFaction - returns the nth faction to which the actor belongs
(faction:ref) reference.GetNthFaction actor:ref
GetActorSoulLevel - returns the soul level of any actor. If an NPC it returns Grand, otherwise if a creature it returns the creature's soul level.
(soulLevel:short) reference.GetActorSoulLevel actor:ref
HasLowLevelProcessing - returns 1 if the actor has low level processing enabled
(hasLowProc:bool) reference.HasLowLevelProcessing actor:ref
HasNoPersuasion - returns 1 if the No Persuasion flag is set on the actor
(hasNoPers) reference.HasNoPersuasion actor:ref
IsActorRespawning - returns 1 if the Respawn flag is set on the actor
(respawns:bool) reference.IsActorRespawning actor:ref
IsPCLevelOffset - returns 1 if the actor's level is calculated relative to the player's level
(isLevOffset:bool) reference.IsPCLevelOffset actor:ref
IsSummonable - returns 1 if the Summonable flag is set on the actor
(isSummonable:bool) reference.IsSummonable actor:ref
SetActorRespawns - changes the Respawn flag on the actor
(nothing) reference.SetActorRespawns flag:short actor:ref
SetCanCorpseCheck - changes the Can Corpse Check flag on the actor
(nothing) reference.SetCanCorpseCheck flag:short actor:ref
SetFemale - changes the Female flag on the actor. Changes are saved but may not be immediately visible.
(nothing) reference.SetFemale flag:short actor:ref
SetLowLevelProcessing - turns low level processing on or off for the actor. Note that this sets the No Low Level Processing flag to the opposite of the passed value.
(nothing) reference.SetLowLevelProcessing flag:short actor:ref
SetNoPersuasion - changes the No Persuasion flag on the actor
(nothing) reference.SetNoPersuasion flag:short actor:ref
SetSummonable - changes the Summonable flag on the actor
(nothing) reference.SetSummonable flag:short actor:ref
SetPCLevelOffset - changes the PC Level Offset flag on the actor, and optionally specifies the minimum and maximum levels. If minLevel or maxLevel is omitted or passed as -1, the existing value will be retained. Note that changes to the min/max levels are not saved in the savegame.
(nothing) reference.SetPCLevelOffset flag:short minLevel:short maxLevel:short actor:ref
GetNumPackages - returns the number of AI packages in the actor's package list
(numPackages:short) reference.GetNumPackages actor:ref
GetNthPackage - returns the Nth AI package in the NPC's package list, in the order in which they were added in the editor.
(package:ref) reference.GetNthPackage actor:ref
Attacking
Types with this quality are used for attacks.
Values:
Attack Damage - long the base damage of the type; used in a forumla with the appropriate skill to determine damage actually done
Speed - float the speed factor of the type; used in a forumla to determine the rate of attack
Ignores Resistance flag - bool determines whether the type will ignore normal damage resistance.
Functions:
GetAttackDamage - returns the base attack damage
(damage:long) reference.GetAttackDamage objectID:ref
SetAttackDamage - sets the base attack damage
(nothing) reference.SetAttackDamage nuDamage:long objectID:ref
ModAttackDamage - modifies the base attack damage up or down
(nothing) reference.ModAttackDamage modifyBy:float objectID:ref
GetWeaponSpeed - returns the weapon speed
(speed:float) reference.GetWeaponSpeed objectID:ref
SetWeaponSpeed - sets the weapon speed
(nothing) reference.SetWeaponSpeed nuSpeed:float obejctID:ref
ModWeaponSpeed - modifies the weapon speed up or down
(nothing) reference.ModWeaponSpeed modifyBy:float obejctID:ref
GetIgnoresResistance - returns whether the object ignores normal damage resistance
(ignores:bool) reference.GetIgnoresResistance objectID:ref
SetIgnoresResistance - sets whether the object ignores normal damage resistance
(nothing) reference.SetIgnoresResistance shouldIgnore:bool objectID:ref
Audible*
Types with this quality have one or more sounds associated with them.
Values:
Open Sound - ref the sound played upon opening. (Containers and Doors)
Close Sound - ref the sound played upon closing. (Containers and Doors)
Loop Sound - ref the looping sound associated with an object. (Doors, Lights, and Activators)
Functions:
GetOpenSound - Returns the "open" sound
(sound:ref) reference.GetOpenSound baseObject:ref
GetCloseSound - Returns the "close" sound
(sound:ref) reference.GetCloseSound baseObject:ref
GetLoopSound - Returns the looping sound
(sound:ref) reference.GetLoopSound baseObject:ref
SetOpenSound - Sets the "open" sound
(nothing) reference.SetOpenSound sound:ref baseObject:ref
SetCloseSound - Sets the "close" sound
(nothing) reference.SetCloseSound sound:ref baseObject:ref
SetLoopSound - Sets the looping sound
(nothing) reference.SetLoopSound sound:ref baseObject:ref
Breakable
Types with this quality can be broken.
Values:
Health - long the base health of the object. Cannot be negative.
Current Health - float the current health of the object. the object is damaged when the current value is less than the base object value and is broken when the current health reaches 0. The effectiveness of the object may be decreased as damage increases.
Functions:
GetObjectHealth - returns the base object health
(health:long) reference.GetObjectHealth objectID:ref
SetObjectHealth - sets the base object health
(nothing) reference.SetObjectHealth nuHealth:long objectID:ref
ModObjectHealth - modifies the base object health up or down
(nothing) reference.ModObjectHealth modifyBy:float objectID:ref
GetCurrentHealth - returns the current health of the calling reference
(health:float) reference.GetCurrentHealth
GetEquippedCurrentHealth - gets the current health of the object in the specified equipment slot
(health:float) reference.GetEquippedCurrentHealth slot:short
SetEquippedCurrentHealth - sets the current health of the object in the specified equipment slot
(nothing) reference.SetEquippedCurrentHealth nuHealth:long slot:short
ModEquippedCurrentHealth - modifies the current health of the object in the specified equipment slot up or down
(nothing) reference.ModEquippedCurrentHealth modifyBy:float slot:short
Class
Types with this quality have a player class.
Values:
Attributes - short the two attributes of the class
Skills - short the five major skills of the class
Specialization - short the specialization of the class
Functions:
GetClass - returns the class of the NPC
(class:ref) reference.GetClass
GetClassAttribute - returns the Nth attribute of the class. If called on a reference it will attempt to find the class from that referenced NPC and use that.. If a class FormID is passed, that takes precedence.
(attribute:short) reference.GetClassAttribute whichAttribute:short class:ref
GetClassSkill - returns the Nth skill of the class. If called on a reference it will attempt to find the class from that referenced NPC and use that.. If a class FormID is passed, that takes precedence.
(skill:short) reference.GetClassSkill whichSkill:short class:ref
GetClassSpecialization - returns the class specialization. If called on a reference it will attempt to find the class from that referenced NPC and use that.. If a class FormID is passed, that takes precedence.
(specialization:short) reference.GetClassSpecialization class:ref
IsClassSkill - returns whether the passed skill is a skill of the class. If called on a reference it will attempt to find the class from that referenced NPC and use that.. If a class FormID is passed, that takes precedence.
(isClassSkill:bool) reference.IsClassSkill skill:short class:ref
(isClassSkill:bool) reference.IsMajor skill:short class:ref
IsClassAttribute - returns whether the passed attribute is an attribute of the class. If called on a reference it will attempt to find the class from that referenced NPC and use that.. If a class FormID is passed, that takes precedence. (available in v0011)
(isClassAttribute:bool) reference.IsClassAttribute attribute:short class:ref
Container
Something that holds inventory items.
Functions:
GetNumItems - returns the number of different object types in the container
(count:long) reference.GetNumItems
GetInventoryObject - returns the objectID of the Nth item type in the container
(objectID:ref) reference.GetInventoryObject whichObject:long
IsContainer - returns whether the reference or passed objectID is a container
(isContainer:bool) reference.IsContainer objectID:ref
GetContainerRespawns - returns whether the container's contents repawn
(respawns:bool) reference.GetContainerRespawns objectID:ref
(respawns:bool) reference.IsUnsafeRespawns objectID:ref
SetContainerRespawns - sets whether the container's contents respawn. Note - this change is not persisted in the save game.
(nothing) reference.SetContainerRespawns respawns:bool objectID:ref
(nothing) reference.SetUnsafeContainer respawns:bool objectID:ref
Edible
Types with this quality may be considered food.
Values:
Is Food flag - bool is the object considered to be food
Functions:
IsFood - returns whether the object is considered to be food
(isFood:bool) reference.IsFood objectID:ref
SetIsFood - sets whether the object is considered to be food
(nothing) reference.IsFood isFood:bool objectID:ref
Enchantable
Types with this quality may be enchanted. A couple notes: Enchantments and the ranges of their effects need to be appropriate for the enchantable object's type. The Enchantment Type needs to match the object the enchantment applies to. Also, when adding an enchantment to an object, be sure that the object has a charge, or the enchantment cannot work. If the object was not previously enchanted, call SetObjectCharge to assign a charge to the object.
Values:
Enchantment - ref the specific enchantment on the enchantable item
Charge - long the maximum charge available on the enchantable item
Current Charge - float the current charge of the enchantable item
Functions:
GetEnchantment - returns the specific enchantment on the object
(enchantment:ref) reference.GetEnchantment objectID:ref
SetEnchantment - sets the specific enchantment on the object and returns any previous enchantment
(oldEnchantment:ref) reference.SetEnchantment nuEnchantment:ref objectID:ref
RemoveEnchantment - removes the enchantment from the object and returns any previous enchantment
(oldEnchantment:ref) reference.RemoveEnchantment objectID:ref
GetObjectCharge - returns the max charge of the object
(charge:long) reference.GetObjectCharge objectID:ref
SetObjectCharge - sets the max charge of the object
(nothing) refernce.SetObjectCharge nuCharge:long objectID:ref
ModObjectCharge - modifies the max charge of the object up or down
(nothing) reference.ModObjectCharge modifyBy:float objectID:ref
GetCurrentCharge - returns the current charge of the calling reference
(charge:float) reference.GetCurrentCharge
GetEquippedCurrentCharge - returns the current charge of the object in the specified slot
(charge:float) reference.GetEquippedCurrentCharge slot:short
SetEquippedCurrentCharge - sets the current charge of the object in the specified slot
(nothing) reference.SetEquippedCurrentCharge nuCharge:long slot:short
ModEquippedCurrentCharge - modifies the current charge of the object in the specified slot up or down
(nothing) reference.ModEquippedCurrentCharge modifyBy:float slot:short
Equippable
Types with this quality can be equipped by a character.
Values:
Slot - short the equipment slot of the object
Functions:
GetEquipmentSlot - returns the equipment slot of the object
(slot:short) reference.GetEquipmentSlot objectID:ref
GetEquippedObject
Inventory
Types with this quality are objects that can be either stored in an inventory or exist as a reference outside of an inventory.
Values:
Object - long the base object id of a reference
Weapon Type- short the type of weapon
Weight - float the weight of one object of this type
Gold Value - long the gold value of one object of this type. this value may not match the value displayed in the interface as that could include additional value from an enchantment.
Is Quest Item flag - bool whether the type is a quest item. quest items cannot be activated and cannot be dropped.
Functions:
GetBaseObject - returns the base object of the reference
(objectID:ref) reference.GetBaseObject
GetObjectType - returns a type code for each type of object
(type:long) reference.GetObjectType objectID:ref
IsWeapon - returns whether the object is a weapon
(isWeapon:bool) reference.IsWeapon objectID:ref
IsAmmo - returns whether the object is ammunition
(isAmmo:bool) reference.IsAmmo objectID:ref
IsArmor - returns whether the object is armor
(isArmor:bool) reference.IsArmor objectID:ref
IsBook - returns whether the object is a book
(isBook:bool) reference.IsBook objectID:ref
IsClothing - returns whether the object is clothing
(isClothing:bool) reference.IsClothing objectID:ref
IsIngredient - returns whether the object is an ingredient
(isIngredient:bool) reference.IsIngredient objectID:ref
IsKey - returns whether the object is a key
(isKey:bool) reference.IsKey objectID:ref
IsAlchemyItem - returns whether the object is an alchemy item
(isAlchemyItem:bool) reference.IsAlchemyItem objectID:ref
IsApparatus - returns whether the object is an alchemy apparatus
(isApparatus:bool) reference.IsApparatus objectID:ref
IsSoulGem - returns whether the object is a soul gem
(isSoulGem:bool) reference.IsSoulGem objectID:ref
IsSigilStone - returns whether the object is a sigil stone
(isSigilStone:bool) reference.IsSigilStone objectID:ref
IsLight - returns whether the object is a light source
(isLight:bool) reference.IsLight objectID:ref
GetWeight - returns the weight of the type
(weight:float) reference.GetWeight objectID:ref
SetWeight - sets the weight of the type
(nothing) reference.SetWeight nuWeight:float objectID:ref
ModWeight - modifies the weight of the type up or down
(nothing) reference.ModWeight modifyBy:float objectID:ref
GetGoldValue - returns the base gold value of the type
(goldValue:long) reference.GetGoldValue objectID:ref
GetFullGoldValue* - returns the full gold value of an item, including the value added by enchantments.
(goldValue:long) reference.GetFullGoldValue objectID:ref
SetGoldValue - sets the base gold value of the type
(nothing) reference.SetGoldValue nuGoldValue:long objectID:ref
ModGoldValue - modifies the base gold value of the type up or down
(nothing) reference.ModGoldValue modifyBy:float objectID:ref
IsQuestItem - returns whether the type is a quest item
(isQuestItem:bool) reference.IsQuestItem objectID:ref
SetQuestItem - sets whether the type is a quest item
(nothing) reference.SetQuestItem isQuestItem:bool objectID:ref
SetCurrentSoulLevel - sets the current soul level of the calling soulgem reference.
(nothing) reference.SetCurrentSoulLevel newLevel:short
Lockable
Types with this quality can be locked.
Functions:
GetOpenKey - returns the key used to unlock the calling reference.
(key:ref) reference.GetOpenKey
SetOpenKey - sets the key used to unlock the reference to the specified key.
(nothing) reference.SetOpenKey key:ref
Magic
Types with this quality have a group of magical effects
Values:
Magic Item Type - short the type of magic item (Spell, Enchantment, AlchemyItem, Ingredient)
Effect Count - long the number of magic effect items in the type
IsAutocalc - bool whether the cost is autocalculated or set to a specific amount
EffectItem Code - long the magic effect code for the effect item
EffectItem Magnitude - long the magnitude of the magic effect item
EffectItem Area - long the area affected by the magic effect item
EffectItem Duration - long the time in seconds the magic effect lasts
EffectItem Range - short the range of the effect (Self, Touch, Target)
EffectItem Actor Value - long a code for the attribute or skill affected by the effect item
EffectItemScripted - bool whether the effect item is a ScriptEffect (SEFF)
EffectItemScript - refID the refID of the script used by the scripted effect item
EffectItemScriptVisualEffect - long the magic effect code used for the visual effects of the scripted effect item
EffectItemScriptSchool - short the magic school assigned to the scripted effect
EffectItemScriptIsHostile - bool whether the scripted effect is hostile
Functions:
GetMagicItemType - returns the magic item type
(magicItemType:short) GetMagicItemType magicItem:ref
(magicItemType:short) GetMIType magicItem:ref
GetMagicItemEffectCount - returns the number of magic effect items
(count:long) GetMagicItemEffectCount magicItem:ref
(count:long) GetMIEffectCount magicItem:ref
MagicItemHasEffect - returns whether the magic item has an effect item with the specifed effect. Uses the 4 letter codes for the magic effects listed in the CS. Uses an optional actor value name for use with effects like fortify skill and fortify attribute.
(hasEffect:bool) MagicItemHasEffect effect:chars actorValue:chars
(hasEffect:bool) MagicHasEffect effect:chars actorValue:chars
MagicItemHasEffectCode - returns whether the magic item has an effect item with the specified effect code. Uses a long value returned from GetNthEffectItemCode or GetMagicEffectCode. Uses an optional actor value code for use with effects like fortify skill and fortify attribute.
(hasEffect:bool) MagicItemHasEffectCode effectCode:long actorValueCode:short
(hasEffect:bool) MagicHasEffectC effectCode:long actorValueCode:short
MagicItemHasEffectCount - returns the count of the specified effects on the magic item. Has an optional actorValue name for use with effects like fortify skill and fortify attribute.
(effectCount:short) MagicItemHasEffectCount effect:chars actorValueName:chars
MagicItemHasEffectCountCode - returns the count of effects with the specified effect code on the magic item. Uses a long value returned from GetNthEffectItemCode or GetMagicEffectCode. Has an optional actorValueCode for use with effects like fortify skill and fortify attribute.
(effectCount:short) MagicItemHasEffectCountCode effectCode:long actorValueCode:short
(effectCount:short) MagicItemHasEffectCountC effectCode:long actorValueCode:short
GetNthEffectItemCode - returns the magic effect code of the specified effect item
(code:long) GetNthEffectItemCode magicItem:ref whichEffect:short
(code:long) GetNthEICode magicItem:ref whichEffect:short
GetNthEffectItemMagnitude - returns the magnitude of the specified effect item
(magnitude:long) GetNthEffectItemMagnitude magicItem:ref whichEffect:short
(magnitude:long) GetNthEIMagnitude magicItem:ref whichEffect:short
SetNthEffectItemMagnitude - sets the magnitude of the specified effect item
(nothing) SetNthEffectItemMagnitude nuMagnitude:long magicItem:ref whichEffect:short
(nothing) SetNthEIMagnitude nuMagnitude:long magicItem:ref whichEffect:short
ModNthEffectItemMagnitude - modifies the magnitude of the specified effect item up or down
(nothing) ModNthEffectItemMagnitude modifyBy:float magicItem:ref whichEffect:short
(nothing) ModNthEIMagnitude modifyBy:float magicItem:ref whichEffect:short
GetNthEffectItemArea - returns the area of the specified effect item
(area:long) GetNthEffectItemArea magicItem:ref whichEffect:short
(area:long) GetNthEIArea magicItem:ref whichEffect:short
SetNthEffectItemArea - sets the area of the specified effect item
(nothing) SetNthEffectItemArea nuArea:long magicItem:ref whichEffect:short
(nothing) SetNthEIArea nuArea:long magicItem:ref whichEffect:short
ModNthEffectItemArea - modifies the effect area of the specified effect item up or down
(nothing) ModNthEffectItemArea modifyBy:float magicItem:ref whichEffect:short
(nothing) ModNthEIArea modifyBy:float magicItem:ref whichEffect:short
GetNthEffectItemDuration - returns the duration of the specified effect item
(duration:long) GetNthEffectItemDuration magicItem:ref whichEffect:short
(duration:long) GetNthEIDuration magicItem:ref whichEffect:short
SetNthEffectItemDuration - sets the duration of the specified effect item
(nothing) SetNthEffectItemDuration nuDuration:long magicItem:ref whichEffect:short
(nothing) SetNthEIDuration nuDuration:long magicItem:ref whichEffect:short
ModNthEffectItemDuration - modifies the duration of the specified effect item up or down
(nothing) ModNthEffectItemDuration modifyBy:float magicItem:ref whichEffect:short
(nothing) ModNthEIDuration modifyBy:float magicItem:ref whichEffect:short
GetNthEffectItemRange - gets the range of the specified effect item
(range:short) GetNthEffectItemrange magicItem:ref whichEffect:short
(range:short) GetNthEIRange magicItem:ref whichEffect:short
SetNthEffectItemRange - sets the range of the specified effect item
(nothing) SetNthEffectItemRange nuRange:short magicItem:ref whichEffect:short
(nothing) SetNthEIRange nuRange:short magicItem:ref whichEffect:short
GetNthEffectItemActorValue - gets the actor value of the specified effect item
(actorValueCode:long) GetNthEffectItemActorValue magicItem:ref whichEffect:short
(actorValueCode:long) GetNthEIAV magicItem:ref whichEffect:short
SetNthEffectItemActorValue - sets the actor values of the specified effect item
(nothing) SetNthEffectItemActorValue nuActorValue:long magicItem:ref whichEffect:short
(nothing) SetNthEIAV nuActorValue:long magicItem:ref whichEffect:short
RemoveNthEffectItem - removes the specified effect item
(nothing) RemoveNthEffectItem magicItem:ref whichEffect:short
(nothing) RemoveNthEffect magicItem:ref whichEffect:short
RemoveAllEffectItems - removes all effect items from the magic item
(nothing) RemoveAllEffectItems magicItem:ref
CopyNthEffectItem - copies the specified effect item from one magic item to another
(index:short) CopyNthEffectItem fromObjectID:ref toObjectID:ref whichEffect:short
CopyAllEffectItems - copies all effect items from one magic item to another
(nothing) CopyAllEffectItems fromObjectID:ref toObjectId:ref
AddEffectItem - adds a basic, empty EffectItem of the specified MagicEffect to the magic item
(index:short) AddEffectItem nuEffect:chars magicItem:ref
(index:short) AddEffectItemC nuEffectCode:long magicItem:ref
AddFullEffectItem - adds a fully defined EffectItem to the magic item with the specified MagicEffect, magnitude, area, duration and range
(index:short) AddFullEffectItem nuEffect:chars magnitude:long area:long duration:long range:short magicItem:ref
(index:short) AddFullEffectItemC nuEffectCode:long magnitude:long area:long duration:long range:short magicItem:ref
IsMagicItemAutoCalc - returns 1 if the MagicItem determines magicka cost by autocalculation. Now works on all Magic Items (spells, alchemy, ingredients, enchantments)
(isAutocalc:bool) IsMagicItemAutoCalc magicItem:ref
SetMagicItemAutoCalc - sets whether the Magic Item determines cost by autocalculation. Currently works for Spells, AlchemyItems, Ingredients and Enchantments.
(nothing) SetMagicItemAutoCalc isAutocalc:bool objectID:ref
IsNthEffectItemScripted - returns whether the specified effect item is scripted
(isScriptEffect:bool) IsNthEffectItemScripted magicItem:ref whichEffect:short
GetNthEffectItemScript - returns the refID of the script associated with the specified scripted effect
(script:ref) GetNthEffectItemScript objectID:ref whichEffect:short
(script:ref) GetNthEIScript objectID:ref whichEffect:short
SetNthEffectItemScript - sets the script for the specified scripted effect item. Note that the CS doesn't have a variable type for a script, so you must assign the script editor id to a ref variable to use this function.
(nothing) SetNthEffectItemScript scriptObjectID:ref magicItem:ref whichEffect:short
(nothing) SetNthEIScript scriptObjectID:ref magicItem:ref whichEffect:short
GetNthEffectItemScriptVisualEffect - returns the magic effect code for the scripted effect item's visual effect
(magicEffectCode:long) GetNthEffectItemScriptVisualEffect magicItem:ref whichEffect:short
(magicEffectCode:long) GetNthEISVisualEffect magicItem:ref whichEffect:short
SetNthEffectItemScriptVisualEffect - sets the scrited effect item's visual effect
(nothing) SetNthEffectItemScriptVisualEffect magicEffect:chars magicItem:ref whichEffect:short
(nothing) SetNthEISVisualEffect magicEffect:chars magicItem:ref whichEffect:short
(nothing) SetNthEffectItemScriptVisualEffectC magicEffectCode:long magicItem:ref whichEffect:short
(nothing) SetNthEISVisualEffectC magicEffectCode:long magicItem:ref whichEffect:short
GetNthEffectItemScriptSchool - returns the school of the scripted effect item
(magicSchool:short) GetNthEffectItemScriptSchool magicItem:ref whichEffect:short
(magicSchool:short) GetNthEISSchool magicItem:ref whichEffect:short
SetNthEffectItemScriptSchool - sets the school of the scripted effect item
(nothing) SetNthEffectItemScriptSchool magicItem:ref whichEffect:short
(nothing) SetNthEISSchool magicItem:ref whichEffect:short
IsNthEffectItemScriptHostile - returns whether the scripted effect is hostile
(isHostile:bool) IsNthEffectItemScriptHostile magicItem:ref whichEffect:short
(isHostile:bool) IsNthEISHostile magicItem:ref whichEffect:short
SetNthEffectItemScriptHostile - sets whether the scripted effect is hostile
(nothing) SetNthEffectItemScriptHostile magicItem:ref whichEffect:short
(nothing) SetNthEISHostile magicItem:ref whichEffect:short
SetNthEffectItemScriptName - sets the name of the scripted effect
(nothing) SetNthEffectItemScriptName name:string magicItem:ref whichEffect:short
(nothing) SetNthEISName name:string magicItem:ref whichEffect:short
ModNthEffectItemScriptName - modifies the name of the scripted effect. The toReplaceAndReplaceWith string has the following format: "toReplace|replaceWith". We will do a case insensitve search for the toReplace portion and if found will replace it with the replaceWith portion. The | character is used to separate the portions of the string. If there is nothing before the | character, the replaceWith string is prepended to the name.
(nothing) ModNthEffectItemScriptName toReplaceAndReplaceWith:string magicItem:ref whichEffect:short
(nothing) ModNthEISName toReplaceAndReplaceWith:string magicItem:ref whichEffect:short
MagicItemHasEffectItemScript - returns 1 if the magic effect has a scripted item with the specified script.
(hasScript:bool) MagicItemHasEffectItemScript script:ref magicItem:ref
Magic Target
Types with this quality can be the target of magic. They can have Active Effects working on them.
Values:
Count - long the number of active effects on the target
ActiveEffect Code - long the effect code of the given ActiveEffect
ActiveEffect Magnitude -long the magnitude of the given ActiveEffect
ActiveEffect Duration - float the duration of the total ActiveEffect
ActiveEffect TimeElapsed - float the time in seconds since the ActiveEffect was applied to the target
ActiveEffect MagicItem - ref the magic item which applied the ActiveEffect
ActiveEffect Caster - ref the caster of the ActiveEffect
ActiveEffect Data - ref the extra data (summoned creature, armor, etc.) of the ActiveEffect
ActiveEffect MagicItemIndex - long the index of the EffectItem on the magic item which applied the ActiveEffect
Functions:
GetActiveEffectCount - returns the number of ActiveEffects on the target
(count:long) reference.GetActiveEffectCount
GetNthActiveEffectCode - returns the effect of the Nth ActiveEffect on the target
(effectCode:long) reference.GetNthActiveEffectCode whichEffect:long
(effectCode:long) reference.GetNthAECode whichEffect:long
GetNthActiveEffectMagnitude - returns the magnitude of the Nth ActiveEffect on the target
(magnitude:long) reference.GetNthActiveEffectMagnitude whichEffect:long
(magnitude:long) reference.GetNthAEMagnitude whichEffect:long
GetNthActiveEffectDuration - returns the total duration of the Nth ActiveEffect on the target
(duration:float) reference.GetNthActiveEffectDuration whichEffect:long
(duration:float) reference.GetNthAEDuration whichEffect:long
GetNthActiveEffectTimeElapsed - returns the time that the Nth ActiveEffect has been applied to the target
(timeElapsed:float) reference.GetNthActiveEffectTimeElapsed whichEffect:long
(timeElapsed:float) reference.GetNthAETime whichEffect:long
GetNthActiveEffectMagicItem - returns the magic item which applied theNth ActiveEffect to the target
(magicItem:ref) reference.GetNthActiveEffectMagicItem whichEffect:long
(magicItem:ref) reference.GetNthAEMagicItem whichEffect:long
GetNthActiveEffectCaster - return the caster of the Nth ActiveEffect on the target
(caster:ref) reference.GetNthActiveEffectCaster whichEffect:long
(caster:ref) reference.GetNthAECaster whichEffect:long
GetNthActiveEffectData - return the data of the NthActiveEffect on the target
(data:ref) reference.GetNthActiveEffectData whichEffect:long
(data:ref) reference.GetNthAEData whichEffect:long
GetNthActiveEffectMagicItemIndex - returns the index on its magic item of the Nth ActiveEffect on the target
(index:long) reference.GetNthActiveEffectMagicItemIndex whichEffect:long
(index:long) reference.GetNthActiveEffectMagicItemIndex whichEffect:long
SetNthActiveEffectMagnitude - sets the magnitude of the corresponding ActiveEffect
(nothing) SetNthActiveEffectMagnitude magnitude:float whichEffect:long
(nothing) SetNthAEMagnitude magnitude:float whichEffect:long
ModNthActiveEffectMagnitude - modifies the magnitude of the corresponding ActiveEffect
(nothing) ModNthActiveEffectMagnitude magnitude:float whichEffect:long
(nothing) ModNthAEMagnitude magnitude:float whichEffect:long
GetTotalActiveEffectMagnitude - returns the total magnitude of all ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalActiveEffectMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAEMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalActiveEffectMagnitudeC effectCode:long actorValueCode:short
(totalMag:long) reference.GetTotalAEMagnitudeC effectCode:long actorValueCode:short
GetTotalAENonAbilityMagnitude - returns the total magnitude of all non-ability ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAENonAbilityMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAENonAbilityMagnitudeC effectCode:long actorValueCode:short
GetTotalAEAbilityMagnitude - returns the total magnitude of all ability ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAEAbilityMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAEAbilityMagnitudeC effectCode:long actorValueCode:short
GetTotalAESpellMagnitude - returns the total magniude of all spell ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAESpellMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAESpellMagnitudeC effectCode:long actorValueCode:short
GetTotalAEDiseaseMagnitude - returns the total magnitude of all disease ActiveEffects with a given code on the target.
(totalMag:long) reference.GetTotalAEDiseaseMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAEDiseaseMagnitudeC effectCode:long actorValueCode:short
GetTotalAELesserPowerMagnitude - returns the total magnitude of all lesser power ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAELesserPowerMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAELesserPowerMagnitudeC effectCode:long actorValueCode:short
GetTotalAEPowerMagnitude - retuns the total magnidue of all greater power ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAEPowerMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAEPowerMagnitudeC effectCode:long actorValueCode:short
GetTotalAEAllSpellsMagnitude - returns the total magnitude of all spells (Spell, Ability, Disease, Lesser Power, Power) with a given code on the target.
(totalMag:long) reference.GetTotalAEAllSpellsMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAEAllSpellsMagnitudeC effectCode:long actorValueCode:short
GetTotalAEEnchantmentMagnitude - retuns the total magnitude of all enchantments with a given code on the target.
(totalMag:long) reference.GetTotalAEEnchantmentMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAEEnchantmentMagnitudeC effectCode:long actorValueCode:short
GetTotalAEAlchemyMagnitude - returns the total magnitude of all potions with a given code on the target.
(totalMag:long) reference.GetTotalAEAlchemyMagnitude effectCode:chars actorValue:chars
(totalMag:long) reference.GetTotalAEAlchemyMagnitudeC effectCode:long actorValueCode:short
GetScriptActiveEffectIndex - returns the index of the corresponding ActiveEffect for the running script effect. Note this cannot detect the difference between two active effects running with the same script.
(index:long) GetScriptActiveEffectIndex
Named
Types with this quality have a setable name
Values:
Name - string the display name of the type
Functions:
SetName - sets the display name of the type. SetName is a special function. It is defined to work on Inventory items, but it can be used with any form. To use with a non-Inventory item you must first assign the objectID to a ref. For most forms the name is part of the base form and changing the name will change it for all instances of the type.
(nothing) reference.SetName name:string objectID:ref
CompareName - returns 1 if stringToFindInName is found in the name if the object
(nameContainsString) reference.CompareName toFindInName:string objectID:ref
(nameContainsString) reference.NameIncludes toFindInName:string objectID:ref
CompareNames - compares the names of two objects and returns -1 if the first occurs alphabetically before the second, 1 if the first occurs after the second, or 0 for equality. Comparison is case-insensitive.
(comparison:short) reference.CompareNames compareTo:ref compare:ref
CopyName - copies the name from the source to the target. It is defined to work on Inventory items, but it can be used with any form. To use with a non-Inventory item you must first assign the objectID to a ref. For most forms the name is part of the base form and changing the name will change it for all instances of the type.
(nothing) CopyName srcObjectID:ref targetObjectID:ref
ModName - modifies the name of the calling reference or passed objectID. The toReplaceAndReplaceWith string has the following format: "toReplace|replaceWith". We will do a case insensitve search for the toReplace portion and if found will replace it with the replaceWith portion. The | character is used to separate the portions of the string. If there is nothing before the | character, the replaceWith string is prepended to the name.
(nothing) reference.ModName toReplaceAndReplaceWith:string toObject:ref
AppendToName - appends the passed string to the end of the name of the calling reference or passed objectID.
(nothing) reference.AppendToName toAppend:string toObject:ref
HasName - returns 1 if the object has a name consisting of at least one character.
(hasName:bool) reference.HasName objectID:ref
SetNameEx* - sets the name of the base object. The new name is a string constructed from a format string using the same format specifiers used by OBSE's output functions. Unlike SetName, SetNameEx cannot be called on a reference.
(nothing) reference.SetNameEx formatString:string var1 var2 ... var20 object:ref
Ownable
Types with this quality can be owned by an NPC or faction.
Values:
Owner - NPC or faction the owner of the reference.
Required Rank - short the rank a member of the owning faction must hold in order to legally activate the reference.
Global Variable - global a global variable which, when set to a value other than zero, allows legal activation of the reference.
Functions:
GetOwner - returns the NPC or faction which owns the calling reference.
(owner:ref) reference.GetOwner
GetParentCellOwner - returns the NPC or faction which owns the calling reference's parent cell..
(owner:ref) reference.GetParentCellOwner
GetOwningFactionRequiredRank - returns the rank in the owning faction required to legally activate the calling reference.
(rank:short) reference.GetOwningFactionRequiredRank
(rank:short) reference.GetOwningFactionRank
GetParentCellOwningFactionRequiredRank - returns the rank required for ownership of the calling reference's parent cell.
(rank:short) reference.GetParentCellOwningFactionRequiredRank
(rank:short) reference.GetCellFactionRank
IsOffLimits - returns 1 if it is illegal for the specified actor to activate the calling reference, based on the calling reference's ownership.
(isOffLimits:bool) reference.IsOffLimits actor:ref
Race
Values:
Base Attribute - each sex of a race has base values for all eight attributes
Bonus Skill - each race has seven attributes which get a bonus
Name - each race has a name
Functions:
GetRaceAttribute - returns the specified base attribute value. If passes a raceFormID you must also pass whether you want the female value or not. If called directly on an reference the function will determine the race and sex of the reference and the raceFormID and isFemale are not needed. The C version of the function takes a number rather than the actorvalue name (0 instead of Strength)
(value:short) reference.GetRaceAttribute attributeActorValue:chars raceFormID:ref isFemale:bool
(value:short) reference.GetRaceAttributeC attributeActorValueCode:short raceFormID:ref isFemale:bool
GetRaceSkillBonus - returns the bonus for the specified skill for the race. If called on a reference the function will determine the race of the reference. Returns 0 if there is no bonus for that skill. The C version specifies the specific skill by number rather than by name.
(value:short) reference.GetRaceSkillBonus skillActorValue:chars raceFormID:ref
(value:short) reference.GetRaceSkillBonusC skillActorValueCode:short raceFormID:ref
IsRaceBonusSkill - returns whether the specified skill is a bonus for the race. If called on a reference the function will determine the race of the reference. The C version specifies the skill by number rather than by name.
(isBonusSkill:bool) reference.IsRaceBonusSkill skillActorValue:chars raceFormID:ref
(isBonusSkill:bool) reference.IsRaceBonusSkillC skillActorValue:short raceFormID:ref
GetNthRaceBonusSkill - returns the actor value code for the specified index into the bonus skills. Can be followed up with a call to GetRaceSkillBonusC to determine the actual bonus to the skill. If called on a reference the function will determine the race of the reference.
(skill:short) reference.GetNthRaceBonusSkill whichSkill:short raceFormID:ref
GetRaceSpellCount - returns the number of spells provided by the race. If no race is specified, the race of the calling NPC is used.
(numSpells:short) reference.GetRaceSpellCount race:ref
GetNthRaceSpell - returns the nth spell provided by the race, using the race of the calling NPC if none is specified.
(spell:ref) reference.GetNthRaceSpell whichSpell:short race:ref
Scriptable
Types with this quality can have a script associated with them.
Functions:
IsScripted - returns whether the scriptable object has a script attached to it or not
(isScripted:bool) reference.IsScripted targetObjectID:ref
GetScript - returns the refID of the script attached to the object
(script:refID) reference.GetScript targetObjectID:ref
RemoveScript - removes and returns the script attached to the object. The object is no longer scripted
(script:refID) reference.RemoveScript targetObjectID:ref
SetScript - sets the specified script onto the calling object and returns any previous script. Note that Oblivion doesn't have a script variable type so you must assign the script to a ref variable for this to work. This function is currently considered a Beta function which will get official support after it gets some more testing. For now, please do not use in a shipping mod until further testing is done.
(script:refID) reference.SetScript scriptID:ref targetObjectID:ref
IsFormValid* - returns 1 if the specified ref variable contains a valid object or reference.
(valid:bool) IsFormValid refVar:var
IsReference* - returns 1 if the specified ref variable contains a reference, as opposed to a base object.
(isReference:bool) IsReference refVar:var
HasVariable* - returns 1 if the calling reference or specified quest has a variable with the specified name.
(hasVariable:bool) reference.HasVariable varName:string questID:ref
GetVariable* - returns the value of a numeric variable by name, either from the calling reference's script or the specified quest.
(variableValue:float) reference.GetVariable varName:string questID:ref
GetRefVariable* - returns the reference stored in a ref variable by name, either from the calling reference's script or the specified quest.
(reference:ref) reference.GetRefVariable varName:string questID:ref
CompareScripts* - compares the compiled code of two scripts and returns 1 if they are identical. Note that this doesn't mean the text of the scripts are identical, only that they call the same functions in the same order with the same parameters.
(scriptsAreIdentical:bool) CompareScripts script:ref script:ref
Simple
Types with this quality have a single model path and a single icon texture
Values:
Model Path - string the path to the NIF model for the type
Icon Path - string the path to the DDS icon texture for the type
Functions:
SetModelPath - sets the model path for the type
(nothing) reference.SetModelPath modelPath:string objectID:ref
SetIconPath - sets the icon path for the type
(nothing) reference.SetIconPath iconPath:string objectID:ref
CompareModelPath - returns whether the passed string is part of the model path. This is a case insensitive search.
(found:bool) reference.CompareModelPath toFind:string objectID:ref
(found:bool) reference.ModelPathIncludes toFind:string objectID:ref
CompareIconPath - returns whether the passed string is part of the icon path. This is a case insensitive search.
(found:bool) reference.CompareIconPath toFind:string objectID:ref
(found:bool) reference.IconPathIncludes toFind:string objectID:ref
CopyModelPath - sets the model path of the calling reference or passed objectID to the model path of fromObject
(nothing) reference.CopyModelPath fromObject:ref toObject:ref
CopyIconPath - sets the icon path of the calling reference or passed objectID to the icon path of fromObject
(nothing) reference.CopyIconPath fromObject:ref toObject:ref
ModModelPath - modifies the model path of the calling reference or passed objectID. The toReplaceAndReplaceWith string has the following format: "toReplace|replaceWith". We will do a case insensitve search for the toReplace portion and if found will replace it with the replaceWith portion. The | character is used to separate the portions of the string. If there is nothing before the | character, the replaceWith string is prepended to the model path..
(nothing) reference.ModModelPath toReplaceAndReplaceWith:string toObject:ref
ModIconPath - modifies the icon path of the calling reference or passed objectID. The toReplaceAndReplaceWith string has the following format: "toReplace|replaceWith". We will do a case insensitve search for the toReplace portion and if found will replace it with the replaceWith portion. The | character is used to separate the portions of the string. If there is nothing before the | character, the replaceWith string is prepended to the icon path.
(nothing) reference.ModIconPath toReplaceAndReplaceWith:string toObject:ref
IsModelPathValid* - returns 1 if the model path for the object exists in the user's Data folder or within one of the BSA archives.
(isPathValid:bool) reference.IsModelPathValid object:ref
IsIconPathValid* - returns 1 if the icon path for the object exists in the user's Data folder or within one of the BSA archives.
(isPathValid:bool) reference.IsIconPathValid object:ref
Wearable
Types with this quality can be worn by actors and can have different models and textures for males and females
Values
Slot - short the equipment slot or slots taken by the object
Male Model Path - string the path to the NIF file for the male or only model while worn
Female Model Path - string the path to the NIF file for the female model while worn
Male Ground Path - string the path to the NIF for the male or only model when dropped
Female Ground Path - string the path to the NIF for the female model when dropped
Male Icon Path - string the path to the DDS icon file for the male or only model
Female Icon Path - string the path to the DDS icon file for the female model
Playable - bool whether the item is useable by the player or not
Functions:
GetEquipmentSlot - returns the equipment slot or slots taken by the object
(slot:short) reference.GetEquipentSlot objectID:ref
SetEquipmentSlot - sets the equipment slot or slots taken by the object
(nothing) reference.SetEquipmentSlot slot:short objectID:ref
SetMaleBipedPath - sets the male NIF model path when worn
(nothing) reference.SetMaleModelPath modelPath:string objectID:ref
SetFemaleBipedPath - sets the female NIF model path when worn
(nothing) reference.SetFemaleModelPath modelPath:string objectID:ref
SetMaleGroundPath - sets the male model path when dropped
(nothing) reference.SetMaleGroundPath modelPath:string objectID:ref
SetFemaleGroundPath - sets the female model path when dropped
(nothing) reference.SetFemaleGroundPath modelPath:string objectID:ref
SetMaleIconPath - sets the male icon texture
(nothing) reference.SetMaleIconPath iconPath:string objectID:ref
SetFemaleIconPath - sets the female icon texture
(nothing) reference.SetFemaleIconPath iconPath:string objectID:ref
ModXXXPath - modifies the specified path of the calling reference or passed obectID. The toReplaceAndReplaceWith string has the following format: "toReplace|replaceWith". We will do a case insensitve search for the toReplace portion and if found will replace it with the replaceWith portion. The | character is used to separate the portions of the string. If there is nothing before the | character, the replaceWith string is prepended to the specified path.
(nothing) reference.ModMaleBipedPath toReplaceAndReplaceWith:string toObject:ref
(nothing) reference.ModFemaleBipedPath toReplaceAndReplaceWith:string toObject:ref
(nothing) reference.ModMaleGroundPath toReplaceAndReplaceWith:string toObject:ref
(nothing) reference.ModFemaleGroundPath toReplaceAndReplaceWith:string toObject:ref
(nothing) reference.ModMaleIconPath toReplaceAndReplaceWith:string toObject:ref
(nothing) reference.ModFemaleIconPath toReplaceAndReplaceWith:string toObject:ref
CompareXXXPath - returns whether the specified path of the calling reference or objectID contains the toFind string. This does a case insensitive search.
(found:bool) reference.CompareMaleBipedPath toFind:string objectID:ref
(found:bool) reference.CompareFemaleBipedPath toFind:string objectID:ref
(found:bool) reference.CompareMaleGroundPath toFind:string objectID:ref
(found:bool) reference.CompareFemaleGroundPath toFind:string objectID:ref
(found:bool) reference.CompareMaleIconPath toFind:string objectID:ref
(found:bool) reference.CompareFemaleIconPath toFind:string objectID:ref
(found:bool) reference.MaleBipedPathIncludes toFind:string objectID:ref
(found:bool) reference.FemaleBipedPath Includes toFind:string objectID:ref
(found:bool) reference.MaleGroundPath Includes toFind:string objectID:ref
(found:bool) reference.FemaleGroundPath Includes toFind:string objectID:ref
(found:bool) reference.MaleIconPath Includes toFind:string objectID:ref
(found:bool) reference.FemaleIconPath Includes toFind:string objectID:ref
CopyXXXPath - sets the specified path of the calling reference or objectID to the same path from the fromObject.
(nothing) reference.CopyMaleBipedPath fromObject:ref toObject:ref
(nothing) reference.CopyFemaleBipedPath fromObject:ref toObject:ref
(nothing) reference.CopyMaleGroundPath fromObject:ref toObject:ref
(nothing) reference.CopyFemaleGroundPath fromObject:ref toObject:ref
(nothing) reference.CopyMaleIconPath fromObject:ref toObject:ref
(nothing) reference.CopyFemaleIconPath fromObject:ref toObject:ref
IsPlayable - returns whether the specified object is playable or not. Returns true only if the object is of a type which can be flaggd as playable in the editor.
(isPlayable:bool) reference.IsPlayable objectID:ref
SetIsPlayable - specifies whether the object can be used by the player
(nothing) reference.SetIsPlayable isPlayable:bool objectID:ref
IsPlayable2* - returns whether the specified object is playable or not. If the object is of a type which cannot be flagged as playable in the editor, this function returns true.
(isPlayable:bool) reference.IsPlayable2 objectID:ref
IsBipedIconPathValid* - returns 1 if the icon path for the object exists in the user's Data folder or within one of the BSA archives.
(isPathValid:bool) reference.IsBipedIconPathValid bipedPathCode:short object:ref
IsBipedModelPathValid* - returns 1 if the model path for the object exists in the user's Data folder or within one of the BSA archives.
(isPathValid:bool) reference.IsBipedModelPathValid bipedPathCode:short object:ref
Oblivion Types
Oblivion Types are the various forms available to fill out in the CS. They correspond to real objects or concepts in Oblivion. Types are a collection of values and functions which can be applied to them. Frequently they have Qualities which encapsulate common values and functions across the various types. If a type has a quality listed, that type has all of the values and functions of that quality in addition to any listed directly with the type itself.

- Actor Reference*
- Alchemy Item
- Ammo
- Apparatus
- Armor
- Book
- Cell
- Climate
- Clothing
- Creature
- Door
- Enchantment
- Faction
- Flora
- Ingredient
- Leveled List
- Light
- Magic Effect Setting
- Magic Target
- NPC
- Player*
- Projectile*
- Reference
- Skill
- Soul Gem
- Spell
- Weapon
- Weather

Actor Reference
A reference to a creature or NPC in the gameworld. Actor references have AI, animations, and havok states.
Qualities: Actor, Inventory, Magic Target, NPC or Creature
Functions:
GetNumDetectedActors - returns the number of other actors of which the calling actor may detect. This includes actors detected at "Lost" or "Unseen" level.
(numDetectedActors:short) reference.GetNumDetectedActors
GetNthDetectedActor - returns the Nth actor in the calling actor's detection list
(actor:ref) reference.GetNthDetectedActor
SetDetectionState - sets the detection state of the calling actor toward the specified actor reference. Note that Oblivion recalculates this value frequently for actors in high process; the function's main purpose is to reset the detection state of unconscious actors.
(nothing) reference.SetDetectionState actor:ref detection state:short
IsBlocking - returns 1 if the calling actor is blocking
(isBlocking:bool) reference.IsBlocking
IsAttacking - returns 1 if the calling actor is attacking
(isAttacking:bool) reference.IsAttacking
IsRecoiling - returns 1 if the calling actor is recoiling
(isRecoiling:bool) reference.IsRecoiling
IsDodging - returns 1 if the calling actor is dodging
(isDodging:bool) reference.IsDodging
IsStaggered - returns 1 if the calling actor is staggered
(isStaggered:bool) reference.IsStaggered
IsMovingForward - returns 1 if the calling actor is attempting to move forward, even if his path is blocked.
(isMovingForward:bool) reference.IsMovingForward
IsMovingLeft - returns 1 if the calling actor is attempting to strafe left
(isMovingLeft:bool) reference.IsMovingLeft
IsMovingRight - returns 1 if the calling actor is attempting to strafe right
(isMovingRight:bool) reference.IsMovingRight
IsMovingBackward - returns 1 if the calling actor is attempting to move backwards
(isMovingBackwards:bool) reference.IsMovingBackwards
IsTurningLeft - returns 1 if the calling actor is turning left
(isTurningLeft:bool) reference.IsTurningLeft
IsTurningRight - returns 1 if the calling actor is turning right
(isTurningRight:bool) reference.IsTurningRight
IsInAir - returns 1 if the calling actor is airborne, whether jumping or falling
(isInAir:bool) reference.IsInAir
IsJumping - returns 1 if the calling actor is beginning to jump (playing the JumpStart anim group)
(isJumping:bool) reference.IsJumping
IsOnGround - returns 1 if the calling actor is on the ground
(isOnGround:bool) reference.IsOnGround
IsFlying - returns 1 if the calling actor is flying. Only creatures can fly.
(isFlying:bool) reference.IsFlying
IsPowerAttacking - returns 1 if the calling actor is executing a power attack
(isPowerAttacking:bool) reference.IsPowerAttacking
IsCasting - returns 1 if the calling actor is casting a spell
(isCasting:bool) reference.IsCasting
GetFallTimer - returns the length of time for which the actor has been falling
(fallTimer:float) reference.GetFallTimer
IsAnimGroupPlaying* - returns 1 if the specified animation group is currently being played by the calling actor
(playing:bool) reference.IsAnimGroupPlaying animationGroup:chars
AnimPathIncludes* - returns 1 if one of the calling actor's currently playing animation paths includes the specified substring
(includes:bool) reference.AnimPathIncludes pathString:string
GetProcessLevel* - returns the actor's current process level, or -1 if called on a non-actor. Process level determines how frequently the game updates an actor's AI. In general, high process actors are in the same cell as the player, while more distant actors are kept at a lower process level.
(processLevel:short) reference.GetProcessLevel
Alchemy Item
Alchemy Items are potions and poisons.
Qualities: Edible, Inventory, Magic, Named, Simple
Values:
Is Poison Flag- bool whether the alchemy item is considered a poison. A poison is an alchemy item with all hostile effects. An alchemy item with even a single non-hostile effect is not a poison.
Functions:
IsPoison - returns whether the alchemy item is a poison.
(isPoison:bool) reference.IsPoison objectID:ref
Ammo
Ammo includes all ammunition like arrows.
Qualities: Attacking, Enchantable, Equippable, Inventory, Named, Simple
Apparatus
Apparatus are used for Alchemy and the creation of alchemy items.
Values:
Type - short the type of alchemy apparatus
Quality - float the level of the alchemy apparatus quality. The Apparatus Quality list shows the basic levels, but any value between 0 and 1.0 is valid.
Functions:
GetApparatusType - returns the alchemy apparatus type of the calling reference or passed objectID
(apparatusType:short) reference.GetApparatusType objectID:ref
SetApparatusType - sets the alchemy type of the calling reference or passed objectID
(nothing) reference.SetApparatusType apparatusType:short objectID:ref
GetQuality - returns the quality level of the calling reference or passed objectID
(quality:float) reference.GetQuality objectID:ref
SetQuality - sets the quality level of the calling reference or passed objectID
(nothing) reference.SetQuality quality:float objectID:ref
ModQuality - modifies the quality of the calling reference or passed objectID
(nothing) reference.ModQuality modQualityBy:float objectID:ref
Armor
Armor is any type of wearable object that provides protection against damage
Qualities: Breakable, Enchantable, Inventory, Named, Wearable
Values:
Armor Rating - long the value of protection provided by the armor
Armor Type - short the type of the armor. Armor Type Codes.
Functions:
GetArmorAR - returns the armor rating of the object
(armorRating:long) reference.GetArmorAR objectID:ref
SetArmorAR - sets the armor rating of the object
(nothing) reference.SetArmorAR nuArmorRating:long objectID:ref
ModArmorAR - modifies the armor rating of the object up or down
(nothing) reference.Mod ArmorAR modifyBy:float objectID:ref
GetArmorType - returns 0 if light armor and 1 if heavy armor
(armorType:short) reference.GetArmorType objectID:ref
SetArmorType - sets whether the armor is heavy or light
(nothing) reference.SetArmorType nuArmorType:short objectID:ref
Book
Qualities: Inventory
Values:
Can Be Taken - bool whether the book can be taken
IsScroll - bool whether the book is a scroll
SkillTaught - bool whether the book teaches a skill or not
Functions:
GetBookCantBeTaken - returns 1 if the book cannot be taken
(cantBeTaken:bool) reference.GetBookCantBeTaken objectID:ref
GetBookIsScroll - returns whether the book is a scroll or not
(isScroll:bool) reference.GetBookIsScroll objectID:ref
GetBookSkillTaught - returns the skill taught by the book. If no skill is taught, returns 255.
(skillTaught:short) reference.GetBookSkillTaught objectID:ref
SetBookCantBeTaken - sets whether the book can be taken
(nothing) reference.SetBookCantBeTaken cantBeTaken:bool objectID:ref
SetBookIsScroll - sets whether the book is a scroll
(nothing) reference.SetBookIsScroll isScroll:bool objectID:ref
SetBookSkillTaught - sets the skill the book teaches. The the skillTaught value is not one of the skills, sets the value to 255.
(nothing) reference.SetBookSkillTaught skillTaught:short objectID:ref
Cell
Qualities: Named
Value:
Music Type
Functions:
GetCellMusicType - returns the music type of the player's current cell.
(musicType:short) GetCellMusicType
Climate
Qualities:
Values: CS Wiki Page Info
Sunrise Begin, Sunrise End, Sunset Begin, Sunset End - short these values are the number of 10 minute increments since midnight the the given event occurs
MoonPhaseLength - short the number of days in the moons' phase.
HasMasser, HasSecunda - bool which moons the climate will show
Volatility - short the volatility of the climate, or how often the weather is likely to change
Functions:
GetCurrentClimateID - returns the refID of the current climate
(currentClimate:ref) GetCurrentClimateID
GetClimateSunriseBegin - returns the time sunrise begins specified as a number of 10 minute units since midnight
(sunriseBegin:short) GetSunriseBegin climate:ref
GetClimateSunriseEnd - returns the time sunrise ends specified as a number of 10 minute units since midnight
(sunriseEnd:short) GetSunriseEnd climate:ref
GetClimateSunsetBegin - returns the time sunset begins specified as a number of 10 minute units since midnight
(sunsetBegin:short) GetSunsetBegin climate:ref
GetClimateSunsetEnd - returns the time sunset ends specified as a number of 10 minute units since midnight
(sunsetEnd:short) GetSunsetEnd climate:ref
GetClimateMoonPhaseLength - returns the number of days in the phase of the moons. The total moon cycle length is 8 x PhaseLength according to the CS.
(phaseLength:short) GetClimateMoonPhaseLength climate:ref
GetClimateHasMasser - returns 1 if the current climate shows the moon Masser
(hasMasser:bool) GetClimateHasMasser climate:ref
GetClimateHasSecunda - returns 1 if the current climate shows the moon Secunda
(hasSecunda:bool) GetClimateHasSecunda climate:ref
RefreshCurrentClimate - refreshes the climate info to reflect changes made by the SetClimateXXX functions
(nothing) RefreshCurrentClimate
SetClimateSunriseBegin - sets the time sunrise begins as a number of 10 minute units since midnight
(nothing) SetClimateSunriseBegin time:short climate:ref
SetClimateSunriseEnd - sets the time sunrise ends as a number of 10 minute units since midnight
(nothing) SetClimateSunriseEnd time:short climate:ref
SetClimateSunsetBegin - sets the time sunset begins as a number of 10 minute units since midnight
(nothing) SetClimateSunsetBegin time:short climate:ref
SetClimateSunsetEnd - sets the time sunset ends as a number of 10 minute units since midnight
(nothing) SetClimateSunsetEnd time:short climate:ref
SetClimateMoonPhaseLength - sets the number of days in the phase of the moons
(nothing) SetClimateMoonPhaseLength nuPhaseLength:short climate:ref
SetClimateHasMasser - sets whether the climate shows the moon Masser
(nothing) SetClimateHasMasser hasMasser:bool climate:ref
SetClimateHasSecunda - sets whether the climate shows the moon Secunda
(nothing) SetClimateHasSecunda hasMasser:bool climate:ref
GetClimateVolatility - returns the volatility of the climate
(volatility:short) GetClimateVolatility climate:ref
SetClimateVolatility - sets the volatility of the climate
(nothing) SetClimateVolatility volatility:short climate:ref
Clothing
Clothing is any wearable object that does not provide armor protection. Includes amulets and rings.
Qualities: Enchantable, Inventory, Named, Wearable
Creature
Qualities: Actor, Attacking (only attack damage), Inventory, Magic Target
Value:
Creature Type - short the type of creature
Combat Skill - short the value for all combat skills for the creature
Magic Skill - short the value for all magic skills for the creature
Stealth Skill - short the value for all stealth skills for the creature
Reach - short the attack reach of the creature
Soul Level - short the soul level of the creature
Base Scale - float the base scale of the creature
Functions:
IsCreature - returns whether the reference or passed id is a creature
(isCreature:bool) reference.IsCreature creature:ref
GetCreatureType - returns the type of the creature (Undead, Humanoid, Daedrea etc)
(creatureType:short) reference.GetCreatureType creature:ref
GetCreatureCombatSkill - returns the combat skill for the creature
(combatSkill:short) reference.GetCreatureCombatSkill creature:ref
GetCreatureMagicSkill - returns the magic skill for the creature
(magicSkill:short) reference.GetCreatureCombatSkill creature:ref
GetCreatureStealthSkill - returns the stealth skill for the creature
(stealthSkill:short) reference.GetCreatureCombatSkill creature:ref
GetCreatureReach - returns the reach of the creature
(reach:short) reference.GetCreatureReach creature:ref
GetCreatureSoulLevel - returns the soul level of the creature
(soulLevel:short) reference.GetCreatureSoulLevel creature:ref
GetCreatureBaseScale - retuns the base scale of the creature
(scale:float) reference.GetCreatureBaseScale creature:ref
GetCreatureWalks - returns 1 if the Walks flag is set on the creature
(walks:bool) reference.GetCreatureWalks creature:ref
GetCreatureSwims - returns 1 if the Swims flag is set on the creature
(swims:bool) reference.GetCreatureSwims creature:ref
GetCreatureFlies - returns 1 if the Flies flag is set on the creature
(flies:bool) reference.GetCreatureFlies creature:ref
IsCreatureBiped - returns 1 if the Biped flag is set on the creature
(biped:bool) reference.isCreatureBiped creature:ref
CreatureHasNoMovement - returns 1 if the No Movement flag is set on the creature
(noMovement:bool) reference.CreatureHasNoMovement creature:ref
CreatureHasNoHead - returns 1 if the No Head flag is set on the creature
(noHead:bool) reference.CreatureHasNoHead creature:ref
CreatureHasNoLeftArm - returns 1 if the No Left Arm flag is set on the creature
(noLeftArm:bool) reference.CreatureHasNoLeftArm creature:ref
CreatureHasNoRightArm - returns 1 if the No Right Arm flag is set on the creature
(noRightArm:bool) reference.CreatureHasNoRightArm creature:ref
CreatureNoCombatInWater - returns 1 if the No Combat In Water flag is set on the creature
(noCombat:bool) reference.CreatureNoCombatInWater creature:ref
CreatureUsesWeaponAndShield - returns 1 if the Uses Weapon and Shield flag is set on the creature
(weaponAndShield:bool) reference.CreatureUsesWeaponAndShield creature:ref
GetRider - returns the NPC currently riding the calling horse.
(rider:ref) reference.GetRider
GetCreatureSoundBase - returns the creature from which the specified creature's sounds are derived, if any.
(creature:ref) reference.GetCreatureSoundBase creature:ref
HasModel - returns 1 if the creature's model list includes the specified .nif file. The file must appear in the creature's meshes folder. String must include the ".nif" extension and is case-insensitive.
(hasModel:bool) reference.HasModel model:string creature:ref
GetCreatureSound* - returns the creature's sound associated with the specified action
(sound:ref) reference.GetCreatureSound whichSound:actorSound creature:ref
ToggleCreatureModel* - toggles a model within a creature's model list on or off. The model path must be relative to the creature's model folder and include the ".nif" extension. When called on a reference which is currently being rendered, the reference must be disabled and then enabled before the change is visible.
(nothing) reference.ToggleCreatureModel modelPath:string enableModel:bool creature:ref
Door
Qualities: Audible
Value:
Functions:
IsLoadDoor - returns 1 if the calling reference is a load door
(isLoadDoor:bool) reference.IsLoadDoor
GetLinkedDoor - returns the door to which the calling load door is linked
(linkedDoor:ref) reference.GetLinkedDoor
GetTeleportCell - returns the cell to which the calling load door teleports
(cell:ref) reference.GetTeleportCell
Enchantment
An Enchantment is a group of magical effects that can be applied to enchantable objects.
Qualities: Named, Magic
Value:
Enchantment Type - short the type of object to which an enchantment may be applied
Charge - long the charge of the enchantment. Of unknown and dubious use - the number sometimes does not correspond to the value listed in the CS. The CS seems to list cost and charge both from the Cost value on the enchantment item.
Cost - long the cost in magicka charge consumed by each use of the enchantment
Functions:
GetEnchantmentType - returns the type of the enchantment
(enchantType:short) GetEnchantmentType objectID:ref
SetEnchantmentType - sets the type of the enchantment
(nothing) SetEnchantmentType enchantType:short objectID:ref
GetEnchantmentCharge - returns the charge of the enchantment. Of unknown and dubious use.
(charge:long) GetEnchantmentCharge objectID:ref
SetEnchantmentCharge - sets the charge of the enchantment. Of unknown and dubious use.
(nothing) SetEnchantmentCharge nuCharge:long objectID:ref
ModEnchantmentCharge - modifies the charge of the enchantment. Of unknown and dubious use.
(nothing) ModEnchantmentCharge modifyBy:float objectID:ref
GetEnchantmentCost - returns the magicka charge cost for using the enchantment
(cost:long) GetEnchantmentCost objectID:ref
SetEnchantmentCost - sets the cost for using the enchantment
(nothing) SetEnchantmentCost nuCost:long objectID:ref
ModEnchantmentCost - modifies the cost for using the enchantment up or down
(nothing) ModEnchantmentCost modifyBy:float objectID:ref
Faction
Qualities: Named
Functions:
FactionHasSpecialCombat - returns 1 if the Special Combat flag is set on the faction
(hasSpecialCombat:bool) FactionHasSpecialCombat faction:ref
IsFactionEvil - returns 1 if the faction is marked as evil
(isEvil:bool) IsFactionEvil faction:ref
IsFactionHidden - returns 1 if the faction is not shown on the player's faction sheet
(isHidden:bool) IsFactionHidden faction:ref
SetFactionEvil - changes the Evil flag on the faction. Changes are saved in the savegame
(nothing) SetFactionEvil faction:ref isEvil:short
SetFactionHidden - changes the Hidden flag on the faction. Changes are saved in the savegame
(nothing) SetFactionHidden faction:ref isHidden:short
SetFactionSpecialCombat - changes the Special Combat flag on the faction. Changes are saved in the savegame
(nothing) SetFactionSpecialCombat faction:ref hasSpecialCombat:short
GetNumRanks - returns the number of ranks in the faction.
(numRanks:short) GetNumRanks faction:ref
Flora
Plants which can be harvested for alchemical ingredients
Functions:
IsHarvested - returns 1 if the calling reference's ingredient has been harvested
(isHarvested:bool) reference.IsHarvested
SetHarvested - mark or unmark the calling reference as having been harvested. Changes are saved in the savegame.
(nothing) reference.SetHarvested isHarvested:short
Ingredient
Ingredients are items that may be used to create Alchemy Items.
Qualities: Edible, Inventory, Magic, Named, Simple
Leveled List
A list of creatures, NPCs, items, or spells. Changes made to lists using OBSE functions are not saved in the savegame, but persist for the duration of the game session after they are made. To make effectively "permanent" changes to a leveled list, include code similar to the following in a quest script:
if ( GetGameRestarted ) ; runs once each time Oblivion is started
AddToLeveledList list object level
RemoveFromLeveledList list object
endif
Functions:
AddToLeveledList - adds an object to a leveled creature, spell, or item list.. Count defaults to 1 if unspecified.
(nothing) AddToLeveledList leveledList:ref object:ref level:short count:short
RemoveFromLeveledList - removes all occurences of an object from a leveled list and returns the number of occurences removed.
(numRemoved:short) RemoveFromLeveledList leveledList:ref object:ref
CalcLeveledItem - returns one item from a leveled item list, selected randomly for a character of the specified level. Oblivion selects a level range from which to choose using the game setting iLevItemLevelDifferenceMax. The item chosen is within the range [minLevel...maxLevel], where maxLevel is the level in the list closest to but not exceeding the character's level, and minLevel = maxLevel - levelDiff. If the “Calculate for all item <= level” flag is set for the leveled list, minLevel is always zero. This function checks the "Chance None" property of the leveled list, so it may return nothing based on that chance; pass 0 for the third parameter to override this behavior. In the case of leveled lists containing nested leveled lists, the function recurses through each list until it finds a non-leveled item. Omit the levelDiff parameter to use the current value of iLevItemLevelDifferenceMax.
(randomItem:ref) CalcLeveledItem leveledList:ref level:short useChanceNone:bool levelDiff:short
CalcLevItemNR* - does the same thing as CalcLeveledItem but will not recurse through nested leveled lists. This means that unlike CalcLeveledItem, CalcLevItemNR can return another leveled list rather than a real object.
(randomItem:ref CalcLevItemNR leveledList:ref level:short useChanceNone:bool levelDiff:short
GetCalcAllLevels* - returns 1 if the "calculate for all levels <= PC level" flag is checked.
(calcAllLevels:bool) GetCalcAllLevels leveledList:ref
GetCalcEachInCount* - returns 1 if the "calculate for each item in count" flag is checked.
(calcEach:bool) GetCalcEachInCount leveledList:ref
GetChanceNone* - returns the chance from 0 to 100 that a leveled list returns no item.
(chanceNone:short) GetChanceNone leveledList:ref
GetNthLevItem* - returns the Nth element in a leveled list, as ordered in the Construction Set.
(element:ref) GetNthLevItem index:short leveledList:ref
GetNthLevItemCount* - returns the count of the Nth element of a leveled list.
(count:short) GetNthLevItemCount index:short leveledList:ref
GetNthLevItemLevel* - returns the level of the Nth element of a leveled list.
(level:short) GetNthLevItemLevel index:short leveledList:ref
GetNumLevItems* - returns the number of elements in a leveled list.
(numItems:short) GetNumLevitems leveledList:ref
GetLevItemByLevel* - returns the first element of the specified level in the leveled list.
(element:ref) GetLevItemByLevel whichLevel:short leveledList:ref
RemoveLevItemByLevel* - removes any elements of the specified level from a leveled list
(numRemoved:short) RemoveLevItemByLevel whichLevel:short leveledList:ref
ClearLeveledList * - removes all elements from a leveled list.
(nothing) ClearLeveledList leveledList:ref
Light
Objects which emit light. They may or may not have a visible model associated with them and may or may not be carriable.
Qualities: Equippable, Inventory, Named, Simple, Audible
Value:
Radius - short the radius illuminated by the light
Functions:
IsLightCarriable - returns 1 if the light may be placed in an inventory.
(isCarriable:bool) reference.IsLightCarriable light:ref
GetLightRadius - returns the radius of the light.
(radius:short) reference.GetLightRadius light:ref
SetLightRadius - sets the radius of the light. Changes are not saved in the savegame.
(nothing) reference.SetLightRadius radius:short light:ref
Magic Effect Setting
Values:
Code - chars or long the magic effect code. In the CS this is a 4 character code (like FIDG or Z001). As a return value from OBSE functions it is a long with the same numerical value.
Base Cost - float the base cost multiplier for the effect
School - short the spell skill controlling the effect
Projectile Speed - float the projectile speed of the magic effect
Enchant Factor - float the constant effect enchantment factor which helps determine the maximum magnitude of the effect when enchanting
Barter Factor - float the constant effect barter factor which helps determine the increase in value when enchanting
Is Hostile flag - bool determines if the effect is hostile. Only hostile effects may be in a poison.
Functions:
GetMagicEffectCode - returns the magic effect code of the effect.
(magicEffectCode:long) GetMagicEffectCode effect:chars
(magicEffectCode:long) GetMECode effect:chars
GetMagicEffectBaseCost - returns the base cost of the magic effect
(baseCost:float) GetMagicEffectBaseCost effect:chars
(baseCost:float) GetMEBaseCost effect:chars
(baseCost:float) GetMagicEffectBaseCostC effect:long
(baseCost:float) GetMEBaseCostC effect:long
GetMagicEffectSchool - returns the controlling school of the magic effect
(magicSchool:short) GetMagicEffectSchool effect:chars
(magicSchool:short) GetMESchool effect:chars
(magicSchool:short) GetMagicEffectSchoolC effect:long
(magicSchool:short) GetMESchoolC effect:long
GetMagicEffectProjectileSpeed - returns the projectile speed of the magic effect
(projectileSpeed:float) GetMagicEffectProjectileSpeed effect:chars
(projectileSpeed:float) GetMEProjSpeed effect:chars
(projectileSpeed:float) GetMagicEffectProjectileSpeedC effect:long
(projectileSpeed:float) GetMEProjSpeedC effect:long
GetMagicEffectEnchantFactor - returns the constant effect enchantment factor of the magic effect
(enchantFactor:float) GetMagicEffectEnchantFactor effect:chars
(enchantFactor:float) GetMEEnchant effect:chars
(enchantFactor:float) GetMagicEffectEnchantFactorC effect:long
(enchantFactor:float) GetMEEnchantC effect:long
GetMagicEffectBarterFactor - returns the constant effect barter factor of the magic effect
(enchantFactor:float) GetMagicEffectBarterFactor effect:chars
(enchantFactor:float) GetMEEBarter effect:chars
(enchantFactor:float) GetMagicEffectBarterFactorC effect:long
(enchantFactor:float) GetMEBarterC effect:long
IsMagicEffectHostile - returns whether the magic effect is hostile
(isHostile:bool) IsMagicEffectHostile effect:chars
(isHostile:bool) IsMEHostile effect:chars
(isHostile:bool) IsMagicEffectHostileC effect:long
(isHostile:bool) IsMEHostileC effect:long
IsMagicEffectForSpellmaking - returns whether the magic effect can be used for spell making
(isForSpellMaking:bool) IsMagicEffectForSpellmaking effect:chars
(isForSpellMaking:bool) IsMEForSpellmaking effect:chars
(isForSpellMaking:bool) IsMagicEffectForSpellmakingC effect:long
(isForSpellMaking:bool) IsMEForSpellmakingC effect:long
IsMagicEffectForEnchanting - returns whether the magic effect can be used when enchanting
(isForEnchanting:bool) IsMEForEnchanting effect:chars
(isForEnchanting:bool) IsMagicEffectForEnchantingC effect:long
(isForEnchanting:bool) IsMEForEnchantingC effect:long
IsMagicEffectDetrimental - returns whether the magic effect harms the receipient
(isDetrimental:bool) IsMagicEffectDetrimental effect:chars
(isDetrimental:bool) IsMEDetrimental effect:chars
(isDetrimental:bool) IsMagicEffectDetrimentalC effect:long
(isDetrimental:bool) IsMEDetrimentalC effect:long
IsMagicEffectCanRecover - returns whether the target can recover from the effect
(isCanRecover:bool) IsMagicEffectCanRecover effect:chars
(isCanRecover:bool) IsMECanRecover effect:chars
(isCanRecover:bool) IsMagicEffectCanRecoverC effect:long
(isCanRecover:bool) IsMECanRecoverC effect:long
IsMagicEffectMagnitudePercent - returns whether the magic effect's magnitude is a percentage
(isMagPercent:bool) IsMagicEffectMagnitudePercent effect:chars
(isMagPercent:bool) IsMEMagnitudePercent effect:chars
(isMagPercent:bool) IsMagicEffectMagnitudePercentC effect:long
(isMagPercent:bool) IsMEMagnitudePercentC effect:long
MagicEffectFXPersists - returns whether the magic effect's graphics effects persist
(FXPersists:bool) MagicEffectFXPersists effect:chars
(FXPersists:bool) MagicEffectFXPersistsC effect:long
IsMagicEffectOnSelfAllowed - returns whether the magic effect can be cast on self
(onSelfAllowed:bool) IsMagicEffectOnSelfAllowed effect:chars
(onSelfAllowed:bool) IsMEOnSelfAllowed effect:chars
(onSelfAllowed:bool) IsMagicEffectOnSelfAllowedC effect:long
(onSelfAllowed:bool) IsEOnSelfAllowedC effect:long
IsMagicEffectOnTouchAllowed - returns whether the magic effect can be cast on touch
(onTouchAllowed:bool) IsMagicEffectOnTouchAllowed effect:chars
(onTouchAllowed:bool) IsMagicEffectOnTouchAllowed effect:chars
(onTouchAllowed:bool) IsMagicEffectOnTouchAllowedC effect:long
(onTouchAllowed:bool) IsMagicEffectOnTouchAllowedC effect:long
IsMagicEffectOnTargetAllowed - returns whether the magic effect can be cast on target
(onTargetAllowed:bool) IsMagicEffectOnTargetAllowed effect:chars
(onTargetAllowed:bool) IsMEOnTargetAllowed effect:chars
(onTargetAllowed:bool) IsMagicEffectOnTargetAllowedC effect:long
(onTargetAllowed:bool) IsMEOnTargetAllowedC effect:long
MagicEffectHasNoDuration - returns whether the magic effect doesn't use the duration value
(hasNoDuration:bool) MagicEffectHasNoDuration effect:chars
(hasNoDuration:bool) MEHasNoDuration effect:chars
(hasNoDuration:bool) MagicEffectHasNoDurationC effect:long
(hasNoDuration:bool) MEHasNoDurationC effect:long
MagicEffectHasNoMagnitude - returns whether the magic effect doesn't use the magnitude value
(hasNoMag:bool) MagicEffectHasNoMagnitude effect:chars
(hasNoMag:bool) MEHasNoMagnitude effect:chars
(hasNoMag:bool) MagicEffectHasNoMagnitudeC effect:long
(hasNoMag:bool) MEHasNoMagnitudeC effect:long
MagicEffectHasNoArea - returns whether the magic effect doesn't use the area value
(hasNoArea:bool) MagicEffectHasNoArea effect:chars
(hasNoArea:bool) MEHasNoAreaC effect:long
(hasNoArea:bool) MagicEffectHasNoArea effect:chars
(hasNoArea:bool) MEHasNoAreaC effect:long
MagicEffectHasNoIngredient - returns whether the magic effect has no ingredient
(hasNoIngredient:bool) MagicEffectHasNoIngredient effect:chars
(hasNoIngredient:bool) MEHasNoIngredient effect:chars
(hasNoIngredient:bool) MagicEffectHasNoIngredientC effect:long
(hasNoIngredient:bool) MEHasNoIngredientC effect:long
MagicEffectHasNoHitEffect - returns whether the magic effect has a graphic effect when it hits
(hasNoHitEffect:bool) MagicEffectHasNoHitEffect effect:chars
(hasNoHitEffect:bool) MEHasNoHitEffect effect:chars
(hasNoHitEffect:bool) MagicEffectHasNoHitEffectC effect:long
(hasNoHitEffect:bool) MEHasNoHitEffectC effect:long
MagicEffectUsesWeapon - returns whether the magic effect summons a weapon
(usesWeapon:bool) MagicEffectUsesWeapon effect:chars
(usesWeapon:bool) MEUsesWeapon effect:chars
(usesWeapon:bool) MagicEffectUsesWeaponC effect:long
(usesWeapon:bool) MEUsesWeaponC effect:long
MagicEffectUsesArmor - returns whether the magic effect summons armor
(usesArmor:bool) MagicEffectUsesArmor effect:chars
(usesArmor:bool) MEUsesArmorC effect:long
(usesArmor:bool) MagicEffectUsesArmor effect:chars
(usesArmor:bool) MEUsesArmorC effect:long
MagicEffectUsesCreature - returns whether the magic effect summons a creature
(usesCreature:bool) MagicEffectUsesCreature effect:chars
(usesCreature:bool) MEUsesCreature effect:chars
(usesCreature:bool) MagicEffectUsesCreatureC effect:long
(usesCreature:bool) MEUsesCreatureC effect:long
MagicEffectUsesSkill - returns whether the magic effect affects a skill
(usesSkill:bool) MagicEffectUsesSkill effect:chars
(usesSkill:bool) MagicEffectUsesSkillC effect:long
(usesSkill:bool) MagicEffectUsesSkill effect:chars
(usesSkill:bool) MagicEffectUsesSkillC effect:long
MagicEffectUsesAttribute - returns whether the magic effect affects an attribute
(usesAttribute:bool) MagicEffectUsesAttribute effect:chars
(usesAttribute:bool) MEUsesAttribute effect:chars
(usesAttribute:bool) MagicEffectUsesAttributeC effect:long
(usesAttribute:bool) MEUsesAttributeC effect:long
MagicEffectUsesOtherActorValue - returns whether the magic effect affects an actor value that is not a skill or an attribute
(usesOtherActorVal:bool) MagicEffectUsesOtherActorValue effect:chars
(usesOtherActorVal:bool) MEUsesOtherActorValue effect:chars
(usesOtherActorVal:bool) MagicEffectUsesOtherActorValueC effect:long
(usesOtherActorVal:bool) MEUsesOtherActorValueC effect:long
GetMagicEffectOtherActorValue - returns the actor value (skill, attribute or other) affected by the magic effect
(actorValue:short) GetMagicEffectOtherActorValue effect:chars
(actorValue:short) GetMEOtherActorValue effect:chars
(actorValue:short) GetMagicEffectOtherActorValueC effect:long
(actorValue:short) GetMEOtherActorValueC effect:long
GetMagicEffectUsedObject - returns the weapon, armor or creature summoned by the magic effect
(objectID:ref) GetMagicEffectUsedObject effect:chars
(objectID:ref) GetMEUsedObject effect:chars
(objectID:ref) GetMagicEffectUsedObjectC effect:long
(objectID:ref) GetMEUsedObjectC effect:long
NPC
Qualities: Actor, Class, Container , Magic Target
Values:
Equipped Items - NPC can equip and use items
Merchant Container - NPCS may have a merchant container which holds items they sell and buy
Functions:
GetEquippedObject - returns the base object of the item equipped in the specified slot
(objectID:ref) reference.GetEquippedObject slot:short
GetEquipmentSlotMask - Returns the base object of the first equipped object to match the specified equipment slot mask. If no 'value' parameter is specified, it is assumed to be the same value as the 'mask' parameter. For example, an object taking up the UpperBody, LowerBody, and Foot slots would have a mask of 4 + 8 + 32 = 44. See the "equipment slot bit assignments" list for more info.
(objectID:ref) reference.GetEquipmentSlotMask slotMask:long value:long
GetEquippedCurrentCharge
ModEquippedCurrentCharge
SetEquippedCurrentCharge
GetEquippedCurrentHealth
ModEquippedCurrentHealth
SetEquippedCurrentHealth
GetEquippedWeaponPoison
SetEquippedWeaponPoison
RemoveEquippedWeaponPoison
GetMerchantContainer - returns the reference to the NPC's merchant container
(containerReference:ref) npc.GetMerchantContainer
SetMerchantContainer - replaces the specified mechant's container and returns the old container. If the specified NPC does not have a merchant container, or if the passed reference is not a container the function does nothing and will return 0.
(oldContainerRef:ref) npc.SetMerchantContainer nuContainer:ref
GetHorse - returns the horse currently ridden by the calling NPC. Note that this function returns a reference while the NPC is in the process of walking toward a horse with the intention of mounting it.
(horse:ref) reference.GetHorse
GetTravelHorse - returns a reference to the travel horse used by the calling reference.
(horse:ref) reference.GetTravelHorse
IsFemale - returns 1 if the NPC is female.
(isFemale:bool) reference.IsFemale npc:ref
SetTravelHorse - Sets the travel horse used by the calling reference to the horse reference specified. Changes are not saved in the savegame.
(nothing) reference.SetTravelHorse horse:ref
CopyHair - Copies the hair style, length, and color from one NPC to another. Changes alter the base actor and are not saved in the savegame unless called on the player. Changes will not be visible until the actor is reloaded; calling disable followed by enable a frame later will force the NPC to reload, updating the hair. Changes do appear to be saved for the player, but may not be visible until the game is reloaded.
(nothing) reference.CopyHair copyFrom:ref copyTo:ref
CopyEyes - Copies the eyes used by one npc onto another, with the same caveats as CopyHair.
(nothing) reference.CopyEyes copyFrom:ref copyTo:ref
SetHair - Sets the hair on the NPC to a hairstyle predefined in the CS, with the same caveats as CopyHair.
(nothing) reference.SetHair hairStyle:ref npc:ref
SetEyes - Sets the eyes on the NPC to a set of eyes predefined in the CS, with the same caveats as CopyHair.
(nothing) reference.SetEyes eyes:ref npc:ref
GetRace - returns the race of an NPC.
(race:ref) reference.GetRace npc:ref
GetHair* - returns the NPC's hairstyle
(hair:ref) reference.GetHair npc:ref
GetEyes* - returns the NPC's eyes
(eyes:ref) reference.GetEyes npc:ref
GetHairColor* - returns the RGB value of the NPC's hair color
(color:short) reference.GetHairColor npc:ref
GetTrainerLevel* - returns the level at which the NPC offers training
(level:short) reference.GetTrainerLevel npc:ref
GetTrainerSkill* - returns the skill in which the NPC offers training as an actor value code
(skill:short) reference.GetTrainerSkill npc:ref
SetTrainerLevel* - sets the level at which an NPC offers training
(nothing) reference.SetTrainerLevel newLevel:short npc:ref
SetTrainerSkill* - sets the skill in which an NPC offers training
(nothing) reference.SetTrainerSkill newSkill:actorValue npc:ref
GetServicesMask* - returns an integer code representing the services offered by an NPC. The code is obtained by ORing (adding) service flags
(servicesMask:short) reference.GetServicesMask npc:ref
OffersServicesC* - returns 1 if the NPC offers all of the services specified by the services mask
(offersServices:bool) reference.OffersServicesC serviceFlags:short npc:ref
SetOffersServicesC* - sets the services offered by the NPC to the specified services mask.
(nothing) reference.SetOffersServicesC serviceFlags:short npc:ref
OffersXXX* - these functions return 1 if the NPC offers the specified service
(offersService:bool) reference.OffersXXX npc:ref
OffersWeapons
OffersArmor
OffersClothing
OffersBooks
OffersLights
OffersIngredients
OffersApparatus
OffersMiscItems
OffersMagicItems
OffersSpells
OffersPotions
OffersTraining
OffersRecharging
OffersRepair
SetOffersXXX* - these functions toggle the specified service offered by the NPC.
(nothing) reference.SetOffersXXX offersService:bool npc:ref
SetOffersWeapons
SetOffersArmor
SetOffersClothing
SetOffersBooks
SetOffersIngredients
SetOffersSpells
SetOffersLights
SetOffersMiscItems
SetOffersMagicItems
SetOffersApparatus
SetOffersPotions
SetOffersTraining
SetOffersRecharging
SetOffersRepair
SetOffersServicesC
GetServicesMask
Player
Qualities: Actor, Class, Container , Magic Target
Functions:
GetCrosshairRef - returns a reference to whatever is currently under the player's crosshair. Generally returns zero when called during menumode. Note that this function will return non-activatable references as well; use IsActivatable to determine if the reference can be activated normally.
(crosshairRef:ref) GetCrosshairRef
GetPlayersLastRiddenHorse - returns a reference to the horse most recently ridden by the player.
(horse:ref) GetPlayersLastRiddenHorse
(horse:ref) GetPCLastHorse
GetPlayersLastActivatedLoadDoor - returns a reference to the load door most recently activated by the player.
(loadDoor:ref) GetPlayersLastActivatedLoadDoor
(loadDoor:ref) GetPCLastLoadDoor
GetGodMode - returns 1 if the player has toggled god mode on
(godMode:bool) GetGodMode
SetPCAMurderer - sets whether the PC is a murderer or not
(nothing) SetPCAMurderer isMurderer:bool
GetPlayerSpell - returns the objectID of the player's current spell
(spell:ref) GetPlayerSpell
GetPlayerSpellCount - returns the player spell count
(count:long) GetSpellCount
GetNthPlayerSpell - returns the nth player spell. whichSpell is an index that starts at 0 for the first spell in the list. Note that the CS compiler doesn't expect spells to be returned as a ref. If you are calling this function multiple times to set the same ref variable you need to assign that variable to some other type (say a weapon) in between your calls to this function. Otherwise the ref will continue to keep the value from the first call.
(spell:ref) GetNthPlayerSpell whichSpell:long
(spell:ref) GetNthSpell whichSpell:long
GetPCMajorSkillUps* - returns the number of major skill advancements toward the player's next level.
(skillUps:short) GetPCMajorSkillUps
GetPCAttributeBonus* - returns the number of skill advancements contributing to the specified attribute's bonus for the next level. Note that game setting multipliers applied to these values determine the actual bonus at level-up. Returns -1 if passed an invalid actor value, including Luck.
(bonus:short) GetPCAttributeBonus actorValue:short
GetTotalPCAttributeBonus* - returns the sum of the player's seven attribute bonuses.
(bonus:short) GetTotalPCAttributeBonus
Projectile*
A reference to an arrow or magic projectile in the gameworld. Note that these references are destroyed by the game after a certain period of time. If stored in a reference variable, make sure the reference is still valid before using it in a function. Also note that calling GetBaseObject on a magic projectile will return the same reference; in other words, magic projectile references are their own base objects.
Functions:
GetProjectileType* - returns the type of the projectile
(projectileType:short) reference.GetProjectileType
GetProjectileSource* - returns the caster of a magic projectile or the archer who fired an arrow projectile.
(source:ref) reference.GetProjectileSource
GetMagicProjectileSpell* - returns the spell attached to a magic projectile
(spell:ref) reference.GetMagicProjectileSpell
(enchantment:ref) reference.GetMPSpell
SetMagicProjectileSpell* - changes the spell attached to a magic projectile
(nothing) reference.SetMagicProjectileSpell newSpell:ref
(enchantment:ref) reference.SetMPSpell newSpell:ref
GetArrowProjectileEnchantment* - returns the enchantment on an arrow projectile
(enchantment:ref) reference.GetArrowProjectileEnchantment
(enchantment:ref) reference.GetAPEnch
GetArrowProjectileBowEnchantment* - returns the enchantment on an arrow derived from the bow from which it was fired
(enchantment:ref) reference.GetArrowProjectileBowEnchantment
(enchantment:ref) reference.GetAPBowEnch
GetArrowProjectilePoison* - returns the poison on an arrow projectile
(poison:ref) reference.GetArrowProjectilePoison
(poison:ref) reference.GetAPPoison
SetPlayerProjectile* - sets the player as the source of the projectile. Actors hit by the projectile will react as if the player had cast the spell or fired the arrow.
(nothing) reference.SetPlayerProjectile
Reference
An instance of an object in the gameworld. In general, a reference has access to the functions associated with its base type as well.
Qualities: Lockable, Ownable
Functions:
GetParentCell - returns the objectID of the parent cell of the calling reference
(parentCell:ref) reference.GetParentCell
ParentCellHasWater - returns 1 if the reference's parent cell can contain water
(hasWater:bool) reference.ParentCellHasWater
(hasWater:bool) reference.HasWater
GetParentCellWaterHeight - returns the water height of the references parent cell
(waterHeight:float) reference.GetParentCellWaterHeight
(waterHeight:float) reference.GetWaterHeight
IsActivatable - returns 1 if the calling reference can be activated under normal circumstances.
(activatable:bool) reference.IsActivatable
IsUnderWater - returns 1 if the calling reference's Z position is less than 120 units under its parent cell's water height
(isUnderWater:bool) reference.IsUnderWater
GetNumChildRefs - returns the number of reference for which the calling reference behaves as an enable-state parent
(numChildren:short) reference.GetNumChildRefs
GetNthChildRef - returns the nth child reference associated with the calling reference. Child references are stored in no particular order.
(childRef:ref) reference.GetNthChildRef whichChild:short
GetNumFollowers - returns the number of actors currently following the calling actor. Summoned creatures are excluded.
(numFollowers:short) reference.GetNumFollowers
GetNthFollower - returns a reference to the nth actor currently following the calling actor.
(follower:ref) reference.GetNthFollower whichFollower:short
IsPersistent - returns 1 if the calling reference is a persistent reference.
(isPersistent:bool) reference.IsPersistent
SetScaleEX - sets the scale of the calling reference. Unlike SetScale, the scale is not limited to a certain range. The reference should be disabled and then enabled after calling this function in order to update its scale and collision properties. The new scale is saved in the savegame.
(nothing) reference.SetScaleEX scale:float
HasBeenPickedUp - returns true if the calling reference is currently inactive due to having been picked up by an actor or otherwise transferred to an inventory.
(pickedUp:bool) reference.HasBeenPickedUp
(pickedUp:bool) reference.IsTaken
SetHasBeenPickedUp* - toggles the flag that marks a reference as having been picked up by an actor. When called on a reference which was previously picked up, causes the reference to "respawn". The reference must be disabled and then enabled for the change to become visible.
(nothing) reference.SetHasBeenPickedUp pickedUp:bool
(nothing) reference.SetTaken pickedUp:bool
GetRefCount* - returns the number of items in a stack of items in the world.
(refCount:short) reference.GetRefCount
SetRefCount* - sets the number of items in a stack of items in the world. Note that while this function will change the count of any type of reference, it may have unpredictable results when used on references like NPCs which are not logically stackable.
(nothing) reference.SetRefCount newCount:short
Skill
Qualities:
Values:
Attribute - short the controlling character attribute
Specialization - short the corresponding specialization
UseValue - float One of two values used to increment the experience toward the next skill level based on an action
Experience - float the current player experience points for the skill
Functions:
GetPlayerSkillUse - returns the current experience towards the next level of the skill
(skillExperience:float) GetPlayerSkillUse skill:short
IncrementPlayerSkillUse - records some additional uses of one of the skill actions
(nuSkillExperience:float) IncrementPlayerSkillUse skill:short whichAction:short howManyTimes:float
GetSkillUseIncrement - gets the experience point increase for one use of a skill action
(useRate:float) GetSkillUseIncrement skill:short whichAction:short
SetSkillUseIncrement - sets the experience point increase for one use of a skill action
(nothing) SetSkillUseIncrement nuRate:float skill:short whichAction:short
Soul Gem
Qualities: Inventory, Named, Simple
Values:
Soul Level - the soul level currently captured in the soul gem
Capacity - the maximum soul level that can be captured in the soul gem
Functions:
GetSoulLevel - returns the soul level currently in the soul gem
(soulLevel:short) GetSoulLevel objectID:ref
GetSoulGemCapacity - returns the max soul level the soul gem can contain
(soulLevel:short) GetSoulGemCapacity objectID:ref
(nothing) SetSoulLevel soulLevel:short objectID:ref
(nothing) SetSoulGemCapacity soulLevel:short objectID:ref
GetCurrentSoulLevel - returns the current soul level of the calling reference
(soulLevel:short) GetCurrentSoulLevel
Spell
Qualities: Magic, Named
Value:
Spell Type - short the kind of spell. Spell Types.
Magicka Cost - long the cost in magicka for casting the spell
Mastery Level - short the skill mastery level needed to cast the spell. Spell Mastery Levels.
Functions:
GetSpellType - returns the spell type
(spellType:short) GetSpellType spell:ref
SetSpellType - sets the spell type
(nothing) SetSpellType nuType:short spell:ref
GetSpellMagickaCost - returns the magicka casting cost according to the Oblivion formula. If called on a reference it will use the reference's magic skill values to determine the actual magicka cost of the spell. Without a reference it will return the base cost of the spell as reported in the CS.
(magickaCost:long) reference.GetSpellMagickaCost spell:ref
SetSpellMagickaCost - sets the magicka casting cost
(nothing) SetSpellMagickaCost nuMagickaCost:long spell:ref
ModSpellMagickaCost - modifies the magicka casting cost up or down
(nothing) ModSpellMagickaCost modifyBy:float spell:ref
GetSpellMasteryLevel - returns the mastery level of the spell
(masteryLevel:short) GetSpellMasteryLevel spell:ref
SetSpellMasteryLevel - sets the mastery level of the spell
(nothing) SetSpellMasteryLevel masteryLevel:short objectID:ref
GetSpellSchool - returns the school of the spell, determined by the most expensive effect item
(magicSchool:short) GetSpellSchool spell:ref
GetSpellExplodesWithNoTarget - returns whether the touch spell explodes without a target
(spellExplodesWithNoTarget:bool) GetSpellExplodesWithNoTarget spell:ref
SetSpellExplodesWithNoTarget - sets whether the touch spell will explode without a target
(nothing) SetSpellExplodesWithNoTarget doesSpellExpode:bool spell:ref
IsSpellHostile* - returns 1 if the spell is considered hostile
(isHostile:bool) IsSpellHostile spell:ref
SetSpellHostile* - toggles whether or not a spell is considered hostile.
(nothing) SetSpellHostile spell:ref isHostile:bool
Weapon
Qualities: Attacking, Breakable, Enchantable, Equippable, Inventory, Named, Simple
Values:
Reach - float the distance from the wielder the weapon can reach
Weapon Type - short the type of weapon
Poison - ref the poison currently applied to the weapon
Functions:
GetWeaponReach - returns the reach of the weapon
(reach:float) reference.GetWeaponReach objectID:ref
SetWeaponReach - sets the reach of the weapon
(nothing) reference.SetWeaponReach nuReach:float objectID:ref
ModWeaponReach - modifies the reach of the weapon up or down
(nothing) reference.ModWeaponReach modifyBy:float objectID:ref
GetWeaponType - retuns the weapon type
(weaponType:short) reference.GetWeaponType objectID:ref
SetWeaponType - sets the weapon type
(nothing) reference.SetWeaponType weaponType:short objectID:ref
GetEquippedWeaponPoison - returns the poison applied to the equipped weapon. Called on the weapon holder.
(poison:ref) reference.GetEquippedWeaponPoison
SetEquippedWeaponPoison - sets the poison applied to the equipped weapon and returns the previous poison. Called on the weapon holder.
(oldPoison:ref) reference.SetEquippedWeaponPoison nuPoison:ref
RemoveEquippedWeaponPoison - removes and returns the poison applied to the equipped weapon. Called on the weapon holder.
(oldPoison:ref) reference.RemoveEquippedWeaponPoison
Weather
Qualities:
Values: CS Wiki Page Info
Note - short floats are stored internally as 0-255 but are exposed in the CS and through the API as a float
Wind Speed - short float
Cloud Speed - short float
Trans Delta - short float
Sun Glare - short float
Sun Damage - short float
Fog Distances (near/far for night/day) - float
HDR Values - float
Weather Colors - float the color of the weather for different weather times
Lightning Frequency - short a value which determines the rate of lightning flashes. Scaled from 1 (high) to 255 (low)
Functions:
GetCurrentWeatherID - returns the refID of the current weather
(currentWeather:ref) GetCurrentWeatherID
GetWeatherWindSpeed - returns the wind speed of the specified weather
(windSpeed:float) GetWeatherWindSpeed weather:ref
(windSpeed:float) GetWindSpeed weather:ref
SetWeatherWindSpeed - sets the wind speed of the specified weather
(nothing) SetWeatherWindSpeed speed:float weather:ref
(nothing) SetWindSpeed speed:float weather:ref
GetWeatherCloudSpeedLower - returns the speed of the lower cloud layer
(speed:float) GetWeatherCloudSpeedLower weather:ref
(speed:float) GetCloudSpeedLower weather:ref
SetWeatherCloudSpeedLower - sets the speed of the lower cloud layer
(nothing) SetWeatherCloudSpeedLower speed:float weather:ref
(nothing) SetCloudSpeedLower speed:float weather:ref
GetWeatherCloudSpeedUpper - returns the speed of the upper cloud layer
(speed:float) GetWeatherCloudSpeedUpper weather:ref
(speed:float) GetCloudSpeedUpper weather:ref
SetWeatherCloudSpeedUpper - sets the speed of the upper cloud layer
(nothing) SetWeatherCloudSpeedUpper speed:float weather:ref
(nothing) SetCloudSpeedUpper speed:float weather:ref
GetWeatherTransDelta - returns the transition delta of the weather
(transDelta:float) GetWeatherTransDelta weather:ref
(transDelta:float) GetTransDelta weather:ref
SetWeatherTransDelta - sets the transition delta of the weather
(nothing) SetWeatherTransDelta transDelta:float weather:ref
(nothing) SetTransDelta transDelta:float weather:ref
GetWeatherSunGlare - returns the sun glare
(sunGlare:float) GetWeatherSunGlare weather:ref
(sunGlare:float) GetSunGlare weather:ref
SetWeatherSunGlare - sets the sun glare
(nothing) SetWeatherSunGlare sunGlare:float weather:ref
(nothing) SetSunGlare sunGlare:float weather:ref
GetWeatherSunDamage - returns the sun damage
(sunDamage:float) GetWeatherSunDamage weather:ref
(sunDamage:float) GetSunDamage weather:ref
SetWeatherSunDamage - sets the sun damage
(nothing) SetWeatherSunDamage sunDamage:float weather:ref
(nothing) SetSunDamage sunDamage:float weather:ref
GetWeatherFogDayNear - returns the daytime near fog distance
(fogDistance:float) GetWeatherFogDayNear weather:ref
(fogDistance:float) GetFogDayNear weather:ref
SetWeatherFogDayNear - sets the daytime near fog distance
(nothing) SetWeatherFogDayNear fogDistance:float weather:ref
(nothing) SetFogDayNear fogDistance:float weather:ref
GetWeatherFogDayFar - returns the daytime far fog distance
(fogDistance:float) GetWeatherFogDayFar weather:ref
(fogDistance:float) GetFogDayFar weather:ref
SetWeatherFogDayFar - sets the daytime far fog distance
(nothing) SetWeatherFogDayFar fogDistance:float weather:ref
(nothing) SetFogDayFar fogDistance:float weather:ref
GetWeatherFogNightNear - returns the nighttime near fog distance
(fogDistance:float) GetWeatherFogNightNear weather:ref
(fogDistance:float) GetFogNightNear weather:ref
SetWeatherFogNightNear - sets the nighttime near fog distance
(nothing) SetWeatherFogNightNear fogDistance:float weather:ref
(nothing) SetFogNightNear fogDistance:float weather:ref
GetWeatherFogNightFar - returns the nighttime far fog distance
(fogDistance:float) GetWeatherFogNightFar weather:ref
(fogDistance:float) GetFogNightFar weather:ref
SetWeatherFogNightFar - sets te nighttime far fog distance
(nothing) SetWeatherFogNightFar fogDistance:float weather:ref
(nothing) SetFogNightFar fogDistance:float weather:ref
GetWeatherHDRValue - returns the specified HDR value for the weather
(hdrValue:float) GetWeatherHDRValue whichHDRValue:short weather:ref
(hdrValue:float) GetHDRValue whichHDRValue:short weather:ref
SetWeatherHDRValue - sets the specified HDR value for the weather
(oldHDRValue:float) SetWeatherHDRValue nuVal:float whichHDRValue:short weather:short
(oldHDRValue:float) SetHDRValue nuVal:float whichHDRValue:short weather:short
GetWeatherColor - returns the red, green or blue value of the specified weather color at the specified weather time
(color:short) GetWeatherColor rgb:short whichColor:short weather:ref whichTime:short
SetWeatherColor - sets the red, green and blue values for the specified weather color at the specified weather time
(nothing) SetWeatherColor red:short green:short blue:short whichColor:short weather:ref whichTime:short
GetWeatherLightningFrequency - returns the frequency of the lightning
(frequency:short) GetWeatherLightningFreuency weather:ref
(frequency:short) GetLightningFreuency weather:ref
SetWeatherLightningFrequency - sets the frequency of the lightning
(nothing) SetWeatherLightningFrequency frequency:short weather:ref
(nothing) SetLightningFrequency frequency:short weather:ref
General Functions
IsDoor - returns whether the calling reference or passed objectID is a door
(isDoor:bool) reference.IsDoor objectID:ref
IsFurniture - returns whether the calling reference or passed objectID is furniture
(isFurniture:bool) reference.IsFurniture objectID:ref
IsActivator - returns whether the calling reference or passed objectID is an activator
(isActivator:bool) reference.IsActivator objectID:ref
GetGameLoaded - returns 1 if the game was loaded since the last time this call was made
(gameLoaded:bool) GetGameLoaded
GetGameRestarted - returns 1 if Oblivion was exited and restarted since the last time this call was made from the calling script. Use this condition to reset or undo changes made by OBSE functions which are not stored in the savegame.
(gameRestarted:bool) GetGameRestarted
GetOBSEVersion - returns the version number of OBSE
(obseVersion:long) GetOBSEVersion
GetOBSERevision* - returns the minor version number of OBSE. For instance, when running the second released version of v0014, this function returns 2.
(obseRevision:long) GetOBSERevision
SetNumericGameSetting - sets the specified game setting to the following variable or direct value
(nothing) SetNumericGameSetting gameSettingName:string value:float
GetNumericINISetting - returns the specified ini setting
(setting:float) GetNumericINISetting iniSettingName:string
SetNumericINISetting - sets the specified ini setting to the following variable or direct value
(nothing) SetNumericINISetting iniSettingName:string value:float
GetFPS - returns the frames per second of the game
(fps:float) GetFPS
IsThirdPerson - returns whether the point of view is 3rd person or not
(isThirdPerson:bool) IsThirdPerson
IsGlobalCollisionDisabled - returns whether collision is disabled
(isDisabled:bool) IsGlobalCollisionDisabled
SetDisableGlobalCollision - sets whether to disable the global collision or not
(nothing) SetDisableGlobalCollision toDisableOrNot:bool
RunBatchScript - runs a specified text file under the Oblivion directory as a script. Works the same as the console function bat
(nothing) RunBatchScript
IsPluginInstalled - returns whether a given plugin is installed
(isInstalled:bool) IsPluginInstalled pluginName:string
GetPluginVersion - returns the version of the specified plugin
(version:long) GetPluginVersion pluginName:string
GetDebugSelection - returns the reference to the item last selected in the console
(selection:ref) GetDebugSelection
GetSoundPlaying - If no parameters are passed, then it dumps a list of the currently playing sounds and actors making sound to obse.log (this may change). If a string is passed, then it returns the number of times the specified sound is playing. The string may contain wildcards: * matches several characters, and ? matches one character. If a reference is passed in, then the search is restricted to that reference, returning the number of times it is playing that sound. Some sounds are not associated with objects, so if you pass in a "fuzzy check radius" parameter, it returns the number of times the sound is playing within the specified radius around the reference.
(playingCount:long) reference.GetSoundPlaying soundName:string fuzzyCheckRadius:float
Cloning Functions
The cloning functions are special. They are declared as taking Inventory Objects so any inventory object can be passed as a raw name from the CS. However you can clone any form by first assigning it to a ref and then passing that ref to CloneForm.
CloneForm - creates and returns a new base object that is an exact copy of the passed objectID
(clonedForm:ref) CloneForm objectID:ref
Examples:
ref clonedInventoryItem
ref clonedSpell
ref originalSpell
set clonedInventoryItem to CloneForm WeapSteelShortsword
set originalSpell to StandardCalmTouch1Novice
set clonedSpell to CloneForm originalSpell
IsClonedForm - returns whether the passed objectID is a cloned form or not. A cloned form is saved as part of the save game. Instances of cloned forms are player created potions, spells and enchanted items
(isCloned:bool) IsClonedForm objectID:ref
Flow Control Functions
The flow control functions allow you to implement loops in your scripts. Because there is no built-in loop support in the Oblivion script interpreter, the syntax for the functions is somewhat strange. The first function, SaveIP or Label, will record the position of the instruction after itself in an internal list. The second function, RestoreIP or Goto, jumps back to the saved position. Here's a simple example of a loop:
begin onActivate
; declare a variable to keep track of the number of times we've gone through the loop
long var
set var to 0
; save the current instruction pointer
; this records that the beginning of the loop is right before the PrintToConsole command
SaveIP ; could also use Label
; print the current loop count
PrintToConsole "loop %f" var
; update the loop counter
set var to var + 1
; we only want to go through the loop three times, so check the loop counter
if var < 3
; jump back to the saved location
RestoreIP ; could also use Goto
endif
; if we get here, we're done with the loop
end
When activated, this script will print:
loop 0.0000
loop 1.0000
loop 2.0000
To support nested loops, the SaveIP and RestoreIP commands take an optional integer parameter specifying which 'slot' to save the instruction location in. If you don't specify a number, it defaults to 0. There are 256 slots in the internal list. Here's an example of nested loops:
begin onActivate
long var
long var2
set var2 to 0
SaveIP 0 ; Label 0
; start of outer loop
set var to 0
SaveIP 1 ; Label 1
; start of inner loop
PrintToConsole "loop %f %f" var var2
set var to var + 1
if var < 3
; branch to the start of the inner loop
RestoreIP 1 ; Goto 1
endif
set var2 to var2 + 1
if var2 < 3
; branch to the start of the outer loop
RestoreIP 0 ; Goto 0
endif
end
The inner loop uses slot 1, and the outer loop uses slot 0.
Important notes:
It is possible to create an infinite loop using these functions, which will hang Oblivion. Also note that while the list of saved locations is technically stored globally, the locations only make sense in the context of the script that saved them, and must be treated as if they are invalidated at the end of each script. Finally, do not use SaveIP/Label or RestoreIP/Goto in a 'set' or 'if' statement. (for example, "if RestoreIP == 4"). They are of course safe to use inside the body of an if statement as demonstrated in the examples, just not in the if statement itself.
The original implementation of these functions in OBSE v0009 was broken, leading to memory corruption and crashes when a loop would run more than approximately 10 iterations. The bugfix release v0009a fixes this, however as the functions in that version should still be considered 'beta' and unsupported for use in released mods, the main version number has not been updated. These functions will be supported in v0010, so make sure that you check that GetOBSEVersion returns 10 or greater before using the functions. See the obse_readme.txt for an example of how to do this.
SaveIP - save the location of the command following the SaveIP command
(nothing) SaveIP slot:long
(nothing) Label slot:long
RestoreIP - jump to a previously saved location
(nothing) RestoreIP slot:long
(nothing) Goto slot:long
Ref Walking Functions
GetFirstRef - returns the first reference in the current cell. A type can optionally be supplied to return only references matching that type. Additionally, you can pass 69 for actors and 70 for inventory items. This function should be used only within a Label/Goto loop and GetNextRef. An optional cell depth can be supplied to specify the number of adjacent cells to scan in exteriors; a cell depth of 1 scans the player's current cell plus 8 adjacent cells, a depth of 2 scans the player's cell plus 25 adjacent cells. By default, inactive references to items which were previously picked up by an actor are ignored; passing 1 for the third parameter will force those references to be included.
(reference:ref) GetFirstRef type: short cellDepth:short includeInactiveRefs:short
GetNextRef - returns the next reference in the curent cell. GetFirstRef must be called first; this function uses the cell depth and type passed to GetFirstRef and returns the next reference matching that type, or zero after the last reference has been returned. This function should only be used within a Label/Goto loop.
(reference:ref) GetNextRef
GetNumRefs - returns the number of references in the current cell which match the optionally supplied type code. Use 69 for actors and 70 for inventory items. An optional cell depth can be specified for exteriors. By default, inactive references to items which were previously picked up by an actor are ignored; passing 1 for the third parameter will force those references to be included.
(numRefs:short) GetNumRefs type: short cellDepth:short includeInactiveRefs:short
Example of ref looping (transfers all carriable items in the cell to the player's inventory):
ref nextItem
begin onActivate
set nextItem to GetFirstRef 70 ; get first carriable item
Label 10
if ( nextItem ) ; continue until all refs are processed
nextItem.activate player ; give the item to the player
set nextItem to getNextRef
Goto 10
endif
end
Console Functions
Some of the console commands have been exposed as scripting commands. In many cases, their functionality is not completely documented, and as they were not designed to be used via scripts, strange behavior may occur when using them. The primary thing to expect is changes not being saved in the player's savedata file.
con_CAL
con_GetINISetting
con_HairTint
con_LoadGame
con_ModWaterShader
con_QuitGame
con_RefreshINI
con_RunMemoryPass
con_Save
con_SavINI
con_SetCameraFOV
con_SetClipDist
con_SetFog
con_SetGameSetting
con_SetGamma
con_SetHDRParam
con_SetImageSpaceGlow
con_SetINISetting
con_SetSkyParam
con_SetTargetRefraction
con_SetTargetRefractionFire
con_SexChange
con_TCL
con_TFC
con_TGM
con_ToggleAI
con_ToggleCombatAI
con_ToggleDetection
con_ToggleMenus
con_WaterDeepColor
con_WaterReflectionColor
con_WaterShallowColor
con_PlayerSpellBook
con_ToggleMapMarkers
Input Functions
IsKeyPressed - returns whether the specified key is currently pressed. Uses standard windows key codes.
(isKeyPressed:bool) IsKeyPressed windowsKeyCode:long
IsKeyPressed2 - returns whether the specified key is currently pressed. Uses DX scancodes.
(isKeyPressed:bool) IsKeyPressed2 dxScanCode:long
GetKeyPress - returns the DX scan code of the key being pressed. If more than one key is pressed use whichIndex to choose which keycode to return.
(keyPressed:long) GetKeyPress whichIndex:long
GetNumKeysPressed - returns the number of keys currently pressed
(count:long) GetNumKeysPressed
DisableKey - disables the key with the specified dx scancode
(nothing) DisableKey dxScanCode:long
EnableKey - enables the key with the specified dx scancode. Turns off DisableKey.
(nothing) EnableKey dxScanCode:long
HoldKey - holds down the key with the specified dx scancode
(nothing) HoldKey dxScanCode:long
MenuHoldKey - holds down the key with the specified dx scancode when a menu is open
(nothing) MenuHoldKey dxScanCode:long
ReleaseKey - releases a held key with the specified dx scancode
(nothing) ReleaseKey dxScanCode:long
MenuReleaseKey - releases a held key with the specified dx scancode when a menu is open
(nothing) ReleaseKey dxScanCode:long
TapKey - presses the key with the specidied dx scancode once
(nothing) TapKey dxScanCode:long
MenuTapKey - presses the key with the specificed dx scancode once when a menu is open
(nothing) MenuTapKey dxScanCode:long
HammerKey - fakes keypresses every other frame of the key with the specified dx scancode
(nothing) HammerKey dxScanCode:long
AHammerKey - fakes keypresses every other frame on the alternate frames from HammerKey of the key with the specified dx scancode
(nothing) AHammerKey dxScanCode:long
UnHammerKey - stops hammering the key with the specified dx scancode
(nothing) UnHammerKey dxScanCode:long
GetControl - returns the dx scancode of the key used for the specified control
(dxScanCode:long) GetControl whichControl:short
GetAltControl2 - returns the dx scancode of the alternate key used for the specified control. Unlike GetAltControl, the return value of this function is a valid DX scan code which requires no further calculation for use with other input functions.
(dxScanCode:long) GetAltControl2 whichControl:short
GetMouseButtonPress - returns the dx scancode of the mouse button being pressed. If more than one mouse button is pressed, use whichIndex to choose which code to return
(dxScanCode:long) GetMouseButtonPress whichIndex:long
GetNumMouseButtonsPressed - returns the number of mouse buttons pressed.
(count:long) GetNumMouseButtonsPressed
DisableMouse - prevents the mouse from moving
(nothing) DisableMouse
EnableMouse - turns off DisableMouse
(nothing) EnableMouse
MoveMouseX - moves the mouse horizontally the specified number of pixels
(nothing) MoveMouseX pixels:long
MoveMouseY - moves the mouse veritcally the specified number of pixels
(nothing) MoveMouseY pixels:long
SetMouseSpeedX - moves the mouse in the horizontal axis at the specified number of pixels per second
(nothing) SetMouseSpeedX pixels:float
SetMouseSpeedY - Moves the mouse in the vertical axis at the specified number of pixels per second.
(nothing) SetMouseSpeedY pixels:float
IsKeyPressed3 - returns 1 if the key or mouse button specified is currently pressed. Just like IsKeyPressed2, but detects disabled keys.
(isPressed:bool) IsKeyPressed3 dxScanCode:long
IsControlPressed - returns 1 is either the key or mouse button assigned to the specified control code is currently pressed. Detects disabled keys.
(isPressed:bool) IsControlPressed whichControl:short
DisableControl - disables both the key and mouse buton assigned to the specified control
(nothing) DisableControl whichControl:short
EnableControl - enables the key and mouse button for a control disabled with DisableControl.
(nothing) EnableControl whichControl:short
OnKeyDown -Registers a script as a listener for input events. Returns 1 for one frame when the passed key or mouse button is pressed. If used by multiple scripts, each script will be informed of the key's state. Will not return true again until the key is released and then pressed again..
(keyPressed:bool) OnKeyDown dxScanCode:long
OnControlDown - Works like OnKeyDown, but takes a control code and returns 1 when the key or mouse button assigned to that control is pressed.
(controlPressed:bool) OnControlDown whichControl:short
TapControl - presses the key or mouse button associated with the specified control once.
(nothing) TapControl whichControl:short
RefreshControlMap - re-parses the Oblivion.ini file to update OBSE's internal map of the player's controls. Call this function after the player exits the Controls menu (menumode 1021) to detect any changes to the control layout. DEPRECATED: Input functions are now in sync with Oblivion control bindings.
(nothing) RefreshControlMap
SetControl - assigns a new key to the specified control. If the specified control already has a key assigned, the key mappings are swapped.
(nothing) SetControl whichControl:short dxScanCode:long
SetAltControl - assigns a new mouse button to the specified control. If the specified control already has a mouse button assigned, the button mappings are swapped.
(nothing) SetAltControl whichControl:short dxScanCode:long
Math Functions
Abs - returns the absolute value of the argument
(absoluteValue:float) abs arg:float
Ceil - returns the nearest whole number above the argument
(ceil:float) ceil arg:float
Exp - returns e to the power of the argument
(exp:float) exp arg:float
Floor - returns the nearest whole number less than the argument
(floor:float) floor arg:float
Log - returns the natural logarithm of the number
(log:float) log arg:float
Log10 - returns the base 10 logarithm of the number
(log10:float) log10 arg:float
Pow - returns the base raised to the exponents power
(pow:float) pow base:float exponent:float
Rand - returns a random number between min and max
(rand:float) rand min:float max:float
SquareRoot - returns the square root of the argument
(sqrt:float) squareroot arg:float
(sqrt:float) sqrt arg:float
fmod - returns the floating point modulus of dividend in the given base. This differs from `dividend % base` in the scripting language as % is a strictly integer function. When base is positive, `0 <= result < base`. The optional offset shifts the range of the result to `offset <= result < base+offset`. The two most likely uses of this function are `modulus angle 360` to normalize a computed angle, i.e., ensure it is `>= 0`< 360.0 and , and `modulus angle 360 -180` which ensures the computed [change of] angle is `>= -180.0` and `< 180.0`.`modulus n base` is defined as `n - base Floor n / base`. If the base is negative the direction of the inequality changes. Thus: `0 >= result > base` and `offset >= result > base+offset`.
(fmod:float) fmod dividend:float base: float offset:float
Trigonometry Functions
ACos - returns the arccosine of the argument. ACos and DACos use degrees. RACose uses radians.
(acos:float) acos arg:float
(acos:float) dacos arg:float
(acos:float) racos arg:float
ASin - returns the arcsine of the argument. ASin and DASin use degrees. RASin uses radians.
(asin:float) asin arg:float
(asin:float) dasin arg:float
(asin:float) rasin arg:float
ATan - returns the arctangent of the argument. ATan and DATan use degrees. RATan uses radians.
(atan:float) atan arg:float
(atan:float) datan arg:float
(atan:float) ratan arg:float
ATan2 - returns the arctangent of the arguments. ATan2 and DATan2 use degrees. RATan2 uses radians.
(atan2:float) atan2 arg1:float arg2:float
(atan2:float) datan2 arg1:float arg2:float
Cos - returns the cosine of the angle. Cos and DCos use degrees. RCos uses radians.
(cos:float) cos arg:float
(cos:float) dcos arg:float
(cos:float) rcos arg:float
Cosh - returns the hyperbolic cosine of the angle. Cosh and DCosh use degrees. RCosh uses radians.
(cosh:float) cosh arg:float
(cosh:float) dcosh arg:float
(cosh:float) rcosh arg:float
Sin - returns the sine of the angle. Sin and DSin use degrees. RSinh uses radians.
(sin:float) sin arg:float
(sin:float) dsin arg:float
(sin:float) rsin arg:float
Sinh - returns the hyperbolic sine of the angle. Sinh and DSinh use degrees. RSinh uses radians.
(sinh:float) sin arg:float
(sinh:float) dsin arg:float
(sinh:float) rsin arg:float
Tan - returns the tangent of the angle. Tan and DTan use degrees. RTan uses radians.
(tan:float) tan arg:float
(tan:float) dtan arg:float
(tan:float) rtan arg:float
Tanh - returns the hyperbolic tangent of the angle. Tanh and DTanh use degrees. RTanh uses radians.
(tanh:float) tanh arg:float
(tanh:float) dtanh arg:float
(tanh:float) rtanh arg:float
Bitwise Manipulation Functions
LeftShift - Shifts the argument left by the specified number of bits. Returns zero if shiftAmount is >= 32.
(result:long) LeftShift value:long shiftAmount:long
RightShift - Shifts the argument right by the specified number of bits, inserting zeros on the left. Returns zero if shiftAmount is >= 32.
(result:long) RightShift value:long shiftAmount:long
LogicalAnd - Returns the bitwise AND of the two arguments.
(result:long) LogicalAnd arg1:long arg2:long
LogicalOr - Returns the bitwise OR of the two arguments.
(result:long) LogicalOr arg1:long arg2:long
LogicalXor - Returns the bitwise XOR of the two arguments.
(result:long) LogicalXor arg1:long arg2:long
LogicalNot - Returns the bitwise NOT of the argument.
(result:long) LogicalNot arg:long
Output Functions
Output functions are used to display messages. Some take a string containing format specifiers and an optional list of up to 20 variables which may include reference variables. Format specifiers include all of those used by the Message and MessageBox functions, as well as additional specifiers:
%i - prints the formID of a reference or object
%k - prints a string representing the key associated with a DirectInput scan code
%n - prints the name of a reference or object
%p - displays a pronoun based on the gender of the object parameter:
%po - objective (he, she, it)
%pp - possessive (his, her, its)
%ps - subjective (him, her, it)
%q - prints a double quote character
%r - prints a newline
%c - prints the name of a component within another object. Takes two arguments - an object (ref) and the index of the component you want to access (short). Supported object types:
Magic Item - prints the name of the nth effect item.
Faction - prints the male rank title of the nth rank.
%{ .. %} - Conditionally omits a portion of the format string based on a boolean value. The left bracket accepts a variable; if the value of the variable is zero, all text up to the right bracket will be ignored, and any parameters supplied to format specifiers within the omitted substring will be skipped.
%x - prints an integer in hexadecimal format. An optional digit from 0-9 immediately following this specifier indicates the minimum width of the displayed value. For example, MessageEx "%x4" 255 will display "00FF".
Additional format specifiers used by the C function printf() may work as well. Due to the fact that integer script variables are stored as floats, specifiers expecting integers may not display the expected output.
MessageEX - prints a formatted message to the top-left corner of the screen
(nothing) MessageEX formatString:string var1 var2 ... var20
MessageBoxEX - displays a formatted messagebox using the extended format specifiers. Format specifiers may appear within buttons. Button text should be included within the format string, separated by a pipe character.
(nothing) MessageBoxEX formatString:string var1 var2 ... var20
PrintToConsole - prints a formatted message to the console using the extended format specifiers.
(nothing) PrintToConsole formatString:string var1 var2 ... var20
Example script using MessageBoxEX:
ref refVar1
ref refVar2
short keyCode
short goldCost
set refVar1 to AdrianDecanusREF
set refVar2 to ShadySamREF
set keyCode to GetControl 15 ; menu key, assuming 'Tab' (15)
set goldCost to 500
MessageBoxEX "Press %k to summon a companion %rCost: %g gold|%n|%n|Cancel" keyCode goldCost refVar1 refVar2
The script displays a messageBox in the following format:
Press TAB to summon a companion
Cost: 500 gold
[Adrian Decanus]
[Shady Sam]
[Cancel]
SetMessageSound* - sets the sound which is to be played by the next call to MessageEX. The sound must be defined in the Sounds branch of the Object Window. Once MessageEX has been called the sound is cleared.
(nothing) SetMessageSound soundID:string
SetMessageIcon* - sets the icon which is to be displayed to the left of the text for the next call to MessageEX. The icon is a .dds file located in the folder "Data\Textures\Menus\" or a subfolder thereof. Once MessageEX has been called the icon will be cleared.
(nothing) SetMessageIcon iconPath:string
Spam-Blocking Functions*
Some existing script functions generate UI messages in the top-left corner of the screen when called on the player. The following functions duplicate the behavior of those functions while suppressing those messages. Syntax is identical to the original functions.
AddItemNS*
RemoveItemNS*
EquipItemNS*
UnequipItemNS*
AddSpellNS*
RemoveSpellNS*
Mod Functions*
These functions return information about currently loaded Oblivion plugins.
GetModIndex* - returns the mod index of the specified plugin. This is equivalent to the first two digits of the object's formID.
(index:short) GetModIndex modName:string
GetSourceModIndex* - returns the mod index of the plugin from which the specified object originates.
(index:short) reference.GetSourceModIndex object:ref
GetNumLoadedPlugins* - returns the number of plugins currently loaded. Used in conjunction with GetModIndex, this can be used to verify load order at run-time.
(loadedPluginCount:short) GetNumLoadedPlugins
IsModLoaded - returns 1 if the specified .esp or .esm is currently loaded. String is case-insensitive but must include the file extension.
(isLoaded:bool) IsModLoaded modName:string
Hotkey Functions*
GetHotkeyItem - returns the item or spell bound to the specified hotkey (1-8)
(itemOrSpell:ref) GetHotkeyItem whichHotkey:short
SetHotkeyItem - sets a hotkey to the specified spell or item
(nothing) SetHotkeyItem whichHotkey:short spellOrItem:ref
ClearHotkey - removes any spell or item bound to the specified hotkey
(nothing) ClearHotkey whichHotkey:short
File Functions
FileExists* - returns 1 if the specified file exists in the user's installation folder or within one of the BSA archives. Path is relative to the user's install folder, which is "Bethesda Softworks\Oblivion" by default.
(fileExists:bool) FileExists filePath:string
UI Functions
Return information about the user interface. When the term "active menu" is used, it refers to the menu over which the mouse cursor is positioned when the command is called. Some functions accept an optional parameter specifying the specific menu you are interested in, assuming that menu is currently open.
GetActiveMenuMode - returns the menu code of the active menu. These are the same codes used by the MenuMode function.
(menuCode:short) GetActiveMenuMode
GetActiveMenuSelection - returns the item in the active menu over which the mouse is currently positioned.
(activeItem:ref) GetActiveMenuSelection
The return type varies depending on the active menu:
Magic: Highlighted spell
Container: Highlighted item
Inventory: Highlighted item
GetActiveMenuFilter - returns the code which indicates the current filter options for the active menu.
(filterCode:short) GetActiveMenuFilter menuType:short
GetActiveMenuRef - returns the reference from which the active menu is derived.
(menuRef:ref) GetActiveMenuRef menuType:short
The return type varies depending on the active menu:
SpellPurchase: Spell merchant
Container: Container, corpse, or merchant
Dialog: Speaking NPC
Book: Book reference in the gameworld
GetActiveMenuObject - returns the base object from which the active menu is derived.
(menuObject:ref) GetActiveMenuObject menuType:short
The return type varies based on the active menu type:
Book: Book base object
Alchemy: Potion being brewed
Message: The formID of the reference whose attached script generated the message, or the quest script which generated it. Returns 0 for game-generated messages such as confirmation boxes.
GetEnchMenuSoulgem - returns the soulgem selected for enchantment in the enchantment menu. Only works if the enchantment menu is the active menu.
(soulgem:ref) GetEnchMenuSoulgem
GetEnchMenuEnchItem - returns the enchantment which is to be applied to the item to be enchanted. Only works if the enchantment menu is the active menu.
(enchantment:ref) GetEnchMenuEnchItem
IsBarterMenuActive - returns 1 if the player is bartering with a merchant, providing a way to distinguish between an ordinary container menu and a barter menu, which both return the same MenuMode code.
(isBarterMode:bool) IsBarterMenuActive
GetAlchMenuIngredient - returns one of the four ingredients, from 0 to 3, selected for inclusion in the potion currently being brewed.
(ingredient:ref) GetAlchMenuIngredient whichIngred:short
GetAlchMenuIngredientCount - returns the number of the specified ingredient selected for inclusion in the potion being brewed. Pass 0 for the first ingredient, 3 for the last.
(count:short) GetAlchMenuIngredientCount whichIngred:short
GetAlchMenuApparatus - returns the apparatus object being used in the brewing process
(apparatus:ref) GetAlchMenuApparatus apparatusType:short
CloseAllMenus - closes all currently open menus. Note: if the console is open at the time this function is called, it will be closed but the displayed console text will remain visible until the console is opened and closed again.
(nothing) CloseAllMenus
GetContainerMenuView - when the container/barter menu is open, returns 1 if the player is viewing his own inventory, or 0 if viewing the container or merchant's inventory.
(menuView:short) GetContainerMenuView
Type Codes
Form Type IDs
0: None
1: TES4
2: Group
3: GMST
4: Global
5: Class
6: Faction
7: Hair
8: Eyes
9: Race
10: Sound
11: Skill
12: Effect
13: Script
14: LandTexture
15: Enchantment
16: Spell
17: BirthSign
18: Activator
19: Apparatus
20: Armor
21: Book
22: Clothing
23: Container
24: Door
25: Ingredient
26: Light
27: Misc
28: Stat
29: Grass
30: Tree
31: Flora
32: Furniture
33: Weapon
34: Ammo
35: NPC
36: Creature
37: LeveledCreature
38: SoulGem
39: Key
40: AlchemyItem
41: SubSpace
42: SigilStone
43: LeveledItem
44: SNDG
45: Weather
46: Climate
47: Region
48: Cell
49: REFR
50: ACHR
51: ACRE
52: PathGrid
53: WorldSpace
54: Land
55: TLOD
56: Road
57: Dialog
58: DialogInfo
59: Quest
60: Idle
61: Package
62: CombatStyle
63: LoadScreen
64: LeveledSpell
65: ANIO
66: WaterForm
67: EffectShader
68: TOFT
69: Actors
70: Inventory items
Equipment Slot IDs
0: head
1: hair
2: upper body
3: lower body
4: hand
5: foot
6: right ring
7: left ring
8: amulet
9: weapon
10: back weapon
11: side weapon
12: quiver
13: shield
14: torch
15: tail
16: weapon
17: ammo
18: lower and upper body
19: lower and upper and foot
20: lower, upper, hand and foot
Return values only
Equipment slot bit assignments:
0x00000001 1 Head
0x00000002 2 Hair
0x00000004 4 UpperBody
0x00000008 8 LowerBody
0x00000010 16 Hand
0x00000020 32 Foot
0x00000040 64 RightRing
0x00000080 128 LeftRing
0x00000100 256 Amulet
0x00000200 512 Weapon
0x00000400 1024 BackWeapon
0x00000800 2048 SideWeapon
0x00001000 4096 Quiver
0x00002000 8192 Shield
0x00004000 16384 Torch
0x00008000 32768 Tail
0x00010000 65536 Weapon
0x00020000 131072 Ammo
0x00040000 262144 Ranged Weapon
Weapon Type
0: Blade1H
1: Blade2H
2: Blunt1H
3: Blunt2H
4: Staff
5: Bow
Apparatus Type
0: Mortar & Pestle
1: Alembic
2: Calcinator
3: Retort
Apparatus Quality Levels
.10: Novice
.25: Apprentice
.50: Journeyman
.75: Expert
1.0: Master
Armor Type
0: Light Armor
1: Heavy Armor
Soul Level
0: None
1: Petty
2: Lesser
3: Common
4: Greater
5: Grand
Magic Item Type
0: Not a Magic Item
1: Spell
2: Enchantment
3: Alchemy Item
4: Ingredient
Magic Effect Range
0: Self
1: Touch
2: Target
Spell Type
0: Spell
1: Disease
2: Power
3: Lesser Power
4: Ability
Spell Mastery Level
0: Novice
1: Apprentice
2: Journeymand
3: Expert
4: Master
Enchantment Type
0: Scroll
1: Staff
2: Weapon
3: Apparel
Magic Schools
0: Alteration
1: Conjuration
2: Destruction
3: Illusion
4: Mysticism
5: Restoration
Actor Value Codes
0: Strength
1: Intelligence
2: Willpower
3: Agility
4: Speed
5: Endurance
6: Personality
7: Luck
8: Health
9: Magicka
10: Fatigue
11: Encumbrance
12: Armorer
13: Athletics
14: Blade
15: Block
16: Blunt
17: HandToHand
18: HeavyArmor
19: Alchemy
20: Alteration
21: Conjuration
22: Destruction
23: Illusion
24: Mysticism
25: Restoration
26: Acrobatics
27: LightArmor
28: Marksman
29: Mercantile
30: Security
31: Sneak
32: Speechcraft
33: Aggression
34: Confidence
35: Energy
36: Responsibility
37: Bounty
38: Fame
39: Infamy
40: MagickaMultiplier
41: NightEyeBonus
42: AttackBonus
43: DefendBonus
44: CastingPenalty
45: Blindness
46: Chameleon
47: Invisibility
48: Paralysis
49: Silence
50: Confusion
51: DetectItemRange
52: SpellAbsorbChance
53: SpellReflectChance
54: SwimSpeedMultiplier
55: WaterBreathing
56: WaterWalking
57: StuntedMagicka
58: DetectLifeRange
59: ReflectDamage
60: Telekinesis
61: ResistFire
62: ResistFrost
63: ResistDisease
64: ResistMagic
65: ResistNormalWeapons
68: ResistParalysis
67: ResistPoison
68: ResistShock
69: Vampirism
70: Darkness
71: ResistWaterDamage
256: No Actor Value
Class Specialization Codes
0: Combat
1: Magic
2: Stealth
Input Control IDs
0: Forward
1: Back
2: Slide Left
3: Slide Right
4: Use
5: Activate
6: Block
7: Cast
8: Ready Item
9: Crouch/Sneak
10: Run
11: Always Run
12: Auto Move
13: Jump
14: Toggle POV
15: Menu Mode
16: Rest
17: Quick Menu
18: Quick1
19: Quick2
20: Quick3
21: Quick4
22: Quick5
23: Quick6
24: Quick7
25: Quick8
26: QuickSave
27: QuickLoad
28: Grab
Creature Type
0: Creature
1: Daedra
2: Undead
3: Humanoid
4: Horse
5: Giant
HDR Value
0: Eye Adapt
1: Blur Radius
2: Blur Passes
3: Emissive Mult
4: Target LUM
5: Upper LUM Clamp
6: Bright Scale
7: Bright Clamp
8: LUM Ramp No Tex
9: LUM Ramp Min
10: LUM Ramp Max
11: Sunlight Dimmer
12: Grass Dimmer
13: Tree Dimmer
Weather Color
0: Sky Upper
1: Fog
2: Clouds Lower
3: Ambient
4: Sunlight
5: Sun
6: Stars
7: Sky Lower
8: Horizon
9: Clouds Upper
10: Lightning
Weather Time
0: Sunrise
1: Day
2: Sunset
3: Night
RGB Value
0: Red
1: Green
2: Blue
Music Type
0: Default
1: Public
2: Dungeon
Projectile Type
0: Arrow
1: Magic Ball
2: Magic Fog
3: Magic Bolt
Actor Sound
0: LeftFoot
1: RightFoot
2: LeftBack
3: RightBack
4: Idle
5: Aware
6: Attack
7: Hit
8: Death
9: Weapon
Detection State
0: Lost
1: Unseen
2: Noticed
3: Seen
Animation Group
Note: Functions expecting an Animation Group parameter will accept the string associated with that group.
0: Idle
1: DynamicIdle,
2: SpecialIdle,
3: Forward,
4: Backward,
5: Left,
6: Right,
7: FastForward,
8: FastBackward,
9: FastLeft,
10: FastRight,
11: DodgeForward,
12: DodgeBack,
13: DodgeLeft,
14: DodgeRight,
15: TurnLeft,
16: TurnRight,
17: Equip,
18: Unequip,
19: AttackBow,
20: AttackLeft,
21: AttackRight,
22: AttackPower,
23: AttackForwardPower,
24: AttackBackPower,
25: AttackLeftPower,
26: AttackRightPower,
27: BlockIdle,
28: BlockHit,
29: BlockAttack,
30: Recoil,
31: Stagger,
32: Death,
33: TorchIdle,
34: CastSelf,
35: CastTouch,
36: CastTarget,
37: CastSelfAlt,
38: CastTouchAlt,
39: CastTargetAlt,
40: JumpStart,
41: JumpLoop,
42: JumpLand,
Service Flags
Note: Add two or more flags together to specify a group of services offered by an NPC.
1: Weapons
2: Armor
4: Clothing
8: Books
16: Ingredients
128: Lights
256: Apparatus
1024: Misc
2048: Spells
4096: MagicItems
8192: Potions
16384: Training
65536: Recharge
131072: Repair
Biped Path Codes
Specifies icon/model paths associated with biped objects, i.e. clothing and armor
0: Male Biped Path
1: Female Biped Path
2: Male Ground Path
3: Female Ground Path
Process Level
For actors, the level at which the game processes their AI
0: High
1: Middle-high
2: Middle-low
3: Low
Menu Code

        1001:    Message
        1002:    Inventory
        1003:    Stats
        1004:    HUDMain
        1005:    HUDInfo
        1006:    HUDReticle
        1007:    Loading
        1008:    Container, Barter
        1009:    Dialog
        1010:    HUDSubtitle
        1011:    Generic
        1012:    SleepWait
        1013:    Pause
        1014:    LockPick
        1015:    Options
        1016:    Quantity
        1017:    Audio
        1018:    Video
        1019:    VideoDisplay
        1020:    Gameplay
        1021:    Controls
        1022:    Magic
        1023:    Map
        1024:    MagicPopup
        1025:    Negotiate
        1026:    Book
        1027:    LevelUp
        1028:    Training
        1029:    BirthSign
        1030:    Class
        1031:    Attributes
        1032:    Skills
        1033:    Specilization
        1034:    Persuasion
        1035:    Repair
        1036:    RaceSex
        1037:    SpellPurchase
        1038:    Load
        1039:    Save
        1040:    Alchemy
        1041:    SpellMaking
        1042:    Enchantment
        1043:    EffectSetting
        1044:    Main
        1045:    Breath
        1046:    QuickKeys
        1047:    Credits
        1048:    SigilStone
        1049:    Recharge
        1051:    TextEdit

Menu Filter Code
Magic Menu:
1: Target
2: Touch
3: Self
7: All
8: Active Effects
Container/Barter/Inventory Menu:
1: Weapons
2: Armor/Clothing
3: Alchemy
4: Miscellaneous
31: All
Alchemy Apparatus
0: Mortar and Pestle
1: Retort
2: Alembic
3: Calcinator
Function Index
- functions follwed by a number in subscript were introduced in that release (10: v0010, 11: v0011)
Abs
ACos
AddEffectItem10
AddEffectItemC10
AddFullEffectItem11
AddFullEffectItemC11
AddItemNS15
AddSpellNS15
AddToLeveledList13
AHammerKey
AnimPathIncludes15
AppendToName11
ASin
ATan
ATan2
CalcLeveledItem13
CalcLeveledItemNR15
CanCorpseCheck14
Ceil
ClearHotKey15
ClearLeveledList15
CloneForm
CloseAllMenus15
CompareFemaleBipedPath10
CompareFemaleGroundPath10
CompareFemaleIconPath10
CompareIconPath10
CompareMaleBipedPath10
CompareMaleGroundPath10
CompareMaleIconPath10
CompareModelPath10
CompareName10
CompareNames13
CompareScripts15
con_CAL10
con_GetINISetting
con_HairTint
con_LoadGame13
con_ModWaterShader
con_PlayerSpellBook14
con_QuitGame11
con_RefreshINI
con_RunMemoryPass
con_Save10
con_SaveINI11
con_SetCameraFOV
con_SetClipDist
con_SetFog
con_SetGameSetting
con_SetGamma
con_SetHDRParam
con_SetImageSpaceGlow
con_SetINISetting
con_SetSkyParam
con_SetTargetRefraction
con_SetTargetRefractionFire
con_SexChange
con_TCL10
con_TFC12
con_TGM11
con_ToggleAI10
con_ToggleCombatAI10
con_ToggleDetection
con_ToggleMapMarkers14
con_ToggleMenus10
con_WaterDeepColor
con_WaterReflectionColor
con_WaterShallowColor
CopyEyes13
CopyFemaleBipedPath10
CopyFemaleGroundPath10
CopyFemaleIconPath10
CopyHair13
CopyIconPath10
CopyMaleBipedPath10
CopyMaleGroundPath10
CopyMaleIconPath10
CopyModelPath10
CopyName10
CopyNthEffectItem10
CopyAllEffectItems10
Cos
Cosh
CreatureHasNoHead14
CreatureHasNoLeftArm14
CreatureHasNoMovement14
CreatureHasNoRightArm14
CreatureNoCombatInWater14
CreatureUsesWeaponAndShield14
DisableControl13
DisableKey
DisableMouse
EnableControl13
EnableKey
EnableMouse
EquipItemNS15
Exp
FactionHasSpecialCombat14
FileExists15
Floor
Fmod10
GetActiveEffectCount13
GetActiveMenuFilter15
GetActiveMenuMode15
GetActiveMenuRef15
GetActiveMenuObject15
GetActiveMenuSelection15
GetActorLightAmount
GetActorMaxLevel14
GetActorMinLevel14
GetActorSoulLevel14
GetActorValueC14
GetAlchMenuIngredient15
GetAlchMenuIngredientCount15
GetAlchMenuApparatus15
GetAltControl215
GetApparatusType10
GetArmorAR
GetArmorType
GetArrowProjectileEnchantment15
GetArrowProjectileBowEnchantment15
GetArrowProjectilePoison15
GetAttackDamage
GetBaseObject
GetBookCantBeTaken10
GetBookIsScroll10
GetBookSkillTaught10
GetCalcAllLevels15
GetCalcEachInCount15
GetChanceNone15
GetCellMusicType14
GetClass
GetClassAttribute
GetClassSkill
GetClassSpecialization
GetClimateSunriseBegin12
GetClimateSunriseEnd12
GetClimateSunsetBegin12
GetClimateSunsetEnd12
GetClimateVolatility13
GetCloseSound15
GetContainerMenuView15
GetContainerRespawns13
GetControl
GetCreatureBaseScale13
GetCreatureCombatSkill10
GetCreatureFlies14
GetCreatureMagicSkill10
GetCreatureReach13
GetCreatureSoulLevel13
GetCreatureSound15
GetCreatureSoundBase14
GetCreatureStealthSkill10
GetCreatureSwims14
GetCreatureType10
GetCreatureWalks14
GetCurrentCharge10
GetCurrentClimateID12
GetCrosshairRef14
GetCurrentHealth10
GetCurrentSoulLevel10
GetCurrentWeatherID12
GetDebugSelection13
GetEnchantment
GetEnchMenuEnchItem15
GetEnchMenuSoulgem15
GetEnchantmentCharge
GetEnchantmentCost
GetEnchantmentType
GetEquipmentSlot
GetEquipmentSlotMask10
GetEquippedCurrentCharge
GetEquippedCurrentHealth
GetEquippedObject
GetEquippedWeaponPoison
GetEyes15
GetFallTimer15
GetFirstRef13
GetFPS10
GetFullGoldValue15
GetGameLoaded
GetGameRestarted13
GetGodMode15
GetGoldValue
GetHair15
GetHairColor15
GetHotKeyItem15
GetHorse14
GetIgnoresResistance
GetInventoryObject
GetKeyPress
GetLevItemByLevel15
GetLightRadius14
GetLinkedDoor13
GetLoopSound15
GetMagicEffectBarterFactor
GetMagicEffectBaseCost
GetMagicEffectCode
GetMagicEffectEnchantFactor
GetMagicEffectOtherActorValue10
GetMagicEffectOtherActorValueC10
GetMagicEffectProjectileSpeed
GetMagicEffectSchool
GetMagicEffectUsedObject10
GetMagicEffectUsedObjectC10
GetMagicItemEffectCount
GetMagicItemType
GetMagicProjectileSpell15
GetMerchantContainer12
GetModIndex15
GetMouseButtonPress
GetNextRef13
GetNthActiveEffectCaster13
GetNthActiveEffectCode13
GetNthActiveEffectData13
GetNthActiveEffectDuration13
GetNthActiveEffectMagicItem13
GetNthActiveEffectMagicItemIndex13
GetNthActiveEffectMagnitude13
GetNthActiveEffectTimeElapsed13
GetNthChildRef14
GetNthDetectedActor15
GetNthEffectItemActorValue
GetNthEffectItemArea
GetNthEffectItemCode
GetNthEffectItemDuration
GetNthEffectItemMagnitude
GetNthEffectItemRange
GetNthEffectItemScript10
GetNthEffectItemScriptSchool10
GetNthEffectItemScriptVisualEffect10
GetNthFaction14
GetNthFollower14
GetNthLevItem
GetNthLevItemCount15
GetNthLevItemLevel15
GetNthPackage15
GetNthPlayerSpell10
GetNthRaceBonusSkill12
GetNthRaceSpell14
GetNumLoadedMods15
GetNumRanks14
GetNumChildRefs14
GetNumDetectedActors15
GetNumericINISetting
GetNumFactions14
GetNumFollowers14
GetNumItems
GetNumKeysPressed
GetNumLevItems15
GetNumMouseButtonsPressed
GetNumPackages15
GetNumRefs13
GetObjectCharge
GetObjectHealth
GetOBSERevision15
GetOBSEVersion
GetOpenKey13
GetOpenSound15
GetOwner13
GetOwningFactionRank13
GetParentCell
GetParentCellOwner13
GetParentCellOwningFactionRank13
GetParentCellWaterHeight13
GetPCAttributeBonus15
GetPCMajorSkillUps15
GetPlayerSkillUse11
GetPlayerSpell
GetPlayerSpellCount10
GetPlayersLastActivatedLoadDoor14
GetPlayersLastRiddenHorse14
GetPluginVersion13
GetProcessLevel15
GetProjectileSource15
GetProjectileType15
GetQuality10
GerRace14
GetRefCount15
GetRefVariable15
GetRaceAttribute12
GetRaceAttributeC12
GetRaceSkillBonus12
GetRaceSkillBonusC12
GetRaceSpellCount14
GetRider14
GetScript12
GetScriptActiveEffectIndex13
GetServicesMask15
GetSkillUseIncrement11
GetSoulGemCapacity
GetSoulLevel
GetSoundPlaying15
GetSourceModIndex15
GetSpellExplodesWithNoTarget12
GetSpellMagickaCost
GetSpellMasteryLevel
GetSpellSchool10
GetSpellType
GetTeleportCell13
GetTotalActiveEffectMagnitude13
GetTotalAEAbilityMagnitude13
GetTotalAEAlchemyMagnitude13
GetTotalAEAllSpellsMagnitude13
GetTotalAEDiseaseMagnitude13
GetTotalAEEnchantmentMagnitude13
GetTotalAELesserPowerMagnitude13
GetTotalAENonAbilityMagnitude13
GetTotalAEPowerMagnitude13
GetTotalAESpellMagnitude13
GetTotalPCAttributeBonus15
GetTrainerLevel15
GetTrainerSkill15
GetTravelHorse13
GetObjectType
GetVariable15
GetWeaponReach
GetWeaponSpeed
GetWeaponType
GetWeatherCloudSpeedLower13
GetWeatherCloudSpeedUpper13
GetWeatherColor13
GetWeatherFogDayFar13
GetWeatherFogDayNear13
GetWeatherFogNightFar13
GetWeatherFogNightNear13
GetWeatherHDRValue13
GetWeatherLightningFrequency13
GetWeatherSunDamage13
GetWeatherSunGlare13
GetWeatherTransDelta13
GetWeatherWindSpeed13
GetWeight
Goto
HammerKey
HasBeenPickedUp14
HasLowLevelProcessing14
HasModel14
HasName14
HasNoPersuasion14
HasSpell
HasVariable15
HoldKey
IncrementPlayerSkillUse11
IsActivatable14
IsActivator
IsActorRespawning14
IsAlchemyItem
IsAmmo
IsAnimGroupPlaying15
IsApparatus
IsArmor
IsAttacking15
IsBarterMenuActive15
IsBipedModelPathValid15
IsBipedIconPathValid15
IsBlocking15
IsBook
IsCasting15
IsClassAttribute11
IsClassSkill
IsClonedForm
IsClothing
IsContainer
IsControlPressed13
IsCreature
IsCreatureBiped14
IsDodging15
IsDoor
IsFactionEvil14
IsFactionHidden14
IsFlying15
IsFood
IsFormValid15
IsFurniture
IsGlobalCollisionDisabled11
IsHarvested14
IsIconPathValid15
IsInAir15
IsIngredient
IsJumping15
IsKey
IsKeyPressed
IsKeyPressed2
IsKeyPressed313
IsLight
IsLoadDoor13
IsLightCarriable14
IsMagicEffectCanRecover10
IsMagicEffectCanRecoverC10
IsMagicEffectDetrimental10
IsMagicEffectDetrimentalC10
IsMagicEffectForEnchanting10
IsMagicEffectForEnchantingC10
IsMagicEffectMagnitudePercent10
IsMagicEffectMagnitudePercentC10
IsMagicEffectOnSelfAllowed10
IsMagicEffectOnSelfAllowedC10
IsMagicEffectForSpellmaking10
IsMagicEffectForSpellmakingC10
IsMagicEffectHostile
IsMagicEffectOnTargetAllowed10
IsMagicEffectOnTargetAllowedC10
IsMagicEffectOnTouchAllowed10
IsMagicEffectOnTouchAllowedC10
IsMagicItemAutoCalc10
IsModelPathValid15
IsModLoaded14
IsMovingBackward15
IsMovingForward15
IsMovingLeft15
IsMovingRight15
IsNthEffectItemScripted10
IsNthEffectItemScriptHostile10
IsOffLimits14
IsOnGround15
IsPCLevelOffset14
IsPersistent14
IsPlayable12
IsPlayable215
IsPluginInstalled13
IsPoison
IsPowerAttacking15
IsQuestItem
IsRaceBonusSkill12
IsRaceBonusSkillC12
IsRecoiling15
IsReference15
IsRefEssential
IsScripted10
IsSigilStone
IsSoulGem
IsSpellHostile15
IsStaggered15
IsSummonable14
IsThirdPerson10
IsTurningLeft15
IsTurningRight15
IsUnderWater13
IsWeapon
Label
LeftShift10
Log
Log10
LogicalAnd10
LogicalNot10
LogicalOr10
LogicalXor10
MagicEffectFXPersists10
MagicEffectFXPersistsC10
MagicItemHasEffect
MagicItemHasEffectCode
MagicItemHasEffectCount12
MagicItemHasEffectCountCode12
MagicEffectHasNoArea10
MagicEffectHasNoAreaC10
MagicEffectHasNoDuration10
MagicEffectHasNoDurationC10
MagicEffectHasNoHitEffect10
MagicEffectHasNoHitEffectC10
MagicEffectHasNoIngredient10
MagicEffectHasNoIngredientC10
MagicEffectHasNoMagnitude10
MagicEffectHasNoMagnitudeC10
MagicEffectUsesAttribute10
MagicEffectUsesAttributeC10
MagicEffectUsesArmor10
MagicEffectUsesArmorC10
MagicEffectUsesCreature10
MagicEffectUsesCreatureC10
MagicEffectUsesOtherActorValue10
MagicEffectUsesOtherActorValueC10
MagicEffectUsesSkill10
MagicEffectUsesSkillC10
MagicEffectUsesWeapon10
MagicEffectUsesWeaponC10
MagicItemHasEffectItemScript14
MenuHoldKey10
MenuReleaseKey10
MenuTapKey10
MessageBoxEx14
MessageEx14
ModActorValueC14
ModActorValue2
ModArmorAR
ModAttackDamage
ModEnchantmentCharge
ModEnchantmentCost
ModEquippedCurrentCharge
ModEquippedCurrentHealth
ModFemaleBipedPath10
ModFemaleGroundPath10
ModFemaleIconPath10
ModGoldValue
ModIconPath10
ModMaleBipedPath10
ModMaleGroundPath10
ModMaleIconPath10
ModModelPath10
ModName11
ModNthActiveEffectMagnitude13
ModNthEffectItemArea
ModNthEffectItemDuration
ModNthEffectItemMagnitude
ModNthEffectItemScriptName14
ModObjectCharge
ModObjectHealth
ModQuality10
ModSpellMagickaCost
ModWeaponReach
ModWeaponSpeed
ModWeight
MoveMouseX
MoveMouseY
OffersWeapons15
OffersArmor15
OffersClothing15
OffersBooks15
OffersLights15
OffersIngredients15
OffersApparatus15
OffersMiscItems15
OffersMagicItems15
OffersSpells15
OffersPotions15
OffersTraining15
OffersRecharging15
OffersRepair15
OffersServicesC15
OnControlDown13
OnKeyDown13
ParentCellHasWater13
Pow
PrintToConsole
Rand
RefreshControlMap13
RefreshCurrentClimate13
ReleaseKey
RemoveAllEffectItems12
RemoveEnchantment
RemoveEquippedWeaponPoison
RemoveFromLeveledList13
RemoveItemNS15
RemoveLevItemByLevel15
RemoveNthEffectItem
RemoveScript12
RemoveSpellNS15
RestoreIP
RightShift10
RunBatchScript11
SaveIP
SetActorRespawns14
SetActorValueC14
SetAltControl15
SetApparatusType10
SetArmorAR
SetArmorType
SetAttackDamage
SetBookCantBeTaken10
SetBookIsScroll10
SetBookSkillTaught10
SetCanCorpseCheck14
SetClimateHasMasser13
SetClimateHasSecunda13
SetClimateMoonPhaseLength13
SetClimateSunsetBegin13
SetClimateSunsetEnd13
SetClimateVolatility13
SetCloseSound15
SetContainerRespawns13
SetControl15
SetCurrentSoulLevel14
SetDetectionState15
SetDisableGlobalCollision11
SetEnchantment
SetEnchantmentCharge
SetEnchantmentCost
SetEnchantmentType
SetEquipmentSlot
SetEquippedCurrentCharge
SetEquippedCurrentHealth
SetEquippedWeaponPoison
SetEyes13
SetFactionEvil14
SetFactionHidden14
SetFactionSpecialCombat14
SetFemaleBipedPath
SetFemaleGroundPath
SetFemaleIconPath
SetGoldValue
SetHair13
SetHarvested14
SetHasBeenPickedUp15
SetHotKeyItem15
SetIconPath
SetIgnoresResistance
SetIsFood
SetIsPlayable12
SetLightRadius14
SetLoopSound15
SetLowLevelProcessing14
SetMagicItemAutoCalc10
SetMagicProjectileSpell15
SetMaleBipedPath
SetMaleGroundPath
SetMaleIconPath
SetMerchantContainer12
SetMessageSound15
SetMessageIcon15
SetModelPath
SetMouseSpeedX
SetMouseSpeedY
SetName
SetNameEx15
SetNoPersuasion14
SetNthActiveEffectMagnitude13
SetNthEffectItemActorValue
SetNthEffectItemArea
SetNthEffectItemDuration
SetNthEffectItemMagnitude
SetNthEffectItemRange
SetNthEffectItemScript12
SetNthEffectItemScriptHostile11
SetNthEffectItemScriptName12
SetNthEffectItemScriptSchool10
SetNthEffectItemScriptVisualEffect10
SetNthEffectItemScriptVisualEffectC10
SetNumericGameSetting
SetNumericINISetting
SetObjectCharge
SetObjectHealth
SetOffersWeapons15
SetOffersArmor15
SetOffersClothing15
SetOffersBooks15
SetOffersIngredients15
SetOffersSpells15
SetOffersLights15
SetOffersMiscItems15
SetOffersMagicItems15
SetOffersApparatus15
SetOffersPotions15
SetOffersTraining15
SetOffersRecharging15
SetOffersRepair15
SetOffersServicesC15
SetOpenKey13
SetOpenSound15
SetPCAMurderer13
SetPCLevelOffset14
SetPlayerProjectile15
SetQuality10
SetQuestItem
SetRefCount15
SetRefEssential
SetScaleEX14
SetScript12
SetSkillUseIncrement11
SetSoulGemCapacity10
SetSoulLevel10
SetSpellExplodesWithNoTarget12
SetSpellHostile15
SetSpellMagickaCost
SetSpellMasteryLevel
SetSpellType
SetSummonable14
SetTrainerLevel15
SetTrainerSkill15
SetTravelHorse13
SetWeaponReach
SetWeaponSpeed
SetWeaponType
SetWeatherCloudSpeedLower13
SetWeatherCloudSpeedUpper13
SetWeatherColor13
SetWeatherFogDayFar13
SetWeatherFogDayNear13
SetWeatherFogNightFar13
SetWeatherFogNightNear13
SetWeatherHDRValue13
SetWeatherLightningFrequency13
SetWeatherSunDamage13
SetWeatherSunGlare13
SetWeatherTransDelta13
SetWeatherWindSpeed13
SetWeight
Sin
Sinh
SquareRoot
Tan
Tanh
TapControl13
TapKey
ToggleCreatureModel15
UnequipItemNS15
UnHammerKey
Deprecated Functions
GetEquippedCurrentValue - replaced by GetEquippedCurrentHealth, GetEquippedCurrentCharge and GetEquippedWeaponPoison
GetEquippedObjectValue - replaced by GetEquippedObject and the appropriate individual value functions
GetInventoryItemType - renamed GetBaseObject
GetMagicEffectCodeValue - replaced by the individual GetMagicEffectXXXXC functions.
GetMagicEffectValue - replaced by the individual GetMagicEffect functions
GetMagicItemValue - replaced by the individual MagicItem functions
GetObjectValue - replaced by the individual value functions
SetActiveSpell - duplicate of standard SetPlayerSpell function
RefreshControlMap - input functions are now in sync with Oblivion control bindings
GetAltControl - use GetAltControl2 instead