Commit Graph

107 Commits

Author SHA1 Message Date
haven1433
4b4d5fce2b Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2025-11-27 15:43:58 -06:00
haven1433
2f124c7ded update scriptReference 2025-11-27 14:02:31 -06:00
ShinyTillDawn
ec99fb1a7f Added a [[List]] for the news kinds, used in command no. 0x97. 2025-11-27 14:52:46 -05:00
ShinyTillDawn
cf51c1dd3f Bonus: nops in FireRed are also in LeafGreen. 2025-11-27 14:47:06 -05:00
haven1433
33acab052c doc update 2025-11-27 08:29:43 -06:00
ShinyTillDawn
22e60bcf86
Switched the 0x30 byte in question to 0x03. (#254) 2025-03-30 11:13:51 -05:00
haven1433
e0b8675e88 add turnobject alias for spriteface 2025-01-02 20:36:49 -06:00
ShinyTillDawn
0cc7c238fc
Additional Script Reference Changes (#206)
− Fixed the indentation for 54
− Modified the description for 5F
− Fixed a typo in 8B's name
− Added a [[List]] to the behavior param of AA
2023-12-22 17:34:22 -06:00
haven1433
e7eec2f348 spritebehave should use FacingOptions list 2023-12-12 06:44:04 -06:00
haven1433
d88aeb535f minor features
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
2023-11-29 21:54:40 -06:00
haven1433
dcc551396f msgbox.item only works in FR/LG 2023-11-29 21:03:10 -06:00
haven1433
9d9b0d7f7f update documentation to use varX instead of 0x800X for scripts 2023-11-17 22:11:19 -06:00
haven1433
32bf8d0ea4 add specialvar as an alias for special2
still prefers `special2` when decompiling scripts
2023-11-17 21:54:26 -06:00
haven1433
417383584a msgbox.item now includes actually giving the player an item.
fix bug where some macros don't decompile correctly
2023-11-17 20:05:16 -06:00
haven1433
20839f6a85 more hubol features
randomizer exclusion lists
set wild pokemon moves
2023-11-02 21:02:23 -05:00
haven1433
8efac2c6c9 more CFRU support
roaming pokemon
trainer class-based music
expanded tutors / tms
2023-11-01 22:34:00 -05:00
haven1433
545b3b316e add names for common variables
temps and vars
2023-10-28 20:36:07 -05:00
haven1433
a82a022fdc use signed values for showpokepic 2023-10-28 17:01:01 -05:00
haven1433
4771532e09 add warp.center macro 2023-10-01 14:17:47 -05:00
haven1433
5dc5706c85 re-add warp changes
lost during merging
2023-10-01 14:12:59 -05:00
PhoenixBound
2dd69848d1
Document a few script commands (#196)
* 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>
2023-10-01 14:09:20 -05:00
haven1433
8b46613dae improve map warp script commands 2023-09-30 17:42:27 -05:00
haven1433
26eae01cfa rename give.item to find.item
clear up confusion about an npc trying to give you an item vs finding an item on the ground
2023-09-06 21:58:01 -05:00
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
haven1433
067bdb0883 setfarbyte bugfix 2023-08-18 20:42:21 -05:00
haven1433
446f9b4502 only allow msgbox.instant.* macros for Emerald (relies on preparemsg3) 2023-08-13 22:12:14 -05:00
ShinyTillDawn
5f1123a230
Added the "scripts.battle.badge.obey" category. (#178)
* 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.
2023-08-02 23:23:49 -05:00
haven1433
2db6f890e9 update fadescreen 2023-08-02 23:10:35 -05:00
haven1433
23a891a5eb improve documentation for msgbox.npc 2023-07-31 20:52:32 -05:00
haven1433
6bdc9e801c fixes from merge 2023-07-20 07:04:47 -05:00
haven1433
9930f21f9e Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-07-20 07:00:07 -05:00
ShinyTillDawn
34ea580f12
Made "buffer1" through "buffer3" valid arguments. (#176)
"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.
2023-07-20 06:45:56 -05:00
haven1433
c76acd2536 improve comments 2023-07-19 21:06:04 -05:00
haven1433
435a36a535 Add human-readable documentation for scripts 2023-07-14 06:44:03 -05:00
haven1433
1fc1566d4c add comment 2023-07-09 20:23:47 -05:00
haven1433
daea25bd4e make it possible to add comments to list elements
right now the comments are only shown by the script editor. But they could be added to other things too, like maybe wild pokemon rates?
2023-07-07 08:58:16 -05:00
haven1433
6fc0f568dc Basic implementation for flag/vars show&tell
Currently hidden
2023-06-29 19:31:08 -05:00
haven1433
59fc5fc648 add multichoicegrid alias for multichoice3 2023-06-26 22:23:14 -05:00
haven1433
67506e5828 add if macros for gender/male/female goto/call 2023-06-23 20:35:39 -05:00
haven1433
e10dfb00ab fix scriptRef bugs
* fix documentation for checktrainerflag
* fix typo in if yes/no goto/call
2023-06-12 23:33:06 -05:00
haven1433
32c5c558e5 code cleanup
* 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.
2023-06-05 22:36:14 -05:00
ShinyTillDawn
08cf3a1015
Revamping the Yes/No Message Box (#165)
* 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
2023-06-05 22:28:05 -05:00
ShinyTillDawn
6eb79dac33
New trainerbattle macros (#162)
* 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>
2023-06-05 22:22:34 -05:00
ShinyTillDawn
d1e50a10b1
Added a macro for multichoice's allowCancel field. (#157)
* 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.
2023-06-03 10:30:45 -05:00
ShinyTillDawn
b2ecec72e5
Added a "movenpc" command macro. (#159)
* 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
2023-06-02 22:14:10 -05:00
ShinyTillDawn
aa9563afaa
Updated reference info in "scriptReference.txt". (#154) 2023-05-07 10:17:26 -05:00
haven1433
3c6930b527 small fixes
* 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
2023-05-06 16:33:37 -05:00
TheDiamondMiner
564b298fc2
Updated Scriptreference.txt for the new macros (#137)
* Updated scriptreference

* Amended changes
2023-03-30 09:55:56 -05:00
haven1433
fc05cd58e6 add comments explaining base commands for macros 2023-03-20 22:10:00 -05:00
ShinyTillDawn
aacd573bf6
More scriptReference.txt changes (#131)
* 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."
2023-03-16 20:55:30 -05:00