Commit Graph

6 Commits

Author SHA1 Message Date
ShinyTillDawn
9ce2b6cd10
Updating script references (#191)
* 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
2023-08-22 23:40:25 -05:00
ShinyTillDawn
f108a05f96
Implemented 8 feature requests or so (#113)
* Implemented 8 feature requests or so

- fixing money cap description
- updating trainer AI script command parameters so names of types/moves can be used
- updated various font anchors
- made lists for trainer AI scripts
- added floor names for FRLG

* Fixed ability field oversight

IDK how I had the ability field use the type field.
2023-03-05 22:37:16 -06:00
haven1433
c4dba402cb battlescript bugfixes 2022-12-22 17:26:35 -06:00
haven1433
a44841290f first pass at updating script pointer logic
instead of the script line itself knowing that it points to something,
pull it down to the argument level, so that each argument knows
if it points to something.

This will allow a single script line to point to multiple things (like trainers pointing to multiple text or scripts)
2022-12-02 08:38:21 -06:00
haven1433
d350c6bfa9 fix ai scripts for emerald 2022-11-22 08:52:52 -06:00
Haven1433
ee28bc8a02 initial ai script support 2022-09-12 20:23:40 -05:00