List of Global Variables
The following is a list of all the global variables that are used by Fallout 3's various scripts.
- 1 Usage notes
- 2 Alternatives
- 3 Global variables for In-Game Time
- 4 Global variables for Speech/Attribute Challenges
- 5 Global Variables for Free-Form Encounters
- 6 Global Variables for Karma
- 7 Trap Rewards
- 8 Player House Mods
- 9 Caravan variables
- 10 Global Variables for Quests
- 11 Other Global Variables
These are considered base types in the GECK, and can be viewed by clicking "*ALL" in the Object window, clicking the "Form Type" column heading, then scrolling to view all items of type "GLOB".
As with all base types, you can create your own global variable just by renaming one of these to something that is unlikely to conflict with other mods (typically by prefixing it with the name of your mod), and clicking "yes" to create a new object.
In order to modify Global variables, you must open the "Global" window by clicking on "Globals..." under the Gameplay menu. The "GLOB" Form type doesn't have its own dialogue window, so double-clicking on a Global in the Object Window will result in an error.
If the variable will only be used within one script, typical script variables are the best choice, as they have a scope of only that script: variable naming conflicts are not possible.
If the variable will be used within a single quest, using quest variables should suffice, as then the variable will not need storing before or after the quest.
In some cases, you could create a persistent reference which would store the value in a property.
However, where a variable will need to be used across multiple quests, cells and scripts, a well-named global variable is probably the correct choice.
Global variables for In-Game Time
- GameDay: Returns the in-game day (day of the month).
- GameDaysPassed: Returns the amount of days passed in game.
- GameHour: Returns the in-game hour.
- GameMonth: Returns the in-game month.
- GameYear: Returns the in-game year
- Timescale: Number of game minutes that passes in 1 real minute. Default: 30.
Care must be taken when mixing use of GameDaysPassed and GameHour in a script. When crossing midnight, GameDaysPassed may indicate the start of a new day, while GameHour is still in the previous day. For example, if GameDaysPassed is 6.04 (6th day at 00:01), then GameHour should be about 0.02 (00:01). But GameHour may indicate something like 23.90. This situation can exist for multiple frames.
Global variables for Speech/Attribute Challenges
- SpeechSkillLow: Returns the value of a low speech skill. Used for defining the difficulty of a speech challenge.
- SpeechSkillMedium: Returns the value of a medium speech skill. Used for defining the difficulty of a speech challenge.
- SpeechSkillHigh: Returns the value of a high speech skill. Used for defining the difficulty of a speech challenge.
- SpeechSpecialLow: Returns the value of a low SPECIAL attribute. Used for defining the difficulty of an attribute challenge.
- SpeechSpecialMedium: Returns the value of a medium SPECIAL attribute. Used for defining the difficulty of an attribute challenge.
- SpeechSpecialHigh: Returns the value of a high SPECIAL attribute. Used for defining the difficulty of an attribute challenge.
Global Variables for Free-Form Encounters
Global Variables for Karma
Player House Mods
Global Variables for Quests
These are prefixed by the quest ID, which seems to be two initials CG, MS or MQ (Main Quest?), followed by a number for the specific quest.
- MS05Check - no ingame references
Other Global Variables