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 endIf 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. Type: Faction Returns: short Example: if ( GetPCRank, "Thieves Guild" > 5 ) if ( "telvanni sharpshooter"->GetPCRank > 2 ) if ( player->GetPCRank, "Temple" >= 0 ) Scripts: shrineAralor MoonandStar
Returns the player’s rank in faction. This will default to the actor’s faction if FactionID is not defined. Returns 0-9 and -1 if not a member.
See Also: GetPCFacRep
GetPCRunningType: Movement, Tribunal Returns: short Example: if ( GetPCRunning == 1 ) set sValue to ( "idros givyn"->GetPCRunning ) Scripts: Not Used
Returns 1 if the player is currently running, or 0 otherwise.
See Also: GetPCJumping, GetPCSneaking
GetPCSleepType: Misc Returns: short Example: if ( GetPCSleep == 1 ) set sValue to ( GetPCSleep ) Scripts: Main Sleepers
Returns 1 if the player is currently sleeping, or 0 otherwise.
See Also:
GetPCSneakingType: Movement, Tribunal Returns: short Example: if ( GetPCSneaking == 1 ) set sValue to ( "idros givyn"->GetPCSneaking ) Scripts: projectileMine proximityMine
Returns 1 if the player is currently sneaking, or 0 otherwise.
See Also: GetPCJumping, GetPCRunning
GetPCTravelingType: Movement, Bloodmoon Returns: short Example: if ( GetPCTraveling == 1 ) set sValue to ( GetPCTraveling ) Scripts:
Returns 1 if the player is currently fast travelling (silt strider or boat), or 0 otherwise.
See Also:
GetPlayerControlsDisabled GetPlayerFightingDisabled GetPlayerJumpingDisabled GetPlayerMagicDisabled GetPlayerLookingDisabled GetPlayerViewSwitch (Broken) GetVanityModeDisabledType: Player Controls Returns: short Example: if ( GetPlayerControlsDisabled == 1 ) set sValue to GetPlayerFightingDisabled Scripts: Not Used
Returns 1 if the associated player control/mode is disabled, or 0 otherwise. Note that the GetPlayerViewSwitch function appears to be broken.
See Also: DisablePlayerControls, DisablePlayerFighting, DisablePlayerJumping, DisablePlayerLooking, DisablePlayerMagic, DisablePlayerViewSwitch, and DisableVanityMode.
GetPos, AxisWhere: Axis = Which world axis to get the object's position (X, Y, or Z). Type: Movement Returns: float Example: if ( misc_com_wood_bowl_02->GetPos, Z >= 400 ) if ( GetPos, Y < 0 ) set TempFloat to ( GetPos, X ) Scripts: cavein_script testmoverock
Returns a float value of the calling object's current position in the world along the specified axis. Does not always return the object's position if the object is not in the same cell (or close to) the player (returns 0 instead). In such a case, it is better to store the object's position when you know the player is close by (such as when the item is dropped) and use them later.
See Also: SetPos
GetRace, 'RaceID'Where: 'RaceID' = RaceID to compare against the calling NPC. Type: Faction Returns: short Example: if ( GetRace, "High Elf" == 1 ) if ( "telvanni sharpshooter"->GetRace, "Imperial" == 1 ) Scripts: DaedraMalacath RaceCheck
Returns 1 if the calling NPC is of the given race, or 0 otherwise. The following is a list of the default races available to the player.
Argonian Breton Dark Elf High Elf Imperial Khajiit Nord Orc Redguard Wood Elf
See Also:
GetSecondsPassedType: Time Returns: float Example: set TimePassed to ( TimePass + GetSecondsPassed ) Scripts: Akula_doors Bardoor
Returns the time in seconds since the script was last run. Very useful for timing events in scripts, for example:
begin TestTimeScript float TimePassed set TimePassed to (TimePassed + GetSecondsPassed) if ( TimePassed > 10 ) MessageBox "Displayed every 10 seconds" set TimePassed to 0 endif end
See Also:
GetSoundPlaying, "SoundID"Type: Sound Returns: short Example: if ( GetSoundPlaying, "endrumble" == 1 ) set sValue to ( GetSoundPlaying, "endrumble" ) Scripts: LorkhanHeart lava
Returns 1 if the given sound is currently being played by the calling object, or 0 otherwise. Sound IDs can be found from the Gameplay-Sounds menu in the Construction Set. You can use this function to determine the current action of the player/actor, such as whether they are casting a spell, or swinging a weapon.
See Also:
Includes Contributions from Argent.
GetSpell, SpellIDWhere: SpellID = The spell you wish to check for. Type: Magic Returns: short Example: if ( GetSpell, shield == 1 ) set sValue to ( "dorisa darvel"->GetSpell "Swamp Fever" ) Scripts: dinScript letteScript
Returns 1 if the calling object has the spell in their inventory, or 0 otherwise. This may work in a similar manner to AddSpell and RemoveSpell where if the spell is a normal one, it merely checks if the calling actor knows it. If the spell is a disease or curse, however, it may check if the calling actor is under the spell's effect.
See Also: GetEffect, GetSpellEffects
GetSpellEffects, SpellIDWhere: SpellID = The spell you wish to check for. Type: Magic Returns: short Example: if ( GetSpellEffects, "Burning Hand" == 1 ) set sValue to ( "Myn Farr"->GetSpellEffects, "Rust Chancre" ) Scripts: bulfimScript Example_NPC_Stuff
Returns 1 if the calling object is under the effect of the given spell, or 0 otherwise.
GetSpellReadiedType: Magic, Tribunal Returns: short Example: if ( GetSpellReadied == 1 ) set sValue to ( "shat gro-shazog"->GetSpellReadied ) Scripts: Not Used
Returns 1 if the calling actor has a spell read to be cast, or 0 otherwise.
See Also:
GetSquareRoot, ValueWhere: Value = Value to compute the square root for, can be a literal or float variable Type: Misc, Tribunal Returns: float Example: if ( GetSquareRoot, fValue < 100 ) set fValue1 to ( GetSquareRoot, fValue2 ) Scripts:
Computes the square root of the given float value or variable.
See Also:
GetStandingActor GetStandingPCType: Misc Returns: short Example: if ( GetStandingActor == 1 ) set sValue to GetStandingPC Scripts: TestMoveRock CharGenStuffRoom
Returns 1 if any actor (or PC) is standing on the calling object, or 0 otherwise. GetStandingActor checks for any actor including the player.
See Also:
GetStartingAngle, AxisWhere: Axis = World axis to get the object's original orientation (X, Y, or Z). Type: Movement Returns: float Example: if ( GetStartingAngle, X >= 90 ) set fInitialYAngle to ( "misc_de_goblet_04_dagoth"->GetStartingAngle, Y ) Scripts: Float SignRotate
Returns a float value of the object's original orientation (in degrees) along the given world axis.
See Also: GetStartingPos
GetStartingPos, AxisWhere: Axis = World axis to get the object's original position (X, Y, or Z). Type: Movement Returns: float Example: if ( GetStartingPos, X >= 90 ) set fInitialYPos to ( "misc_de_goblet_04_dagoth"->GetStartingPos, Y ) Scripts: Float SignRotate
Returns a float value of the object's original position (in game units) along the given world axis.
See Also: GetStartingAngle
GetAcrobatics | GetAgility | GetAlarm | GetAlchemy | GetAlteration | GetArmorBonus | GetArmorer |
GetAthletics | GetAttackBonus | GetAxe | GetBlindness | GetBlock | GetBluntWeapon | GetCastPenalty |
GetChameleon | GetConjuration | GetDefendBonus | GetDestruction | GetDisposition | GetEnchant | GetEndurance |
GetFatigue | GetFight | GetFlee | GetFlying | GetHandToHand | GetHealth | GetHeavyArmor |
GetHello | GetIllusion | GetIntelligence | GetInvisible | GetLevel | GetLightArmor | GetLongBlade |
GetLuck | GetMarksman | GetMediumArmor | GetMagicka | GetMercantile | GetMysticism | GetParalysis |
GetPCCrimeLevel | GetPCVisionBonus | GetPersonality | GetReputation | GetResistBlight | GetResistCorprus | GetResistDisease |
GetResistFire | GetResistFrost | GetResistMagicka | GetResistNormalWeapons | GetResistParalysis | GetResistPoison | GetResistShock |
GetRestoration | GetScale | GetSecurity | GetShortblade | GetSilence | GetSneak | GetSpear |
GetSpeechcraft | GetSpeed | GetStrength | GetSuperJump | GetSwimSpeed | GetUnarmored | GetWaterBreathing |
GetWaterLevel | GetWaterWalking | GetWillpower |
Get____Type: Stats Returns: float Example: if ( player->GetHealth < 10 ) set MyStr to GetStrength Scripts: ouch_keening puzzlecanal
These functions are used to return the various statistics of the calling actor or player. There are several special cases of the Get___ functions as described below.
Note that the GetInvisible was incorrectly spelled as GetInvisibile in the original Morrowind game (fixed in a later patch or Tribunal?).
GetTarget, ActorIDWhere: ActorID = NPC ID to check against the source actor's current target. Type: Combat Returns: short Example: if ( GetTarget, "taren andoren" == 1 ) if ( GetTarget Player == 1 ) Scripts: nartiseGuards nemindaScript
Returns 1 if the target of the NPC is the given actor. Returns 0 otherwise.
See Also:
GetWeaponDrawnType: Object, Tribunal Returns: short Example: if ( GetWeaponDrawn == 1 ) set sValue to ( "shat gro-shazog"->GetWeaponDrawn ) Scripts: BladeScript
Returns 1 if the calling actor has a weapon drawn ready to attack, or 0 otherwise.
See Also:
GetWeaponTypeType: Object, Tribunal Returns: short (-1 to 13) Unarmed -1 Short blade, 1-Hand 0 Long blade, 1-Hand 1 Long blade, 2-Hand 2 Blunt, 1-Hand 3 Blunt, 2-Hand Close 4 Blunt, 2-Hand Wide 5 Spear, 2-Hand Wide 6 Axe, 1-Hand 7 Axe, 2-Hand Close 8 Bow 9 Crossbow 10 Thrown Weapon 11 Arrow 12 Bolt 13 Example: if ( GetWeaponType == 1 ) if ( "addarnat assardidairan"->GetWeaponType == -1 ) if ( player->GetWeaponType == 10 ) Scripts: Not Used
Returns the weapon type of the actor's current weapon.
See Also: GetArmorType
GetWerewolfKillsType: Werewolf, Bloodmoon Returns: float? Example: if ( GetWerewolfKills > 1 ) Scripts:
Returns the number of kills the player (?) has done since they last turned into a werewolf (unconfirmed).
See Also:
GetWindSpeedType: Weather, Undocumentated Returns: float Example: if ( GetWindSpeed > 0.5 ) Scripts: Not Used
Undocumented function that returns the current wind speed. Generally values are around 0 to 2 for average conditions.
See Also:
GoodbyeType: Dialogue Returns: none Example: Goodbye Scripts: Only in dialogue results
This function immediately ends the players conversation with the NPC, forcing the user to click the Goodbye option to end dialogue. Used only in dialogue results (unsure if it can be used in a regular script or not).
See Also:
GotoJailType: Misc Returns: none Example: GotoJail Scripts: GotoJailWhenDone
Sends the player to prison.
See Also:
HasItemEquipped, ObjectIDWhere: ObjectID = Object to check being equipped on the calling actor. Type: Object, Tribunal Returns: short Example: if ( HasItemEquipped, "ebony spear" == 1 ) if ( player->HasItemEquipped, fireblade != 0 ) if ( "alvis teri"->HasItemEquipped, "expensive_belt_01" == 1 ) Scripts: Not Used
Returns 1 if the given item is currently equipped on the calling actor, or 0 otherwise.
See Also:
HasSoulgem, CreatureIDWhere: CreatureID = Creature to check for a soul gem Type: Magic Returns: short Example: if ( Player->HasSoulGem, "atronach_storm" > 1 ) set sValue to ( HasSoulGem, lich_relvel ) Scripts: SkinkSoul1 StrongSoulCheck
Returns 1 if the calling object has the given creature's soulgem in their inventory, or 0 otherwise.
See Also:
HelpType: Console Example: Scripts:
Console only command that lists some of the console specific functions.
See Also:
HitAttemptOnMe, ObjectID HitOnMe, ObjectIDWhere: ObjectID = Number of hit points per second to damage any colliding actor (float). Type: Combat Returns: short Example: Set keeningHit to HitOnMe Keening player->HitOnMe, "chitin dagger" Scripts: LorkhanHeart (HitOnMe) Not Used (HitAttemptOnMe)
Returns 1 if a hit on the calling NPC is attempted (HitAttemptOnMe) or hit (HitOnMe) by ObjectID in melee. For example, player->HitOnMe, "chitin dagger" will return 1 if the player is hit by a chitin dagger.
See Also:
HurtCollidingActor, ValueWhere: Value = Number of hit points per second to damage any colliding actor (float). Type: Collison, Tribunal Returns: none Example: HurtCollidingActor 100 HurtCollidingActor 9999999 (kill any NPCs that collide with it) Scripts: Collide_damage_100 Collide_damage_kill
Damages colliding actor the given number of health points per second. This function requires Tribunal.
See Also: HurtStandingActor
HurtStandingActor, ValueWhere: Value = Number of hit points per second to damage any actor standing on it (float). Value should be negative for damage, or positive for healing. This value can be literal or a variable. Type: Collison Returns: none Example: HurtStandingActor, 1 (heal 1 hitpoint per second) HurtStandingActor, -20.0 (hurt 10 hitpoints per second) HurtStandingActor, fDmgValue (use a variable value) Scripts: lava SothaHotOil
Damages any actor standing on the object the given number of health points per second. As mentioned above, a positive value will heal the actor, and a negative value will damage them. The value can not only be a literal number, but also a variable (local or global).
See Also: HurtCollidingActor
IsWerewolfType: Werewolf, Bloodmoon Returns: short? Example: Scripts:
Returns 1 if the player (or other NPC?) is currently in Werewolf form, or 0 otherwise.
See Also: BecomeWerewolf, UndoWerewolf
Journal, ID, IndexWhere: ID = Journal ID to add. Index = Value of the journal entry to add. Can be a literal value or also a local or global short variable. Type: Dialogue Returns: none Example: Journal, "A2_4_MiloGone", 10 Journal, C3_DestroyDagoth, 50 Journal, C3_DestroyDagoth, sSumValue (use a variable value) Scripts: amayaJournal AzuraEnd
Adds a journal entry to the player's journal using the given value to determine which entry to add. Generally the a single ID will refer to a single quest, with multiple index values to indicate various parts of the quest. The index starts low and ends high. For instance, 10 for the starting journal entry, 20 and 30 for two middle quest journal entries, and 50 for the last, end of quest, journal entry.
This is one of the few functions that can accept a variable for the index parametrr.
See Also:
Lock, ValueWhere: Value = Level of the lock to set (0 to 100, shor) Type: Misc Returns: none Example: Lock "chest_ashurninibi_01"->Lock, 50 Scripts: OvisScript Pub_Vivec_Black
Locks the calling object to the given lock value.
See Also: Unlock
LongType: System Example: long LocalVar Scripts:
This is one of the three types of the scripting language. Long variables are signed and can range from -2,147,483,648 to 2,147,483,647. While these are the correct logical ranges, the editor appears to only accept values up to 2,147,483,520.
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 Argent and DinkumThinkum.
Loopgroup, GroupName, Number, [Flags]Where: GroupName = Animation group to play. Number = The number of times to play the animation. Flags = Optional parameter indicating when the animation should start. 0 = Normal, the current animation will finish it’s full cycle, and the new animation will start from its beginning. 1 = Immediate Start, the current animation will stop regardless of the frame it is on, and the new animation will start from its beginning. 2 = Immediate Loop, the current animation will stop regardless of the frame it is on, and the new animation will start at the beginning of its loop cycle. Type: Animation Returns: none Example: LoopGroup, Idle3, 5 Scripts: OutsideBanner sotha_machine1
Plays the animation group defined by GroupName the number of times specified. Optional flags can be used to start the group in different ways. The various group names for NPCs can be found by viewing the animation menu options in the Character menu in the Construction Set.
See Also: PlayGroup
LowerRankType: Faction Returns: none Example: LowerRank player->LowerRank "tedryn brenur"->LowerRank Scripts: Not Used, only used in dialogue?
Lowers the object’s rank in its current faction.
See Also: RaiseRank, PCLowerRank
MenuModeType: Misc Returns: short Example: if ( MenuMode == 1 ) Scripts: anoScript AzuraEnd
Returns 1 if the player is currently in menu mode (i.e., has any inventory/magic menus open thus pausing the game). It is a good idea to separate your script logic into processing of commands in and out of menumode. Certain actions like using items are done when in menu mode.
See Also:
menutestType: Console, Undocumented Returns: none Example: Scripts:
It seems to close is variations on inventory menus (player, NPC, container). It does not work on dialogue, enchanting, alchemy, spell or armorer menus. It works from the console as well as from a script.
See Also:
Includes Contributions Argent.
MessageBox, "Message", [Var1], [Var2, ...], ["button1"], ["button2"], ...Where: Message = String message to display Var1, 2, ... = Optional variables to insert into message Button1, ... = Optional button texts for displaying choices Type: Misc Returns: none Example: Scripts:
The MessageBox function has too main abilities, to display simple text messages to the player at the bottom of the screen and to display a list of choices to the player. To display a message use the function like the following:
MessageBox, "This is a simple message" ; Simple text message MessageBox, "GameHour = %.2f", GameHour ; Display a float value with 2 decimal points MessageBox, "Long/Short = %G", 101 ; Display a short/long value, not %D as in the help file! MessageBox, "String = %S", "SomeString" ; Display a string value, kinda useless, might not workUse the optional variables to display numbers/strings in the message text. When displaying float values you must specify the number of decimals places to use. You can also use the %.0f format to display short/long variables. Although the help file only shows 1 or 2 optional variables, there can be more than 2.
To display a list of choices to the user, use the format:
MessageBox, "Press ok to continue...", "Ok" ; One choice MessageBox, "What is your answer?", "Yes", "No" ; Two choices MessageBox, "Choose a number", "1", "2", "3", "4", "5" ; Five choicesThere are also a number of special strings which can be used within the MessageBox string. They all begin with the ^ and not the % character as written in the help file:
^PCName The player's name. ^PCClass The player's class. ^PCRace The player's race. ^PCRank The player's rank in the speaker's faction. ^NextPCRank The player's next rank in the speaker's faction. ^Cell The cell the player is currently in. ^Global Any global variable value (ex: ^Day). Floats display with 1 decimal. ^NPC.Name The NPC's name. ^NPC.Race The NPC's race. ^NPC.Class The NPC's class. ^NPC.Faction The NPC's faction. If they have no faction, it will be blank. ^NPC.Rank The NPC's rank.This is the same format used in dialogue info texts although for dialogue you can omit the NPC. to use the speaker by default (if you omit the NPC. in scripts the player is used by default).
To return the user's choice, use the GetButtonPressed function, for example:
begin TestMessageScript short MessageOn short Button ; Display message when the player activates the object if ( OnActivate == 1 ) set MessageOn to 1 endif ; Display the choices to the user if ( messageOn == 1 ) MessageBox, "Do you wish to drink from the Bitter Cup or to pick it up?", "Drink", "Pick it up" Set messageOn to 2 endif if ( messageOn == 2 ) set Button to GetButtonPressed if ( Button == -1 ) ; Nothing return; endif if ( Button == 0 ) ; drink it Disable player->ModStrength, 20 Set MessageOn to 0 return endif if ( Button == 1 ) ; pick it up Activate Set MessageOn to 0 return endif endif endUse a similar setup for asking the user other choices.
If you pop up a message box with an 'ok' button when a saved game is loaded immediately after running Morrowind, you won't have a mouse pointer to click on the 'ok' button to get rid of the message box. The game also keeps running while the message box is displayed; it doesn't pause as it normally does. You can right-click to get into Menu mode, and then you'll have a mouse pointer to clear the box with. This only happens the first time you load a save after running Morrowind; if you load a save from within the game, you do get a mouse pointer to click the 'ok' button with. So apparently it's some sort of initialization problem.
See Also: GetButtonPressed
Includes Contributions from DinkumThinkum.
ModAcrobatics | ModAgility | ModAlarm | ModAlchemy | ModAlteration | ModArmorBonus | ModArmorer |
ModAthletics | ModAttackBonus | ModAxe | ModBlindness | ModBlock | ModBluntWeapon | ModCastPenalty |
ModChameleon | ModConjuration | ModCurrentFatigue | ModCurrentHealth | ModCurrentMagicka | ModDefendBonus | ModDestruction |
ModDisposition | ModEnchant | ModEndurance | ModFatigue | ModFight | ModFlee | ModFlying |
ModHandToHand | ModHealth | ModHeavyArmor | ModHello | ModIllusion | ModIntelligence | ModInvisible |
ModLightArmor | ModLongBlade | ModLuck | ModMarksman | ModMediumArmor | ModMagicka | ModMercantile |
ModMysticism | ModParalysis | ModPCCrimeLevel | ModPCVisionBonus | ModPersonality | ModReputation | ModResistBlight |
ModResistCorprus | ModResistDisease | ModResistFire | ModResistFrost | ModResistMagicka | ModResistNormalWeapons | ModResistParalysis |
ModResistPoison | ModResistShock | ModRestoration | ModScale | ModSecurity | ModShortblade | ModSilence |
ModSneak | ModSpear | ModSpeechcraft | ModSpeed | ModStrength | ModSuperJump | ModSwimSpeed |
ModUnarmored | ModWaterBreathing | ModWaterLevel | ModWaterWalking | ModWillpower |
Mod____, ValueWhere: Value = Value to modify the stat by. Can be a literal value or a variable (float). Type: Stats Returns: none Example: player->ModCurrentHealth, -10 ModSuperJump, LocalVar Scripts: darksunScript puzzlecanal
These Mod____ functions will modify the actor's statistic by the given amount. The functions will also accept a float variable instead of a literal number value. There are several special cases of the Mod___ functions as described below.
Note that the ModInvisible was incorrectly spelled as ModInvisibile in the original Morrowind game (fixed in a later patch or Tribunal?).
ModFactionReaction, FactionID1, FactionID2, ValueWhere: FactionID1 = FactionID source FactionID2 = FactionID target Value = Value to modify the faction reaction by. Type: Faction Returns: none Example: ModFactionReaction, "Thieves Guild", "Temple", -2 modFactionReaction, "Redoran", "Nerevarine", 4 Scripts: MoonAndStar
Modifies the reaction of one faction towards members of another faction. Positive value indicate more like, while negative values indicate dislike. For example,
ModFactionReaction, "Thieves Guild", "Temple", -2will cause all thieves guild members to increase their dislike of all temple members (it is not reversible so you would have to also set the Temple faction reaction to the Thieves guild).
See Also: GetFactionReaction, SetFactionReaction
ModPCFacRep, Value, [FactionID]Where: Value = Value to modify the faction reputation by. FactionID = Optional faction ID to modify. Type: Faction Returns: none Example: ModPCFacRep, 10, "Thieves Guild" ModPCFacRep, 25, "Temple" "tedryn brenur"->ModPCFacRep, -5 Scripts: MaduraFollow shrineAldDaedroth
Modifies the reaction modifier for members of the specified faction towards the PC.
See Also: GetPCFacRep, SetPCFacRep
ModRegion, RegionID, Clear, Cloudy, Foggy, Overcast, Rain, Thunder, Ash, Blight, Unknown1, Unknown2Where: RegionID = Region to change the weather in Clear = Chance of clear weather (percent, 0 to 100, float) Cloudy = Chance of cloudy weather (percent, 0 to 100, float) Foggy = Chance of fog (percent, 0 to 100, float) Overcast = Chance of overcast weather (percent, 0 to 100, float) Rain = Chance of rain (percent, 0 to 100, float) Thunder = Chance of thunder storms (percent, 0 to 100, float) Ash = Chance of ash storms (percent, 0 to 100, float) Blight = Chance of blight storms (percent, 0 to 100, float) Unknown1 = Chance of snow (percent, 0 to 100, float) (Bloodmoon) Unknown2 = Chance of blizzard (percent, 0 to 100, float) (Bloodmoon) Type: Weather Returns: none Example: ModRegion, "Weather Machine", 0, 100, 0, 0, 0, 0, 0, 0, 0, 0 ModRegion, "Red Mountain Region", 50, 50, 0, 0, 0, 0, 0, 0, 0, 0 Scripts: weatherScript Endgame
Changes the weather chances for the RegionID. Used to get rid of, or add weathers to an area permanently. The values must add up to 100 or you will get odd results. Note that the last two weather types are undocumented and currently unknown but assumably are the two new snow/blizzard weather types added with Bloodmoon.
See Also: ChangeWeather
MonthType: Global, Time Returns: short Example: set CurrentMonth to Month Scripts:
Assumably the current month which ranges from 0 to 11. You can use the SET command to change the current month.
The Month variable ranges from 0-11, where 0 is the first month of the year (Morning Star), 1 is the second month of the year (Sun's Dawn), etc. The game starts in Last Seed, which is month 7 (the eighth month of the year). Morrowind does have a bug where after a year ends, the month is rolled over to 1 (which is the second month of the year). There is a plugin-based fix for it, which you can download off of Morrowind Summit, but of course the best fix is for Bethesda to repair the problem.
Includes Contributions from Spuzzum.
MoveOneToOne (MOTO)Type: Console Returns: none Example: Scripts:
Unknown console function that appears to have something to do with animation.
See Also:
Move, Axis, Speed MoveWorld, Axis, SpeedWhere: Axis = X, Y or Z Speed = Movement speed in world units per second. Type: Movement Returns: none Example: Move, X, 10 MoveWorld, Y, 12 Scripts:
These functions cause the referenced object to move at the given speed. The Move function uses the object's axes while the MoveWorld always uses the world axes (positive Z is upwards). Note that the exact speed is affected slightly by the speed of the system the game is being played. Thus, where an exact final position is required it is recommended to test for distance rather than time.
See Also:
OnActivateType: Object Returns: short Example: if ( OnActivate == 1 ) Activate endif Scripts: Alen_note BarDoor
Returns 1 if calling object is activated, or 0 otherwise. An object is activated when you approach it in the game and press the spacebar (by default).
See Also:
OnDeathType: Combat Returns: short Example: if ( OnDeath == 1 ) Scripts: anoScript BILL_MT_WritGuril
Returns 1 for one frame when the actor is killed (0 otherwise).
See Also: OnKnockout, OnMurder
OnKnockoutType: Combat Returns: short Example: if ( OnKnockout == 1 ) Scripts: girasScript gardingScript
Returns 1 for one frame when the actor is knocked out (0 otherwise).
OnMurderType: Combat Returns: short Example: if ( OnMurder == 1 ) Scripts: alvisTeriScript RedoranCouncillor
Returns 1 for one frame when the actor is murdered (0 otherwise). Both this and OnDeath will return 1 at the same time, so you can do something like this:
if ( OnDeath == 1 ) if ( OnMurder == 1 ) Set RedoranMurdered to 2 else Set RedoranMurdered to 1 endif endif
See Also: OnDeath, OnKnockout
OnPCAddType: Inventory, Variable Returns: short Example: short OnPCAdd if ( OnPCAdd == 1 ) Scripts: CharGenStatsSheet CharGen_ring_keley
Not a function but must be defined as a short variable in order to be used. When defined, it will be set to 1 when the player adds the calling item to their inventory. Should be manually reset if you wish to check for additional item additions.
See Also:
OnPCDropType: Inventory, Variable Returns: short Example: short OnPCDrop if ( OnPCDrop == 1 ) Scripts: Not Used
Not a function but must be defined as a short variable in order to be used. When defined, it will be set to 1 when the player drops the calling item from their inventory. Should be manually reset if you wish to check for additional item drops.
See Also:
OnPCEquipType: Inventory, Variable Returns: short Example: short OnPCEquip if ( OnPCEquip == 1 ) set OnPCEquip to 0 endif Scripts: bladeScript disguisedArmor
Not a function but must be defined as a short variable in order to be used. When defined, it will be set to 1 when the player equips the item, and remain 1 while the player has it equipped (unless manually reset) and is 0 otherwise.
See Also:
OnPCHitMeType: Combat, Variable Returns: short Example: short OnPCHitMe if ( OnPCHitMe == 1 ) StartCombat Player Set OnPCHitMe to 0 endif Scripts: almaScript cattleScript
This is not a function but must be defined as a short variable in the script to be used. When the player hits the object, the variable will be set to 1. It must be reset to 0 when testing for it, such as in the above example script.
See Also:
OnPCRepairType: Inventory, Variable Returns: short Example: short OnPCRepair if ( OnPCRepair == 1 ) Scripts: Not Used
Not a function but must be defined as a short variable in order to be used. When defined, it will be set to 1 when the player repairs the calling item. Should be manually reset if you wish to check for additional item repairs.
See Also:
OnPCSoulGemUseType: Inventory, Variable Returns: short Example: short OnPCSoulGemUse if ( OnPCSoulGemUse == 1 ) Player->additem, "Misc_soulgem_Azura", 1 endif Scripts: AzuraStarScript
Not a function but must be defined as a short variable in order to be used. When defined, it will be set to 1 when the player uses a soul gem for enchanting or recharging an item. Should be manually reset if you wish to check for additional soul gem uses.
See Also:
OnRepairType: Object, Broken Returns: short Example: short OnRepair if ( OnRepair == 1 ) Scripts: Not Used
Not a function but must be defined as a short variable in order to be used. Returns 1 if calling object has been attempted to be repaired, or 0 otherwise. This function is currently broken and does not work.
See Also: OnPCRepair
OutputObjCounts OutputRefCounts OutputRefInfoType: Console, Undocumented Returns: none Example: Scripts:
Console only commands that output object/reference info. Further testing is required.
See Also:
PayFine PayFineThief (undocumented)Type: Misc Returns: none Example: PayFine Scripts: TGDiscountScript
Pays the player's fine for committing any crimes and resets the game's AI so that guards and NPCs don't hate the player any more. PayFine is used by the game to clear the AI after the player pays a fine to a guard or other law enforced. It removes any stolen merchandise from the player's inventory and puts it into the evidence chests around the island. PayFineThief is similarily used when the player uses the Thieves Guild to remove any bounty on their head but does not remove any stolen items.
See Also:
Includes Contributions from Spuzzum and Tim Martin.
PCClearExpelled, [FactionID]Where: FactionID = Optional faction to clear the player's expelled flag. Type: Faction Returns: none Example: PCClearExpelled, "Mages Guild" PCClearExpelled (call from a dialogue, uses the actor's faction) Scripts: expelledMG
Clears the player's expelled flag for the given faction. If no faction is specified, the caller's faction is used.
See Also: PCExpell, PCExpelled
PCExpell, [FactionID]Where: FactionID = Optional faction to expell the player from. Type: Faction Returns: none Example: PCExpell, "Mages Guild" PCExpell (call from a dialogue, uses the actor's faction) Scripts: Not Used (only in dialogue)
Expells the player from the given faction.
See Also: PCClearExpelled, PCExpelled
PCExpelled, [FactionID]Where: FactionID = Optional faction to check the player's expelled flag. Type: Faction Returns: none Example: if (PCExpelled, "Mages Guild" == 1) if (PCExpelled == 1 ) ( uses the caller's faction) Scripts: Not Used (only in dialogue)
Returns 1 if the player is currently expelled from the given faction, or 0 otherwise.
See Also: PCClearExpelled, PCExpell
PCGet3rdPersonType: Player Controls Returns: short Example: if (PCGet3rdPerson == 1) set sValue to PCGet3rdPerson Scripts: Not Used
Returns 1 if in 3rd person mode, or 0 otherwise.
See Also: PCForce3rdPerson, PCForce1stPerson
PCForce3rdPersonType: Player Controls Returns: none Example: PCForce3rdPerson Scripts: Not Used
Queue the change to 3rd person mode (this may have to wait for the current animation to finish).
See Also: PCGet3rdPerson, PCForce1stPerson
PCForce1stPersonType: Player Controls Returns: none Example: PCForce1stPerson Scripts: Not Used
Queue the change to 1st person mode (this may have to wait for the current animation to finish).
See Also: PCGet3rdPerson, PCGet3rdPerson
PCJoinFaction, [FactionID]Where: FactionID = Optional faction for the player to join. Type: Faction Returns: none Example: PCJoinFaction, "Mages Guild" PCJoinFaction, Nerevarine PCJoinFaction (uses the caller's faction) Scripts: MoonAndStar
Joins the player to the given (or the caller's) faction.
See Also: PCLowerRank, PCRaiseRank
PCLowerRank, [FactionID]Where: FactionID = Optional faction for the player to join. Type: Faction Returns: none Example: PCLowerRank, "Mages Guild" PCLowerRank, Nerevarine PCLowerRank (uses the caller's faction) Scripts: Not Used
Lowers the player's rank in the given faction.
See Also: LowerRank, PCJoinFaction, PCRaiseRank
PCRaceType: Global Returns: short Example: Scripts:
A global variable that holds a numeric value for the player's race.
1 = Agonian 2 = Breton 3 = Dark Elf 4 = High Elf 5 = Imperial 6 = Khajiit 7 = Nord 8 = Orc 9 = Redguard 10 =WoodelfIt is unknown what happens for a newly created race.
See Also:
PCRaiseRank, [FactionID]Where: FactionID = Optional faction for the player to join. Type: Faction Returns: none Example: PCRaiseRank, "Mages Guild" PCRaiseRank, Nerevarine PCRaiseRank (uses the caller's faction) Scripts: sjoringScript
Raises the player's rank in the given faction. If the player is not a member of the faction, the player is joined and their rank set to 1.
See Also: PCJoinFaction, PCLowerRank, RaiseRank
PCSkipEquipType: Inventory Returns: none Example: short PCSkipEquip set PCSkipEquip to 1 set PCSkipEquip to 0 Scripts: sealedTreasuryOrders sealedTreasuryReport
Not a function but must be defined as a short variable in order to be used. When defined, set this to 1 to skip equipping the object, or 0 otherwise. Good for popping up messages for breaking seals on books and such.
See Also:
PCVampireType: Global Returns: short Example: Scripts:
A global variable that gives the state of the player's vampire status.
-1 = Has been cured 0 = Not a vampire 1 = Currently a vampire
See Also:
PCWerewolfType: Global, Bloodmoon Returns: short Example: Scripts:
A global variable that gives the state of the player's werewolf status.
-1 = Has been cured (immune to lycanthropy) 0 = Not a Werewolf 1 = Currently a Werewolf
See Also:
Includes Contributions from LDones.
PlaceAtMe, ObjectID, Count, Distance, Direction PlaceAtPC, ObjectID, Count, Distance, DirectionWhere: ObjectID = Object to place into world Count = Number of the object to add Distance = Distance from the player in game units Direction = Initial orientation of the object 0 = front 1 = back 2 = left 3 = right Type: Movement PlaceAtMe, Bloodmoon Returns: none Example: PlaceAtPC, "delte fyr", 1, 120, 0 (just in front of player) PlaceAtPC, "Dremora_lord", 1, 128, 1 (sneak attack behind player) PlaceAtMe, "activator_01", 1, 500, 3 Scripts: karrodScript BILL_MarksDaedraSummon
Places the object at the player (PlaceAtPC) or another object/activator (PlaceAtMe), in the direction you specify and the distance. If that location is not safe (in the air, in a wall, etc), the object will be placed at one of the other axis or at the player’s exact location (feet). It is used most often to spawn NPCs/creatures near the player/object for a coordinated and timed attack.
See Also: PlaceItem, PlaceItemCell
Position, X, Y, Z, ZRot PositionCell, X, Y, Z, ZRot, "CellID"Where: X,Y,Z = Exterior/interior location to move to the object to (float). ZRot = World Z-axis orientation of the object (degrees, 0=North, 180=South, float) CellID = Interior cell name Type: Movement Returns: none Example: Player->Position, -1005, 165018, 100 "Salyni Nelvayn"->PositionCell, 106, 1241, -105, "Assurdirapal, Shrine" PositionCell, 8090, 698, -500, 270, "Vivec, St. Olms Haunted Manor" Scripts: CharGen gardingScript
Sets the position of the calling object to the given exterior (Position) or interior (PositionCell) location. If you try to teleport to an unsafe place (clipping with an object or out in the void), you will instead be placed at the next safe location. Some people have noticed bugs using the Position function (NPCs disappearing) and reccommend using the PositionCell function instead, which can be outside if an exterior cell name is given.
Note that the ZRot parameter does not appear to work when PositionCell is used on NPCs. It seems to work fine on the player and other objects though. Also, if you PositionCell something you have never met into your current cell then its local script will not start running (until you leave the area and return anyways).
A common application of this function is to create a teleportation item (though, since variables are not accepted, you can only teleport to set locations), for example:
Begin TestTeleport_Script short button short messageOn short reset short OnPcEquip if ( OnPCEquip == 0 ) set reset to 0 endif if ( reset == 1 ) return endif if ( OnPCEquip == 1 ) if ( reset == 0 ) Set OnPCEquip to 0 MessageBox "Use the Mazedband to teleport where?" "Vivec" "Mournhold" "Sotha Sil" "Nowhere" set messageOn to 1 endif endif if ( messageOn == 1 ) set button to GetButtonPressed if ( button >= 0 ) set messageOn to 0 endif ; Vivec if ( button == 0 ) playsound "conjuration hit" Player->PositionCell 12, 219, -501, 0 "Vivec, High Fane" set reset to 1 ; Mournhold elseif ( button == 1 ) playsound "conjuration hit" Player->PositionCell 0, -478, -645, 0 "Mournhold Temple: High Chapel" set reset to 1 ; Sotha sil elseif ( button == 2 ) playsound "conjuration hit" Player->PositionCell 3976, 4179, 12310, 0 "Sotha Sil, Dome of Sotha Sil" set reset to 1 return ; Nothing elseif ( button == 3 ) set reset to 1 return endif endif End
You should not use either function from dialogue results as it can cause the game to crash. Instead, create a script to peform the teleporting and use a StartScript to start it from the dialogue result.
See Also: PlaceItem, PlaceItemCell
Includes Contributions from Cortex and DinkumThinkum.
PlaceItem, ObjectID, X, Y, Z, ZRot PlaceItemCell, ObjectID, CelID, X, Y, Z, ZRotWhere: ObjectID = Object to place into world CelID = Cell name where to place the item X,Y,Z = Exterior/interior location to place the item, can be a literal value as well as float variables. ZRot = World Z-axis orientation of the item (in degrees) Type: Movement, Tribunal Returns: none Example: PlaceItem, "false_sunder", 10, -5006, 0, 0 PlaceItemCell, "daedric_god_helm", "Assernerairan, Shrine", NewX, NewY, NewZ, 45 Scripts: dulniScript projectileMine
New functions added in Tribunal to create new item references into the world. PlaceItem will create a new item in the exterior while PlaceItemCell does the same for an interior cell. With either function, if the target cell for the reference is an exterior cell and the given coordinate is outside of that cell, then the reference will be added to the cell containing the coordinate. This is a nice addition that allows you to add things to the world without previously placing them in the editor.
There seems to be a bug with PlaceItemCell in that items added with the function disappear if you save, exit, and reload. This seems to depend on the order in which things occur. For instance if you add an NPC to the clothier to a cell that the player has never visited the NPC will be there. However, if you save the game after the NPC has been added, reload that save and then visit the cell the NPC will not be there.
See Also: PlaceAtPC
Includes Contributions from DinkumThinkum.
PlayBink, "Filename", FlagWhere: Filename = Movie filename Flag = 0 or 1 (1 if you want player to be able to escape movie) Type: Misc Returns: none Example: PlayBink, "mw_cavern.bik", 1 Scripts: AzuraEnd MoonAndStar
Plays the given BIK movie file.
See Also:
Includes Contributions from DinkumThinkum and Klinn.
PlayGroup, GroupName, [Flags]Where: GroupName = Animation group to play. Flags = Optional parameter indicating when the animation should start. 0 = Normal, the current animation will finish it’s full cycle, and the new animation will start from its beginning. 1 = Immediate Start, the current animation will stop regardless of the frame it is on, and the new animation will start from its beginning. 2 = Immediate Loop, the current animation will stop regardless of the frame it is on, and the new animation will start at the beginning of its loop cycle. Type: Animation Returns: none Example: PlayGroup, Idle2 "taren andoren"->PlayGroup, Idle, 0 "Black Dart Malar"->PlayGroup "Death1" Scripts: AzuraEnd rockSlide drowned
Plays the animation group defined by GroupName. Optional flags can be used to start the group in different ways. The various group names can be found by viewing the animation menu options in the Character menu in the Construction Set.
See Also: LoopGroup
PlayLoopSound3D, "SoundID" PlayLoopSound3DVP, "SoundID", Volume, Pitch PlaySound, "SoundID" PlaySoundVP, "SoundID", Volume, Pitch PlaySound3D, "SoundID" PlaySound3DVP, "SoundID", Volume, PitchWhere: SoundID = The sound to play Volume = Float value to adjust the volume, 0 is none, 1 is full Pitch = Float value to adjust the pitch Type: Sound Returns: none Example: PlaySound, "Crowd Boo" PlayLoopSound3DVP. "Sound Test Loop", 1.0, 1.0 Scripts: SoundTest GG_OpenGate1
These functions play sound with a variety of options. The PlaySound function will play the sound at full volume, sounding like it comes from directly at the player's location. The 3D functions will cause the sound to be played from the calling object's location in the game (so it will be dimmer the farther the player is away from it). The VP functions allow you to adjust the volume and pitch of the sound, although whenever the functions are used only 1 for both volume and pitch are used. The PlayLoop functions will play the sound continuously until a StopSound function is called.
See Also: StopSound
PurgeTextures PTType: Console, Undocumented Returns: none Example: Scripts:
Console command that assumably unloads all textures currently being used.
See Also:
RaiseRankType: Faction Returns: none Example: RaiseRank player->RaiseRank "tedryn brenur"->RaiseRank Scripts: Not Used, only used in dialogue?
Raises the object’s rank in its current faction.
See Also: LowerRank, PCRaiseRank
Random, ValueWhere: Value = One more than the maximum random number you want to generate Type: Misc Returns: short Example: if ( Random, 10 == 5 ) set sValue to Random, 100 ; Random number between 0 and 99 Scripts: Main ouch_sunder
Generates a random number between 0 and (Value - 1).
See Also:
RemoveEffects, EffectIDWhere: EffectID = Magic effect to remove, use the following number values: 85 = sEffectAbsorbAttribute 20 = sEffectDrainFatigue 77 = sEffectRestoreFatigue 88 = sEffectAbsorbFatigue 18 = sEffectDrainHealth 75 = sEffectRestoreHealth 86 = sEffectAbsorbHealth 21 = sEffectDrainSkill 78 = sEffectRestoreSkill 89 = sEffectAbsorbSkill 19 = sEffectDrainSpellpoints 76 = sEffectRestoreSpellPoints 87 = sEffectAbsorbSpellPoints 126 = sEffectExtraSpell 42 = sEffectSanctuary 63 = sEffectAlmsiviIntervention 8 = sEffectFeather 3 = sEffectShield 47 = sEffectBlind 14 = sEffectFireDamage 15 = sEffectShockDamage 123 = sEffectBoundBattleAxe 4 = sEffectFireShield 46 = sEffectSilence 129 = sEffectBoundBoots 117 = sEffectFortifyAttackBonus 11 = sEffectSlowFall 127 = sEffectBoundCuirass 79 = sEffectFortifyAttribute 58 = sEffectSoultrap 120 = sEffectBoundDagger 82 = sEffectFortifyFatigue 48 = sEffectSound 131 = sEffectBoundGloves 80 = sEffectFortifyHealth 67 = sEffectSpellAbsorption 128 = sEffectBoundHelm 84 = sEffectFortifyMagickaMultiplier 136 = sEffectStuntedMagicka 125 = sEffectBoundLongbow 83 = sEffectFortifySkill 106 = sEffectSummonAncestralGhost 121 = sEffectBoundLongsword 81 = sEffectFortifySpellpoints 110 = sEffectSummonBonelord 122 = sEffectBoundMace 52 = sEffectFrenzyCreature 134 = sEffectSummonCenturionSphere 130 = sEffectBoundShield 51 = sEffectFrenzyHumanoid 103 = sEffectSummonClannfear 124 = sEffectBoundSpear 16 = sEffectFrostDamage 104 = sEffectSummonDaedroth 7 = sEffectBurden 6 = sEffectFrostShield 105 = sEffectSummonDremora 50 = sEffectCalmCreature 39 = sEffectInvisibility 114 = sEffectSummonFlameAtronach 49 = sEffectCalmHumanoid 9 = sEffectJump 115 = sEffectSummonFrostAtronach 40 = sEffectChameleon 10 = sEffectLevitate 113 = sEffectSummonGoldensaint 44 = sEffectCharm 41 = sEffectLight 109 = sEffectSummonGreaterBonewalker 118 = sEffectCommandCreatures 5 = sEffectLightningShield 112 = sEffectSummonHunger 119 = sEffectCommandHumanoids 12 = sEffectLock 108 = sEffectSummonLeastBonewalker 132 = sEffectCorpus 60 = sEffectMark 102 = sEffectSummonScamp 70 = sEffectCureBlightDisease 43 = sEffectNightEye 107 = sEffectSummonSkeletalMinion 69 = sEffectCureCommonDisease 13 = sEffectOpen 116 = sEffectSummonStormAtronach 71 = sEffectCureCorprusDisease 45 = sEffectParalyze 111 = sEffectSummonWingedTwilight 73 = sEffectCureParalyzation 27 = sEffectPoison 135 = sEffectSunDamage 72 = sEffectCurePoison 56 = sEffectRallyCreature 1 = sEffectSwiftSwim 22 = sEffectDamageAttribute 55 = sEffectRallyHumanoid 59 = sEffectTelekinesis 25 = sEffectDamageFatigue 61 = sEffectRecall 101 = sEffectTurnUndead 23 = sEffectDamageHealth 68 = sEffectReflect 133 = sEffectVampirism 24 = sEffectDamageMagicka 100 = sEffectRemoveCurse 0 = sEffectWaterBreathing 26 = sEffectDamageSkill 95 = sEffectResistBlightDisease 2 = sEffectWaterWalking 54 = sEffectDemoralizeCreature 94 = sEffectResistCommonDisease 33 = sEffectWeaknessToBlightDisease 53 = sEffectDemoralizeHumanoid 96 = sEffectResistCorprusDisease 32 = sEffectWeaknessToCommonDisease 64 = sEffectDetectAnimal 90 = sEffectResistFire 34 = sEffectWeaknessToCorprusDisease 65 = sEffectDetectEnchantment 91 = sEffectResistFrost 28 = sEffectWeaknessToFire 66 = sEffectDetectKey 93 = sEffectResistMagicka 29 = sEffectWeaknessToFrost 38 = sEffectDisintegrateArmor 98 = sEffectResistNormalWeapons 31 = sEffectWeaknessToMagicka 37 = sEffectDisintegrateWeapon 99 = sEffectResistParalysis 36 = sEffectWeaknessToNormalWeapons 57 = sEffectDispel 97 = sEffectResistPoison 35 = sEffectWeaknessToPoison 62 = sEffectDivineIntervention 92 = sEffectResistShock 30 = sEffectWeaknessToShock 17 = sEffectDrainAttribute 74 = sEffectRestoreAttribute Type: Magic Returns: none Example: RemoveEffects, 56 player->RemoveEffects, 1 Scripts: Not Used
Removes all spells currently affecting the calling actor that include the given effect. Note that this is slightly different from the GetEffect function which accepts the sEffect___ ID rather than the numeric value.
See Also: GetEffect, RemoveSpell, RemoveSpellEffects
RemoveItem, ObjectID, CountWhere: ObjectID = Object to remove from the calling item's inventory. Count = Number of the object to remove (short). Type: Object Returns: none Example: Player->RemoveItem, "Daedric_special", 1 Fargoth->RemoveItem, "ring_keley", 1 Scripts: lookoutScript MagasScript
Removes the give number of the item from the calling object but does not drop it. There is a potential for crashing the game if you attempt to remove an item within it's own script, i.e.,
begin test_CrashScript if (OnActivate == 1) MessageBox "The item disappears before your eyes" player->RemoveItem, "some_unique_item", 1 endif endIf this script was attached to the some_unique_item and the only instance of it was removed from the player's inventory, the game would crash. In order to successfully remove the item you will have to use a global script or from another object. You can successfully remove items that do not exist in the calling object's inventory. The RemoveItem function accepts a short count value which limits the number of items you can remove at a time to 65535 (or possibly 65534).
It appears that if you use RemoveItem from the player, the player's encumberence is modified, whether or not they actually have the object. An interesting way to modify the amount the player can carry, especially in situations where uninstalled mods have caused the player to carry around 'missing items' (i.e., the player's encumberence does not reach 0 when naked). Generally, though, you will not want to modify the player's encumberence so check for the existence of items with the GetItemCount before you remove them.
There is a bug related to this function when adding/removing items from a container causing the container's contents to not be updated the second time items are added/removed. See AddItem for information on this.
Note that this function does accept global variables but only in dialogue results, not scripts.
See Also: AddItem
Includes Contributions from Spuzzum and Argent.
RemoveFromLevCreature, LevCreature, Creature, Level RemoveFromLevItem, 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: RemoveFromLevCreature, "ex_azurascoast_sleep", "ash_ghoul", 25 RemoveFromLevItem, "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 remove the given object/level pair to the levelled list (assuming that it exists in the list).
See Also: AddToLevCreature, AddToLevItem
RemoveSoulgem, CreatureIDWhere CreatureID = Creature whose soulgem we wish to remove Type: Magic Returns: none Example: Player->RemoveSoulGem, "atronach_storm" RemoveSoulGem, "golden saint_staada" Scripts: SkinkSoul2 StrongSoulRemove
Removes one soulgem containing the given creature's soul from the calling actor's inventory. Note that some references incorrectly mention an optional 'Count' argument where you can specify the number of the soulgem to remove (confirmed in script output with Bloodmoon and latest patch).
See Also:
RemoveSpell, SpellIDWhere SpellID = Spell to remove Type: Magic Returns: none Example: Player->>RemoveSpell, "Vampire Attributes" RemoveSpell, stamina Scripts: Vampire_Cure_PC diseaseAshChancre
Removes the spell from the calling actors known spell list or affecting spells. If the spell is a normal spell, it is removed from the actor's list of known spells. If the spell is a curse/disease it is removed from the list of spells currently affecting the actor.
A bug vaguely related to this function is that if a creature dies with a curse type spell on 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: RemoveEffects, RemoveSpellEffects
Includes Contributions from Argent.
RemoveSpellEffects, SpellIDWhere SpellID = Spell to remove Type: Magic Returns: none Example: Player->>RemoveSpellEffects, "shock shield" RemoveSpellEffects, shield Scripts: Not Used
Removes the spell from the calling actors list of affecting spells.
See Also: RemoveEffects, RemoveSpell
RepairedOnMe, ObjectIDWhere: ObjectID = The repair object to check for Type: Object Returns: short Example: if ( daedric_shield->RepairedOnMe, repair_master_01 == 1 ) if ( "DarkBrotherhood Boots"->RepairedOnMe, "repair_grandmaster_01" == 1 ) Scripts: Not Used
Returns 1 if the calling object is repaired by given object, or 0 otherwise. For example,
if ( "banhammer_unique"->RepairedOnMe, "repair_journeyman_01" == 1 )checks against a Banhammer being repaired by a journeyman's hammer. Obviously, the ObjectID should be a valid repair item and the calling item should be a weapon or armor.
See Also:
ResetActors RAType: Console, Undocumented Returns: none Example: Scripts:
Console command that moves all actors to their starting positions and sets their AI package to the default.
See Also:
Includes Contributions from Spuzzum.
ResurrectType: Stats Returns: none Example: gateway_haunt->Resurrect Scripts: KarrodScript ResurrectHaunt
Brings actor back to life. When you do this any changes made to the actor in game (stats, inventory, etc...) will be reset to their original value. I have experienced game crashes when using this function from the console sometimes (not consistent).
See Also:
ReturnType: System Returns: none Example: return Scripts:
Use this to stop processing a script before the end. This is particularily useful for long scripts that may take some time to fully process. For example:
begin TestScript if ( MenuMode == 1 ) return endif ; Do stuff end
See Also:
Rotate, Axis, Angle/sec RotateWorld, Axis, Angle/secWhere: Axis = The world or object axis to rotate about (X, Y, or Z). Angle/sec = The rotation speed to rotate the object (degrees per second). Type: Movement Returns: none Example: Rotate, X, 0.5 "Act_banner_Khuul"->RotateWorld, Z, 1 Scripts: float BarDoor
Rotates the object along the specified world (RotateWorld) or object (Rotate) axis at the specified number of degrees per second. To be used properly, the function should be called continuously while rotation is desired, for example:
begin test_RotateScript short RotatingItem if ( OnActivate == 1 ) if ( RotatingItem == 0 ) set RotatingItem to 1 else set RotatingItem to 0 endif endif if ( RotatingItem == 1 ) RotateWorld, Z, 0.5 endif endwhich should start rotating an object up when it is activated and stop when it is activated again.
See Also:
SameFactionType: Faction Returns: short Example: if ( "Shunari Eye-Fly"->SameFaction == 1 ) Scripts: Not Used, only used in dialogue
Returns 1 if player is in the faction of the calling NPC, or 0 otherwise.
See Also:
Say, "Filename", "Text"Where: Filename = WAV Sound file to play Text = Text used for dialog captions. Type: Sound Returns: none Example: Say, "Vo\Misc\tr_almgreet1.mp3", "Many Blessings upon you, my loyal servant." "hels_assassin1"->Say, "Vo\Misc\helsass1.wav", "...supposed to be here somewhere..." Scripts: almaScript barassScript
Makes the subject say the given WAV file, only works on animating objects.
See Also: SayDone
SayDoneType: Sound Returns: short Example: if ( SayDone == 1 ) if ( Player->SayDone == 1 ) Scripts: DaedraAzura TribEnd
Returns 1 if the object is not saying anything, or 0 otherwise.
See Also: Say
ScriptRunning, ScriptNameWhere: ScriptName = Name of the script to check Type: Script Returns: short Example: if ( ScriptRunning, CharGen == 1 ) Scripts: Main
Returns 1 if the given script is running as a global script, or 0 otherwise.
See Also: StartScript, StopScript
SetWhere:to
Use set to store a value or expression to a variable. The expression can be a complex mathematical expression including numbers, functions, and variables. When using the set command you should make use of spaces surround all operators and variables. You should also surrounding all functions with brackets (if you do not use brackets some functions will not compile correctly).
Note that you can have multiple functions in the set expression, however they will all apply to the same object reference. For example:
set LocalVar to ( player->GetPos, X ) + ( player->GetPos, Y ) set LocalVar to ( player->GetPos, X ) + ( GetPos, Y ) ; Same as the previous set set LocalVar to ( player->GetPos, X ) + ( aengoth->GetPos, Y ) ; Will not work, use two seperate set commands
See Also:
SetAcrobatics | SetAgility | SetAlarm | SetAlchemy | SetAlteration | SetArmorBonus | SetArmorer |
SetAthletics | SetAttackBonus | SetAxe | SetBlindness | SetBlock | SetBluntWeapon | SetCastPenalty |
SetChameleon | SetConjuration | SetDefendBonus | SetDestruction | SetDisposition | SetEnchant | SetEndurance |
SetFatigue | SetFight | SetFlee | SetFlying | SetHandToHand | SetHealth | SetHeavyArmor |
SetHello | SetIllusion | SetIntelligence | SetInvisible | SetLevel | SetLightArmor | SetLongBlade |
SetLuck | SetMarksman | SetMediumArmor | SetMagicka | SetMercantile | SetMysticism | SetParalysis |
SetPCCrimeLevel | SetPCVisionBonus | SetPersonality | SetReputation | SetResistBlight | SetResistCorprus | SetResistDisease |
SetResistFire | SetResistFrost | SetResistMagicka | SetResistNormalWeapons | SetResistParalysis | SetResistPoison | SetResistShock |
SetRestoration | SetScale | SetSecurity | SetShortblade | SetSilence | SetSneak | SetSpear |
SetSpeechcraft | SetSpeed | SetStrength | SetSuperJump | SetSwimSpeed | SetUnarmored | SetWaterBreathing |
SetWaterLevel | SetWaterWalking | SetWillpower |
Set____Where: Value = Value to set the stat by. Can be a literal value or a variable (float). Type: Stats Returns: none Example: player->SetFatigue, 0 SetStrength, LocalVar Scripts: ouch_keening puzzlecanal
These Set functions will set the exact value of the statistic. The functions will also accept a float variable instead of a literal numeric value. There are several special cases of the Set___ functions as described below.
Note that the SetInvisible was incorrectly spelled as SetInvisibile in the original Morrowind game (fixed in a later patch or Tribunal?).
Includes Contributions from Jog.
SetAngle, Axis, AngleWhere: Axis = World axis to set the object's angle (X, Y, or Z) Angle = Angle in degrees to set (float). In Tribunal the function can accept variable floats as well as literal values. Type: Movement Returns: none Example: SetAngle, X, 45.0 "Act_banner_Tel_Vos"->SetAngle, Z, 90 SetAngle, Y, GetStartingAngle, Y SetAngle, Y, fValue (Tribunal only) Scripts: SignRotate Dagoth_doors
Sets the angle of the object in degrees using the given world axis. In Tribunal the function also accepts float variables in addition to literal values.
See Also:
SetAtStartType: Movement Returns: none Example: SetAtStart "ex_gg_portcullis_01"->SetAtStart Scripts: BarDoor GG_OpenGate1
This resets the object to the original position and orientation it was given in the editor, before any movement or rotation occurred. Be warned that this function doesn't always seem to do exactly as it should. Objects are not nessecarily reset to its editor defined position.
See Also:
Includes Contributions fron CaveRat.
SetDelete, FlagWhere: Flag = 1 to delete object, 0 to clear Type: Misc, Tribunal Returns: none Example: SetDelete, 1 Scripts: trapProjScript explosion_pushout
The SetDelete function can be used in combination with Disable to remove an object more completely. SetDelete 1 marks a reference for deletion while SetDelete, 0 clears that flag. If the reference came from the master file, it is still there but knows it shouldn’t be so has no art and no scripting. If was created in game, it will actually be deleted.
Use "SetDelete, 1" to mark on object to be deleted/not saved in a save game. Objects that have been put in the world with the editor (or perhaps those already saved in the game) seem to stay in place when it's used on them, until a save/load has happened, and a "SetDelete, 0" could be used on them to undo the effect. Items that are placed however, using PlaceAtPC, or PlaceItem, are immediately deleted from the world.
There are a couple of things that should be done to make this work, as I had some problems with using it crashing the game otherwise. If you use this on an object, give it a bit of time of inactivity before you delete it, and Disable it ahead of time. So you could put something like this in your script near the top, as an example:
if ( deleteobj = 1 ) ;Local variable, set when you want to delete if ( deletetimer == 0 ) Disable endif if ( deletetimer < 10 ) set deletetimer to ( deletetimer + 1 ) endif if ( deletetimer == 10 ) "my_object_01"->SetDelete, 1 endif Return endifThat way, with the return, it stops the rest of the script if it's up near the top of it (below where you setup the variables though), and disables it, and gives it a bit of time before it's deleted. It may not need 10 frames, but that's not long, and it worked in my scripts It can be quite a useful function in scripting things, as it allows for a script to use PlaceAtPC or PlaceItem scripts or such to create items within the world, at different locations, or different situations, where you may want to delete such items after.
Other useful tips for successfully using SetDelete are:
See Also: DontSaveObject
Includes Contributions from Soralis, Dan_Wheeler and Accido.
SetFactionReaction, FactionID1, FactionID2, ValueWhere: FactionID1 = FactionID source FactionID2 = FactionID target Value = Value to modify the faction reaction by. Type: Faction Returns: none Example: SetFactionReaction, "Thieves Guild", "Temple", -2 SetFactionReaction, "Redoran", "Nerevarine", 4 Scripts: MoonAndStar
Defines the reaction of one faction towards members of another faction. Positive value indicate more like, while negative values indicate dislike. For example,
SetFactionReaction, "Thieves Guild", "Temple", -2will cause all thieves guild members to dislike all temple members (it is not reversible so you would have to also set the Temple faction reaction to the Thieves guild).
See Also: GetFactionReaction, ModFactionReaction.
SetJournalIndex, JournalID, IndexWhere: JournalID = Journal entry to add or modify. Index = Value to set the journal entry to. Type: Dialogue Returns: none Example: SetJournalIndex, "A2_4_MiloGone", 10 (???) Scripts: Not Used
Sets the Journal to that index. Can move up or down. Not used so I'm not sure what purpose or use this function is. Although it is supposedly included in the original game, it only works in Tribunal or later versions.
SetJournalIndex is primarily useful to set a Journal to an entry without displaying any journal text. This can be used as a form of a quest variable without being forced to actually create a global variable to govern that quest -- for example, to display something to the player, and then set a special flag for that quest you can set the index to 46, and then check to see if the dialogue entry is 46 instead of 45 to have the NPC do something different when reacting to the player. Essentially, it's a way of tracking the player's shenanigans without tipping off the player with a journal entry.
You can set the journal index to values where a journal index doesn't actually exist, as well. Whether or not you can use SetJournalIndex to repeatedly display the same journal entry over and over, I haven't tried.
See Also: Journal
Includes Contributions from Spuzzum and Melian.
SetPCFacRep, Value, [FactionID]Where: Value = Value to set the faction reputation to. FactionID = Optional faction ID to modify. Type: Faction Returns: none Example: SetPCFacRep, 10, "Thieves Guild" SetPCFacRep, 25, "Temple" "tedryn brenur"->ModPCFacRep, 5 Scripts: Not Used
Defines the reaction modifier for members of the specified faction towards the PC.
See Also: GetPCFacRep, ModPCFacRep
SetPos, Axis, PositionWhere: Axis = World axis to set the object's position (X, Y, or Z) Position = Position in game units to set (float). In Tribunal the function can accept variable floats as well as literal values. Type: Movement Returns: none Example: SetPos, X, 45.0 "Act_banner_Tel_Vos"->SetPos, Z, -1002.0 SetPos, Y, GetStartingPos, Y SetPos, Y, fValue (Tribunal only) Scripts: shrineGnisisSecret PlagueRock1
Sets the position of the object in game units (70 units per meter) using the given world axis. In Tribunal the function also accepts local float variables in addition to literal values (does not accept globals). This function does modify the player's position. Unfortunately there are problems when you use SetPos to change the current cell. The cell's contents are not always loaded correctly. In this case you may need to use the COE (CenterOnExterior) function to change the current cell and then the SetPos to modify the player's position. An easier method is to use a FixMe function call after the player's position has changed.
A related problem is in exteriors the function will only work in the currently loaded area (the current cell plus 2-3 cells around the current cell). It can't be used to move something to an arbitrary exterior cell.
See Also: GetPos
Includes Contributions from Srikandi, and AfterShock_81.
SetWerewolfAcrobatics, ValueWhere: Value = New acrobatics skill value/bonus Type: Statistic Returns: none Example: Scripts:
Sets the acrobatics skill value/bonus when the player is in Werewolf form (unconfirmed).
See Also:
ShortType: System Example: short LocalVar Scripts:
This is one of the three types of the scripting language. Short variables are signed and can range from -32,768 to 32,767.
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.
ShowType: Console Example: Scripts:
Unknown console command (similar to ShowVars?). If you use this in a script it will prevent the script from being compiled (you'll get no errors in the editor but the compiled script data is not saved to the plugin).
See Also:
ShowAnim SAType: Console, Undocumented Example: Scripts:
Unknown console command.
See Also:
ShowGroup SGType: Console Example: Scripts:
Unknown console command.
See Also:
ShowMap, CellIDWhere: CellID = Partial or complete cell name to show on world map Type: Misc Returns: none Example: ShowMap "Gnisis" ShowMap "Vivec" Scripts: BookPilgrimsPath
Shows the given cell name on the world map. Will match complete or partial cells, so ShowMap, "Vivec" will show cells Vivec and Vivec, Fred's House as well.
See Also:
ShowRestMenuType: Console Returns: none Example: ShowRestMenu Scripts: BedStandard CharGenBed
Displays the standard rest/sleep menu allowing the player to choose the amount of time they wish to rest.
See Also:
ShowSceneGraph SSGType: Console Example: Scripts: n/a
When you use this command the game will freeze for a short time (30 seconds or so). When the command is finished it will actually create a new Window on the desktop with all the game renderer's information (use Alt-Tab or Alt-Esc to temporarily exit the game and view the other window). The information is displayed via a tree control and those familiar with hacking NIF files may recognize some of the information. The world objects can be found under the World Scene Graph--WorldRoot--WorldObjectRoot and then under the currently loaded cells. You can view the various rendering information under each object. This probably won't be much use to most people but only those performing low-level hacking/editting of Morrowind or it's data files (such as NIF files).
See Also:
ShowTargets STType: Console Example: Scripts:
Console command that shows the selected actor's target group members.
See Also:
ShowVars SVType: Console Example: Scripts:
Console command that lists all the global and/or local variables. If no object is currently selected in the console (shown by the console title) SV will list all global variables and values. If an object is selected SV will list all the object's script variables and values (if it has any). This console command is invaluable for debugging purposes.
See Also:
SkipAnimType: Animation Returns: none Example: SkipAnim "taren andoren"->SkipAnim Scripts: Not Used
Causes the current animation to not be played for this frame. One of the useful things to do with this is to create armor dummies for displaying armour and clothing. Simply create a new NPC, set its health to 0, and attach to it a script like the following:
begin test_dummy SkipAnim; endWhen you insert the NPC into the game it will die (since it has no hitpoints) but it will not 'fall over' since all its animations are disabled. You can then access its inventory (since its dead) and any armour that you place in the dead body will be automatically equipped. Unfortunately it appears that weapons are not automatically equipped in the same manner.
See Also: LoopGroup, PlayGroup
StartCombat, ActorIDWhere: ActorID = The actor with which to start combat with. Type: Combat Returns: none Example: "drals indobar"->StartCombat Player StartCombat Player Scripts: almaScript avSlaveHunter
The calling NPC will start combat with the given ActorID. Should only be called once (not continuously) or you may experience unintended results (such as the NPC not attacking at all). Once combat is started, the NPC is subject to the usual AI rules (such as fleeing).
See Also: StopCombat
StartScript, ScriptNameWhere: ScriptName = Name of the script to start Type: Script Returns: none Example: StartScript, CharGen Scripts: Main MoonAndStar
This function starts a script running as a global script. It is not attached to any object, so functions like moving, rotating, checking distances and such have no bearing in a global script (which means you must specify object IDs explicity). Note this isn't exactly true as if you start a global script it will use the calling script object by default (i.e., if you started a global script from within the NPC Bob's script, the global script would use Bob as the default object). Global scripts are good for running complex quests, checking variables, or setting timers. Each global script is run every frame so take care not to run too many at one or the game's speed will be reduced.
You can target a global script using either ObjectID->StartScript, or calling StartScript from the dialogue results box. While both are true, they don't quite work as expected when used together. From the results box, ObjectID->StartScript seems to attach the script to the NPC calling the dialogue and not the referenced object. When you use a targetted global script any function call in the script will use the target object (you don't need to explicitly specify the object unless you need/want to).
See Also: ScriptRunning, StopScript
Includes Contributions from Argent.
StayOutsideType: Undocuments, Variable, Bloodmoon Example: short StayOutside set StayOutside to 1 Scripts: Not Used
When used in script, it causes whoever it's assigned to to automatically remain (and wait) outside of any interior the player may enter (automatically rejoins upon return).
See Also:
Includes Contributions from Grumpy.
StopCellTest SCTType: Console Example: Scripts:
Assumably this console command stops a cell test previously started by the TestCells console command.
See Also: TestCells.
StopCombatType: Combat Returns: none Example: "Drores Arvel"->StopCombat StopCombat Scripts: cattleScript fightStopOrdinators
The calling actor will stop attacking (whether or not they actually are currently attacking anything). Note that using this function can result in NPCs not to defend themselves or attack at all.
See Also: StartCombat
StopScript, ScriptNameWhere: ScriptName = Name of the script to stop Type: Script Returns: none Example: StopScript, CharGen Scripts: CharGen EndGame
This stops a currently running global script started previously with StartScript. Using StopScript resets any local variables used by that script. A StopScript will not immediately terminate the script when it is called. Instead, the script continues executing to the End statement, and then terminates. Use the Return command to immediately stop a script for the current frame if desired.
If a Tribunal Start Script is terminated with StopScript, it will start up again the next time the game is loaded.
See Also: ScriptRunning, StartScript
Includes Contributions from DinkumThinkum.
StopSound, SoundIDWhere: SoundID = The sound to stop playing Type: Sound Returns: none Example: StopSound "Sound Test Loop" Scripts: SoundTest PlagueRock1
Stops the given sound if it is playing and previously starting with PlayLoopSound.
See Also: PlayLoopSound
StreamMusic, "Filename"Where: Filename = Name of the music file to play Type: Sound Returns: none Example: StreamMusic, "conantheme.mp3" Scripts: GnisisWarpDoor GnisisEggmineDoor
Plays the given music file.
See Also:
TestCells TestInteriorCells TestModels (T3D) TestThreadCells (undocumented)Type: Console Example: Scripts:
Assumably this console command tests various objects/locations in the game in some manner.
See Also: StopCellTest.
ToggleAI (TAI) | ToggleBorders (TB) | ToggleCollision (TCL) | ToggleCollisionBoxes (TCB) |
ToggleCollisionGrid (TCG) | ToggleCombatStats (TCS) | ToggleDebugText (TDT) | ToggleDialogueStats (TDS) |
ToggleFogOfWar (TFOW) | ToggleFullHelp (TFH) | ToggleGodMode (TGM) | ToggleGrid (TG) |
ToggleKillStats (TKS) | ToggleLights (TL) | ToggleLoadFade (TLF) | ToggleMagicStats (TMS) |
ToggleMenus (TM) | TogglePathGrid (TPG) | ToggleScriptOutput (TSO) | ToggleScripts |
ToggleSky (TS) | ToggleStats (TST) | ToggleTextureString (TTS) | ToggleVanityMode (TVM) |
ToggleWater (TWA) | ToggleWireFrame (TWF) | ToggleWorld (TW) |
ToggleAI (TAI) ToggleBorders (TB) ToggleCollision (TCL) ToggleCollisionBoxes (TCB) ToggleCollisionGrid (TCG) ToggleCombatStats (TCS) ToggleDebugText (TDT) ToggleDialogueStats (TDS) ToggleFogOfWar (TFOW) ToggleFullHelp (TFH) ToggleGodMode (TGM) ToggleGrid (TG) ToggleKillStats (TKS) ToggleLights (TL) ToggleLoadFade (TLF) ToggleMagicStats (TMS) ToggleMenus (TM) TogglePathGrid (TPG) ToggleScriptOutput (TSO) ToggleScripts ToggleSky (TS) ToggleStats (TST) ToggleTextureString (TTS) ToggleVanityMode (TVM) ToggleWater (TWA) ToggleWireFrame (TWF) ToggleWorld (TW)Type: Console Example: Scripts:
These console commands enable/disable various modes or statistics within the game (use once to enable and again to disable). Their descriptions are as follows:
See Also:
TurnMoonRed TurnMoonWhiteType: Weather, Bloodmoon Returns: none Example: TurnMoonRed TurnMoonWhite Scripts:
Turns the moon(s) the given color for special Werewolf effects (unconfirmed).
See Also:
UndoWerewolfType: Werewolf, Bloodmoon Returns: none Example: Scripts:
Will undo the werewolf change brought on by the BecomeWerewolf function. However, the NPC/creature will essentially be naked after the switch. They have to be told to re-equip (weapons are usually re-equipped if it occurs in combat).
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: BecomeWerewolf, PCWerewolf, IsWerewolf
Includes Contributions from LDones.
UnlockType: Misc Returns: none Example: Unlock "chest_ashurninibi_01"->Unlock Scripts: GavisScript Pub_Ghost_Dusk
Unlocks the calling object.
See Also: Lock
UsedOnMe, ObjectIDWhere: ObjectID = Object to test for use Type: Object, Broken Returns: short Example: if ( UsedOnMe, Misc_pot_redware_01 == 1 ) Scripts: UsedOnMe (commented out saying it was crashing)
Returns 1 if the given ObjectID is used on the calling object, or 0 otherwise. It appears that this function is currently broken. UsedOnMe is probably commented out because there's no way for an object to be used on another in the Morrowind engine. I suspect that it was early alpha stuff.
See Also:
Includes Contributions from Spuzzum.
WakeUpPCType: Player Sleeping Returns: none Example: WakeUpPC Scripts: Sleepers VampireCheck
Wakes up the PC if they are sleeping. Use it to wake up the PC to notify them of some timed event.
See Also:
XboxType: Misc Returns: short Example: if ( Xbox == 1 ) Scripts: CharGenBed CharGenDagger
Returns 1 if the game is being played on the XBox, or 0 otherwise.
See Also:
YearType: Time, Global Returns: short Example: if ( Year == 427 ) set sValue to ( OrigYear + Year ) Scripts:
Global short variable which returns the current year in the game. The game starts in the year 427 (of the 3rd era of Tamriel, or 3E 427).
See Also: Day, GameHour, Month
Display
this document for printing (some pages may not display properly).
If you have any problems, suggestions or comments on this page or website, please
feel free to use the Contact Form to send
a message to the WebMaster.
This document was last modified on: Saturday, 19 February 2011, at 09:55:40
and has been accessed
53166 times
( /morrow/editor/mw_cscommands.shtml ).
Please note that this site is Completely Unofficial and is in no way connected to Bethesda softworks or Zenimax. Bethesda Softworks, Battlespire, XnGine, Morrowind, Redguard, Daggerfall, Arena and The Elder Scrolls are trademarks of Media Technology Limited, Copyright © 1994-2001 Media Technology Limited.