## OBSE v0013 Command Documentation

New values and functions available in the v0013 beta are marked with an asterix (*)
OBSE @ Oblivion Construction Set Wiki
New v0013 functions:
AddToLeveledList13
CalcLeveledItem13
CompareNames13
con_LoadGame13
CopyEyes13
CopyHair13
DisableControl13
EnableControl13
GetActiveEffectCount13
GetClimateVolatility13
GetContainerRespawns13
GetCreatureBaseScale13
GetCreatureReach13
GetCreatureSoulLevel13
GetDebugSelection13
GetFirstRef13
GetGameRestarted13
GetLinkedDoor13
GetNextRef13
GetNthActiveEffectCaster13
GetNthActiveEffectCode13
GetNthActiveEffectData13
GetNthActiveEffectDuration13
GetNthActiveEffectMagicItem13
GetNthActiveEffectMagicItemIndex13
GetNthActiveEffectMagnitude13
GetNthActiveEffectTimeElapsed13
GetNumRefs13
GetOpenKey13
GetOwner13
GetOwningFactionRank13
GetParentCellOwner13
GetParentCellOwningFactionRank13
GetParentCellWaterHeight13
GetPluginVersion13
GetScriptActiveEffectIndex13
GetTeleportCell13
GetTotalActiveEffectMagnitude13
GetTotalAEAbilityMagnitude13
GetTotalAEAlchemyMagnitude13
GetTotalAEAllSpellsMagnitude13
GetTotalAEDiseaseMagnitude13
GetTotalAEEnchantmentMagnitude13
GetTotalAELesserPowerMagnitude13
GetTotalAENonAbilityMagnitude13
GetTotalAEPowerMagnitude13
GetTotalAESpellMagnitude13
GetTravelHorse13
GetWeatherCloudSpeedLower13
GetWeatherCloudSpeedUpper13
GetWeatherColor13
GetWeatherFogDayFar13
GetWeatherFogDayNear13
GetWeatherFogNightFar13
GetWeatherFogNightNear13
GetWeatherHDRValue13
GetWeatherLightningFrequency13
GetWeatherSunDamage13
GetWeatherSunGlare13
GetWeatherTransDelta13
GetWeatherWindSpeed13
IsControlPressed13
IsKeyPressed313
IsLoadDoor13
IsPluginInstalled13
IsUnderWater13
OnControlDown13
OnKeyDown13
ParentCellHasWater13
RefreshControlMap13
RefreshCurrentClimate13
RemoveFromLeveledList13
SetClimateHasMasser13
SetClimateHasSecunda13
SetClimateMoonPhaseLength13
SetClimateSunsetBegin13
SetClimateSunsetEnd13
SetClimateVolatility13
SetContainerRespawns13
SetEyes13
SetHair13
SetOpenKey13
SetPCAMurderer13
SetTravelHorse13
SetWeatherCloudSpeedLower13
SetWeatherCloudSpeedUpper13
SetWeatherColor13
SetWeatherFogDayFar13
SetWeatherFogDayNear13
SetWeatherFogNightFar13
SetWeatherFogNightNear13
SetWeatherHDRValue13
SetWeatherLightningFrequency13
SetWeatherSunDamage13
SetWeatherSunGlare13
SetWeatherTransDelta13
SetWeatherWindSpeed13
TapControl13
Table of Contents

- Function Syntax Format
- Function Calling Conventions
- Qualities
- Types
- General Functions
- Cloning Functions
- Flow Control Functions
- Console Functions
- Input Functions
- Math Functions
- Trig 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.

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

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
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
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
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) GetMIECount 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.
(hasEffect:bool) MagicItemHasEffect effect:chars
(hasEffect:bool) MagicHasEffect effect: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.
(hasEffect:bool) MagicItemHasEffectCode effectCode:long
(hasEffect:bool) MagicHasEffectC effectCode:long
MagicItemHasEffectCount - returns the count of the specified effects on the magic item.
(effectCount:short) MagicItemHasEffectCount effect: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.
(effectCount:short) MagicItemHasEffectCountCode effectCode:long
(effectCount:short) MagicItemHasEffectCountC effectCode:long
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
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
GetTotalActiveEffectMagnitude - returns the total magnitude of all ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalActiveEffectMagnitude effectCode:chars
(totalMag:long) reference.GetTotalAEMagnitude effectCode:chars
(totalMag:long) reference.GetTotalActiveEffectMagnitudeC effectCode:long
(totalMag:long) reference.GetTotalAEMagnitudeC effectCode:long
GetTotalAENonAbilityMagnitude - returns the total magnitude of all non-ability ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAENonAbilityMagnitude effectCode:chars
(totalMag:long) reference.GetTotalAENonAbilityMagnitudeC effectCode:long
GetTotalAEAbilityMagnitude - returns the total magnitude of all ability ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAEAbilityMagnitude effectCode:chars
(totalMag:long) reference.GetTotalAEAbilityMagnitudeC effectCode:long
GetTotalAESpellMagnitude - returns the total magniude of all spell ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAESpellMagnitude effectCode:chars
(totalMag:long) reference.GetTotalAESpellMagnitudeC effectCode:long
GetTotalAEDiseaseMagnitude - returns the total magnitude of all disease ActiveEffects with a given code on the target.
(totalMag:long) reference.GetTotalAEDiseaseMagnitude effectCode:chars
(totalMag:long) reference.GetTotalAEDiseaseMagnitudeC effectCode:long
GetTotalAELesserPowerMagnitude - returns the total magnitude of all lesser power ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAELesserPowerMagnitude effectCode:chars
(totalMag:long) reference.GetTotalAELesserPowerMagnitudeC effectCode:long
GetTotalAEPowerMagnitude - retuns the total magnidue of all greater power ActiveEffects with a given code on the target
(totalMag:long) reference.GetTotalAEPowerMagnitude effectCode:chars
(totalMag:long) reference.GetTotalAEPowerMagnitudeC effectCode:long
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
(totalMag:long) reference.GetTotalAEAllSpellsMagnitudeC effectCode:long
GetTotalAEEnchantmentMagnitude - retuns the total magnitude of all enchantments with a given code on the target.
(totalMag:long) reference.GetTotalAEEnchantmentMagnitude effectCode:chars
(totalMag:long) reference.GetTotalAEEnchantmentMagnitudeC effectCode:long
GetTotalAEAlchemyMagnitude - returns the total magnitude of all potions with a given code on the target.
(totalMag:long) reference.GetTotalAEAlchemyMagnitude effectCode:chars
(totalMag:long) reference.GetTotalAEAlchemyMagnitudeC effectCode:long
GetScriptActiveEffectIndex - returns the index of the corresponding ActiveEffect for the running script effect
(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
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
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
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
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
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
(isPlayable:bool) reference.IsPlayable objectID:ref
SetIsPlayable - specifies whether the object can be used by the player
(nothing) reference.SetIsPlayable isPlayable:bool objectID: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.

- Alchemy Item
- Ammo
- Apparatus
- Armor
- Book
- Climate
- Clothing
- Creature
- Door
- Enchantment
- Ingredient
- Leveled List*
- Magic Effect Setting
- Magic Target
- NPC
- Skill
- Soul Gem
- Spell
- Weapon
- Weather

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
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:ref) GetSunriseBegin climate:ref
GetClimateSunriseEnd - returns the time sunrise ends specified as a number of 10 minute units since midnight
(sunriseEnd:ref) GetSunriseEnd climate:ref
GetClimateSunsetBegin - returns the time sunset begins specified as a number of 10 minute units since midnight
(sunsetBegin:ref) GetSunsetBegin climate:ref
GetClimateSunsetEnd - returns the time sunset ends specified as a number of 10 minute units since midnight
(sunsetEnd:ref) 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: 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
Door
Qualities:
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
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
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: 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
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 NPC has the specified spell
(hasSpell:bool) reference.HasSpell spell:ref
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.GetActorLightAmout
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
GetTravelHorse* - returns a reference to the travel horse used by the calling reference.
(horse:ref) reference.GetTravelHorse
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
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
* these values can be changed but have no effect if the spell is marked AutoCalc. See IsMagicItemAutocalc and SetMagicItemAutocalc.
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
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
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
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
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
PrintToConsole - prints a message to the console in the same format as Message
(nothing) PrintToConsole formatString:string var1 var2 etc
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
SetPCAMurderer - sets whether the PC is a murderer or not
(nothing) SetPCAMurderer isMurderer:bool
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
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.
(reference:ref) GetFirstRef type: short cellDepth: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.
(numRefs:short) GetNumRefs type: short cellDepth: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
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
GetAltControl - returns the dx scancode of the alternate key used for the specified control
(dxScanCode:long) GetAltControl 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.
(nothing) RefreshControlMap
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
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
Function Index
- functions follwed by a number in subscript were introduced in that release (10 = v0010, 11 = v0011)
Abs
ACos
AddEffectItem10
AddEffectItemC10
AddFullEffectItem11
AddFullEffectItemC11
AddToLeveledList13
AHammerKey
AppendToName11
ASin
ATan
ATan2
CalcLeveledItem13
Ceil
CloneForm
CompareFemaleBipedPath10
CompareFemaleGroundPath10
CompareFemaleIconPath10
CompareIconPath10
CompareMaleBipedPath10
CompareMaleGroundPath10
CompareMaleIconPath10
CompareModelPath10
CompareName10
CompareNames13
con_CAL10
con_GetINISetting
con_HairTint
con_LoadGame13
con_ModWaterShader
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_ToggleMenus10
con_WaterDeepColor
con_WaterReflectionColor
con_WaterShallowColor
CopyEyes13
CopyFemaleBipedPath10
CopyFemaleGroundPath10
CopyFemaleIconPath10
CopyHair13
CopyIconPath10
CopyMaleBipedPath10
CopyMaleGroundPath10
CopyMaleIconPath10
CopyModelPath10
CopyName10
CopyNthEffectItem10
CopyAllEffectItems10
Cos
Cosh
DisableControl13
DisableKey
DisableMouse
EnableControl13
EnableKey
EnableMouse
Exp
Floor
Fmod10
GetActiveEffectCount13
GetActorLightAmount
GetAltControl
GetApparatusType10
GetArmorAR
GetArmorType
GetAttackDamage
GetBaseObject
GetBookCantBeTaken10
GetBookIsScroll10
GetBookSkillTaught10
GetClass
GetClassAttribute
GetClassSkill
GetClassSpecialization
GetClimateSunriseBegin12
GetClimateSunriseEnd12
GetClimateSunsetBegin12
GetClimateSunsetEnd12
GetClimateVolatility13
GetContainerRespawns13
GetControl
GetCreatureBaseScale13
GetCreatureCombatSkill10
GetCreatureMagicSkill10
GetCreatureReach13
GetCreatureSoulLevel13
GetCreatureStealthSkill10
GetCreatureType10
GetCurrentCharge10
GetCurrentClimateID12
GetCurrentHealth10
GetCurrentSoulLevel10
GetCurrentWeatherID12
GetDebugSelection13
GetEnchantment
GetEnchantmentCharge
GetEnchantmentCost
GetEnchantmentType
GetEquipmentSlot
GetEquipmentSlotMask10
GetEquippedCurrentCharge
GetEquippedCurrentHealth
GetEquippedObject
GetEquippedWeaponPoison
GetFirstRef13
GetFPS10
GetGameLoaded
GetGameRestarted13
GetGoldValue
GetIgnoresResistance
GetInventoryObject
GetKeyPress
GetLinkedDoor13
GetMagicEffectBarterFactor
GetMagicEffectBaseCost
GetMagicEffectCode
GetMagicEffectEnchantFactor
GetMagicEffectOtherActorValue10
GetMagicEffectOtherActorValueC10
GetMagicEffectProjectileSpeed
GetMagicEffectSchool
GetMagicEffectUsedObject10
GetMagicEffectUsedObjectC10
GetMagicItemEffectCount
GetMagicItemType
GetMerchantContainer12
GetMouseButtonPress
GetNextRef13
GetNthActiveEffectCaster13
GetNthActiveEffectCode13
GetNthActiveEffectData13
GetNthActiveEffectDuration13
GetNthActiveEffectMagicItem13
GetNthActiveEffectMagicItemIndex13
GetNthActiveEffectMagnitude13
GetNthActiveEffectTimeElapsed13
GetNthEffectItemActorValue
GetNthEffectItemArea
GetNthEffectItemCode
GetNthEffectItemDuration
GetNthEffectItemMagnitude
GetNthEffectItemRange
GetNthEffectItemScript10
GetNthEffectItemScriptSchool10
GetNthEffectItemScriptVisualEffect10
GetNthPlayerSpell10
GetNthRaceBonusSkill12
GetNumericINISetting
GetNumItems
GetNumKeysPressed
GetNumMouseButtonsPressed
GetNumRefs13
GetObjectCharge
GetObjectHealth
GetOBSEVersion
GetOpenKey13
GetOwner13
GetOwningFactionRank13
GetParentCell
GetParentCellOwner13
GetParentCellOwningFactionRank13
GetParentCellWaterHeight13
GetPlayerSkillUse11
GetPlayerSpell
GetPlayerSpellCount10
GetPluginVersion13
GetQuality10
GetRaceAttribute12
GetRaceAttributeC12
GetRaceSkillBonus12
GetRaceSkillBonusC12
GetScript12
GetScriptActiveEffectIndex13
GetSkillUseIncrement11
GetSoulGemCapacity
GetSoulLevel
GetSpellExplodesWithNoTarget12
GetSpellMagickaCost
GetSpellMasteryLevel
GetSpellSchool10
GetSpellType
GetTeleportCell13
GetTotalActiveEffectMagnitude13
GetTotalAEAbilityMagnitude13
GetTotalAEAlchemyMagnitude13
GetTotalAEAllSpellsMagnitude13
GetTotalAEDiseaseMagnitude13
GetTotalAEEnchantmentMagnitude13
GetTotalAELesserPowerMagnitude13
GetTotalAENonAbilityMagnitude13
GetTotalAEPowerMagnitude13
GetTotalAESpellMagnitude13
GetTravelHorse13
GetType
GetWeaponReach
GetWeaponSpeed
GetWeaponType
GetWeatherCloudSpeedLower13
GetWeatherCloudSpeedUpper13
GetWeatherColor13
GetWeatherFogDayFar13
GetWeatherFogDayNear13
GetWeatherFogNightFar13
GetWeatherFogNightNear13
GetWeatherHDRValue13
GetWeatherLightningFrequency13
GetWeatherSunDamage13
GetWeatherSunGlare13
GetWeatherTransDelta13
GetWeatherWindSpeed13
GetWeight
Goto
HammerKey
HasSpell
HoldKey
IncrementPlayerSkillUse11
IsActivator
IsAlchemyItem
IsAmmo
IsApparatus
IsArmor
IsBook
IsClassAttribute11
IsClassSkill
IsClonedForm
IsClothing
IsContainer
IsControlPressed13
IsCreature
IsDoor
IsFood
IsFurniture
IsGlobalCollisionDisabled11
IsIngredient
IsKey
IsKeyPressed
IsKeyPressed2
IsKeyPressed313
IsLight
IsLoadDoor13
IsMagicEffectCanRecover10
IsMagicEffectCanRecoverC10
IsMagicEffectDetrimental10
IsMagicEffectDetrimentalC10
IsMagicEffectForEnchanting10
IsMagicEffectForEnchantingC10
IsMagicEffectMagnitudePercent10
IsMagicEffectMagnitudePercentC10
IsMagicEffectOnSelfAllowed10
IsMagicEffectOnSelfAllowedC10
IsMagicEffectForSpellmaking10
IsMagicEffectForSpellmakingC10
IsMagicEffectHostile
IsMagicEffectOnTargetAllowed10
IsMagicEffectOnTargetAllowedC10
IsMagicEffectOnTouchAllowed10
IsMagicEffectOnTouchAllowedC10
IsMagicItemAutoCalc10
IsNthEffectItemScripted10
IsNthEffectItemScriptHostile10
IsPlayable12
IsPluginInstalled13
IsPoison
IsQuestItem
IsRaceBonusSkill12
IsRaceBonusSkillC12
IsRefEssential
IsScripted10
IsSigilStone
IsSoulGem
IsThirdPerson10
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
MenuHoldKey10
MenuReleaseKey10
MenuTapKey10
ModActorValue2
ModArmorAR
ModAttackDamage
ModEnchantmentCharge
ModEnchantmentCost
ModEquippedCurrentCharge
ModEquippedCurrentHealth
ModFemaleBipedPath10
ModFemaleGroundPath10
ModFemaleIconPath10
ModGoldValue
ModIconPath10
ModMaleBipedPath10
ModMaleGroundPath10
ModMaleIconPath10
ModModelPath10
ModName11
ModNthEffectItemArea
ModNthEffectItemDuration
ModNthEffectItemMagnitude
ModObjectCharge
ModObjectHealth
ModQuality10
ModSpellMagickaCost
ModWeaponReach
ModWeaponSpeed
ModWeight
MoveMouseX
MoveMouseY
OnControlDown13
OnKeyDown13
ParentCellHasWater13
Pow
PrintToConsole
Rand
RefreshControlMap13
RefreshCurrentClimate13
ReleaseKey
RemoveAllEffectItems12
RemoveEnchantment
RemoveEquippedWeaponPoison
RemoveFromLeveledList13
RemoveNthEffectItem
RemoveScript12
RestoreIP
RightShift10
RunBatchScript11
SaveIP
SetApparatusType10
SetArmorAR
SetArmorType
SetAttackDamage
SetBookCantBeTaken10
SetBookIsScroll10
SetBookSkillTaught10
SetClimateHasMasser13
SetClimateHasSecunda13
SetClimateMoonPhaseLength13
SetClimateSunsetBegin13
SetClimateSunsetEnd13
SetClimateVolatility13
SetContainerRespawns13
SetDisableGlobalCollision11
SetEnchantment
SetEnchantmentCharge
SetEnchantmentCost
SetEnchantmentType
SetEquipmentSlot
SetEquippedCurrentCharge
SetEquippedCurrentHealth
SetEquippedWeaponPoison
SetEyes13
SetFemaleBipedPath
SetFemaleGroundPath
SetFemaleIconPath
SetGoldValue
SetHair13
SetIconPath
SetIgnoresResistance
SetIsFood
SetMagicItemAutoCalc10
SetMaleBipedPath
SetMaleGroundPath
SetMaleIconPath
SetMerchantContainer12
SetModelPath
SetMouseSpeedX
SetMouseSpeedY
SetName
SetNthEffectItemActorValue
SetNthEffectItemArea
SetNthEffectItemDuration
SetNthEffectItemMagnitude
SetNthEffectItemRange
SetNthEffectItemScript12
SetNthEffectItemScriptHostile11
SetNthEffectItemScriptName12
SetNthEffectItemScriptSchool10
SetNthEffectItemScriptVisualEffect10
SetNthEffectItemScriptVisualEffectC10
SetNumericGameSetting
SetNumericINISetting
SetObjectCharge
SetObjectHealth
SetOpenKey13
SetPCAMurderer13
SetIsPlayable12
SetQuality10
SetQuestItem
SetRefEssential
SetScript12
SetSkillUseIncrement11
SetSoulGemCapacity10
SetSoulLevel10
SetSpellExplodesWithNoTarget12
SetSpellMagickaCost
SetSpellMasteryLevel
SetSpellType
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
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