List of Script Variables: Difference between revisions
Happylappy (talk | contribs) |
Happylappy (talk | contribs) mNo edit summary |
||
| (11 intermediate revisions by 3 users not shown) | |||
| Line 19: | Line 19: | ||
=== 0x3 - SCENARIO_MAIN === | === 0x3 - SCENARIO_MAIN === | ||
Stores game progress. The first value correlates with the MAIN value (mostly aligns with the story chapter), while the second is generally used to track progress within that MAIN. | Stores game progress. The first value correlates with the MAIN value (mostly aligns with the story chapter), while the second is generally used to track progress within that MAIN. For the page detailing what these values mean, please see the [[Scenario Main Values]] article. | ||
=== 0x4 - SCENARIO_SIDE === | === 0x4 - SCENARIO_SIDE === | ||
| Line 206: | Line 206: | ||
=== 0x12 - SCENARIO_TALK_BIT_FLAG === | === 0x12 - SCENARIO_TALK_BIT_FLAG === | ||
Up through [ | Up through [140] are in use, and they primarily exist to remember if the player has already talked with an NPC (therefore playing modified or shorter dialogue the second time around). For example, every merchant in treasure town comments on the player's accomplishments (like defeating Darkrai) the first time you talk to them. Whether that conversation has happened yet is tracked with SCENARIO_TALK_BIT_FLAG. | ||
{| class="wikitable" | |||
!Number | |||
!Used By | |||
!Where's used | |||
!Notes | |||
|- | |||
|0 | |||
|N/A | |||
|N/A | |||
|Presumed Unused. | |||
|- | |||
|1 | |||
|Cafe Client | |||
|P01P04A\enter11.ssb | |||
|Used by the Cafe Client for the Gabite Mission, and the 7-Treasures Missions. In both Mission types, it's used to skip the lengthy exposition for the mission if the player declined the job earlier in the day. | |||
|- | |||
|2 | |||
|Spoink | |||
|Various | |||
|Used in all of Spoink's talk scripts. Used to remember if Spoink has given the player their helpful exploration tip about enemies not moving unless you do. | |||
|- | |||
|3-22 | |||
|Chimecho | |||
|G01P03A | |||
|Used in all of Chimecho's talk scripts. Flag 18 is unused! | |||
|- | |||
|23, 24, 26 | |||
|Dugtrio | |||
|Various | |||
|Used in all of Dugtrio's talk scripts. Flag 25 is unused! Likely related to triggering CORO_EVENT_M00_04. | |||
|- | |||
|27, 28 | |||
|Pink Celebi | |||
|D23P11A\um19 | |||
|Used in both Celebi talk scripts for the player to probe deeper about her not minding that she gets to spend more time with Grovyle. | |||
|- | |||
|29-40 | |||
|Croagunk | |||
|G01P04A\enter05.ssb | |||
|Flags 36 and 38 are unused! By mistake, 37 and 39 are used two separate times for Croagunk's dialogue! | |||
|- | |||
|41 | |||
|Cresselia | |||
|Various | |||
|Used in all of Cresselia's talk scripts. Used to remember if the player has rejected recruiting her to the team. Intended to only appear in H01P99A. | |||
|- | |||
|42 | |||
|N/A | |||
|N/A | |||
|Presumed unused. | |||
|- | |||
|43-47 | |||
|Lapras | |||
|D01P01A | |||
|Used in all of Lapras' talk scripts. | |||
|- | |||
|48 | |||
|Vigoroth | |||
|T01P02A | |||
|Used for Vigoroth to give a shortened advertisement for the Marowak Dojo. Apparently he's "sponsored". | |||
|- | |||
|49, 50 | |||
|Chatot | |||
|Various | |||
|Used in all of Chatot's talk scripts. Used for dialogue relating to the player going to Amp Plains. Intended to only appear in G01P04A. | |||
|- | |||
|51-59 | |||
|Electivire | |||
|T01P01A\enter06.ssb | |||
| | |||
|- | |||
|60-62 | |||
|Marowak (Main Story) | |||
|T01P03A\enter07.ssb | |||
| | |||
|- | |||
|63-71 | |||
|Kangaskhan | |||
|T01P02A\enter10.ssb | |||
| | |||
|- | |||
|72-83 | |||
|Green Kecleon | |||
|T01P02A\enter12.ssb | |||
| | |||
|- | |||
|84-95 | |||
|Purple Kecleon | |||
|T01P02A\enter11.ssb | |||
| | |||
|- | |||
|96-102 | |||
|Xatu | |||
|T01P02A\enter09.ssb | |||
| | |||
|- | |||
|103-109 | |||
|Chansey | |||
|T01P01A\enter07.ssb | |||
| | |||
|- | |||
|110-118 | |||
|Duskull | |||
|T01P01A\enter05.ssb | |||
| | |||
|- | |||
|119 | |||
|Pelipper (Rescue) | |||
|S01P02A\enter02.ssb | |||
|Used to remember if the player has ever been "welcomed" to Pelipper Island before after selecting "Go Rescue" on the main menu. | |||
|- | |||
|120 | |||
|Pelipper (Explore) | |||
|S01P02A\enter07.ssb | |||
|Used to remember if the player has ever been "welcomed" to Pelipper Island before after selecting "Standby Adventure" on the main menu. | |||
|- | |||
|121 | |||
|Partner | |||
|Various | |||
|Used during the main story (Main 22, before Brine Cave) to remember if the partner has told the hero they want to check back on Sharpedo Bluff for Grovyle. If enabled, this flag will activate related R-button partner dialogue and prevent the player from triggering the same "Let's go check out Sharpedo Bluff!" dialogue in T01P02A if it has already been triggered in T01P01A. | |||
|- | |||
|122 | |||
|Shaymin (Guide) | |||
|Various | |||
|Used in all of Shaymin's talk scripts throughout the mountain. Remembers if the player has rejected recruiting them to the team. Likely only intended to appear at the summit? | |||
|- | |||
|123 | |||
|Shaymin (Sky Gift) | |||
|D73P11A | |||
|Used to remember if Shaymin has told the player about Sky Gift delivery. | |||
|- | |||
|124 | |||
|N/A | |||
|N/A | |||
|Presumed unused. | |||
|- | |||
|125 | |||
|Pachirisu | |||
|Various | |||
|Used in all of Pachirisu's talk scripts. Remembers if the player has received a Sky Gift from Pachirisu or not. Likely intended to be used somewhere on the mountain. | |||
|- | |||
|126 | |||
|Marowak (Bidoof) | |||
|T01P03A\enter08.ssb | |||
|Used to remember if Bidoof has claimed Marowak's Reviver Seed in the special episode. Reset at the beginning of the episode! | |||
|- | |||
|127 | |||
|Kangakshan (Bidoof) | |||
|T01P02A\un0103.ssb | |||
|Used to remember if Bidoof has talked with Kangaskhan in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|128 | |||
|Duskull (Bidoof) | |||
|T01P01A\un0101.ssb | |||
|Used to remember if Bidoof has talked with Duskull in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|129 | |||
|Green Kecleon (Bidoof) | |||
|T01P02A\un0101.ssb | |||
|Used to remember if Bidoof has talked with Green Kecleon in the episode before. Reset at the beginning of the episode! | |||
|- | |||
|130 | |||
|Purple Kecleon (Bidoof) | |||
|T01P02A\un0102.ssb | |||
|Used to remember if Bidoof has talked with Purple Kecleon in the episode before. Reset at the beginning of the episode! | |||
|- | |||
|131 | |||
|Wigglytuff (Bidoof) | |||
|G01P05A\un0101.ssb | |||
|Used to remember if Bidoof has talked with Wigglytuff after unlocking Deep Star Cave in the episode before. Runs CORO_EVENT_N00_01 if not. | |||
Reset at the beginning of the episode! | |||
|- | |||
|132 | |||
|Bidoof (Sunflora) | |||
|G01P03A\un0401.ssb | |||
|Used to remember if Sunflora has talked with Bidoof in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|133 | |||
|Chimecho (Sunflora) | |||
|G01P03A\un0402.ssb | |||
|Used to remember if Sunflora has talked with Chimecho in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|134 | |||
|Dugtrio (Sunflora) | |||
|H01P99A\un0401.ssb | |||
|Used to remeber if Sunflora has talked with Dugtrio in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|135 | |||
|Kangaskhan (Sunflora) | |||
|T01P02A\un0404.ssb | |||
|Used to remember if Sunflora has talked with Kangaskhan in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|136 | |||
|Green Kecleon (Sunflora) | |||
|T01P02A\un0406.ssb | |||
|Used to remember if Sunflora has talked with Green Kecleon in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|137 | |||
|Purple Kecleon (Sunflora) | |||
|T01P02A\un0405.ssb | |||
|Used to remember if Sunflora has talked with Purple Kecleon in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|138 | |||
|Vigoroth (Sunflora) | |||
|T01P01A\un0404.ssb | |||
|Used to remember if Sunflora was advertised to by Vigoroth in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|139 | |||
|Team Flame (Sunflora) | |||
|G01P03A\un0405.ssb | |||
|Used to remember if Sunflora talked with Bellsprout of Team Flame in the episode before. Reset at the beginning of the episode! | |||
|- | |||
|140 | |||
|Duskull (Sunflora) | |||
|T01P01A\un0405.ssb | |||
|Used to remember if Sunflora talked with Duskull in the episode before. | |||
Reset at the beginning of the episode! | |||
|- | |||
|141+ | |||
|N/A | |||
|N/A | |||
|Presumed unused. | |||
|} | |||
=== 0x13 - SCENARIO_BALANCE_FLAG === | === 0x13 - SCENARIO_BALANCE_FLAG === | ||
Starts at 0 and gets increased as the player completes certain story events. Controls bag size, Wynaut/Spinda dungeon unlocks, and the spawn threshold value of pokémon, which restricts spawning of some species until this variable reaches a certain value. | Starts at 0 and gets increased as the player completes certain story events. Controls bag size, Wynaut/Spinda dungeon unlocks, and the spawn threshold value of pokémon, which restricts spawning of some species until this variable reaches a certain value. Is also used as a general game progression marker by other things, restriction certain mission types, the croagunk swap shop being able to contain a water float, and other things like that. | ||
==== Value changes ==== | ==== Value changes ==== | ||
| Line 383: | Line 615: | ||
DUNGEON_ENTER_INDEX is a more reliable tracker of the dungeon ID. | DUNGEON_ENTER_INDEX is a more reliable tracker of the dungeon ID. | ||
If not 215, PROCESS_SPECIAL_DUNGEON_HAD_REQUEST_DONE will assume no missions were completed without checking DUNGEON_ENTER_INDEX. | |||
=== 0x28 - DUNGEON_ENTER_MODE === | === 0x28 - DUNGEON_ENTER_MODE === | ||
| Line 403: | Line 637: | ||
|- | |- | ||
|9 | |9 | ||
|Escape Orb Used | |Escape Orb Used (Or mission cleared and left mid-dungeon) | ||
|- | |- | ||
|Other | |Other | ||
| Line 566: | Line 800: | ||
=== 0x3a - FRIEND_SUM === | === 0x3a - FRIEND_SUM === | ||
When called by LoadScriptVariableValue(), will always return 1. Seems unused outside of this. | |||
=== 0x3b - UNIT_SUM === | === 0x3b - UNIT_SUM === | ||
In a switch case, will return the number of pokemon in the active team. Cannot be written to, only read. Skytemple's Variable reader will mistakenly read this as zero, as the script variable slot itself is unused, and the number of team members is a hardcoded return from LoadScriptVariable. | |||
=== 0x3c - CARRY_GOLD === | === 0x3c - CARRY_GOLD === | ||
| Line 633: | Line 867: | ||
=== 0x45 - CONFIG_COLOR_KIND === | === 0x45 - CONFIG_COLOR_KIND === | ||
The aura bow color determined by the personality quiz at the beginning of the game. Only ever used by | The aura bow color determined by the personality quiz at the beginning of the game. Only ever used by Wigglytuff to determine the color of the aura bow given to the player. | ||
=== 0x46 - ROM_VARIATION === | === 0x46 - ROM_VARIATION === | ||
| Line 761: | Line 995: | ||
=== 0x55 - WORLD_MAP_MARK_LIST_NORMAL === | === 0x55 - WORLD_MAP_MARK_LIST_NORMAL === | ||
Is adequately sized for the number of World Map Markers. Presumed Unused. | |||
=== 0x56 - WORLD_MAP_MARK_LIST_SPECIAL === | === 0x56 - WORLD_MAP_MARK_LIST_SPECIAL === | ||
Is adequately sized for the number of World Map Markers. Presumed Unused. | |||
=== 0x57 - WORLD_MAP_LEVEL === | === 0x57 - WORLD_MAP_LEVEL === | ||
| Line 782: | Line 1,016: | ||
=== 0x5c - EVENT_LOCAL === | === 0x5c - EVENT_LOCAL === | ||
Used as scratch paper by the base game, and is reset between scripts. | Used as scratch paper by the base game, and is reset between acting scripts. | ||
=== 0x5d - DUNGEON_EVENT_LOCAL === | === 0x5d - DUNGEON_EVENT_LOCAL === | ||
| Line 808: | Line 1,042: | ||
Unlikely to be a backup flag. Conveniently sized for item_GetVariable to extract the item ID and metadata. | Unlikely to be a backup flag. Conveniently sized for item_GetVariable to extract the item ID and metadata. | ||
Used | Used exclusively by the debug town. Unused in the context of vanilla EoS. | ||
=== 0x65 - ITEM_BACKUP_KUREKURE === | === 0x65 - ITEM_BACKUP_KUREKURE === | ||
| Line 838: | Line 1,072: | ||
=== 0x6e - TEAM_RANK_EVENT_LEVEL === | === 0x6e - TEAM_RANK_EVENT_LEVEL === | ||
Updated by message_Menu(76) to the current guild rank. In vanilla, this only seems to happen on clearing a mission. | |||
=== 0x6f - PLAY_OLD_GAME === | === 0x6f - PLAY_OLD_GAME === | ||
| Line 844: | Line 1,078: | ||
=== 0x70 - NOTE_MODIFY_FLAG === | === 0x70 - NOTE_MODIFY_FLAG === | ||
If true, the player will be forced to save on leaving Pelipper island. Likely indicative of whether a rescue has been attempted? | |||
=== 0x71 - SUB30_PROJECTP === | === 0x71 - SUB30_PROJECTP === | ||