List of Script Variables: Difference between revisions

Delta L (talk | contribs)
Documented SPECIAL_EPISODE_CONQUEST.
Happylappy (talk | contribs)
Did some preliminary research and documentation on $SCENARIO_MAIN_BIT_FLAG. A lot of these were pretty easy to identify, especially the sky peak ones.
Line 9: Line 9:


=== 0x1 - CONDITION ===
=== 0x1 - CONDITION ===
Completely unused. Purpose unknown...


=== 0x2 - SCENARIO_SELECT ===
=== 0x2 - SCENARIO_SELECT ===
Line 45: Line 46:


=== 0x10 - SIDE01_BOSS2ND ===
=== 0x10 - SIDE01_BOSS2ND ===
True if Snover has betrayed bidoof in Special Episode 1. Used to determine whether Snover will be an ally in Star Cave or not.


=== 0x11 - SCENARIO_MAIN_BIT_FLAG ===
=== 0x11 - SCENARIO_MAIN_BIT_FLAG ===
Has many purposes, sometimes have hardcoded or technical effects, but not always. Here's a few I know off the top of my head:
- [0]: Not in unionall. Unsure
- [1]: Has something to do with partner.ssb and partner2.ssb
- [2]: Not in unionall. Unsure
- [3]: Will end the current day if EVENT_DIVIDE is run.
- [4]: Similar to 3, I think it related to missions in some way?
- [6], [7], [8]: Used to remember how the game was saved last.
- [9]: Not in unionall. Unsure
- [10]: Chatot tells the player to do jobs on the job board today. I think...
- [11]: Chatot tells the player to do sentry duty today.
- [12], [13]: Marowak Dojo First Entry/ Final Maze Opening
- [14] through [28]: Unsure, not in unionall!
- [29]: Referenced in GETOUT_REQUEST_RETURN.
- [30]: Seems to be used in TITLE_TEST to... distinguish between Time and Darkness???
- [31] through [41]: Unsure, not in unionall
- [42]: Used for... something in EVENT_DIVIDE_AFTER.
- [43], [44], [45]: ICE, ROCK, and STEEL puzzles solved in Aegis Cave
- [46]: Unknown. Proooobably between Aegis Cave and Sky Peak in plot?
- [47], [48], [49]: Used to remember the progression state of Ampharos giving you Sneasel's Sky Gift on Sky Peak. [47] means the conversation happened (if the bag is full, Ampharos will hold onto the gift for you to pick up later), [48] means the gift was claimed, and [49] means the gift was claimed AND the player has left the room after receiving the gift. (so Ampharos will revert to their default dialogue).
- [50], [62]: Wigglytuff Sky Gift in transit/ready to be claimed
- [51], [63]: Chatot Sky Gift in transit/ready to be claimed
- [52], [64]: Diglett Sky Gift in transit/ready to be claimed
- [53], [65]: Dugtrio Sky Gift in transit/ready to be claimed
- [54], [66]: Sunflora Sky Gift in transit/ready to be claimed
- [55], [67]: Loudred Sky Gift in transit/ready to be claimed
- [56], [68]: Corphish Sky Gift in transit/ready to be claimed
- [57], [69]: Chimecho Sky Gift in transit/ready to be claimed
- [58], [70]: Bidoof Sky Gift in transit/ready to be claimed
- [59], [71]: Croagunk Sky Gift in transit/ready to be claimed
- [60], [72]: Partner Sky Gift in transit/ready to be claimed
- [61], [73]: Happiny Sky Gift in transit/ready to be claimed
(Happiny is a Random NPC that can show up at station passes, and requests an item. Will give a Sky Gift in gratitude)
- [74], [75], [76], [77]: Happiny will request an item from the player at 1st/3rd/5th/7th Station Clearing. Normally a 50% chance.
'''HOWEVER''': If ITEM_BACKUP_TAKE happens to roll into the same item as ITEM_BACKUP_GET (which would suggest Numel was set to give you the same item back that you traded them), Happiny will always spawn on the 1st Station Clearing. This does not appear to affect Numel spawning, which may be a bug. (Also this apparently can't ever happen???).
- [78], [79], [80], [81]: Numel will swap items with the player at 1st/3rd/5th/7th Station Clearing. 50% chance to choose one at random at beginning of the day (?)
- [82]: Numel has been traded with today.
- [83], [84], [85], [86], [87]: Jumpluff bearing a free Sky Gift is on 1st Station/3rd Station/5th Station/7th Station/Summit Clearing.
- [88]: Jumpluff's Sky Gift has been claimed today.
- [89]: Delibird bearing a free Sky Gift is on 9th Station Clearing. 50% chance to show up each day.
- [90]: Delibird Sky Gift has been claimed today.
- [91]: Not in unionall. Unsure.
- [92]: Bottle will show up on the beach. 10% chance each day.
- [93]: Client will show up in Spinda's Cafe. 80% chance each day.
- [94]: Seems to be reset each morning?
- [95]: Ursaring believes hero and partner can evolve!
- [96]: Krabby Beach Bottle cutscene has played
- [97]: Chimecho demands recruits be allowed to hang out at the cafe
- [98] through [127]: Not in Unionall. Some may be unused?


=== 0x12 - SCENARIO_TALK_BIT_FLAG ===
=== 0x12 - SCENARIO_TALK_BIT_FLAG ===
Up through [200] are in use, and they primarily exist to remember if you've already talked with an NPC (therefore playing modified or shorter dialogue the second time around). For example, every merchant in treasure town comments on your accomplishments (like defeating Darkrai) the first time you talk to them. Whether that conversation has happened yet is tracked with SCENARIO_TALK_BIT_FLAG.


=== 0x13 - SCENARIO_BALANCE_FLAG ===
=== 0x13 - SCENARIO_BALANCE_FLAG ===
Line 221: Line 320:


=== 0x29 - DUNGEON_ENTER_INDEX ===
=== 0x29 - DUNGEON_ENTER_INDEX ===
Is written on selecting a dungeon from the crossroads (and probably elsewhere). Generally used by the base game to remember the dungeon ID that the player is about to enter or has just exited.


=== 0x2a - DUNGEON_ENTER_FREQUENCY ===
=== 0x2a - DUNGEON_ENTER_FREQUENCY ===
Line 373: Line 473:


=== 0x4f - DUNGEON_OPEN_LIST ===
=== 0x4f - DUNGEON_OPEN_LIST ===
List of unlocked dungeons. One bit per dungeon ID.
List of unlocked dungeons. One bit per dungeon ID. If true, and the dungeon isn't on some blacklist, you can enter this dungeon from the crossroads/dojo/igglybuff's house/pelipper standby adventure.
 
Setting a dungeon to DMODE_OPEN or DMODE_OPEN_AND_REQUEST enables the matching bit in this field!


=== 0x50 - DUNGEON_ENTER_LIST ===
=== 0x50 - DUNGEON_ENTER_LIST ===
Line 380: Line 482:


=== 0x52 - DUNGEON_CONQUEST_LIST ===
=== 0x52 - DUNGEON_CONQUEST_LIST ===
List of completed dungeons. One bit per dungeon ID.
List of completed dungeons. One bit per dungeon ID. Automatically set on clearing any dungeon.
 
In many cases, this bitfield renders other flags or variables redundant in a vanilla setting, especially certain $PERFORMANCE_PROGRESS_LIST flags that are always enabled after clearing certain dungeons for the first time.  


=== 0x53 - DUNGEON_PRESENT_LIST ===
=== 0x53 - DUNGEON_PRESENT_LIST ===


=== 0x54 - DUNGEON_REQUEST_LIST ===
=== 0x54 - DUNGEON_REQUEST_LIST ===
List of dungeons that no longer have story progression. On completing a dungeon with this bit enabled, the player will enter [INSERT THE RIGHT COROUTINE HERE] in unionall.
Setting a dungeon to DMODE_REQUEST or DMODE_OPEN_AND_REQUEST enables the matching bit in this field!
Contrary to the name, this field alone is insufficient for missions to show up on the job board! Only dungeon in DMODE_OPEN_AND_REQUEST can have missions, and other (hardcoded) conditions must be met.


=== 0x55 - WORLD_MAP_MARK_LIST_NORMAL ===
=== 0x55 - WORLD_MAP_MARK_LIST_NORMAL ===
Line 426: Line 535:


=== 0x65 - ITEM_BACKUP_KUREKURE ===
=== 0x65 - ITEM_BACKUP_KUREKURE ===
Used somewhere in Sky Peak
Happiny requests the item stored in this variable if found on Sky Peak. Pulled from an item table each day (?)


=== 0x66 - ITEM_BACKUP_TAKE ===
=== 0x66 - ITEM_BACKUP_TAKE ===
Used somewhere in Sky Peak
Numel requests the item stored in this variable if found on Sky Peak. Pulled from an item table each day (?)


=== 0x67 - ITEM_BACKUP_GET ===
=== 0x67 - ITEM_BACKUP_GET ===
Used somewhere in Sky Peak
Numel gives this item stored in this variable if found on Sky Peak. Pulled from an item table each day (?)


=== 0x68 - REQUEST_THANKS_RESULT_KIND ===
=== 0x68 - REQUEST_THANKS_RESULT_KIND ===
Line 464: Line 573:
=== 0x401 - LOCAL0 ===
=== 0x401 - LOCAL0 ===
Unknown if used in vanilla, is reset on entering a new script like $EVENT_LOCAL.  
Unknown if used in vanilla, is reset on entering a new script like $EVENT_LOCAL.  
NOTE: Is unique for every routine in a script! $LOCAL0 in ``def 0`` is distinct from $LOCAL0 in ``def 1``!


=== 0x402 - LOCAL1 ===
=== 0x402 - LOCAL1 ===
Unknown if used in vanilla, is reset on entering a new script like $EVENT_LOCAL.  
Unknown if used in vanilla, is reset on entering a new script like $EVENT_LOCAL.  
NOTE: Is unique for every routine in a script! $LOCAL1 in ``def 0`` is distinct from $LOCAL1 in ``def 1``!


=== 0x402 - LOCAL2 ===
=== 0x402 - LOCAL2 ===