add teachy-tv table
add comment explaining how ListMenu works. Add table that ListMenu uses.
setweather takes a weather enum now instead of a number
setworldmapflag values are displayed in hex, and no longer offer flag-picking since it's a different list of flags
choose-save background palette
* Document a few script commands
* Undo change to initclock parameters
Variable numbers will display in hex even without a |h, so this change
was misguided.
---------
Co-authored-by: haven1433 <haven1433@gmail.com>
* Specified the formatting of some ptr<> fields.
I wasn't too sure about the "virtualbuffer" command, so I left it untouched.
* A few preliminary changes
Script command 0x10 should be "loadbyte" instead of "setbyte2," but based on the official description of the command, "setbyte" makes more sense over "loadbyte".
I kept the old names & comments for "jumpram" and such.
I also made the last 6 commands or so in battleAIScriptReference.txt exclusive to Emerald via the [BPEE] tag as those are only defined in Emerald, not the older games.
* Changed "resetvars" to "gettime."
* Replaced "playsong2" with "savesong".
* Switched commands 4D and 4E.
Both "checkdecoration" and "testdecoration" were in the wrong places. The pokéemerald decomp puts "checkdecor" at command 4D while "checkdecorspace" ("testdecoration") is positioned at command 4E.
* Corrected applymovement2's parameters.
Because the 2 bytes after the pointer in "applymovement2" actually correspond to map data, supplying invalid maps (thinking that they were bytes for the next few commands) could lead to bugs.
* Did the same treatment with "waitmovement2."
I also made sure that "bank" comes before "map" for both commands.
* Multiple changes
- Replaced more instances of x & y when they should be bank & map.
- Clarified what "spriteinvisible" and "spritevisible" do.
For commands like "hidesprite" and "showsprite", the decomps call them "removeobject" and "addobject," respectively. Those deal with flags while "spritevisible" and "spriteinvisible" deal with some other attribute.
* Added more info to the "repeattrainerbattle" cmd.
* Clarified the description for "waitkeypress".
* "showbox" and "clearbox" are a nop in Emerald.
* Added a description for "preparemsg2."
* Adjusted the descs of "cry" and "sethealingplace."
* Updated some descriptions.
Commands B1 & B2 are actually nops in Emerald, not RS. Either way, they were unused in RS. The "addelevmenuitem" command actually takes in 4 parameters.
* Added descriptions for "hidecoins" & "updatecoins"
* Added more descriptions.
* Added descriptions for commands D8 and D9.
* Finishing touches
* Added the "scripts.battle.badge.obey" category.
Credit to Axcellerator for finding these offsets.
For the life of me, I could not link the flags table to the other 4 new anchors.
Since all of these are part of a THUMB routine, nothing points to these individual anchors, so I had to put them here.
The 0badges to 6badges anchors link to each other, so that's why 3 of them do not have a 1 after their [level.] formatting.
* Fixed a typo from a merge-fix commit.
* Added obedience anchors for FireRed/LeafGreen 1.0.
I tested these, and they seem to work and load correctly.
* Added obedience anchors for FireRed/LeafGreen 1.1.
* Added obedience anchors for Ruby & Sapphire.
I tested it, and these 5 additions work universally for AXVE0, AXVE1, AXPE0, and AXPE1.
"buffer1" is associated with 0 for a parameter in a command like "buffernumber." That misalignment by 1 can cause some confusion, so this change will allow the word "buffer1" to be used instead of 0 for such commands to line up with the \\ 02 text macro ([buffer1]) that would be used afterwards.
* Remove the `compact` macro, since it's just a combination of 3 macros that each make sense by themselves. The goal for macros is to put them in situations where you wouldn't ever want the command by itself.
* Move the `if` macros down to live with the other `if` macros.
* The `(` symbol has been moved.
This was supposed to go in the previous pull request, but I was too late...
* Added another `msgbox.yesno` macro.
No testing has been done yet.
* Added if.yes & if.no macroes.
Caution: These macroes will show up unintentionally if you're using commands other than msgbox.yesno that involve comparing the last result variable (800D) with the literal number 1.
* Fixed the `ptr` pointer format.
my bad
* Configured the macroes.
* Added comments to the macros.
They seem all jumbled up.
* Added corresponding cmds. for trainerbattle 0−8.
Testing needs to be done to make sure they work atm.
* Updated trainerbattle 09 & 0C.
though trainerbattle 09 will need another change.
* Added trainerbattle 09 types based on a bit field.
Right-most bit: Whether or not the player can lose
Second-right-most bit: Tutorial battle w/ Professor Oak
Based on the combinations of bits, I added more variants to FRLG's `trainerbattle 09` command.
* LocalIDs are correctly filled in as 1/2-words now.
My bad
---------
Co-authored-by: haven1433 <haven1433@gmail.com>
* Added a macro for multichoice's allowCancel field.
0 = the game does not ignore B presses (OK to cancel out)
1 = the game ignores B presses (forbid canceling out)
* Clarified by adding "Cancel" to each option.
* Added "movenpc" command.
The exact things will be subj to change.
* Fixed "move.npc" and added "move.player."
I'll need to test these soon.
* Switched the order of 2 command macroes.
Switched the order of move.player and move.npc.
* Fixed the move.player command macro.
I can't specify base-10 numbers to hard code, apparently.
* Added the "move.camera" macro.
* Each new movement macro has 2 lines of flavor text
* fadescreen should use screenfades list
* map object graphics should use overworld sprites enum (allows finding events from the overworld sprites table)
* change field name from 'unused' to 'padding' for final part of object event data
* Correctly fixed the domains of script commands.
According to the 3 decomps' "script_cmd_table.inc" file, Ruby/Sapphire's last command is at index C5 while FireRed/LeafGreen's last command is at index D4. Thus, I updated the file so that valid commands would only show up if you're editing a game with which said commands would be valid.
ex. preparemsg3 no longer shows up as a valid command in FR/LG.
* Found out the parameter for fadescreen3.
Thank you decomps!
I'm not sure if the "mode.screenfades" parameter is the same for the "fadescreen" command.
* Updated "trainerbattle" & other scripts' comments.
Added some comments to clarify some unknowns in commands 5E, 5F, and 65.
I also fixed some comments and unknown pointers in the trainer battle commands.
* More minor comment fixes.
I mean the word "not" in the comments for commands 4D & 4E. The commands are technically not "nop"s in the code, but the edit to 0x800D is commented out.
* Clarified warp descriptions & other commands.
- Warp commands have more descriptive comments.
- Changed FRLG's description for "nop2C."
- Added another way to fill in the "condition" parameter for "gotostdif" and "callstdif" to make it more in line with "if1" and "if2."