|
This page very likely contains outdated information (last updated in 2005). |
![]() |
UESP Main Page Arena Daggerfall Battlespire Redguard Morrowind |
This page contains a description of all the functions available for scripting in Morrowind's Construction Set.
Feel free to Contact the Webmaster to contribute any suggestions
or corrections. You can also view the Categorical Function List.
There are currently 516 different commands/variables listed on this page. Feel free to download this page to your
hardrive for faster and more convienient access.
->Type: System Returns: none Example: if ( player->GetHealth <= 10 ) "bk_fragmentonartaeum"->Enable Scripts:
This is a reserved script operator used to access functions for a particular object reference. Use this when you wish to manipulate or access a specific object explicitly. Note that if multiple objects exist in the world you have no guaruntee which one you'll access (the first one the game finds). Also note that if you wish to access an object from anywhere in the world you will need to ensure that the object's References Persist button is checked.
If the object ID on the left of the -> has any spaces in it you will need to enclose the ID with double-quotes. Leading underscores (_) on Object IDs also seem ti have erratic results in the script editor. In some places they work fine, in other places the script editor chokes on them. It is reccommended not to name objects with a leading underscore.
See Also:
Includes Contributions from DinkumThinkum.
Activate, [player]Where: player = Optional player ID which forces the object to be activated by the player no matter where the object/player is. Undocumented. Type: Object Returns: none Example: If ( OnActivate == 1 ) Activate endif Scripts: Dagoth_doors Bittercup
This function tells the object to do its default activation.
Object Type Activation NPC Dialogue Works Container Opens Works Door Opens Doesn't Work? Book/Scroll Reads Works Weapon Picks Up Works Armor Picks Up Works Misc, etc... Picks Up WorksThere is an undocumented feature in the Activate function by specifying the player after the function, for example:
begin RemoteContainer
short OnPCEquip
if ( OnPCEquip == 1 )
set OnPCEquip to 0
"dh_remote_chest_01"->Activate, player
endif
end
If the container is persistant (references persist) this script should open the container wherever the player is. This
is a great way to create 'carryable' containers by attaching a script similar to the above to a ring or similar item.
See Also:
AddItem, ObjectID, CountWhere ObjectID = Object to add to caller's inventory. Count = Number of item to add Type: Object Returns: none Example: player->AddItem, "Gold_001", 200 (gives player 200 gold) "sinnammu mirpal"->AddItem, cloudcleaver_unique, 1 Scripts: bladeScript blueScript
Adds the given number of the item to the calling NPC. Note that the Count value has a short type which limits the number of items that you can add to 65535 (or possibly 65534).
This function does accept global variables but only in dialogue results, not scripts. It doesn't work when you set the global variable in the same dialogue result. Either set the variable before starting dialogue, or in a dialogue line that precedes the response with the AddItem result (e.g Greeting).
When an NPC has armor added to its inventory (via AddItem or normally when you sell it to them), it will automatically equip the armor if:
There is a related bug/feature when using AddItem/RemoveItem with a container. The game remembers when you change the contents of this container, and if you haven't, there is no need to store the container's contents after you took all that was within. The first AddItem will always work on a container, but after that you need first to move anything into the container (i.e., actually have the player add an item within the game), before another AddItem shows any effect.
See Also: RemoveItem
Includes Contributions from Ben Marshall, Jog and Argent.
AddSoulgem, CreatureID, SoulgemIDWhere CreatureID = Creature whose soul you wish to add SoulgemID = Type of soulgem to create. The game's soulgem IDs are Misc_SoulGem_Azura Misc_SoulGem_Grand Misc_SoulGem_Greater Misc_SoulGem_Common Misc_SoulGem_Lesser Misc_SoulGem_Petty Type: Magic Returns: none Example: player->AddSoulgem, "golden saint", Grand Scripts: Not Used
Adds a filled soulgem to the calling object's inventory using the given creature and soulgem types.
See Also: DropSoulGem
AddSpell, SpellIDWhere SpellID = Spell you wish to add to the target (known or affect spells). Type: Magic Returns: none Example: player->AddSpell, "alit bite" (add to known spell list) AddSpell, "ash woe blight" (add curse to spells affecting target) "adairan lalansour"->AddSpell, "Ogrul's_Lucky_Again" Scripts: CorprusOnPC diseaseChills
This function adds the given spell to the calling object. If the spell is a normal spell, it will be added to the list of the actor's known spells. If the spell is a curse/disease it will be added to the list of spells currently affecting the calling actor. Use RemoveSpell to remove spells added by AddSpell.
A bug related to this function is that if add a curse type spell to a creature and it, then any other creature of that type you encounter from that point on will also be effected by that curse. To fix this simply call RemoveSpell in an OnDeath clause in a script attached to the creature. The fact that this happens in the first place suggests to me that the spell is added to the creature definition, and not just that particular instance of the creature.
See Also: RemoveSpell
Includes Contributions from Argent.
AddToLevCreature, LevCreature, Creature, Level AddToLevItem, LevItem, Item, LevelWhere LevCreature = Levelled creature list ID to modify LevItem = Levelled item list ID to modify Creature = ActorID to add to levelled creature list Item = ItemID to add to levelled item list Level = Minimum level of player to activate the item/creature. Type: Levelled Lists, Tribunal Returns: none Example: AddToLevCreature, "ex_azurascoast_sleep", "ash_ghoul", 25 AddToLevItem, "l_m_amulets", "amulet of 6th house", 15 Scripts: Not Used
Allows the user to modify the levelled item/creature lists while the game is running. The functions will add the object/level pair to the levelled list (assuming that it doesn't already exist in the list).
See Also: RemoveFromLevCreature, RemoveFromLevItem
AddTopic, TopicIDWhere TopicID = Dialogue ID to add to players known topics. Type: Dialogue Returns: none Example: addtopic "Redoran councilors" Scripts: eotScript MoonandStar
Adds the given dialogue topic to the players list of known topics. Known topics will appear when the player talks to NPCs that have that topic. When creating a new plugin with new dialogue topics, you will frequently want to add a few topics that the player already knows. To do this, create a temporary object near the related NPC and attach a script like the following:
begin test_AddTopics short DoOnce; if ( DoOnce == 0 ) AddTopic "newtopic01" AddTopic "newtopic02" AddTopic "newtopic03" set DoOnce to 1 endif end
See Also:
AiActivate, ObjectID, [Reset]Where ObjectID = Object to activate, required [reset] = Optional parameter, unknown, may indicate whether the current AI package is interrupted. Type: AI Returns: none Example: Scripts: Not Used
Although this function is in the TES Construction Set help file it is never actually used in any of the official master files. It causes the referenced NPC/creature to attempt to activate the given object (such as an item, door, activator, etc...).
There is a known bug when using the optional Reset parameter with AiActivate (verified with Tribunal). It is therefore recommended to not include the reset parameter. Also, this function is mostly broken in the original Morrowind game, but has been significantly improved in Tribunal. The following actions have been tested and verified to work:
See Also:
AiEscort, ActorID, Duration, X, Y, Z, [Reset] AiEscortCell, ActorID, CellID, Duration, X, Y, Z, [Reset]Where ActorID = The target NPC that the source NPC will be escorting. Duration = The length of time (in seconds) that the target NPC will be escorting. A value of 0 indicates infinite time. CellID = Cell name where the source NPC will stop escorting. X,Y,Z = The position that the source NPC will stop escorting the target. [Reset] = Optional parameter, unknown, may indicate whether the current AI package is interrupted. Type: AI Returns: none Example: AiEscort, Player, 0, 70685, 126106, 835, 0 AiEscortCell, Player, "Balmora, Hecerinde's House", 0, 70685, 126106, 835, 0 Scripts: whiteguarScript (AiEscort) Not Used (AiEscortCell)
When the NPC uses AiEscort, the player does *not* get free discretion on the path. The NPC leads the player to the destination, and if the player decides to go somewhere else, the NPC stops and waits for the player -- in simple terms, the player must follow the NPC all the way to the destination. If the duration is 0 it will be ignored. When escorting someone, if the target NPC is attacked, the source NPC will come to their aid. An XYZ position of (0,0,0) is often used for situations where you want to directly control when the NPC will stop following (no specific location). In this case, the NPC will escort until another AI type command is given to it.
As with other AI functions, issue this command only once or the results may not be as expected.
AiEscortCell is similar to AiEscort except the target NPC will stop escorting the source NPC (ActorID) at the given position in the named cell.
See Also: AiFollow, GetAiPackageDone, GetCurrentAIPackage
Includes Contributions from Spuzzum.
AiFollow, ActorID, Duration, X, Y, Z, [Reset] AiFollowCell, ActorID, CellID, Duration, X, Y, Z, [Reset]Where ActorID = The target NPC that the source NPC will be following. CellID = Cell name where the source NPC will stop following. Duration = The length of time (in seconds) that the target NPC will be following. A value of 0 indicates infinite time. X,Y,Z = The position that the source NPC will stop following. [Reset] = Optional parameter, unknown, may indicate whether the current AI package is interrupted. Type: AI Returns: none Example: "taren andoren"->AiFollow, "velyna seran" 0, 0, 0, 0 AiFollowCell, Player, "Balmora, Hecerinde's House", 0, 70685, 126106, 835, 0 Scripts: talenScript (AiFollow) Not Used (AiFollowCell)
Similar to AiFollow where the source NPC will be set to follow the target NPC (ActorID) for the given duration (in seconds, 0 indicates infinte time) or until they reach the given position (AiFollow for exterior locations, AiFollowCell for interior locations). When an NPC uses AiFollow, the player gets to choose where he/she goes. The NPC will follow the player diligently the whole way.
As with other AI functions, issue this command only once or the results may not be as expected.
See Also: AiEscort, GetAiPackageDone, GetCurrentAIPackage
Includes Contributions from Spuzzum.
AiTravel, X, Y, Z, [reset]
Where X,Y,Z = The exterior position for the NPC to travel to. [Reset] = Optional parameter, unknown, may indicate whether the current AI package is interrupted. Type: AI Returns: none Example: AiTravel, 1900 -2146 -173 0 "adaves therayn"->AiTravel, 10199, 1945, 100 Scripts: lookoutscript (good example of making Fargoth move around) dulniScript tarenScript
Starts the NPC to travel to the given exterior position. The distance to the new coordinates cannot be too great (about 3000-4000 units), or the actor will not react, although this maybe related to trying to move the NPC to another cell (which often has problems). Use GetAiPackageDone function to determine when the actor reaches destination. Note that sleeping, teleporting, or fast travel will cause the actor to warp to the end-coordinates, but the GetAiPackageDone function will not fire - this can be a problem. The Z coordinates need only be approximate and all values must be literal, no variables accepted. AIpath grid helps, but is not mandatory.
As with other AI functions, issue this command only once or the results may not be as expected.
See Also: AiEscort, AiFollow, GetAiPackageDone, GetCurrentAIPackage
AiWander, Range, Duration, Time, [Idle2], [Idle3], ...[Idle9], [Reset]Where Range = The range, in game units, that the NPC will wander in from its current location. Duration = Time (in hours?) that the NPC will wander (0 indicates infinite) Time = Possibly the start time for the wandering to occur (0 may indicate no start time). [Idle2]... = Optional parameters, that give the chance of the NPC to perform the following idle movements: Idle2: Looking around Idle3: Looking behind Idle4: Scratching head Idle5: Shifting clothing or armor on shoulder Idle6: Rubbing hands together and showing wares Idle7: Looking at fingers and looking around furtively Idle8: Deep thought Idle9: Reaching for weapon [Reset] = Optional parameter, unknown, may indicate whether the current AI package is interrupted. Type: AI Returns: none Example: AIWander, 0, 0, 0 (forces NPC to stand in one spot) "urzul gra-agum"->AIWander, 128, 0, 0, 60, 30, 10, 0, 0, 0, 0, 0, 0 Scripts: attack_Slave dinScript
Sets the given NPC to wander randomly in the current area using any AI grid points and performing various random idle movements. This function is commonly used to stop NPCs from following or performing a previously assigned action.
There are two known bugs with this function. The Idle2 parameter is not output in the compiled script (verified with Tribunal). The Reset parameter also maybe output incorrectly and should not be used.
See Also: GetAiPackageDone, GetCurrentAIPackage
BecomeWerefolfType: Werewolf, Bloodmoon Returns: none Example: player->BecomeWerewolf Scripts:
Turns the player, NPC, or creature immediately into a werewolf. Only works properly for NPC's, however, it can be used on creatures for some weird effects. Effected NPC's take on the werewolf mesh, removing all clothing and weapons, and retaining all AI settings. This means an NPC turned into a werewolf may not be able to talk, but he/she will have the same Idle, Fight, and Hello, settings, etc... (though they'll just track the PC on Hello triggers, no dialogue). Likewise, already attacking NPC's will simply keep attacking, albeit in a new form - scripts seem to continue to run fine, as the object ID seems to remain the same. I'm unsure if stats on NPC's affected by this function call are changed or not - Speed is definitely not changed, so presumably it's only attack damage and/or hit chance that changes.
This command can be used on creatures, with varying effects - the creature NIF/appearance will NOT be swapped out, nor will their 'Name' tag say 'werewolf', as it does on NPC's - and it only seems to work for certain creatures, changing their attack sound and attack stats, if I'm not mistaken. Creatures with Weapon & Shield bone entries will unequip whatever they're holding and go hand-to-hand - and as I said the attack sound changes to a werewolf growl, but otherwise Idle and other sounds seem to remain the same. It's amusing when used on Reiklings - they become little snarling, boxing, midgets.
Also, The Werewolf transformation is handled almost exactly like the Vampire one, with the PCWerewolf global being used. Using Becomewerewolf and Undowerewolf can break your game. Some quests and variables depend solely on on use of these, so if you use one to toy around.... you may be asking for it.
See Also: IsWerewolf, PCWerewolf, SetWereWolfAcrobatics, UndoWerewolf
Includes Contributions from LDones.
begin ScriptNameWhere: ScriptName = The unique name of the script Type: System Returns: none Example: begin testing_script Scripts:
This should be first line at the top of your script that states the script's ID. The script ID can be any combination of letters, numbers, underscore or spaces. It is recommended not to use spaces for simplicity (as with any other object ID).
See Also: End
BetaComment, Comment BC, CommentWhere: Comment = Beta comment string to save Type: Console Returns: none Example: BC, "test comment" Scripts:
Console function that assumably records a comment for use in beta testing.
See Also:
Cast, SpellID, TargetIDWhere: SpellID = Spell to cast at the target TargetID = Target for the spell Type: Magic Returns: none Example: Cast, "Cure Common Disease Other", Player "adairan lalansour"->Cast, "poisonbloom", "Netch_Giant_UNIQUE" Scripts: GavisScript ShrineMeris
The calling object casts the given spell onto the target (spells only). A common use for this is to create traps that cast a spell on the player when activated.
In the original Morrowind release, the a touch spell can be cast by any object but must be directed at a specific REFERENCE to an NPC or creature. Targeted and self spells can only be cast by an NPC or creature. For example:
FXSpawner->Cast, "FX_Frost_Sphere", mysterious_temple_NPC00000000
It doesn't matter where the caster is, it will still activate the effect on the NPC or creature ref and glow. Only NPCs and certain creatures can cast a targeted spell. Some creatures like rats can't cast spells. Non-AI objects can cast multiple spells at once at multiple targets or a single target whereas NPCs and creatures will target the last ref targeted in the calling frame. Also, NPCs and creatures have to reset back to where they where when Cast was called before casting again.
Getting a reference to target itself is a perfect substitute in the original Morrowind for Tribunal's ExplodeSpell Command.
See Also:
Includes Contributions from Ben Marshall.
CellChangedType: Movement Returns: short Example: if ( CellChanged == 1 ) Scripts: ajiraScript avSlaveHunter
Returns 1 for one frame when the player enters a cell (but not when they leave), or 0 otherwise. Often used to disable/enable objects once the player has left the area (so they don't appear immediately out of thin air or cause script errors/crashes).
See Also:
Includes Contributions from Klinn.
CellUpdateType: Movement, Broken Returns: none Example: CellUpdate Scripts: Not Used Updates the current objects cell position. This should be called when moving objects over large distances. The game keeps tracks of objects based on what cell they are in, and if an object moves a cell over from its starting position, it may not get processed correctly when running its script.
Note that this function does not appear to work correctly. Moving items across cell boundaries (exterior) can cause them to warp or disappear and calling CellUpdate only results in a script error.
See Also:
CellUpdateType: Movement, Broken Returns: none Example: CellUpdate Scripts: Not Used Updates the current objects cell position. This should be called when moving objects over large distances. The game keeps tracks of objects based on what cell they are in, and if an object moves a cell over from its starting position, it may not get processed correctly when running its script.
Note that this function does not appear to work correctly. Moving items across cell boundaries (exterior) can cause them to warp or disappear and calling CellUpdate only results in a script error.
See Also:
CenterOnCell, CellNameWhere: CellName = Name of a interior cell Type: Console Returns: none Example: CenterOnCell, "Balmora, Temple" Scripts:
Places the player in the center of the given interior cell.
See Also: CenterOnExterior
CenterOnExterior, CellX, CellYWhere: CellX CellY = Cell grid location coordinates (shorts) Type: Console Returns: none Example: CenterOnExterior, -3, -2 Scripts:
Places the player in the center of the given exterior cell.
See Also: CenterOnCell
ChangeWeather, [Region], [Type]Where: Region = Region name to change the weather in. Type = The type of weather to change to. 0 = Clear 1 = Cloudy 2 = Foggy 3 = Overcast 4 = Rain 5 = Thunder 6 = Ash 7 = Blight 8 = Snow (Bloodmoon?) 9 = Blizzard (Bloodmoon?) Type: Weather Returns: none Example: ChangeWeather, "Red Mountain Region", 0 ChangeWeather, "Bitter Coast Region", 1 Scripts: EndGame CharGen
Changes the weather in the specified region right now. The weather will begin transitioning immediately. It will reselect a new weather on the next weather update (12 hours).
See Also: ModRegion
Choice, 'Button1', ...['Button5']Where: 'Button1'... = Text for the various choices. At least one choice is required and up to five are allowed. Type: Dialogue Returns: none Example: Choice, "Continue..." (force the player to one option) Choice, "Yes" 1, "No" 2, "I'm not sure" 3 Scripts: Used only in dialogue results.
Used only in dialog for presenting 1 to 5 choices to the user. The choice results can be retrieved by using the choice function in the function/variable lists in the dialogue speaker conditions area. Use values following the choice strings to specify the exact return value if the user chooses that option (I'm unsure what values are returned if you do no specify values, though I assume they start at 1).
Important Note: If you specify the numbers after each choice you must include a space between the ending quote and the number.
Choice and Goodbye can be used in scripts. Choice can also be used multiple times in a row to create as many choices as desired. I'm not sure what happens when they're used if dialogue is not open, but I suspect it would crash Morrowind. However, when dialogue *is* open, they can be used for some very clever dialogue choices.
For example:
[in the dialogue topic] Okay, so here's the plan. At the stroke of midnight, you post a watch on the northern tower. Meanwhile, I'll enter the compound, and when you hear a loud whistle, you open the front gates and let me out. Then we'll meet later and I'll give you your share. Understand?
[in the dialogue Results box] Choice "No." 1 StartScript "_spzHeistResponseIntelScript"
[in the script] begin _spzHeistResponseIntelScript if ( ( Player->GetIntelligence ) > 20 ) Choice "Mostly." 2 endif if ( ( Player->GetIntelligence ) > 40 ) Choice "Yes, perfectly!" 3 endif if ( ( Player->GetIntelligence ) > 60 ) Choice "I have a better strategy." 4 endif StopScript "_spzHeistResponseIntelScript" ;mandatory! end _spzHeistResponseIntelScriptIn simple terms, the smarter the player is, the more options the player gets for responses.
See Also: GoodBye, MessageBox
Includes Contributions from Spuzzum.
ClearForceJumpType: Movement, Tribunal Returns: none Example: ClearForceJump "Gadyni Rethan"->ClearForceJump Scripts: Not Used
Stops the calling actor from jumping from a previous call to ForceJump.
See Also: ForceJump, GetForceJump
ClearForceMoveJumpType: Movement, Tribunal Returns: none Example: ClearForceMoveJump "Gadyni Rethan"->ClearForceMoveJump Scripts: Not Used
Stops the calling actor from jumping from a previous call to ForceMoveJump.
See Also: ForceMoveJump, GetForceMoveJump
ClearForceRunType: Movement, Tribunal Returns: none Example: ClearForceRun "Gadyni Rethan"->ClearForceRun Scripts: Not Used
Stops the calling actor from running from a previous call to ForceRun.
See Also: ForceRun, GetForceRun
ClearForceSneakType: Movement Returns: none Example: ClearForceSneak "taren andoren"->ClearForceSneak Scripts: tarenScript lookoutScript
Stops the NPC sneaking from a previous call to ForceSneak.
See Also: ForceSneak, GetForceSneak
ClearInfoActorType: Dialogue Returns: none Example: ClearInfoActor Scripts: Not Used
Makes this info not appear in the journal. Not entirely sure the purpose or use of this function.
See Also:
CreateMaps, "filename.esp"Where: "filename.esp" = Plugin to create maps for Type: Console Returns: none Example: CreateMaps Scripts:
The actual effect of this functions depends on the Create Maps Enable entry in MORROWIND.INI file. The accepted values are:
0 = None 1 = XBox Maps 2 = Exterior Cell MapsFor the XBox setting, maps are created for the given input plugin filename (a .MAP is created in the Morrowind\Data Files path). For the Exterior Cell Map setting, BMP files for all exterior cells are output to the Data Files path (I think). Note that this takes a good deal of time so you may wish to let it run overnight.
See Also:
DayType: Time, Global Returns: short Example: if ( Day > 10 ) set sValue to ( OrigDay + Day ) Scripts: expelledMG fraldScript
Global short variable which returns the current day of the month in the game. This value can be modified using the SET command to change the day.
See Also: DaysPassed, GameHour, Month, Year
Includes Contributions from Spuzzum.
DaysPassedType: Time, Global, Tribunal Returns: short Example: if ( DaysPassed > 10 ) set sValue to ( OrigDay + DaysPassed ) Scripts: barAssScript karrodMovement
Global short variable which returns the total number of game days since the start of the game.
See Also: Day, GameHour, Month, Year
Includes Contributions from Jog.
Disable EnableType: Misc Returns: none Example: "murberius harmevus"->Disable misc_lw_bowl_chapel->Enable Scripts: Alen_Note AzuraEnd
Used to enable/disable objects within the game. A disabled object is saved but not visible or processed within the game (though any scripts attached to it will still work). Not that it is dangerous to disable an object within its own script (causes crashes). There also appears to be some minor issues involved with disabling lights.
There are many possibilities allowed with these functions. For example, the game strongholds are initially disabled and are only enabled once the player performs the appropriate quests
See Also: GetDisabled
DisableLevitation EnableLevitationType: Movement, Tribunal Returns: none Example: DisableLevitation EnableLevitation Scripts: TribunalMain
Enables/disables the use of levitation magic.
See Also:
DisablePlayerControls DisablePlayerFighting DisablePlayerJumping DisablePlayerLooking DisablePlayerMagic DisablePlayerViewSwitch DisableVanityModeType: Player Controls Returns: none Example: DisablePlayerControls DisablePlayerFighting DisablePlayerJumping DisablePlayerLooking DisablePlayerMagic DisablePlayerViewSwitch DisableVanityMode Scripts: AzuraEnd CharGen mastriusScript
Stops the player from using various parts of the interface. Used during character creation and during in-game cut scenes mostly.
See Also: EnablePlayerControls, EnablePlayerFighting, EnablePlayerJumping, EnablePlayerLooking, EnablePlayerMagic, EnablePlayerViewSwitch, and EnableVanityMode.
DisableTeleporting EnableTeleportingType: Movement Returns: none Example: DisableTeleporting EnableTeleporting Scripts: DagothUrCreature2 TribunalMain enable_teleport EndGame
Enables or disables the use of teleportation magic in the game. Use to force the player to remain in a particular area or prevent easy escape.
See Also:
DontSaveObjectType: Misc Returns: none Example: DontSaveObject Scripts: diseaseAscended SignRotate
Call when you do not want to save any changes in the calling object to the player's save game.
Although this has been said to be a new function with Tribunal, it also appears to work fine in the original game (such as in the diseaseAscended script which is in the original game).
See Also: SetDelete
Drop, ObjectID, CountWhere: ObjectID = Object to drop Count = Number of the object to drop Type: Object Returns: none Example: player->Drop, "gold_001", 100 Drop, "amulet of mark", 1 Drop, Slave_Bracer_Left, 1 Scripts: slaveScript CharGenDagger
The calling NPC drops the given number of the item into world at his feet. Assumably it only works if the calling actor has enough of the item to drop. There does appear to be some problems dropping items from NPCs where the item is dropped at the player's feet instead of the NPCs (works in the slave script though).
See Also:
DropSoulgem, CreatureIDWhere: CreatureID = Creature to fill the soulgem with Type: Magic Returns: none Example: DropSoulgem, "atronach_flame" Scripts: Not Used
Assumably causes the calling object to drop a filled soulgem with the given creature's soul. Assumably the type of soulgem is calculated automatically from the value of the creature's soul.
See Also: AddSoulgem
if ( LeftValue CompareOp RightValue ) < statements > elseif ( LeftValue CompareOp RightValue ) < statements > else < statements > endifWhere: LeftValue = Local/global variable or function call CompareOp = ==, <=, <, >, >=, != RightValue = Local/global variable or numeric literal value Statements = Zero or more statements to execute Type: System Returns: none Example: if ( GlobalVar >= 10 ) ; do stuff elseif ( LocalVar < GlobalVar ) ; do stuff elseif ( player->GetStrength == 100 ) ; do stuff else ; do stuff endif Scripts:
The IF statement block is used to test and execute conditional statements. The elseif/else blocks are both optional. It should be noted that if statements can be used in dialogue results. You should not include any operations (add, subtract, multiply, divide) in either the LeftValue or RightValue fields. Use a temporary variable and a set statement before the if block if you need to use operations.
It is important to remember to use spaces surrounding the '(', compare operator, and ')'. There are known cases where omitting the spaces will cause compiler or runtime errors in the script.
See Also:
Includes Contributions from Argent.
EnableInventoryMenu EnableMagicMenu EnableMapMenu EnableStatsMenuType: Controls, Undocumented Returns: none Example: Scripts: CharGenClassNPC CharGenNameNPC
These undocumented functions enable the various menus and are used during character creation to limit what the player has access too.
See Also:
EnableBirthMenu EnableClassMenu EnableNameMenu EnableRaceMenu EnableStatsReviewMenuType: Character, Undocumented Returns: none Example: EnableBirthMenu EnableClassMenu Scripts: CharGenClassNPC CharGenNameNPC
These undocumented functions display the various windows used during character creation. You should be able to use these at any time to change/modify your character. A common use of these is to change the character creation process. See all the CharGen... scripts for more details. EnableRaceMenu allows you to choose your race, EnableBirthMenu your birth sign, EnableClassMenu you class, etc...
See Also:
EnableLevelUpMenu EnableRestType: Player Controls Returns: none Example: EnableLevelUpMenu EnableRest Scripts: CharGenBed
Enables the rest/levelup windows to allow the user to rest and increase their levels normally. Note that these functions do not appear to have an associated Disable... function.
See Also:
EnablePlayerControls EnablePlayerFighting EnablePlayerJumping EnablePlayerLooking EnablePlayerMagic EnablePlayerViewSwitch EnableVanityModeType: Player Controls Returns: none Example: EnablePlayerControls EnablePlayerFighting EnablePlayerJumping EnablePlayerLooking EnablePlayerMagic EnablePlayerViewSwitch EnableVanityMode Scripts: AzuraEnd CharGen mastriusScript
Allows the player to using various parts of the interface disabled from a previous call to one of the Disable... functions.
See Also: DisablePlayerControls, DisablePlayerFighting, DisablePlayerJumping, DisablePlayerLooking, DisablePlayerMagic, DisablePlayerViewSwitch, and DisableVanityMode.
while ( LeftValue CompareOp RightValue ) < statements > endwhileWhere: LeftValue = Local/global variable or function call CompareOp = ==, <=, <, >, >=, != RightValue = Local/global variable or numeric literal value Statements = Zero or more statements to execute Type: System Returns: none Example: while ( GetStrength < 90 ) ModStrength, 1 endwhile Scripts:
The while is the only loop statement available in the scripting language. The while loop is executed within one frame until the condition is satisfied. This can cause an unwanted pause in the game if there are many loops required.
See Also:
Equip, ObjectIDWhere: ObjectID = Object to equip on its owner. Type: Object Returns: none Example: Fargoth->Equip, "torch_infinite_time_unique" Equip, amulet_usheeja player->Equip, "dh_thrift_hammer_01" Scripts: lookoutScript
Equips the given item on its owner. Note that this function does not work as intended some of the time. Equipping items on the player often does not work, although I had successfully equipped repair hammers from a script. Similarily with NPCs, equipping weapons/armor may not be possible although you can make them quaff potions.
Note that this function appears to be broken in the original Morrowind game (you may receive a bad function code error in the game or things simply will not work) but is fixed with the Tribunal expansion. In Tribunal you can successfully get NPCs to equip weapons/armor as well as on the player.
See Also:
ExplodeSpell, SpellIDWhere: SpellID = Spell to explode on the calling object Type: Magic, Tribunal Returns: none Example: ExplodeSpell, "proj_trap_spell" Scripts: trapProjScript
Makes the calling object cast the given spell at itself. If an area effect touch range spell is used, this can make the reference 'explode'.
See Also:
Face, Angle, Time (unconfirmed) or Face, X, Y (??)Where: Angle = The final Z-angle you want the object to face. Time = How fast the object rotates? X, Y = Coordinate you want the NPC to face. Type: Movement, Undocumented Returns: none Example: Scripts:
Possibly makes an NPC face a direction and how fast they turn that way. Apparently interrupts current animations. I've used to on Wandering NPCs and they stop, Face wherever, then continue on wherever they were wandering to as soon as the Facing movement is over. Call only once unlike the Rotate type functions.
This function may be partially or entirely broken.
See Also:
Includes Contributions from Jog, CaveRat.
FadeIn, Time FadeOut, TimeWhere: Time = Time in seconds to fade in/out (0 to 10, float) Type: Misc Returns: none Example: FadeIn, 1.0 FadeOut, 2.5 Scripts: puzzlecanal mastriusScript
Fades the screen in/out to/from black in the given amount of time.
See Also: FadeTo
FadeTo, Alpha, TimeWhere: Alpha = The final amount of fade (0 = clear, 100 is black) Time = Time in seconds to fade (float) Type: Misc Returns: none Example: FadeTo, 50, 2 (fade to 50% black in 2 seconds) Scripts: Not Used
Fades the screen to a given amount in the set time.
FallType: Movement, Undocumented Returns: none Example: Scripts:
Assumably this function causes the calling object to fall to the ground. Further testing is required.
See Also:
FillJournalType: Console Returns: none Example: Scripts:
This console function adds all the available journal entries to the character's journal. The TESCK help file says this may take a long time. The only known use of this function is for testing purposes.
See Also:
FillMapType: Console Returns: none Example: Scripts:
Shows all the town names on the world map.
See Also:
FixMeType: Console Returns: none Example: Scripts:
Reloads the current cell and attempts to 'unstick' the player from any object (jump 128 units away). Although this is a console function you can still call this function from a script. One use is when moving objects over long distances (across cell boundaries). Calling FixMe in this circumstance can correct certain display and clipping errors.
See Also:
FloatType: System Example: float LocalVar Scripts:
This is the largest and one of the three types of the scripting language. Float variables can range from 3.4e+38 to 3.4e-38 and has 7 digits of precision.
Although local variables can start with an underscore character (_), this seems to cause strange problems in some functions. Therefore it is reccommended that you do not name variables starting with the underscore.
Includes Contributions from DinkumThinkum.
ForceGreetingType: Dialogue Returns: none Example: ForceGreeting "taren andoren"->ForceGreeting Scripts: anoScript dinScript
Makes the NPC start dialogue with the PC. Does not matter where the NPC is. The only exception to this appears to be that NPCs not in the current cell can only be used in a script if the player has visited the cell with the NPC within 72 hours. Note that this applies to ForceGreeting and other script functions as well. You can get around this limitation by using a PositionCell on the NPC once per day. Even if their position is not actually changed the 72 hour limit will no longer apply (some say you do actually have to change the NPC's cell with this technique).
See Also:
Includes Contributions from Srikandi and Cortex.
ForceJumpType: Movement, Tribunal Returns: none Example: ForceJump "Gadyni Rethan"->ForceJump Scripts: Not Used
Forces the calling actor to jump in place. Note this is different than ForceMoveJump which causes the NPC to jump while they move.
See Also: ClearForceJump, GetForceJump
ForceMoveJumpType: Movement, Tribunal Returns: none Example: ForceMoveJump "Gadyni Rethan"->ForceMoveJump Scripts: Not Used
Forces the calling actor to jump while they move. Note this is different than ForceJump which causes the NPC to jump in place without moving.
See Also: ClearForceMoveJump, GetForceMoveJump
ForceRunType: Movement, Tribunal Returns: none Example: ForceRun "Gadyni Rethan"->ForceRun Scripts: Not Used
Forces the calling actor to run when they move.
See Also: ClearForceRun, GetForceRun
ForceSneakType: Movement Returns: none Example: ForceSneak "taren andoren"->ForceSneak Scripts: tarenScript lookoutScript
Forces the NPC to start sneaking, making him creep around stealthily.
See Also: ClearForceSneak, GetForceSneak
GameHourType: Time Returns: float Example: if ( GameHour >= 18 ) set fValue to GameHour Scripts: anoScript sleeperScript
Returns the current hour of the day in the game's time. The value is a floating point value that will be increased slightly on each frame. Game hour can be modified using the SET command to change the game time.
My favourite usage is on an item I created -- the Ring of Eternal Midnight -- which causes the GameHour to be set to 0.001 constantly once the day changes -- thus, once it becomes midnight, the ring will keep the game frozen at midnight until you remove it. When you do remove it, time will advance normally (even if you put the ring on again) until midnight is again reached.
Another good usage of setting GameHour directly is to make time pass. 'set GameHour to GameHour + 0.5' makes time advance a half-hour instantaneously. It correctly identifies new days, but I haven't yet tested whether or not it also correctly identifies time passed beyond a new day -- that is, if it is currently 11:59 PM, whether or not adding a half hour will make it 12:29 AM or simply 12:00 AM.
See Also:
Includes Contributions from Spuzzum.
GetAIPackageDoneType: AI Returns: short Example: if ( GetAIPackageDone == 1 ) Scripts: dulniScript FaluraScript
Returns 1 for one frame when the NPC's AI package has completed (usually returns 0). Use this to determine when an NPC has arrived at their location when using the AiTravel function.
See Also: AiEscort, AiFollow, AiTravel, AiWander, GetCurrentAiPackage
GetAngle, AxisWhere: Axis = Which world axis to get the object's orientation (X, Y, or Z). Type: Movement Returns: float Example: if ( misc_com_wood_bowl_02->GetAngle, Z >= 180 ) if ( GetAngle, Y < 0 ) set TempFloat to ( GetAngle, X ) Scripts: cavein_script testmoverock
Returns a float value of the calling object's current orientation (in degrees) in the world along the specified axis.
See Also:
GetArmorType, ArmorLocationWhere: ArmorLocation = Short value indicating which armor piece to check. Helmet 0 Cuirass 1 Left Pauldron 2 Right Pauldron 3 Greaves 4 Boots 5 Left Gauntlet 6 Right Gauntlet 7 Shield 8 Left Bracer 9 Right Bracer 10 Type: Object, Tribunal Returns: short (-1 to 2) Unarmored -1 Light Armor 0 Medium Armor 1 Heavy Armor 2 Example: if ( GetArmorType, 0 == 1 ) if ( player->GetArmorType, 8 == 2 ) if ( "adairan lalansour"->GetArmorType, 5 >= 0 ) Scripts:
Returns the armor weight class of the actor's armor at the given location.
See Also: GetWeaponType
GetAttackedType: Combat Returns: short Example: if ( GetAttacked == 1 ) Scripts: tarenScript JournalistPals
Returns 0 if the actor has never been attacked and 1 if he has been attacked.
See Also:
GetBlightDisease GetCommonDiseaseType: Magic Returns: short Example: if ( GetBlightDisease == 1 ) set sValue to "delte fyr"->GetCommonDisease Scripts: diseaseCorprus diseaseBrownRot
Returns 1 if the calling object has a common or blight disease, or 0 otherwise.
See Also:
GetButtonPressedType: Misc Returns: short Example: short Button set Button to GetButtonPressed Scripts: bittercup playscript
Returns the user's choice from the previous MessageBox function. If the user hasn't made a choice yet the function returns -1. The first button will return a value of 0, the second 1, and so on.
See Also: MessageBox
GetCollidingActor GetCollidingPCType: Collison, Tribunal Returns: short Example: if ( GetCollidingPC == 1 ) if ( GetCollidingActor == 1 ) Scripts: explosion_pushout ExitBlockMessage
GetCollidingPC returns 1 if the player is colliding with it. Similarily, GetCollidingActor returns 1 if ANY actor (including PC) is colliding on it. The functions returns 0 otherwise.
Are new functions introduced in the Tribunal expansion.
See Also:
GetCurrentAIPackageType: AI Returns: short (-1 to 5) None = -1 Wander = 0 Travel = 1 Escort = 2 Follow = 3 Activate = 4 Pursue = 5 Example: if ( GetCurrentAIPackage == 3 ) set g_TempValue to "teruise girvayne"->GetCurrentAIPackage Scripts: devalFollow FaluraScript
Returns a short value based on the current AIPackage the NPC is performing.
See Also: AiEscort, AiFollow, AiTravel, AiWander, GetAiPackageDone
GetCurrentTimeType: Time, Undocumented Returns: float Example: if ( GetCurrentTime >= 10 ) set g_TempValue to GetCurrentTime Scripts: Not Used
Unknown function that may return the same value of GetSecondsPassed. Further testing is required.
See Also: GetSecondsPassed
GetCurrentWeatherType: Weather Returns: short (0 to 7) 0 Clear 1 Cloudy 2 Foggy 3 Overcast 4 Rain 5 Thunder 6 Ash 7 Blight Example: if ( GetCurrentWeather == 1 ) Scripts: OutsideBanner
Returns the current weather conditions.
See Also:
GetDeadCount, ObjectIDWhere: ObjectID = Actor to get the number of times it has been killed Type: Stats Returns: short Example: if ( GetDeadCount, "Vorar Helas" > 0 ) set sValue to ( GetDeadCount, "ancestor_ghost" ) Scripts: attack_slave AhniaNote
Returns the number of items the given actor has been killed.
See Also:
GetDetected, ActorIDWhere: ActorID = Target NPC used to check if the source actor can them. Type: AI Returns: short Example: if ( GetDetected, "teres arothan" == 1 ) if ( GetDetected, Player == 1 ) Scripts: jeanneScript nartiseGuards
Checks to see if the calling NPC can detect the given actor (returns 1 if it can). If not, then the given actor is invisible in some form (such as sneaking, chameleon, or invisibility). The TES help file says that this is a slow function that should not be called too often.
See Also:
GetDisabledType: Misc Returns: short Example: if ( GetDisabled == 1 ) if ( "misc_vivec_ashmask_01"->GetDisabled == 0 ) set fValue to ( "cienne sintieve"->GetDisabled ) Scripts: almaScript CharGenBoatNPC
Returns 1 if the calling object is currently disabled, or 0 otherwise.
GetDistance, ObjectIDWhere: ObjectID = Object to get the distance to. Type: Movement Returns: float Example: if ( GetDistance, denegor <= 200 ) set fValue to ( "cienne sintieve"->GetDistance, Player ) Scripts: anoScript AzuraEnd
Returns a float value for the distance between the calling object and the given ObjectID (in game units). If one of the objects is not unique, the first instance of that object is used (thus you should only use the function with unique objects). Also, if you move one of the objects using Move or MoveWorld, GetDistance will still report the original distance (use GetPos in this situation).
See Also:
GetEffect, EffectIDWhere: EffectID = Magic effect to check for, use the following values: sEffectAbsorbAttribute sEffectAbsorbFatigue sEffectAbsorbHealth sEffectAbsorbSkill sEffectAbsorbSpellPoints sEffectAlmsiviIntervention sEffectBlind sEffectBoundBattleAxe sEffectBoundBoots sEffectBoundCuirass sEffectBoundDagger sEffectBoundGloves sEffectBoundHelm sEffectBoundLongbow sEffectBoundLongsword sEffectBoundMace sEffectBoundShield sEffectBoundSpear sEffectBurden sEffectCalmCreature sEffectCalmHumanoid sEffectChameleon sEffectCharm sEffectCommandCreatures sEffectCommandHumanoids sEffectCorpus sEffectCureBlightDisease sEffectCureCommonDisease sEffectCureCorprusDisease sEffectCureParalyzation sEffectCurePoison sEffectDamageAttribute sEffectDamageFatigue sEffectDamageHealth sEffectDamageMagicka sEffectDamageSkill sEffectDemoralizeCreature sEffectDemoralizeHumanoid sEffectDetectAnimal sEffectDetectEnchantment sEffectDetectKey sEffectDisintegrateArmor sEffectDisintegrateWeapon sEffectDispel sEffectDivineIntervention sEffectDrainAttribute sEffectDrainFatigue sEffectDrainHealth sEffectDrainSkill sEffectDrainSpellpoints sEffectExtraSpell sEffectFeather sEffectFireDamage sEffectFireShield sEffectFortifyAttackBonus sEffectFortifyAttribute sEffectFortifyFatigue sEffectFortifyHealth sEffectFortifyMagickaMultiplier sEffectFortifySkill sEffectFortifySpellpoints sEffectFrenzyCreature sEffectFrenzyHumanoid sEffectFrostDamage sEffectFrostShield sEffectInvisibility sEffectJump sEffectLevitate sEffectLight sEffectLightningShield sEffectLock sEffectMark sEffectNightEye sEffectOpen sEffectParalyze sEffectPoison sEffectRallyCreature sEffectRallyHumanoid sEffectRecall sEffectReflect sEffectRemoveCurse sEffectResistBlightDisease sEffectResistCommonDisease sEffectResistCorprusDisease sEffectResistFire sEffectResistFrost sEffectResistMagicka sEffectResistNormalWeapons sEffectResistParalysis sEffectResistPoison sEffectResistShock sEffectRestoreAttribute sEffectRestoreFatigue sEffectRestoreHealth sEffectRestoreSkill sEffectRestoreSpellPoints sEffectSanctuary sEffectShield sEffectShockDamage sEffectSilence sEffectSlowFall sEffectSoultrap sEffectSound sEffectSpellAbsorption sEffectStuntedMagicka sEffectSummonAncestralGhost sEffectSummonBonelord sEffectSummonCenturionSphere sEffectSummonClannfear sEffectSummonDaedroth sEffectSummonDremora sEffectSummonFlameAtronach sEffectSummonFrostAtronach sEffectSummonGoldensaint sEffectSummonGreaterBonewalker sEffectSummonHunger sEffectSummonLeastBonewalker sEffectSummonScamp sEffectSummonSkeletalMinion sEffectSummonStormAtronach sEffectSummonWingedTwilight sEffectSunDamage sEffectSwiftSwim sEffectTelekinesis sEffectTurnUndead sEffectVampirism sEffectWaterBreathing sEffectWaterWalking sEffectWeaknessToBlightDisease sEffectWeaknessToCommonDisease sEffectWeaknessToCorprusDisease sEffectWeaknessToFire sEffectWeaknessToFrost sEffectWeaknessToMagicka sEffectWeaknessToNormalWeapons sEffectWeaknessToPoison sEffectWeaknessToShock BloodMoon: sEffectSummonCreature01 sEffectSummonCreature02 sEffectSummonCreature03 sEffectSummonCreature04 sEffectSummonCreature05 Type: Magic Returns: short Example: if ( GetEffect, sEffectSilence == 1 ) set sValue to ( "cienne sintieve"->GetEffect, sEffectShield != 0 ) Scripts: Example_NPC_Stuff shrineTemple
Returns 1 if the given spell effect is currently on the calling object. Do not confuse effects and spells (effects are what make up the spells). You can also use an exact literal value for the EffectID if you know it. Appears to be broken for fatigue related effects?
See Also: GetSpell, GetSpellEffects
Includes Contributions from CaveRat.
GetFactionReaction, FactionID1, FactionID2Where: FactionID1, FactionID2 = Factions to get the reaction adjustment for Type: Faction, Console Returns: short Example: GetFactionReaction, "Thieves Guild", "Redoran" Scripts:
Returns the reaction adjustment for the two given factions. Can only be used in the console (unconfirmed)?
See Also: ModFactionReaction, SetFactionReaction.
GetForceJumpType: Movement, Tribunal Returns: short Example: if ( GetForceJump == 1 ) set sValue to ( "Gadyni Rethan"->GetForceJump ) Scripts: Not Used
Returns 1 if the calling actor is jumping from a previous call to ForceJump, or 0 otherwise.
See Also: ClearForceJump, ForceJump
GetForceMoveJumpType: Movement, Tribunal Returns: short Example: if ( GetForceMoveJump == 1 ) set sValue to ( "Gadyni Rethan"->GetForceMoveJump ) Scripts: Not Used
Returns 1 if the calling actor is running from a previous call to ForceMoveRun, or 0 otherwise.
See Also: ClearForceMoveJump, ForceMoveJump
GetForceRunType: Movement, Tribunal Returns: short Example: if ( GetForceRun == 1 ) set sValue to ( "Gadyni Rethan"->GetForceRun ) Scripts: Not Used
Returns 1 if the calling actor is running from a previous call to ForceRun, or 0 otherwise (short value).
See Also: ClearForceRun, ForceRun
GetForceSneakType: Movement Returns: short Example: if ( GetForceSneak == 1 ) if ( "taren andoren"->GetForceSneak == 1 ) Scripts: Not Used
Returns 1 if the NPC is currently sneaking (by a previous call to ForceSneak). Returns 0 otherwise.
See Also: ClearForceSneak, ForceSneak
GetHealthGetRatioType: Stats, Undocumented Returns: float Example: if ( player->GetHealthGetRatio < 0.10 ) set fValue to ( "Murudius Flaeus"->GetHealthGetRatio ) Scripts: Not Used
Returns a float value from 0.0 to 1.0 representing the calling actor's current health to maximum health ratio (i.e., 0.0 would be dead, and 1.0 would be full health). Note that this is the correct name for the GetHealthRatio function listed in the Construction Set help.
See Also:
GetInteriorType: Misc, Undocumented Returns: short Example: if ( GetInterior == 1 ) set sValue to GetInterior Scripts: Not Used
Returns 1 if the current cell is interior, or 0 otherwise.
See Also:
GetItemCount, ObjectIDWhere: ObjectID = ID of object to get the count for Type: Object Returns: short? Example: if ( player->GetItemCount, "gold_001" == 11171 ) if ( GetItemCount, "blessed_shield" > 0 ) short ObjectCount set ObjectCount to ( Player->GetItemCount, "wraithguard" ) Scripts: blueScript DagothTaunt_1
Returns the number of the objectID contained in the calling object. May not work correctly if the calling object has more than 32267 of the given item (unconfirmed).
There is a bug with this function when used on containers (possibly related to the AddItem/ RemoveItem bug). If the player chooses the Take All button on the container then subsequent GetItemCount calls on the container will return the number of items in the container before the player took everything.
One way to get around this bug is to set the chest as persistant and use a temporary persistant ingrediant in the chest. The persistant ingrediant is hidden in the sense that it is added initially to the chest from a script, removed when the player opens the container, and added back again when the container is closed. See the below script for an example:
begin HidePersistant short doOnce if ( onActivate == 1 ) RemoveItem, "PersistantIngredient", 1 set doOnce to 1 endif if ( doOnce == 1 ) If ( onActivate == 1 ) ; do nothing elseif ( Activate == 1 ) ; do nothing elseif ( MenuMode == 1 ) ; do nothing else AddItem, "PersistantIngredient", 1 Set doOnce to 0 return endif endif end
See Also:
Includes Contributions from Paschors and Aquiantus.
GetJournalIndex, JournalIDWhere: JournalID = ID of player's journal to retrieve Type: Dialogue Returns: short Example: if ( GetJournalIndex, MG_StolenReport > 0 ) if ( GetJournalIndex "MS_WhiteGuar" <= 50 ) Scripts: ajiraReports anoScript
This function returns the index of the highest (or the last?) journal entry for that journal topic that the player has received. Use this to keep track of the player's current location in the quest and for scripting specific events according to the quest.
See Also:
GetLOS, ObjectID GetLineOfSight, ObjectID (undocumented)Where: ObjectID = Object to check the line of sight with. Type: Movement Returns: short Example: if ( GetLOS, Player == 1 ) if ( GetLineOfSight, Player == 1 ) if ( "arara uvulas"->GetLOS, "ashamanu" == 1 ) Scripts: balynScript BILL_synette_jeline
Returns 1 if the calling object has a line of sight to other given ObjectID, or 0 otherwise. May not work correctly if used on non-actor objects. Both versions of the function should be identical.
See Also:
GetLockedType: Misc Returns: short Example: if ( GetLocked == 1 ) set sValue to ( "door_cavern_doors00_velas"->GetLocked ) Scripts: PlagueStart freleneCellDoor
Returns 1 if the calling object is locked, or 0 otherwise.
See Also:
GetMasserPhase GetSecundaPhaseType: Misc Returns: short 0 = New moon or Interior Cell (this is the default) 1 = Waxing or Waning Cresecent 2 = Waxing or Waning Half 3 = Waxing or Waning Gibbous 4 = Full Moon Example: if ( GetMasserPhase == 1 ) set sValue to GetSecundaPhase Scripts: Not Used
Returns the current phase of the two moons of Tamriel. Note that the GetSecundaPhase function is incorrectly referred to as GetSecundusPhase in the Construction Set help. Another thing that should be pointed out that the moons return whether or not they're full even during the day time, when logically the moons are invisible.
This isn't confirmed, but in practice, experimenting with both functions almost always resulted in both moons being full immediately upon loading a saved game, and both moons remaining at the precise same phase as one another throughout their rotation.
When the player is in an interior these functions will return the phase when you were last in an exterior cell.
See Also:
Includes Contributions from Spuzzum and Elim.
GetPCCell, "CellID"Where: CellID = CellID (partial or full) to test if player is in Type: Misc Returns: short Example: if ( GetPCCell, "Koal Cave" == 1 ) set sValue to GetPCCell, "Vivec, Arena Pit" Scripts: devalFollow DrothPost
Returns 1 if the player is in the given cell. Can also check for partial matches, i.e., GetPCCell, "Vivec" will return 1 if the player is in a cell named Vivec or Vivec, Fred’s House.
See Also:
GetPCFacRep, [FactionID]Where: FactionID = Optional faction to get the PC's reputation in. Type: Faction Returns: short Example: if ( GetPCFacRep, "Thieves Guild" > 5 ) Scripts: Not Used
Returns the player's faction modifier towards the calling NPC's faction, or of the supplied FactionID.
See Also: ModPCFacRep, SetPCFacRep
GetPCInJailType: Misc, Bloodmoon Returns: short Example: if ( GetPCInJail == 1 ) set sValue to ( GetPCInJail ) Scripts:
Returns 1 if the player is currently in jail, or 0 otherwise.
See Also:
GetPCJumpingType: Movement, Tribunal Returns: short Example: if ( GetPCJumping == 1 ) set sValue to ( "idros givyn"->GetPCJumping ) Scripts: Not Used
Returns 1 if the player is currently jumping, or 0 otherwise.
See Also: GetPCRunning, GetPCSneaking
GetPCRank, [FactionID]Where: FactionID = Optional faction to get the PC's rank in.