|
Scripts are a huge aspect of Skyrim and tell the game how to work. Anything happening in the game is due to scripts.
This page is intended to be a quick reference sheet for reading certain script functions, and only shows ones of particular used to this wiki—for example, how a quest reward is given or what determines quest progression. For a very thorough list of scripting commands and tutorials on how to write scripts, see the Creation Kit Wiki.
It is not necessary to understand everything a script is saying if you are looking for a particular occurrence. Some terms used here may be better understood by having some familiarity with the Creation Kit.
StuffEdit
- Semicolons (
;
) comment out a section. If you see a section starting with a semicolon, it is either commentary about the script or something that was not implemented. - Fragments are run in numerical order despite the order they appear in the script itself.
Questy thingsEdit
- Alias_Alias.Clear()
This removes the alias (object or character important in the quest) from future use in the quest, such as Alias_LexiconCubeBlank.Clear()
.(?)
- CompleteAllObjectives()
Completes all assigned objectives.
- FailAllObjectives()
Fails all assigned objectives.
- SetObjectiveCompleted(#, #)
This sets a quest objective as completed and moves it from your active objective to a fulfilled one. The first number is the objective number; the second is either a 1 or a 0, 1 indicating success and 0 indicating failure.(?)
- SetObjectiveDisplayed(#, #)
This displays a new quest objective for you to complete. The first number is the objective number; the second is what? 1/0?(?)
- SetStage(#)
This sets the stage in a certain quest when conditions are met, as in SetStage(5)
. Look within the same fragment for what triggers the new stage. It's also possible to set stages for other quests by adding the quest ID first, as in MQ205.SetStage(80)
, which is sometimes preceded by an "if" statement in the line before, as in if MQ205.IsRunning()
.
- Stop()
Ends the quest.
Player effectsEdit
- AddItem
- AddPerk
- Game.GetPlayer()
This affects the player in some way, by adding or removing an item, perk, skill, etc. For example, in DA04, there is Game.GetPlayer().RemovePerk(BloodHarvest)
. This is also used to give a reward with the format Game.GetPlayer().AddItem(Reward)
, as in Game.GetPlayer().AddItem(LvlQuestReward02Medium)
, where LvlQuestReward02Medium
is the editor ID of a specific object or leveled list.
- PlayIdle
UnsortedEdit
- AddToMap()
This adds a map marker to the world map, such as AlftandMapMarker.AddToMap()
.
- Disable()
Disables an object, as in ElderScroll.Disable()
.
- Enable()
Enables an object, as in ElderScroll.Enable()
.
- MakePlayerFriend()
This makes an NPC a friend of yours, allowing you to take small items from their home and perhaps marry them. In quests, it may be marked as Alias_Alias.GetActorRef().MakePlayerFriend()
, as in Alias_Halbarn.GetActorRef().MakePlayerFriend()
.