OBSE v0015  Command Documentation

New values and functions available in v0015 are marked with an asterix ()
OBSE @ Oblivion Construction Set Wiki

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

Table of Contents

Function Syntax Format
    (returnValueName:returnValueType)    reference.FunctionName parameter1:type parameter2:type

optional
- optional parameters or references are in italics

Parameter Types: designated after colon
  float    a positive or negative decimal number
  long     a positve whole number with large values   
  short    a positive whole number with smaller values
  ref      a ref (usually an objectID)
  chars    a 4 character magic effect code (for example: FIDG, Z001)
  string   a set of characters in quotes
  bool     a short with only 2 values: 1 for true and 0 for false
  

Function Calling Conventions:

By Reference or ObjectID
reference.FunctionName someParameters objectID:ref
Examples:
    (health:long) reference.GetObjectHealth objectID:ref
    (oldEnchantment:ref) reference.SetEnchantment nuEnchantment:ref objectID:ref

These functions can either be called on a reference or have an objectID passed in as an argument.  If an objectID is passed in, it takes precedence over a calling reference.

By Reference only:
reference.FunctionName someParameters
Examples:
    (oldPoison:ref) reference.SetEquippedWeaponPoison nuPoison:ref

These functions must be called on a reference.

By ObjectID only
FunctionName someParamters objectID:ref

    (masterLevel:short) GetSpellMasteryLevel spell:ref
    (effectCode:long) GetNthEffectItemCode magicItem:ref whichEffect:long

Qualities
Qualities are a set of related values and functions which apply to multiple Oblivion object types.  For documentation purposes I have gathered the related values together.  Any type which has a given quality has all of values listed and all of the quality's functions may be applied to the type. Actor
Includes creatures and NPCs. All changes to actor flags such as Respawn and Low Level Processing are saved in the savegame.
Functions:
    IsRefEssential - returns whether the referenced actor is essential
        (isEssential:bool) reference.IsRefEssential
    SetRefEssential - sets the calling ref to be essential or not
        reference.SetRefEssential isEssential:bool
    HasSpell - returns whether the actor has the specified spell
        (hasSpell:bool) reference.HasSpell spell:ref
    GetActorValueC - returns the actor value specified by the actor value code
        (actorValue:long) reference.GetActorValueC actorValueCode:short
        (actorValue:long) reference.GetAVC actorValueCode:short
    ModActorValueC - modifies the actor value without changing the base value.  Acts like a spell: a negative number reduces the value which can be restored and a positive value restores values without exceeding the maximum of the stat.
        (nothing) reference.ModActorValueC actorValueCode:short value:long
        (nothing) reference.ModAVC actorValueCode:short value:long
    SetActorValueC - sets the actor value specified by the actor value code
        (nothing) reference.SetActorValueC actorValueCode:short value:long
        (nothing) reference.SetAVC actorValueCode:short value:long
    ModActorValue2 - modifies the current value without changing the base value.  Acts like a spell: a negative number reduces the value which can be restored and a positive value restores values without exceeding the maximum of the stat.
        (nothing) reference.ModActorValue2 actorValueName:string value:long
    GetActorLightAmount - returns a float describing the amount of light falling on an actor, or 100 if the actor is not in high/medium-high process.
        (lightAmount:float) reference.GetActorLightAmount
    CanCorpseCheck - returns 1 if the Can Corpse Check flag is set on the actor
        (canCoprseCheck:bool) reference.CanCorpseCheck actor:ref
    GetActorMinLevel - returns the minimum level of the actor if the PC Level Offset flag is set
        (minLevel:short) reference.GetMinLevel actor:ref
    GetActorMaxLevel - returns the maximum level of the actor if the PC Level Offset flag is set
        (maxLevel:short) reference.GetMaxLevel actor:ref
    GetNumFactions - returns the number of factions to which the actor belongs
        (numFactions:short) reference.GetNumFactions actor:ref
    GetNthFaction - returns the nth faction to which the actor belongs
        (faction:ref) reference.GetNthFaction actor:ref
    GetActorSoulLevel - returns the soul level of any actor.  If an NPC it returns Grand, otherwise if a creature it returns the creature's soul level.
        (soulLevel:short) reference.GetActorSoulLevel actor:ref
    HasLowLevelProcessing - returns 1 if the actor has low level processing enabled
        (hasLowProc:bool) reference.HasLowLevelProcessing actor:ref
    HasNoPersuasion - returns 1 if the No Persuasion flag is set on the actor
        (hasNoPers) reference.HasNoPersuasion actor:ref
    IsActorRespawning - returns 1 if the Respawn flag is set on the actor
        (respawns:bool) reference.IsActorRespawning actor:ref
    IsPCLevelOffset - returns 1 if the actor's level is calculated relative to the player's level
        (isLevOffset:bool) reference.IsPCLevelOffset actor:ref
    IsSummonable - returns 1 if the Summonable flag is set on the actor
        (isSummonable:bool) reference.IsSummonable actor:ref
    SetActorRespawns - changes the Respawn flag on the actor
        (nothing) reference.SetActorRespawns flag:short actor:ref
    SetCanCorpseCheck - changes the Can Corpse Check flag on the actor
        (nothing) reference.SetCanCorpseCheck flag:short actor:ref
    SetFemale - changes the Female flag on the actor. Changes are saved but may not be immediately visible.
        (nothing) reference.SetFemale flag:short actor:ref
    SetLowLevelProcessing - turns low level processing on or off for the actor. Note that this sets the No Low Level Processing flag to the opposite of the passed value.
        (nothing) reference.SetLowLevelProcessing flag:short actor:ref
    SetNoPersuasion - changes the No Persuasion flag on the actor
        (nothing) reference.SetNoPersuasion flag:short actor:ref
    SetSummonable - changes the Summonable flag on the actor
        (nothing) reference.SetSummonable flag:short actor:ref
    SetPCLevelOffset - changes the PC Level Offset flag on the actor, and optionally specifies the minimum and maximum levels. If minLevel or maxLevel is omitted or passed as -1, the existing value will be retained. Note that changes to the min/max levels are not saved in the savegame.
        (nothing) reference.SetPCLevelOffset flag:short minLevel:short maxLevel:short actor:ref
    GetNumPackages - returns the number of AI packages in the actor's package list
        (numPackages:short) reference.GetNumPackages actor:ref
    GetNthPackage - returns the Nth AI package in the NPC's package list, in the order in which they were added in the editor.
        (package:ref) reference.GetNthPackage actor:ref

Attacking
Types with this quality are used for attacks.
Values:
    Attack Damage - long the base damage of the type; used in a forumla with the appropriate skill to determine damage actually done
    Speed - float the speed factor of the type; used in a forumla to determine the rate of attack
    Ignores Resistance flag - bool determines whether the type will ignore normal damage resistance.
Functions:   
    GetAttackDamage - returns the base attack damage
        (damage:long) reference.GetAttackDamage objectID:ref
    SetAttackDamage - sets the base attack damage
        (nothing) reference.SetAttackDamage nuDamage:long objectID:ref
    ModAttackDamage - modifies the base attack damage up or down
        (nothing) reference.ModAttackDamage modifyBy:float objectID:ref
    GetWeaponSpeed - returns the weapon speed
        (speed:float) reference.GetWeaponSpeed objectID:ref
    SetWeaponSpeed - sets the weapon speed
        (nothing) reference.SetWeaponSpeed nuSpeed:float obejctID:ref
    ModWeaponSpeed - modifies the weapon speed up or down
        (nothing) reference.ModWeaponSpeed modifyBy:float obejctID:ref
    GetIgnoresResistance - returns whether the object ignores normal damage resistance
        (ignores:bool) reference.GetIgnoresResistance objectID:ref
    SetIgnoresResistance - sets whether the object ignores normal damage resistance
        (nothing) reference.SetIgnoresResistance shouldIgnore:bool objectID:ref

Audible*
Types with this quality have one or more sounds associated with them.
Values:
    Open Sound - ref the sound played upon opening. (Containers and Doors)
    Close Sound - ref the sound played upon closing. (Containers and Doors)
    Loop Sound - ref the looping sound associated with an object. (Doors, Lights, and Activators)
Functions:
    GetOpenSound - Returns the "open" sound
        (sound:ref) reference.GetOpenSound baseObject:ref
    GetCloseSound - Returns the "close" sound
        (sound:ref) reference.GetCloseSound baseObject:ref
    GetLoopSound - Returns the looping sound
        (sound:ref) reference.GetLoopSound baseObject:ref
    SetOpenSound - Sets the "open" sound
        (nothing) reference.SetOpenSound sound:ref baseObject:ref
    SetCloseSound - Sets the "close" sound
        (nothing) reference.SetCloseSound sound:ref baseObject:ref
    SetLoopSound - Sets the looping sound
        (nothing) reference.SetLoopSound sound:ref baseObject:ref

Breakable
Types with this quality can be broken.
Values:
    Health - long the base health of the object.  Cannot be negative.
    Current Health - float the current health of the object.  the object is damaged when the current value is less than the base object value and is broken when the current health reaches 0.  The effectiveness of the object may be decreased as damage increases.
Functions:
    GetObjectHealth - returns the base object health
        (health:long) reference.GetObjectHealth objectID:ref
    SetObjectHealth - sets the base object health
        (nothing) reference.SetObjectHealth nuHealth:long objectID:ref
    ModObjectHealth - modifies the base object health up or down
        (nothing) reference.ModObjectHealth modifyBy:float objectID:ref
    GetCurrentHealth - returns the current health of the calling reference
        (health:float) reference.GetCurrentHealth
    GetEquippedCurrentHealth - gets the current health of the object in the specified equipment slot
        (health:float) reference.GetEquippedCurrentHealth slot:short
    SetEquippedCurrentHealth - sets the current health of the object in the specified equipment slot
        (nothing) reference.SetEquippedCurrentHealth nuHealth:long slot:short
    ModEquippedCurrentHealth - modifies the current health of the object in the specified equipment slot up or down
        (nothing) reference.ModEquippedCurrentHealth modifyBy:float slot:short

Class
Types with this quality have a player class.
Values:
    Attributes - short the two attributes of the class
    Skills - short the five major skills of the class
    Specialization - short the specialization of the class
Functions:
    GetClass - returns the class of the NPC
        (class:ref) reference.GetClass
    GetClassAttribute - returns the Nth attribute of the class.  If called on a reference it will attempt to find the class from that referenced NPC and use that..  If a class FormID is passed, that takes precedence.
        (attribute:short) reference.GetClassAttribute whichAttribute:short class:ref
    GetClassSkill - returns the Nth skill of the class. If called on a reference it will attempt to find the class from that referenced NPC and use that..  If a class FormID is passed, that takes precedence.
        (skill:short
reference.GetClassSkill whichSkill:short class:ref
    GetClassSpecialization - returns the class specialization. If called on a reference it will attempt to find the class from that referenced NPC and use that..  If a class FormID is passed, that takes precedence.
        (specialization:shortreference.GetClassSpecialization class:ref
    IsClassSkill - returns whether the passed skill is a skill of the class. If called on a reference it will attempt to find the class from that referenced NPC and use that..  If a class FormID is passed, that takes precedence.
        (isClassSkill:bool) reference.IsClassSkill  skill:short class:ref
        (isClassSkill:bool) reference.IsMajor  skill:short class:ref
    IsClassAttribute - returns whether the passed attribute is an attribute of the class. If called on a reference it will attempt to find the class from that referenced NPC and use that..  If a class FormID is passed, that takes precedence. (available in v0011)
        (isClassAttribute:bool) reference.IsClassAttribute attribute:short class:ref


Container
Something that holds inventory items.
Functions:
    GetNumItems - returns the number of different object types in the container
        (count:long) reference.GetNumItems
    GetInventoryObject - returns the objectID of the Nth item type in the container
        (objectID:ref) reference.GetInventoryObject whichObject:long
    IsContainer - returns whether the reference or passed objectID is a container
        (isContainer:bool) reference.IsContainer objectID:ref
    GetContainerRespawns - returns whether the container's contents repawn
        (respawns:bool) reference.GetContainerRespawns objectID:ref
        (respawns:bool) reference.IsUnsafeRespawns objectID:ref
    SetContainerRespawns - sets whether the container's contents respawn.  Note - this change is not persisted in the save game.
        (nothing) reference.SetContainerRespawns respawns:bool objectID:ref
        (nothing) reference.SetUnsafeContainer respawns:bool objectID:ref
   
Edible
Types with this quality may be considered food.
Values:
    Is Food flag - bool is the object considered to be food
Functions:
    IsFood - returns whether the object is considered to be food
        (isFood:bool) reference.IsFood objectID:ref
    SetIsFood - sets whether the object is considered to be food
        (nothing) reference.IsFood isFood:bool objectID:ref

Enchantable
Types with this quality may be enchanted.  A couple notes:  Enchantments and the ranges of their effects need to be appropriate for the enchantable object's type.  The Enchantment Type needs to match the object the enchantment applies to.  Also, when adding an enchantment to an object, be sure that the object has a charge, or the enchantment cannot work.  If the object was not previously enchanted, call SetObjectCharge to assign a charge to the object.
Values:
    Enchantment - ref the specific enchantment on the enchantable item
    Charge - long the maximum charge available on the enchantable item
    Current Charge - float the current charge of the enchantable item
Functions:
    GetEnchantment - returns the specific enchantment on the object
        (enchantment:ref) reference.GetEnchantment objectID:ref
    SetEnchantment - sets the specific enchantment on the object and returns any previous enchantment
        (oldEnchantment:ref) reference.SetEnchantment nuEnchantment:ref objectID:ref
    RemoveEnchantment - removes the enchantment from the object and returns any previous enchantment
        (oldEnchantment:ref) reference.RemoveEnchantment objectID:ref
    GetObjectCharge - returns the max charge of the object
        (charge:long) reference.GetObjectCharge objectID:ref
    SetObjectCharge - sets the max charge of the object
        (nothing) refernce.SetObjectCharge nuCharge:long objectID:ref
    ModObjectCharge - modifies the max charge of the object up or down
        (nothing) reference.ModObjectCharge modifyBy:float objectID:ref
    GetCurrentCharge - returns the current charge of the calling reference
        (charge:float) reference.GetCurrentCharge
    GetEquippedCurrentCharge - returns the current charge of the object in the specified slot
        (charge:float) reference.GetEquippedCurrentCharge slot:short
    SetEquippedCurrentCharge - sets the current charge of the object in the specified slot
        (nothing) reference.SetEquippedCurrentCharge nuCharge:long slot:short
    ModEquippedCurrentCharge - modifies the current charge of the object in the specified slot up or down
        (nothing) reference.ModEquippedCurrentCharge modifyBy:float slot:short

Equippable
Types with this quality can be equipped by a character.
Values:
    Slot - short the equipment slot of the object
Functions:
    GetEquipmentSlot - returns the equipment slot of the object
        (slot:short) reference.GetEquipmentSlot objectID:ref
    GetEquippedObject

Inventory
Types with this quality are objects that can be either stored in an inventory or exist as a reference outside of an inventory.
Values:
    Object - long the base object id of a reference
    Weapon Type- short the type of weapon
    Weight - float the weight of one object of this type
    Gold Value - long the gold value of one object of this type.  this value may not match the value displayed in the interface as that could include additional value from an enchantment.
    Is Quest Item flag - bool whether the type is a quest item.  quest items cannot be activated and cannot be dropped.
Functions:
    GetBaseObject - returns the base object of the reference
        (objectID:ref) reference.GetBaseObject
    GetObjectType - returns a type code for each type of object
        (type:long) reference.GetObjectType objectID:ref
    IsWeapon - returns whether the object is a weapon
        (isWeapon:bool) reference.IsWeapon objectID:ref
    IsAmmo - returns whether the object is ammunition
        (isAmmo:bool) reference.IsAmmo objectID:ref
    IsArmor - returns whether the object is armor
        (isArmor:bool) reference.IsArmor objectID:ref
    IsBook - returns whether the object is a book
        (isBook:bool) reference.IsBook objectID:ref
    IsClothing - returns whether the object is clothing
        (isClothing:bool) reference.IsClothing objectID:ref
    IsIngredient - returns whether the object is an ingredient
        (isIngredient:bool) reference.IsIngredient objectID:ref
    IsKey - returns whether the object is a key
        (isKey:bool) reference.IsKey objectID:ref
    IsAlchemyItem - returns whether the object is an alchemy item
        (isAlchemyItem:bool) reference.IsAlchemyItem objectID:ref
    IsApparatus - returns whether the object is an alchemy apparatus
        (isApparatus:bool) reference.IsApparatus objectID:ref
    IsSoulGem - returns whether the object is a soul gem
        (isSoulGem:bool) reference.IsSoulGem objectID:ref
    IsSigilStone - returns whether the object is a sigil stone
        (isSigilStone:bool) reference.IsSigilStone objectID:ref
    IsLight - returns whether the object is a light source
        (isLight:bool) reference.IsLight objectID:ref
    GetWeight - returns the weight of the type
        (weight:float) reference.GetWeight objectID:ref
    SetWeight - sets the weight of the type
        (nothing) reference.SetWeight nuWeight:float objectID:ref
    ModWeight - modifies the weight of the type up or down
        (nothing) reference.ModWeight modifyBy:float objectID:ref
    GetGoldValue - returns the base gold value of the type
        (goldValue:long) reference.GetGoldValue objectID:ref
    GetFullGoldValue* - returns the full gold value of an item, including the value added by enchantments.
        (goldValue:long) reference.GetFullGoldValue objectID:ref
    SetGoldValue - sets the base gold value of the type
        (nothing) reference.SetGoldValue nuGoldValue:long objectID:ref
    ModGoldValue - modifies the base gold value of the type up or down
        (nothing) reference.ModGoldValue modifyBy:float objectID:ref
    IsQuestItem - returns whether the type is a quest item
        (isQuestItem:bool) reference.IsQuestItem objectID:ref
    SetQuestItem - sets whether the type is a quest item
        (nothing) reference.SetQuestItem isQuestItem:bool objectID:ref
    SetCurrentSoulLevel - sets the current soul level of the calling soulgem reference.
        (nothing) reference.SetCurrentSoulLevel newLevel:short

Lockable
Types with this quality can be locked.
Functions:
    GetOpenKey - returns the key used to unlock the calling reference.
        (key:ref) reference.GetOpenKey
    SetOpenKey - sets the key used to unlock the reference to the specified key.
        (nothing) reference.SetOpenKey key:ref

Magic
Types with this quality have a group of magical effects
Values:
    Magic Item Type - short the type of magic item (Spell, Enchantment, AlchemyItem, Ingredient)
    Effect Count - long the number of magic effect items in the type
    IsAutocalc - bool whether the cost is autocalculated or set to a specific amount
    EffectItem Code - long the magic effect code for the effect item
    EffectItem Magnitude - long the magnitude of the magic effect item
    EffectItem Area - long the area affected by the magic effect item
    EffectItem Duration - long the time in seconds the magic effect lasts
    EffectItem Range - short the range of the effect (Self, Touch, Target)
    EffectItem Actor Value - long a code for the attribute or skill affected by the effect item
    EffectItemScripted - bool whether the effect item is a ScriptEffect (SEFF)
    EffectItemScript - refID the refID of the script used by the scripted effect item
    EffectItemScriptVisualEffect - long the magic effect code used for the visual effects of the scripted effect item
    EffectItemScriptSchool -  short the magic school assigned to the scripted effect
    EffectItemScriptIsHostile - bool whether the scripted effect is hostile
Functions:
    GetMagicItemType - returns the magic item type
        (magicItemType:short) GetMagicItemType magicItem:ref
        (magicItemType:short) GetMIType magicItem:ref       
    GetMagicItemEffectCount - returns the number of magic effect items
        (count:long) GetMagicItemEffectCount magicItem:ref
        (count:long) GetMIEffectCount magicItem:ref
    MagicItemHasEffect - returns whether the magic item has an effect item with the specifed effect.  Uses the 4 letter codes for the magic effects listed in the CS.  Uses an optional actor value name for use with effects like fortify skill and fortify attribute.
        (hasEffect:bool) MagicItemHasEffect effect:chars actorValue:chars
        (hasEffect:bool) MagicHasEffect effect:chars actorValue:chars
    MagicItemHasEffectCode - returns whether the magic item has an effect item with the specified effect code. Uses a long value returned from GetNthEffectItemCode or GetMagicEffectCode.  Uses an optional actor value code for use with effects like fortify skill and fortify attribute.
        (hasEffect:bool) MagicItemHasEffectCode effectCode:long actorValueCode:short
        (hasEffect:bool) MagicHasEffectC effectCode:long actorValueCode:short
    MagicItemHasEffectCount - returns the count of the specified effects on the magic item.  Has an optional actorValue name for use with effects like fortify skill and fortify attribute.
        (effectCount:short) MagicItemHasEffectCount effect:chars actorValueName:chars
    MagicItemHasEffectCountCode - returns the count of effects with the specified effect code on the magic item. Uses a long value returned from GetNthEffectItemCode or GetMagicEffectCode.  Has an optional actorValueCode for use with effects like fortify skill and fortify attribute.
        (effectCount:short) MagicItemHasEffectCountCode effectCode:long actorValueCode:short
        (effectCount:short) MagicItemHasEffectCountC effectCode:long actorValueCode:short
    GetNthEffectItemCode - returns the magic effect code of the specified effect item
        (code:long) GetNthEffectItemCode magicItem:ref whichEffect:short
        (code:long) GetNthEICode magicItem:ref whichEffect:short
    GetNthEffectItemMagnitude - returns the magnitude of the specified effect item
        (magnitude:long) GetNthEffectItemMagnitude magicItem:ref whichEffect:short
        (magnitude:long) GetNthEIMagnitude magicItem:ref whichEffect:short
    SetNthEffectItemMagnitude - sets the magnitude of the specified effect item
        (nothing) SetNthEffectItemMagnitude nuMagnitude:long magicItem:ref whichEffect:short
        (nothing) SetNthEIMagnitude nuMagnitude:long magicItem:ref whichEffect:short
    ModNthEffectItemMagnitude - modifies the magnitude of the specified effect item up or down
        (nothing) ModNthEffectItemMagnitude modifyBy:float magicItem:ref whichEffect:short
        (nothing) ModNthEIMagnitude modifyBy:float magicItem:ref whichEffect:short
    GetNthEffectItemArea - returns the area of the specified effect item
        (area:long) GetNthEffectItemArea magicItem:ref whichEffect:short
        (area:long) GetNthEIArea magicItem:ref whichEffect:short
    SetNthEffectItemArea - sets the area of the specified effect item
        (nothing) SetNthEffectItemArea nuArea:long magicItem:ref whichEffect:short
        (nothing) SetNthEIArea nuArea:long magicItem:ref whichEffect:short
    ModNthEffectItemArea - modifies the effect area of the specified effect item up or down
        (nothing) ModNthEffectItemArea modifyBy:float magicItem:ref whichEffect:short
        (nothing) ModNthEIArea modifyBy:float magicItem:ref whichEffect:short
    GetNthEffectItemDuration - returns the duration of the specified effect item
        (duration:long) GetNthEffectItemDuration magicItem:ref whichEffect:short
        (duration:long) GetNthEIDuration magicItem:ref whichEffect:short
    SetNthEffectItemDuration - sets the duration of the specified effect item
        (nothing) SetNthEffectItemDuration nuDuration:long magicItem:ref whichEffect:short
        (nothing) SetNthEIDuration nuDuration:long magicItem:ref whichEffect:short
    ModNthEffectItemDuration - modifies the duration of the specified effect item up or down
        (nothing) ModNthEffectItemDuration modifyBy:float magicItem:ref whichEffect:short
        (nothing) ModNthEIDuration modifyBy:float magicItem:ref whichEffect:short
    GetNthEffectItemRange - gets the range of the specified effect item
        (range:short) GetNthEffectItemrange magicItem:ref whichEffect:short
        (range:short) GetNthEIRange magicItem:ref whichEffect:short
    SetNthEffectItemRange - sets the range of the specified effect item
        (nothing) SetNthEffectItemRange nuRange:short magicItem:ref whichEffect:short
        (nothing) SetNthEIRange nuRange:short magicItem:ref whichEffect:short
    GetNthEffectItemActorValue - gets the actor value of the specified effect item
        (actorValueCode:long) GetNthEffectItemActorValue magicItem:ref whichEffect:short
        (actorValueCode:long) GetNthEIAV magicItem:ref whichEffect:short
    SetNthEffectItemActorValue - sets the actor values of the specified effect item
        (nothing) SetNthEffectItemActorValue nuActorValue:long magicItem:ref whichEffect:short
        (nothing) SetNthEIAV nuActorValue:long magicItem:ref whichEffect:short
    RemoveNthEffectItem - removes the specified effect item
        (nothing) RemoveNthEffectItem magicItem:ref whichEffect:short
        (nothing) RemoveNthEffect magicItem:ref whichEffect:short
    RemoveAllEffectItems - removes all effect items from the magic item
        (nothing) RemoveAllEffectItems magicItem:ref
    CopyNthEffectItem - copies the specified effect item from one magic item to another
        (index:short) CopyNthEffectItem fromObjectID:ref toObjectID:ref whichEffect:short
    CopyAllEffectItems - copies all effect items from one magic item to another
        (nothing) CopyAllEffectItems fromObjectID:ref toObjectId:ref
    AddEffectItem - adds a basic, empty EffectItem of the specified MagicEffect to the magic item
        (index:short) AddEffectItem nuEffect:chars magicItem:ref
        (index:short) AddEffectItemC nuEffectCode:long magicItem:ref
    AddFullEffectItem - adds a fully defined EffectItem to the magic item with the specified MagicEffect, magnitude, area, duration and range
        (index:short) AddFullEffectItem nuEffect:chars magnitude:long area:long duration:long range:short magicItem:ref
        (index:short) AddFullEffectItemC nuEffectCode:long magnitude:long area:long duration:long range:short magicItem:ref

    IsMagicItemAutoCalc - returns 1 if the MagicItem determines magicka cost by autocalculation.  Now works on all Magic Items (spells, alchemy, ingredients, enchantments)
        (isAutocalc:bool) IsMagicItemAutoCalc magicItem:ref
    SetMagicItemAutoCalc - sets whether the Magic Item determines cost by autocalculation.  Currently works for Spells, AlchemyItems, Ingredients and Enchantments.
        (nothing) SetMagicItemAutoCalc isAutocalc:bool objectID:ref
    IsNthEffectItemScripted - returns whether the specified effect item is scripted
        (isScriptEffect:bool) IsNthEffectItemScripted magicItem:ref whichEffect:short
    GetNthEffectItemScript - returns the refID of the script associated with the specified scripted effect
        (script:ref) GetNthEffectItemScript objectID:ref whichEffect:short
        (script:ref) GetNthEIScript objectID:ref whichEffect:short
    SetNthEffectItemScript - sets the script for the specified scripted effect item.  Note that the CS doesn't have a variable type for a script, so you must assign the script editor id to a ref variable to use this function.
        (nothing) SetNthEffectItemScript scriptObjectID:ref magicItem:ref whichEffect:short
        (nothing) SetNthEIScript scriptObjectID:ref magicItem:ref whichEffect:short
    GetNthEffectItemScriptVisualEffect - returns the magic effect code for the scripted effect item's visual effect
        (magicEffectCode:long) GetNthEffectItemScriptVisualEffect magicItem:ref whichEffect:short
        (magicEffectCode:long) GetNthEISVisualEffect magicItem:ref whichEffect:short
    SetNthEffectItemScriptVisualEffect - sets the scrited effect item's visual effect
        (nothing) SetNthEffectItemScriptVisualEffect magicEffect:chars magicItem:ref whichEffect:short
        (nothing) SetNthEISVisualEffect magicEffect:chars magicItem:ref whichEffect:short
        (nothing) SetNthEffectItemScriptVisualEffectC magicEffectCode:long magicItem:ref whichEffect:short
        (nothing) SetNthEISVisualEffectC magicEffectCode:long magicItem:ref whichEffect:short
    GetNthEffectItemScriptSchool - returns the school of the scripted effect item
        (magicSchool:short) GetNthEffectItemScriptSchool magicItem:ref whichEffect:short
        (magicSchool:short) GetNthEISSchool magicItem:ref whichEffect:short
    SetNthEffectItemScriptSchool - sets the school of the scripted effect item
        (nothing) SetNthEffectItemScriptSchool magicItem:ref whichEffect:short
        (nothing) SetNthEISSchool magicItem:ref whichEffect:short
    IsNthEffectItemScriptHostile  - returns whether the scripted effect is hostile
        (isHostile:bool) IsNthEffectItemScriptHostile magicItem:ref whichEffect:short
        (isHostile:bool) IsNthEISHostile magicItem:ref whichEffect:short
    SetNthEffectItemScriptHostile - sets whether the scripted effect is hostile
        (nothing) SetNthEffectItemScriptHostile magicItem:ref whichEffect:short
        (nothing) SetNthEISHostile magicItem:ref whichEffect:short
    SetNthEffectItemScriptName - sets the name of the scripted effect
        (nothing) SetNthEffectItemScriptName name:string magicItem:ref whichEffect:short
        (nothing) SetNthEISName name:string magicItem:ref whichEffect:short
    ModNthEffectItemScriptName - modifies the name of the scripted effect.  The toReplaceAndReplaceWith string has the following format: "toReplace|replaceWith".  We will do a case insensitve search for the toReplace portion and if found will replace it with the replaceWith portion.  The | character is used to separate the portions of the string.  If there is nothing before the | character, the replaceWith string is prepended to the name.
        (nothing) ModNthEffectItemScriptName toReplaceAndReplaceWith:string magicItem:ref whichEffect:short
        (nothing) ModNthEISName toReplaceAndReplaceWith:string magicItem:ref whichEffect:short
    MagicItemHasEffectItemScript - returns 1 if the magic effect has a scripted item with the specified script.
        (hasScript:bool) MagicItemHasEffectItemScript script:ref magicItem:ref

Magic Target
Types with this quality can be the target of magic.  They can have Active Effects working on them.
Values:
    Count - long the number of active effects on the target
    ActiveEffect Code - long the effect code of the given ActiveEffect
    ActiveEffect Magnitude -long  the magnitude of the given ActiveEffect
    ActiveEffect Duration - float the duration of the total ActiveEffect
    ActiveEffect TimeElapsed - float the time in seconds since the ActiveEffect was applied to the target
    ActiveEffect MagicItem - ref the magic item which applied the ActiveEffect
    ActiveEffect Caster - ref the caster of the ActiveEffect
    ActiveEffect Data - ref the extra data (summoned creature, armor, etc.) of the ActiveEffect
    ActiveEffect MagicItemIndex - long the index of the EffectItem on the magic item which applied the ActiveEffect
Functions:
    GetActiveEffectCount - returns the number of ActiveEffects on the target
        (count:long) reference.GetActiveEffectCount
    GetNthActiveEffectCode - returns the effect of the Nth ActiveEffect on the target
        (effectCode:long) reference.GetNthActiveEffectCode whichEffect:long
        (effectCode:long) reference.GetNthAECode whichEffect:long
    GetNthActiveEffectMagnitude - returns the magnitude of the Nth ActiveEffect on the target
        (magnitude:long)  reference.GetNthActiveEffectMagnitude whichEffect:long
        (magnitude:long)  reference.GetNthAEMagnitude whichEffect:long
    GetNthActiveEffectDuration - returns the total duration of the Nth ActiveEffect on the target
        (duration:float) reference.GetNthActiveEffectDuration whichEffect:long
        (duration:float) reference.GetNthAEDuration whichEffect:long
    GetNthActiveEffectTimeElapsed - returns the time that the Nth ActiveEffect has been applied to the target
        (timeElapsed:float) reference.GetNthActiveEffectTimeElapsed whichEffect:long
        (timeElapsed:float) reference.GetNthAETime whichEffect:long
    GetNthActiveEffectMagicItem - returns the magic item which applied theNth ActiveEffect to the target
        (magicItem:ref) reference.GetNthActiveEffectMagicItem whichEffect:long
        (magicItem:ref) reference.GetNthAEMagicItem whichEffect:long
    GetNthActiveEffectCaster - return the caster of the Nth ActiveEffect on the target
        (caster:ref) reference.GetNthActiveEffectCaster whichEffect:long
        (caster:ref) reference.GetNthAECaster whichEffect:long
    GetNthActiveEffectData - return the data of the NthActiveEffect on the target
        (data:ref) reference.GetNthActiveEffectData whichEffect:long
        (data:ref) reference.GetNthAEData whichEffect:long
    GetNthActiveEffectMagicItemIndex - returns the index on its magic item of the Nth ActiveEffect on the target
        (index:long) reference.GetNthActiveEffectMagicItemIndex whichEffect:long
        (index:long) reference.GetNthActiveEffectMagicItemIndex whichEffect:long
    SetNthActiveEffectMagnitude - sets the magnitude of the corresponding ActiveEffect
        (nothing) SetNthActiveEffectMagnitude magnitude:float whichEffect:long
        (nothing) SetNthAEMagnitude magnitude:float whichEffect:long
    ModNthActiveEffectMagnitude - modifies the magnitude of the corresponding ActiveEffect
        (nothing) ModNthActiveEffectMagnitude magnitude:float whichEffect:long
        (nothing) ModNthAEMagnitude magnitude:float whichEffect:long
    GetTotalActiveEffectMagnitude - returns the total magnitude of all ActiveEffects with a given code on the target
        (totalMag:long) reference.GetTotalActiveEffectMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAEMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalActiveEffectMagnitudeC effectCode:long actorValueCode:short
        (totalMag:long) reference.GetTotalAEMagnitudeC effectCode:long actorValueCode:short
    GetTotalAENonAbilityMagnitude - returns the total magnitude of all non-ability ActiveEffects with a given code on the target
        (totalMag:long) reference.GetTotalAENonAbilityMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAENonAbilityMagnitudeC effectCode:long actorValueCode:short
    GetTotalAEAbilityMagnitude - returns the total magnitude of all ability ActiveEffects with a given code on the target
        (totalMag:long) reference.GetTotalAEAbilityMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAEAbilityMagnitudeC effectCode:long actorValueCode:short
    GetTotalAESpellMagnitude - returns the total magniude of all spell ActiveEffects with a given code on the target
        (totalMag:long) reference.GetTotalAESpellMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAESpellMagnitudeC effectCode:long actorValueCode:short
    GetTotalAEDiseaseMagnitude - returns the total magnitude of all disease ActiveEffects with a given code on the target.
        (totalMag:long) reference.GetTotalAEDiseaseMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAEDiseaseMagnitudeC effectCode:long actorValueCode:short
    GetTotalAELesserPowerMagnitude - returns the total magnitude of all lesser power ActiveEffects with a given code on the target
        (totalMag:long) reference.GetTotalAELesserPowerMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAELesserPowerMagnitudeC effectCode:long actorValueCode:short
    GetTotalAEPowerMagnitude - retuns the total magnidue of all greater power ActiveEffects with a given code on the target
        (totalMag:long) reference.GetTotalAEPowerMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAEPowerMagnitudeC effectCode:long actorValueCode:short
    GetTotalAEAllSpellsMagnitude - returns the total magnitude of all spells (Spell, Ability, Disease, Lesser Power, Power) with a given code on the target.
        (totalMag:long) reference.GetTotalAEAllSpellsMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAEAllSpellsMagnitudeC effectCode:long actorValueCode:short
    GetTotalAEEnchantmentMagnitude - retuns the total magnitude of all enchantments with a given code on the target.
        (totalMag:long) reference.GetTotalAEEnchantmentMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAEEnchantmentMagnitudeC effectCode:long actorValueCode:short
    GetTotalAEAlchemyMagnitude - returns the total magnitude of all potions with a given code on the target.
        (totalMag:long) reference.GetTotalAEAlchemyMagnitude effectCode:chars actorValue:chars
        (totalMag:long) reference.GetTotalAEAlchemyMagnitudeC effectCode:long actorValueCode:short
    GetScriptActiveEffectIndex - returns the index of the corresponding ActiveEffect for the running script effect.  Note this cannot detect the difference between two active effects running with the same script.
        (index:long) GetScriptActiveEffectIndex

Named
Types with this quality have a setable name
Values:
    Name - string the display name of the type
Functions:
    SetName - sets the display name of the type.  SetName is a special function.  It is defined to work on Inventory items, but it can be used with any form.  To use with a non-Inventory item you must first assign the objectID to a ref.  For most forms the name is part of the base form and changing the name will change it for all instances of the type.
        (nothing) reference.SetName name:string objectID:ref
    CompareName - returns 1 if stringToFindInName is found in the name if the object
        (nameContainsString) reference.CompareName toFindInName:string objectID:ref
        (nameContainsString) reference.NameIncludes toFindInName:string objectID:ref
    CompareNames - compares the names of two objects and returns -1 if the first occurs alphabetically before the second, 1 if the first occurs after the second, or 0 for equality. Comparison is case-insensitive.
        (comparison:short) reference.CompareNames compareTo:ref compare:ref
    CopyName - copies the name from the source to the target.  It is defined to work on Inventory items, but it can be used with any form. To use with a non-Inventory item you must first assign the objectID to a ref.  For most forms the name is part of the base form and changing the name will change it for all instances of the type.
        (nothing) CopyName srcObjectID:ref targetObjectID:ref
    ModName - modifies the name of the calling reference or passed objectID.  The toReplaceAndReplaceWith string has the following format: "toReplace|replaceWith".  We will do a case insensitve search for the toReplace portion and if found will replace it with the replaceWith portion.  The | character is used to separate the portions of the string.  If there is nothing before the | character, the replaceWith string is prepended to the name.
        (nothing) reference.ModName toReplaceAndReplaceWith:string toObject:ref
    AppendToName - appends the passed string to the end of the name of the calling reference or passed objectID.
        (nothing) reference.AppendToName toAppend:string toObject:ref
    HasName - returns 1 if the object has a name consisting of at least one character.
        (hasName:bool) reference.HasName objectID:ref
   SetNameEx* - sets the name of the base object. The new name is a string constructed from a format string using the same format specifiers used by OBSE's output functions. Unlike SetName, SetNameEx cannot be called on a reference.
        (nothing) reference.SetNameEx formatString:string var1 var2 ... var20 object:ref

Ownable
Types with this quality can be owned by an NPC or faction.
Values:
    Owner - NPC or faction the owner of the reference.
    Required Rank - short the rank a member of the owning faction must hold in order to legally activate the reference.
    Global Variable  - global a global variable which, when set to a value other than zero, allows legal activation of the reference.
Functions:
    GetOwner - returns the NPC or faction which owns the calling reference.
        (owner:ref) reference.GetOwner
    GetParentCellOwner - returns the NPC or faction which owns the calling reference's parent cell..
        (owner:ref) reference.GetParentCellOwner
    GetOwningFactionRequiredRank - returns the rank in the owning faction required to legally activate the calling reference.
        (rank:short) reference.GetOwningFactionRequiredRank
        (rank:short) reference.GetOwningFactionRank
    GetParentCellOwningFactionRequiredRank - returns the rank required for ownership of the calling reference's parent cell.
        (rank:short) reference.GetParentCellOwningFactionRequiredRank
        (rank:short) reference.GetCellFactionRank
    IsOffLimits - returns 1 if it is illegal for the specified actor to activate the calling reference, based on the calling reference's ownership.
        (isOffLimits:bool) reference.IsOffLimits actor:ref

Race
Values:
    Base Attribute - each sex of a race has base values for all eight attributes
    Bonus Skill - each race has seven attributes which get a bonus
    Name - each race has a name
Functions:
    GetRaceAttribute - returns the specified base attribute value.  If passes a raceFormID you must also pass whether you want the female value or not.  If called directly on an reference the function will determine the race and sex of the reference and the raceFormID and isFemale are not needed.  The C version of the function takes a number rather than the actorvalue name (0 instead of Strength)
        (value:short) reference.GetRaceAttribute attributeActorValue:chars raceFormID:ref isFemale:bool
        (value:short) reference.GetRaceAttributeC attributeActorValueCode:short raceFormID:ref isFemale:bool
    GetRaceSkillBonus - returns the bonus for the specified skill for the race.  If called on a reference the function will determine the race of the reference.  Returns 0 if there is no bonus for that skill.  The C version specifies the specific skill by number rather than by name.
        (value:short) reference.GetRaceSkillBonus skillActorValue:chars raceFormID:ref
        (value:short) reference.GetRaceSkillBonusC skillActorValueCode:short raceFormID:ref
    IsRaceBonusSkill - returns whether the specified skill is a bonus for the race.  If called on a reference the function will determine the race of the reference.  The C version specifies the skill by number rather than by name.
        (isBonusSkill:bool) reference.IsRaceBonusSkill skillActorValue:chars raceFormID:ref
        (isBonusSkill:bool) reference.IsRaceBonusSkillC skillActorValue:short raceFormID:ref
    GetNthRaceBonusSkill - returns the actor value code for the specified index into the bonus skills.  Can be followed up with a call to GetRaceSkillBonusC to determine the actual bonus to the skill.  If called on a reference the function will determine the race of the reference.
        (skill:short) reference.GetNthRaceBonusSkill whichSkill:short raceFormID:ref   
    GetRaceSpellCount - returns the number of spells provided by the race. If no race is specified, the race of the calling NPC is used.
        (numSpells:short) reference.GetRaceSpellCount race:ref
    GetNthRaceSpell - returns the nth spell provided by the race, using the race of the calling NPC if none is specified.
        (spell:ref) reference.GetNthRaceSpell whichSpell:short race:ref

Scriptable
Types with this quality can have a script associated with them.
Functions:
    IsScripted - returns whether the scriptable object has a script attached to it or not
        (isScripted:bool) reference.IsScripted targetObjectID:ref
    GetScript - returns the refID of the script attached to the object
        (script:refID) reference.GetScript targetObjectID:ref
    RemoveScript - removes and returns the script attached to the object.  The object is no longer scripted
        (script:refID) reference.RemoveScript targetObjectID:ref
    SetScript - sets the specified script onto the calling object and returns any previous script.  Note that Oblivion doesn't have a script variable type so you must assign the script to a ref variable for this to work.  This function is currently considered a Beta function which will get official support after it gets some more testing.  For now, please do not use in a shipping mod until further testing is done.
        (script:refID) reference.SetScript scriptID:ref targetObjectID:ref
    IsFormValid* - returns 1 if the specified ref variable contains a valid object or reference.
        (valid:bool) IsFormValid refVar:var
    IsReference* - returns 1 if the specified ref variable contains a reference, as opposed to a base object.
        (isReference:bool) IsReference refVar:var
    HasVariable* - returns 1 if the calling reference or specified quest has a variable with the specified name.
        (hasVariable:bool) reference.HasVariable varName:string questID:ref
    GetVariable* - returns the value of a numeric variable by name, either from the calling reference's script or the specified quest.
        (variableValue:float) reference.GetVariable varName:string questID:ref
    GetRefVariable* - returns the reference stored in a ref variable by name, either from the calling reference's script or the specified quest.
        (reference:ref) reference.GetRefVariable varName:string questID:ref
    CompareScripts* - compares the compiled code of two scripts and returns 1 if they are identical. Note that this doesn't mean the text of the scripts are identical, only that they call the same functions in the same order with the same parameters.
        (scriptsAreIdentical:bool) CompareScripts script:ref script:ref

Simple
Types with this quality have a single model path and a single icon texture
Values:
    Model Path - stri