Netruk44/uesp-wiki-content huggingface dataset:
Tes3Mod:XGetBaseSneak

A function from MWSE update by Merzasphor.

Returns the base value of the associated skill.

Syntax
 

Example
 

See Also
xGetBaseAcrobatics 
xGetBaseAlteration 
xGetBaseArmorer 
XGetBaseAlchemy 
XGetBaseAthletics 
xGetBaseAxe 
xGetBaseBlock 
xGetBaseBluntWeapon 
xGetBaseConjuration 
xGetBaseDestruction 
xGetBaseEnchant 
xGetBaseHandToHand 
xGetBaseHeavyArmor 
xGetBaseIllusion 
xGetBaseLightArmor 
xGetBaseLongBlade 
xGetBaseMarksman 
xGetBaseMediumArmor 
xGetBaseMercantile 
xGetBaseMysticism 
xGetBaseRestoration 
XGetBaseSecurity 
xGetBaseShortBlade 
xGetBaseSpear 
xGetBaseSpeechcraft 
xGetBaseUnarmored
Tes3Mod:XGetBaseSpe

A function added by MWSE.

xGetBaseSpe returns the base (unmodifed) speed for the NPC.

Syntax
 

Example
 

See Also
xGetBaseStr 
xGetBaseInt 
xGetBaseWil 
xGetBaseAgi 
xGetBaseEnd 
xGetBasePer 
xGetBaseLuc
Tes3Mod:XGetBaseSpear

A function from MWSE update by Merzasphor.

Returns the base value of the associated skill.

Syntax
 

Example
 

See Also
xGetBaseAcrobatics 
xGetBaseAlteration 
xGetBaseArmorer 
XGetBaseAlchemy 
XGetBaseAthletics 
xGetBaseAxe 
xGetBaseBlock 
xGetBaseBluntWeapon 
xGetBaseConjuration 
xGetBaseDestruction 
xGetBaseEnchant 
xGetBaseHandToHand 
xGetBaseHeavyArmor 
xGetBaseIllusion 
xGetBaseLightArmor 
xGetBaseLongBlade 
xGetBaseMarksman 
xGetBaseMediumArmor 
xGetBaseMercantile 
xGetBaseMysticism 
xGetBaseRestoration 
XGetBaseSecurity 
xGetBaseShortBlade 
xGetBaseSneak 
xGetBaseSpeechcraft 
xGetBaseUnarmored
Tes3Mod:XGetBaseSpeechcraft

A function from MWSE update by Merzasphor.

Returns the base value of the associated skill.

Syntax
 

Example
 

See Also
xGetBaseAcrobatics 
xGetBaseAlteration 
xGetBaseArmorer 
XGetBaseAlchemy 
XGetBaseAthletics 
xGetBaseAxe 
xGetBaseBlock 
xGetBaseBluntWeapon 
xGetBaseConjuration 
xGetBaseDestruction 
xGetBaseEnchant 
xGetBaseHandToHand 
xGetBaseHeavyArmor 
xGetBaseIllusion 
xGetBaseLightArmor 
xGetBaseLongBlade 
xGetBaseMarksman 
xGetBaseMediumArmor 
xGetBaseMercantile 
xGetBaseMysticism 
xGetBaseRestoration 
XGetBaseSecurity 
xGetBaseShortBlade 
xGetBaseSneak 
xGetBaseSpear 
xGetBaseUnarmored
Tes3Mod:XGetBaseStr

A function added by MWSE.

xGetBaseStr returns the base (unmodifed) strength for the NPC.

Syntax
 

Example
 

See Also
xGetBaseInt 
xGetBaseWil 
xGetBaseAgi 
xGetBaseSpe 
xGetBaseEnd 
xGetBasePer 
xGetBaseLuc
Tes3Mod:XGetBaseUnarmored

A function from MWSE update by Merzasphor.

Returns the base value of the associated skill.

Syntax
 

Example
 

See Also
xGetBaseAcrobatics 
xGetBaseAlteration 
xGetBaseArmorer 
XGetBaseAlchemy 
XGetBaseAthletics 
xGetBaseAxe 
xGetBaseBlock 
xGetBaseBluntWeapon 
xGetBaseConjuration 
xGetBaseDestruction 
xGetBaseEnchant 
xGetBaseHandToHand 
xGetBaseHeavyArmor 
xGetBaseIllusion 
xGetBaseLightArmor 
xGetBaseLongBlade 
xGetBaseMarksman 
xGetBaseMediumArmor 
xGetBaseMercantile 
xGetBaseMysticism 
xGetBaseRestoration 
XGetBaseSecurity 
xGetBaseShortBlade 
xGetBaseSneak 
xGetBaseSpear 
xGetBaseSpeechcraft
Tes3Mod:XGetBaseWil

A function added by MWSE.

xGetBaseWil returns the base (unmodifed) willpower for the NPC.

Syntax
 

Example
 

See Also
xGetBaseStr 
xGetBaseInt 
xGetBaseAgi 
xGetBaseSpe 
xGetBaseEnd 
xGetBasePer 
xGetBaseLuc
Tes3Mod:XGetCharge

A function added by MWSE.

XGetCharge returns the current charge on a 'cast when used' or 'cast when strikes' enchanted item. Constant effect and non-enchanted items return 0.

Syntax
 

Example
 

See Also
xGetOwner 
xGetWeight 
xGetValue 
xGetQuality 
xGetCondition 
xGetMaxCondition 
xGetEncumb 
xGetMaxCharge 
xSetValue 
xSetWeight 
xSetQuality 
xSetCondition 
xSetMaxCondition 
xSetCharge 
xSetMaxCharge
Tes3Mod:XGetClass

A function from the MWSE update by Merzasphor.

Returns info about the class of the target NPC/PC, 0 if the target is not an NPC or the PC.

Syntax
 

classId: the unique string identifier of the class. "NEWCLASSID_CHARGEN" is the
id of a custom class created by the PC during character generation.
 name: the name of the class.
 playable: 1 if the class can be chosen by the PC, 0 otherwise. This is 0 if the
class is a custom class created by the PC during character generation.
 specialization: 0 = Combat, 1 = Magic, 2 = Stealth
 attributes: a bitmap of the two primary attributes. The result is obtained by
adding the values found in the attributes table.
 majorSkills: a bitmap of the 5 major skills. The result is obtained by adding
the values found in the skills table.
 minorSkills: a bitmap of the 5 minor skills. The result is obtained by adding
the values found in the skills table.
 attributeMask: a bit mask to apply to the attributes value.
 majorMask: a bit mask to apply to the majorSkills value.
 minorMask: a bit mask to apply to the minorSkills value.

If a mask is 0, the corresponding value is unaltered.






Example
Tes3Mod:XGetCombat

A function added by MWSE

xGetCombat returns a reference to this NPC/creature's combat target or 0 if the NPC/creature is not in combat.

Syntax
 

Example
 

See Also
xSetRef 
xRefType 
xGetRef 
xGetPCTarget 
xFirstNPC 
xFirstItem 
xFirstStatic 
xNextRef
Tes3Mod:XGetCondition

A function added by MWSE.

XGetCondition returns the current condition for armor and weapons and remaining uses for lockpicks, probes, and repair tools.

In v0.9.4a, this function returned the max condition of armor, weapons, lockpicks, probes, and repair items. This is fixed in the MWSE update released by Merzasphor.

Syntax
 

Example
 

See Also
xGetOwner 
xGetWeight 
xGetValue 
xGetQuality 
xGetEncumb 
xGetMaxCondition 
xGetCharge 
xGetMaxCharge 
xSetValue 
xSetWeight 
xSetQuality 
xSetCondition 
xSetMaxCondition 
xSetCharge 
xSetMaxCharge
Tes3Mod:XGetEnchant

A function from MWSE update by Merzasphor.

Returns info about the enchantment on the target item, 0 if no enchantment present. Scrolls are not currently supported.

Syntax
 

type: 0 = Cast Once, 1 = Cast When Strikes, 2 = Cast When Used, 3 = Constant
 autocalc: 0 = off, 1 = on

Example
Tes3Mod:XGetEnchantEffectInfo

A deprecated function from the MWSE update by Merzasphor.
:''Note: This function is deprecated, and will be removed in the future! Use xGetEffectInfo instead.''

Returns info about one of the effects of the given enchantId, -1 if the enchantId is 
invalid or the index is out of range [1, numEffects]. To determine the number of valid
effects, call xGetEnchantInfo or xGetEnchant first.

Syntax
 

rangeType: 0 = SELF, 1 = TOUCH, 2 = TARGET

Example
Tes3Mod:XGetEnchantInfo

A function from MWSE update by Merzasphor.

Returns info about the given enchantId, 0 if enchantId is invalid.

Syntax
 

type: 0 = Cast Once, 1 = Cast When Strikes, 2 = Cast When Used, 3 = Constant
 autocalc: 0 = off, 1 = on

Example
Tes3Mod:XGetEncumb

A function added by MWSE.

XGetEncumb returns the total weight of all objects in the inventory of a container, NPC, or creature. Levelled list items don't have a weight but they are assigned a weight of 0.001 by this fnction. If any of the items in the group are respawning items then the resulting weight will be negative.

Syntax
 

Example
 

See Also
xGetOwner 
xGetWeight 
xGetValue 
xGetQuality 
xGetCondition 
xGetMaxCondition 
xGetCharge 
xGetMaxCharge 
xSetValue 
xSetWeight 
xSetQuality 
xSetCondition 
xSetMaxCondition 
xSetCharge 
xSetMaxCharge
Tes3Mod:XGetGold

A function added by MWSE.

xGetGold returns the current amount of barter gold possessed by the NPC (or creature). The base gold amount is used if you haven't bartered with the NPC/creature recently.

Syntax
 

Example
 

See Also
xIsFemale 
xIsTrader 
xIsTrainer 
xIsProvider 
xGetService 
xSetService 
xModService 
xGetBaseGold 
xSetBaseGold 
xSetGold
Tes3Mod:XGetLockLevel

A function from MWSE update by Merzasphor.

Returns the lock level of a door or container. This function returns -1 for doors/containers that have never been locked and for items that aren't doors or containers.

This returns the lock level regardless of whether the item is locked or unlocked. Use GetLocked
to determine the state of the lock.

Lock level is stored as a signed short (16 bits, max value = 32,767). Values less than 0 do not 
survive saving, exiting, and reloading. They are converted to their absolute value and the 
door/container is flagged as unlocked.

Syntax
 

Example
 

See Also
GetLocked
Tes3Mod:XGetMaxCharge

A function added by MWSE.

XGetMaxCharge returns the maximum charge on an enchanted item.

Syntax
 

Example
 

See Also
xGetOwner 
xGetWeight 
xGetValue 
xGetQuality 
xGetCondition 
xGetMaxCondition 
xGetEncumb 
xGetCharge 
xSetValue 
xSetWeight 
xSetQuality 
xSetCondition 
xSetMaxCondition 
xSetCharge 
xSetMaxCharge
Tes3Mod:XGetMaxCondition

A function added by MWSE.

XGetMaxCondition returns the maxium condition for armor and weapons and maximum uses for lockpicks, probes, and repair tools.

Syntax
 

Example
 

See Also
xGetOwner 
xGetWeight 
xGetValue 
xGetQuality 
xGetEncumb 
xGetCondition 
xGetCharge 
xGetMaxCharge 
xSetValue 
xSetWeight 
xSetQuality 
xSetCondition 
xSetMaxCondition 
xSetCharge 
xSetMaxCharge
Tes3Mod:XGetName

A function added by MWSE.

xGetName returns a string containing the name (suitable for display, not the objectid) for the object or 0 if the object doesn't have a name. The NPC who falls from the sky near Seyda Neen has an object id of "agronian guy" but his name is "Tarhiel" when you look at his corpse.

In v0.9.4a, this function didn't return the name of ammo and lockpick items. This is fixed in the MWSE update released by Merzasphor.
Syntax
 

Example
 

See Also
xPCCellID 
xRefID 
xMyCellID 
xSetName 
xGetBaseID 
xStringCompare 
xStringLength 
xStringParse 
xStringBuild 
xStringMatch 
xLogMessage 
xMessageFix
Tes3Mod:XGetOwner

A function added by MWSE.

XGetOwner returns a 0 if the object is not owned, the objectid of the owner of the item if it is owned by a specific NPC or the string "unknown" if it is owned by a faction or controlled by a variable.

Syntax
 

Example
 

See Also
xGetOwnerInfo 
xGetValue 
xGetWeight 
xGetEncumb 
xGetQuality 
xGetCondition 
xGetMaxCondition 
xGetCharge 
xGetMaxCharge 
xSetValue 
xSetWeight 
xSetQuality 
xSetCondition 
xSetMaxCondition 
xSetCharge 
xSetMaxCharge
Tes3Mod:XGetPCTarget

A function added by MWSE

xGetPCTarget returns a reference to the object in the player's crosshair or 0 if the player is not looking at anything that can be manipulated by the player.

Syntax
 

Example
 

See Also
xSetRef 
xRefType 
xGetRef 
xGetCombat 
xFirstNPC 
xFirstItem 
xFirstStatic 
xNextRef
Tes3Mod:XGetProgressLevel

A function from MWSE update by Merzasphor.

Returns the current progress to the next level.

Syntax
 

Example
 

See Also
xSetProgressLevel
Tes3Mod:XGetQuality

A function added by MWSE.

XGetQuality returns the quality of alchemical apparatus, lockpick, probe, and repair tool items.

Syntax
 

Example
 

See Also
xGetOwner 
xGetWeight 
xGetValue 
xGetEncumb 
xGetCondition 
xGetMaxCondition 
xGetCharge 
xGetMaxCharge 
xSetValue 
xSetWeight 
xSetQuality 
xSetCondition 
xSetMaxCondition 
xSetCharge 
xSetMaxCharge
Tes3Mod:XGetRef

A function added by MWSE.

xGetRef gets a reference to one of the active objects that match the object ID. An active object is an object in one of the loaded cells, or a persistent object such as an NPC.

Syntax
 

Example
 

See Also
xSetRef 
xRefType 
xGetCombat 
xGetPCTarget 
xFirstNPC 
xFirstItem 
xFirstStatic 
xNextRef
Tes3Mod:XGetService

A function added by MWSE.

xGetService combines the features of xIsTrader, xIsTrainer, and xIsProvider in a single function with one return value. The service values are shown in the following table and if an NPC offers more than one service the sum of the service numbers will be returned. The mask parameter can be used as a filter to limit the return value to only consider the services indicated.



Use a mask of 16384 to see if the NPC is a trainer and the function will either return 16384 or 0. Use a mask of 96 (32+64) to see if the NPC sells thieving equipment. The value returned could be 0, 32, 64, or 96, but won't any other values even if the NPC provides other services too.

Syntax
 

Example
 

See Also
xIsFemale 
xIsTrader 
xIsTrainer 
xIsProvider 
xSetService 
xModService 
xGetBaseGold 
xGetGold 
xSetBaseGold 
xSetGold
Tes3Mod:XGetSpell

A function from MWSE update by Merzasphor.

Returns 1 if spellId is present, 0 otherwise. This is not a wrapper for GetSpell; it's a reimplementation. It only works
for NPCs and the player.

Syntax
 

Example
Tes3Mod:XGetSpellEffectInfo

A deprecated function from the MWSE update by Merzasphor.
:''Note: This function is deprecated, and will be removed in the future! Use xGetEffectInfo instead.''

Returns info about one of the effects of the given spellId, -1 if the spellId is 
invalid or the index is out of range [1, numEffects]. To determine the number of valid
effects, call xGetSpellInfo or xSpellList first.

Syntax
 

rangeType: 0 = SELF, 1 = TOUCH, 2 = TARGET

Example
Tes3Mod:XGetSpellInfo

A function from MWSE update by Merzasphor.

Returns info about the given spellId, 0 if spellId is invalid.

Syntax
 

type: 0 = SPELL, 1 = ABILITY, 2 = BLIGHT, 3 = DISEASE, 4 = CURSE, 5 = POWER
 flags: (combination of these values) 1 = AUTOCALC, 2 = PCSTART, 4 = ALWAYSSUCCEEDS

Example
Tes3Mod:XGetTrap

A function from MWSE update by Merzasphor.

Returns info about the spell used for trap, 0 if no trap is present.

Syntax
 

Example
 

See Also
xSetTrap
Tes3Mod:XGetValue

A function added by MWSE.

xGetValue returns the gold value of the object. Objects that can't be sold return 0.

In v0.9.4a it does not work for ammo and repair items. This is fixed in the MWSE update released by Merzasphor.

Syntax
 

Example
 

See Also
xGetOwner 
xGetWeight 
xGetEncumb 
xGetQuality 
xGetCondition 
xGetMaxCondition 
xGetCharge 
xGetMaxCharge 
xSetValue 
xSetWeight 
xSetQuality 
xSetCondition 
xSetMaxCondition 
xSetCharge 
xSetMaxCharge
Tes3Mod:XGetWeight

A function added by MWSE.

XGetWeight returns the weight of the object for carriable objects. Returns the maximum capacity of a container and 0 for all other objects. (When the player places multiple copies of one item on the ground the stack is considered one item and this function will calculate the value for the group not just a single item of that type.)

In v0.9.4a it does not work for ammo and repair items. This is fixed in the MWSE update released by Merzasphor.

Syntax
 

Example
 

See Also
xGetValue 
xGetOwner 
xGetEncumb 
xGetQuality 
xGetCondition 
xGetMaxCondition 
xGetCharge 
xGetMaxCharge 
xSetValue 
xSetWeight 
xSetQuality 
xSetCondition 
xSetMaxCondition 
xSetCharge 
xSetMaxCharge
Tes3Mod:XHasItemEquipped

A function added by MWSE.

xHasItemEquipped returns 1 if the NPC or creature has the object equipped, 0 otherwise.

Syntax
 

Example
 

See Also
xInventory 
xNextStack 
xContentList 
xAddItem 
xRemoveItem 
xEquip 
xDrop 
xAddSpell 
xRemoveSpell
Tes3Mod:XHypot

A function added by MWSE.

xHypot returns the hypotenuse for sides a and b, c = sqrt(a*a + b*b). Unlike xSqrt this is more efficient than calculating the formula inside the script.

Syntax
 

Example
 

See Also
xDistance 
xSqrt 
xDegRad 
xRadDeg 
xCos 
xSin 
xTan 
xArcCos 
xArcSin 
xArcTan
Tes3Mod:XInventory

A function added by MWSE.

xInventory returns three values based on the inventory of the current container, NPC, or creature. The first is the objectid of one of the items in the inventory. The second is the number of that particular item found in the inventory. The third is a reference that can be passed to the xNextStack function to find the rest of the items in the inventory. All three results will be 0 if there are no items in the inventory (and just the third will be zero if there is only one item in the inventory). (It is not possible to get a normal reference to objects inside an inventory. The reference returned by this function is of a unique type and should only be used with xNextStack.)

Syntax
 

Example
Place following script on a container. When container is activated file containing IDs of items in the container will be created in Data Files\MWSE folder. 
 

See Also
xNextStack 
xContentList 
xAddItem 
xRemoveItem 
xHasItemEquipped 
xEquip 
xDrop 
xAddSpell 
xRemoveSpell
Tes3Mod:XIsFemale

A function added by MWSE.

xIsFemale returns 1 if the NPC is female and 0 otherwise.

Syntax
 

Example
 

See Also
xIsTrader 
xIsTrainer 
xIsProvider 
xGetService 
xSetService 
xModService 
xGetBaseGold 
xGetGold 
xSetBaseGold 
xSetGold
Tes3Mod:XIsProvider

A function added by MWSE.

xIsProvider returns a non-zero value if the NPC/creature sells spells, repairs armor and weapons, or is an enchanter or spell maker. Otherwise it returns a 0.

Syntax
 

Example
 

See Also
xIsFemale 
xIsTrader 
xIsTrainer 
xGetService 
xSetService 
xModService 
xGetBaseGold 
xGetGold 
xSetBaseGold 
xSetGold
Tes3Mod:XIsTrader

A function added by MWSE.

xIsTrader returns a 0 if the NPC/creature doesn't barter for items, otherwise it is a value that represents the combination of items the merchant will trade. New functions for each individual type are needed.

Syntax
 

Example
 

See Also
xIsFemale 
xIsTrainer 
xIsProvider 
xGetService 
xSetService 
xModService 
xGetBaseGold 
xGetGold 
xSetBaseGold 
xSetGold
Tes3Mod:XIsTrainer

A function added by MWSE.

xIsTrainer returns a 1 if the NPC/creature is a Trainer and 0 otherwise.

Syntax
 

Example
 

See Also
xIsFemale 
xIsTrader 
xIsProvider 
xGetService 
xSetService 
xModService 
xGetBaseGold 
xGetGold 
xSetBaseGold 
xSetGold
Tes3Mod:XKeyPressed

A function added by MWSE.

xKeyPressed monitors the status of the keyboard (and mouse buttons). This can be similar to GetPCSneaking, but it actually detects whether a particular key is really being pressed. If input parameter code is a Virtual Key Code (between 1 and 254), the return value will indicate the status of that key, and a non-zero value means the key is being pressed. If the input code is 0, then on each call, the function will return the key code for the key (or one of the keys) currently being pressed. The specific values for the virtual key codes can be found in the Microsoft documentation at  Some of the codes match different keys on different keyboard layouts.

Syntax
 

Example
 

See Also
xTextInput 
xTextInputAlt
Tes3Mod:XLogMessage

A function added by MWSE.

xLogMessage writes out formatted strings to the log file (MWSELog.txt) Works much like MessageBox but with the additional formatting options described for xStringBuild. A trailing % in the format string will suppress the printing of the new line sequence allowing a single line of text to be created with two or more xLogMessage calls. The number of parameters specified in the formatstring MUST match those supplied or there will be trouble.

Syntax
 

Example
 

See Also
xPCCellID 
xRefID 
xMyCellID 
xGetName 
xSetName 
xGetBaseID 
xStringCompare 
xStringLength 
xStringParse 
xStringBuild 
xStringMatch 
xMessageFix
Tes3Mod:XLongToFloats

A function from MWSE update by Merzasphor.

This function stores a long value using a pair of floats. It is intended to work around the issue that all globals are really floats. They work by splitting the long 32 bit value into two 16 bit values and adding a flag to indicate which value maps to the high 16 bits. Argument order doesn't matter. MWEdit doesn't like to compile these functions with globals as arguments, so you'll need to use temporary locals.

Syntax
 

Example
 

See Also
xFloatsToLong
Tes3Mod:XMessageFix

A function added by MWSE.

xMessageFix this function allows you to use strings from variables with the MessageBox function with a few restrictions. First, the MessageBox command must immediately follow this one. Second, the number of strings for this function must match the number of strings for the MessageBox. Third, the MessageBox can have buttons but it can't use variables. And finally, the values of the strings used on the MessageBox will be replaced with the values from xMessageFix, but the MessageBox strings set a maximum size for each of the xMessageFix strings (it's OK if the MessageBox strings are longer than the MessageFix ones). Using xMessageFix can take both the STRING variable and literal string types and each string acts as a format string as described for the xStringBuild function. If a string ends in a single % and the formatted string takes less space than the matching string from MessageBox, the remaining characters of the MessageBox string will be used.

While it is possible to use formatted messages and buttons, it is best to format strings with xStringBuild if there are buttons involved because of the limit of 12 parameters per function.

Syntax
 

Example
 

If you are in Caldera, the Arena in Vivec, or Ald-Ruhn the MessageBox would respectively show:







See Also
xPCCellID 
xRefID 
xMyCellID 
xGetName 
xSetName 
xGetBaseID 
xStringCompare 
xStringLength 
xStringParse 
xStringBuild 
xStringMatch 
xLogMessage
Tes3Mod:XModService

A function added by MWSE.

xModService uses the value parameter to modify the services offered by an NPC. A positive value adds that service (or set of services) to those already offered. A negative value will remove a service or service. The changes are not permanent.

Syntax
 

Example
 

See Also
xIsFemale 
xIsTrader 
xIsTrainer 
xIsProvider 
xGetService 
xSetService 
xGetBaseGold 
xGetGold 
xSetBaseGold 
xSetGold
Tes3Mod:XMyCellID

A function added by MWSE.

xMyCellID returns a string containing the name of the cell the object (intended to be used with references to unique NPCs) inhabits. So fargoth_ref->xMyCellID would return "Seyda Neen" unless you've lured him into the wilderness for some reason. Useful for locating that missing companion. Can't locate items stored in containers or inventory.

Syntax
 

Example
 

See Also
xPCCellID 
xRefID 
xGetName 
xSetName 
xGetBaseID 
xStringCompare 
xStringLength 
xStringParse 
xStringBuild 
xStringMatch 
xLogMessage 
xMessageFix
Tes3Mod:XNextRef

A function added by MWSE.

xNextRef returns the next reference in one of the three lists of objects in the current cell (NPC, Item, and Static) after the current one. If the player is outside, the list will cycle through all 9 loaded exterior cells which may be too much to do in a single frame. Object references added by mods will be returned only if they are persistent. 

In v0.9.4a this function is bugged: it may not return all references in exterior cells, and it returns deleted references. These bugs are fixed in the MWSE update released by Merzasphor. 
Syntax
 

Example
 

Here we are using xFirstNPC to retrieve the first NPC in the list of the current cells, but xFirstItem and xFirstStatic could also be used for items and statics respectively. Then we are using our current reference (stored in NPCref) as a parameter for xNextRef so that the function will know from where to pick the next reference in the list. This new reference (in this case it's the second one in the list) is then set to NPCref.

See Also
xSetRef 
xRefType 
xGetRef 
xGetCombat 
xGetPCTarget
Tes3Mod:XNextStack

A function added by MWSE.

xNextStack returns the next item in the inventory stack. The parameter to this function is the third result from either xInventory or this function. Attempts to pass any other kind of reference to this function or use this reference with other functions will result in errors and possibly crash the game. If the inventory of the current NPC, creature, or container is changed (items added or removed) it will make the current stack reference invalid and you should get a new stack reference with xInventory.

Syntax
 

Example
Place following script on a container. When container is activated file containing IDs of items in the container will be created in Data Files\MWSE folder. 
 

See Also
xInventory 
xContentList 
xAddItem 
xRemoveItem 
xHasItemEquipped 
xEquip 
xDrop 
xAddSpell 
xRemoveSpell
Tes3Mod:XPCCellID

A function added by MWSE.

xPCCellID returns a string containing the name of the current cell.

Syntax
 

Example
 

See Also
xRefID 
xMyCellID 
xGetName 
xSetName 
xGetBaseID 
xStringCompare 
xStringLength 
xStringParse 
xStringBuild 
xStringMatch 
xLogMessage 
xMessageFix
Tes3Mod:XPlace

A function added by MWSE.

xPlace places an object of type objectid behind the player and returns a reference to the new object.

Syntax
 

Example
 

See Also
xAITravel 
xPosition 
xPositionCell 
xStartCombat