MSFD Variable-type functions
For easy reference, the following list shows all those variable/function type hybrids that you need to declare as variables if you use them in a script.
Local variables that get set by the game:
Short OnPCEquip
Short OnPCAdd
Short OnPCRepair
Short OnPCSoulGemUse
Short OnPCHitMe
Float minimumProfit (Tribunal)
Local variables that you can set as a flag:
Short Companion (Tribunal)
Short StayOutside (Tribunal)
Short PCSkipEquip
Special Globals
Some globals hold special significance that you can take advantage of for your own scripting. Since they are globals, you do not need to declare them.
Short NPCVoiceDistance (750) Used as a distance when Following NPCs call after you to wait for them (e.g. see DandsaScript)
Float GameHour Holds the current hour of the day (0-23)
Note, this is a float, so 10:30 would be represented as 10.5. See the section on float variables for more information
Short Day Holds the current day of the month (1-30)
Short Month Holds the current Month of the year (0-11)
Short Year (427) Holds the current year
Float TimeScale (30) Sets the ratio of real-time/game-time
Short Random100 Is randomly set between 0-100 (set by main script when out of menumode)
Short PCRace Contains the player's Race
(1=Argonian, 2=Breton, 3=Dark Elf, 4=High Elf, 5=Imperial, 6= Khajiit, 7=Nord, 8=Orc, 9=Redguard, 10=Woodelf)
If the player is using a custom race, PCRace will remain 0 by default. Note that it is possible to add your own racecheck script for custom races, and set PCRace to a custom value, but be warned: if two mods do this, you may have conflicts. As this variable is only used in dialog, it is not required that you set it to a different number for every custom race you make. If you made a new race with dialog, instead of using this it would be far better to make your own global variable as it would be less likely to conflict with other mods.
Short PCVampire Vampire status: 0=Normal, 1=Vampire, -1= cured
Short VampClan If the PC becomes a vampire, this indicates his clan. 1=Aundae, 2=Berne, 3=Quarra
Short DaysPassed Contains the number of days since the game started.
Requires an explicit declaration, which is present in Tribunal but must otherwise be added (not present in Bloodmoon or Morrowind).
Short PCWerewolf Werewolf status: 0=Normal, 1=Werewolf, -1=Cured
Float WerewolfClawMult (25.00) Increased during the Werewolf quests to make your claw attack more powerful.
Short PCHasGoldDiscount Used in dialogue. Gets set to 1 if player has enough gold to pay thieves guild discount on the "price on your head".
Short PCHAsTurnIn Used in dialogue. Gets set to 1 if player has enough gold to pay the reduced fee for turning yourself in.
Short PCHasCrimeGold Used in dialogue. Gets set to 1 if player has enough gold to pay the crime fee.
Short CrimeGoldTurnIn Gold needed for reduced crime fee
CrimeGoldDiscount Gold needed for thieves guild discount crime fee