Quest for Glory 4 Scripting Values and Variables: Difference between revisions
From Sierra WikiNew
Jump to navigationJump to search
No edit summary |
m (1 revision imported) |
(No difference)
|
Latest revision as of 00:11, 3 June 2024
Quest for Glory 4 Scripting Values and Variables[1]
Global scripting values
To Do: Finish this section up with descriptions of all the values
- 12 - Previous room (Used for some event checks for story bound warps)
- 15 - New puzzle points (still shown in red in the stats' screen)
- 121 - Night time? (0 is day, 1 is night)
- 122 - Current day
- 123 - Time of day - the value can be between 0 to 7, each signifying 3 hours of a day:
- 0 - Day is dawning (5-7)
- 1 - Mid morning (8-10)
- 2 - Midday (11-13)
- 3 - Mid afternoon (14-16)
- 4 - Sunset approaching (17-19)
- 5 - Night is still young (20-22)
- 6 - Middle of night (23-1)
- 7 - Not yet dawn (2-4)
- 125 - Character class (0 for Fighter, 1 for Wizard, 2 for Thief, 3 for Paladin)
- 140 - Old puzzle points (becomes a copy of global flag 15 once the stats' screen is shown)
- 201 - Debug mode (0 by default, unless you have the special resource file activating it)
- 361 - Initial Honor score upon the start of the game, used as a base value when Honor varies, to determine when you get additional Paladin abilities via current honor - initial honor
- 365 - Current monster encounter
- 394 - Set to 1 when class is 3 (Paladin), used when Honor varies, to determine when you get additional Paladin abilities
- 414 - Used in room 280 (Mordavia East end with Nikolai) for date checks regarding your first interaction with Nikolai
- 415 - Used in room 250 (Mordavia North end) and initialized with global122
- 416 - Records on which day you last met Katrina (at the town gate or at the castle gates) by copying the value of global122, used for date checks in the room at the inn (3 days) or at the castle gate (2 days) to enforce delays
- 425 - Records on which day you last were at room 600 (Castle Gates), used in the event determination logic
- 426 - Copy of global122 (current day) in rooms 320 and 330 (Inn and Hero's room), probably to keep track of the time the Hero entered the screen
- 427 - Controls the event number to be executed in the inn when the Hero sleeps
- 1 - Not defined ?
- 2 - Not defined ?
- 3 - Not defined ?
- 4 - Sets local0 variable to 5 -> global variable incremented by 1
- Set to this value when sleeping at the Inn after flag 39 has been set (Gypsy has been set free; method doesn't matter)
- Will cause the Hero to hear Bella weep (dialogue sequence 10 6 10) and flag 136 to be set (then used in room 320)
- 5 - Sets local0 variable in room 330 set to 7 -> global variable incremented by 1
- Set to this value when interrupted sleeping at night by Bella's weeping
- Reaching this value will prevent the sleep interruption that would nudge you into seeing the Domovoi
- Will then do nothing other than incrementing the variable
- 6 - Sets local0 variable to 75 -> Erasmus and Fenrus trying to locate the Hero and musing about a Rootin' Tootin' Root Beer commercial -> global variable incremented by 1
- 7 - Not defined ? Can only be further incremented by saving Tanya ?
- 8 - Set when coming from the staff screen to your room (happens when having saved Tanya, overrides everything else as it will ensure you get back on track and receive the fake note)
- 9 - Set when in state 8 and learning the Ultimate Joke ; Triggers the fake Katrina note from Ad Avis that will trigger the end game
- 428 - Number of times the Hero has slept at the inn (incremented when stamina, health and mana are restored)
- Sleep 2 times -> local0 variable set to 1 -> Hear Ad Avis and Katrina trying to scry on the Hero (dialogue sequence 10 6 12)
- Sleep 4 times -> local0 variable set to 2 -> Hear Erasmus and Fenrus trying to scry on the Hero (reference to Erasmus spying on the Dryad; dialogue sequence 10 6 13)
- 434 - Initialized to a random value (1-26) for the formula to give for Healing Potions
- 435 - Initialized to a random value (1-26) for the formula to give for Poison Cure Potions
- 436 - Initialized to a random value (1-26) for the formula to give for the Rehydration Solution
- 446 - Set to the current day when requesting a Healing Potion, used to ensure you get only one a day
- 447 - Set to the current day when requesting a Poison Cure Potion, used to ensure you get only one a day
- 468 - Tracks the total amount paid to the Innkeeper for board and room
- 469 - When you last paid at the inn
- 473 - When you last had a card reading by Magda to ensure you get only one a day
- 500 - Where the above event flags are stored
Local variable flow notes in important rooms
To Do: Finish this section up with descriptions of all the values
Room 330 (Hero's room)
- local0 definition (First condition to match takes precedence)
- 8 : Set when coming from the staff screen to your room (ostensibly happens when saving Tanya), sets global 427 variable to 8 for the next time you sleep at the Inn, which will trigger the fake note if you know the Ultimate Joke
- 5 : Set if global variable 427 was equal to 4
- 4 : Set if flag 39 was set (Gypsy released), and global variable 427 < 4
- 11 : Domovoi quest related (help Monastery Domovoi) ; Set if global variable 426 was set, if flag 138 was set (Monastery Domovoi saved), and flags 154 and 139 not set
- 12 : Domovoi quest related (help Gnome Punny Bones) ; Set if global variable 426 was set but different from global variable 122, if global variable 122 was >= to 12, and flags 130 and 155 not set
- 13 : Domovoi quest related (rescue Tanya) ; Set if global variable 426 was set but different from global variable 122, if global variable 122 was >= to 16, and flag 139 set (Domovoi met a second time) but flags 115 and 156 not set
- 3 : Set if global variable 122 >= to 5, flag 37 set (Igor missing), flag 48 not set (Igor not yet saved)
- 1 : Set if you have slept two nights at the Inn
- 2 : Set if you have slept four nights at the Inn
- 10 : Set if flag 110 (Katrina Geas) is set but flag 153 is not (Hearing Erasmus zap his beard while scrying)
- 75 : Set if global variable 427 was equal to 6
- 7 : Set if global variable 427 was equal to 5 and flag 115 was not set (Tanya not rescued)
- local0 use (First condition to match takes precedence)
- 11 12 13 : Also checks if global variable 123 is <= 6 and local10 is not defined -> Sets local10 and local4 to 1 (local4 spawns the Domovoi)
- 11 : Sets flag 154
- 12 : Sets flag 155
- 13 : Sets flags 156 and 144
- 5 : If global variable 427 was not at 5 your sleep is interrupted at midnight (dialogue sequence 10 6 15), local5 is set
- 1 : Hear Ad Avis and Katrina scrying on the Hero (dialogue sequence 10 6 12)
- 2 : Hear Erasmus and Fenrus trying to scry on the Hero (reference to Erasmus spying on the Dryad; dialogue sequence 10 6 13)
- 3 : Hear Ad Avis and Katrina scry again on the Hero (dialogue sequence 10 6 14)
- 4 : Set global variable 427 to 4 -> Do nothing that night but trigger next night at the Inn
- 7 : Set global variable 427 to 6 -> Do nothing that night but trigger next night at the Inn
- 75 : Set global variable 427 to 7, Erasmus and Fenrus trying to locate the Hero and musing about a Rootin' Tootin' Root Beer commercial
- 8 : Set global variable 427 to 8 -> Do nothing that night but trigger next night at the Inn
- 10 : Hear Erasmus zap his beard while scrying, flag 153 is set
- 11 12 13 : Also checks if global variable 123 is <= 6 and local10 is not defined -> Sets local10 and local4 to 1 (local4 spawns the Domovoi)
- local4 : If set, the Domovoi will appear
- local5 : Set when your sleep is interrupted
- Interruption can be caused by the Domovoi for local0 values 11 12 13
- But also by Bella weeping (dialogue sequence 10 6 16), which sets flag 136, and forces global variable 123 to be at 6 if it was >= 4, also kicking script 7 7
- local10 : Set at the same time as local4 for Domovoi related events, likely to prevent the Domovoi from spawning again -->
References
- ↑ Intro info Borrowed from https://tcrf.net/Notes:Quest_for_Glory:_Shadows_of_Darkness
Related Links