Commit Graph

937 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
haven1433
99d42f3385 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2025-11-27 08:27:31 -06:00
haven1433
18c0c52b6c fixing bugs from discord 2025-07-20 14:20:13 -05:00
ShinyTillDawn
ffcfbf7fd8
Added the constant for what level eggs hatch at. (#272)
* Started adding the egg-hatch level constants.

Added the offsets for Ruby & Sapphire so far. These addresses are all the same, apart from v1.1 increasing all of them by 0x20.

Credits: Jambo51 and VersekrDark (with the help of ModExe Ruby)

The anchor name could change.

* Added the lines for FireRed, LeafGreen, & Emerald.

I also specified the domain of valid levels in the comments. According to the PokéCommunity thread (linked in the Pull Request description), the game bugs out when choosing a constant greater than 100.

Credits: Jambo51 & Wobbu
2025-07-16 22:04:53 -05:00
ShinyTillDawn
c8771895d2
Roaming Pokémon sets in FireRed, LeafGreen, and Emerald (#268)
* Added `data.maps.roaming.sets` for Emerald.

It's called `sRoamerLocations` in the decomps. Looks like there are 6 locations per major table entry instead of 7.

* FireRed & LeafGreen: Location params use map names.

Each location parameter references a map name instead of showing a literal now.
2025-07-11 09:17:08 -05:00
ShinyTillDawn
18762eba75
Added some Battle Pike & Resort Gorgeous table anchors. (#267)
* Added level 50 & open level battle pike tables.

All 8 anchors have the same formatting.

* Added the Resort Gorgeous rewards table anchor.

* Added the `scripts.elevator.floor` anchor.

I tested this, and these anchors work as intended, as well.
2025-07-11 09:16:07 -05:00
ShinyTillDawn
f52ca66768
Implemented a few more feature requests. (#266)
* Hold Effects Table: 1st param. references a table.

* Renamed "bag.inside3" to "bag.pokemart".

Requested by 1RWT16KU1D.

* Made a certain table's Trigger field a hex field.

I have not tested this yet. There's a chance this could lead to metadata irregularities.

* Added Emerald's vrsn. of the town map annotations.

Testing on a fresh ROM will commence shortly.

* Lowered the length of `scripts.text.destinations`.

The correct length is 8, not 14.

* Fixed a failed test involving an anchor change.

With `graphics.bag.inside.3.palette` and company renamed, the relevant assertion in `Upgrades.cs` should now succeed correctly. I just needed to supply the old names in one spot and the new names in another spot.

* Added the banlist for FireRed & LeafGreen.

This is for the battle tower.
Requested by Sylinuser.

* Added the same banlist for Ruby & Sapphire.
2025-06-27 10:36:43 -05:00
ShinyTillDawn
22e60bcf86
Switched the 0x30 byte in question to 0x03. (#254) 2025-03-30 11:13:51 -05:00
haven1433
28bf92ce07 fix broken name for first person views 2025-01-05 11:05:16 -06:00
haven1433
207b0bd657 fix directions list
cannot have multiple names with the same index
2025-01-03 20:53:54 -06:00
haven1433
e0b8675e88 add turnobject alias for spriteface 2025-01-02 20:36:49 -06:00
Francesco Cariaggi
86389fa98d
Add partial support for Italian Fire Red (#240)
* partial support for Italian Fire Red

* minor tweaks
2025-01-01 20:53:08 -06:00
ShinyTillDawn
855959435f
A variety of changes related to HUBOL (#222)
* Updated HUBOL's move names count to 896.

Previously, two "Rapid Flow" moves were left out of the hard−coded formatting.

Testing will be required.

* Fixed a typo in the "trainerabilities" variable.

* Added HUBOL's move effect options.

Yak Attack's feature request.

The code could be improved so that it replaces the vanilla move effect options [[List]].

This code has not been tested yet.

* Fixed the indentation.

* Removed all `\t`s in favor of spaces.

* Added the code to update the "effectiveness" list.

This is if the CFRU was detected.

* Added the code to add the type chart anchor.

Address 145BB74 is the anchor reference pointer, not the location of the anchor itself.

This should be updated as `AdjustFormatForCFRU()` makes its initial call.

* Readded C9 Btl. Script alias. Fixed syntax errors.

The `jumpifattackandspecialattackcannotfall` alias no longer throws a compiler error due to its length, so it's fair game to readd it.
The other syntax errors came from implementing more things for HUBOL's metadata.

* Fixed the move effects [[List]] generation.

The existing code did not account for all of the new move effects, and the list added earlier was not completely accurate. Now, the move effect names _should_ be correct.

Some of the move effects (like Endure) are unused in HUBOL's _moves,_ but they're still used in some tables referenced by the vanilla AI.

* Optimized the code for two [[List]]s.

* Removed some comments.

* Optimized the code for making the type chart taЫe.

* Added Decorate's move effect to the metadata.

Decorate uses its own move effect (#245), and that was previously overlooked.
2024-06-04 21:44:11 -05:00
haven1433
5fb94334b6 fix move relearner after move expansion 2024-06-03 08:56:39 -05:00
haven1433
9bb6dee9af Script discovery logic improvement
During the first pass, scripts that are detected that are earlier than the current script are given a length of 1 to prevent recursion.
The script parser can now produce a second pass on these addresses if they're recognized as scripts, to make sure that the full script gets concatenated rather than truncated to the first command.
2024-06-02 11:13:09 -05:00
haven1433
75d5f339ba show error for short-form macros with too many args 2024-06-01 13:26:23 -05:00
haven1433
953d4e786e documentation update 2024-06-01 12:46:42 -05:00
haven1433
eeb7383549 update firered movementtypes 2024-05-30 15:50:14 -05:00
haven1433
8ce21a3e95 validate that script macros that expect the same value in multiple args only apply if all the args actually have the same value 2024-05-30 11:12:48 -05:00
haven1433
4e7dce1864 fix value==int.MinValue bug in script parsing 2024-05-30 11:12:19 -05:00
haven1433
5154d05f63 improve script command parsing logic
account for macros in linecode matching logic
2024-05-30 09:57:49 -05:00
ShinyTillDawn
ad4aeab057
Implemented 7 feature requests. (#221)
* Updated the battleOptions observable collection.

Axcellerator's feature request.
I updated the third & fourth option and reformatted the last option. Separating these lists for the Kanto & Hoenn games would be useful, though challenging to implement, I think.

* Two table reference touch-ups

Made the pokemonOffset & trainerOffset fields in Emerald's `data.pokedex.stats` unsigned.

Made the worldmapflag in the `graphics.overworld.firstpersonview.sprites` table show as a base-16 number.

* A 3rd table reference touch-up

Updated the back throw anchor's fields from a, b, c to size, index.

* A fourth and fifth table reference touch-up

Yogia's feature request: Implement a fixed `data.famechecker.trainerpics` anchor.

RedKraken's feature request: Implement an anchor for the PC script.

As for the name, there's only 1 `pc` subdirectory under `scripts`, and it's under `newgame`, so that's where it was located. However, this new anchor name can be adjusted.

* The final feature request in this pull request

In `scriptReference.md`, parameter fields that format numbers as entries from a named anchor will have the words "is from" instead of just "from."
2024-05-30 07:56:03 -05:00
haven1433
cb13a6d153 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2024-05-29 21:25:32 -05:00
haven1433
dc18c138ea add capability of split-byte arguments for scripts
We want a macro that can "set the current move" for use in battle scripts, for setting how the animation should work. This needs to set a low-byte high-byte pair based on a move id, which requires 2 separate commands. In order for this macro to work, the code needs to be able to read the two split bytes as a single value, and write the single value as 2 split bytes. This is now supported.
2024-05-29 21:24:14 -05:00
haven1433
a532f72ced battle scripts can end with handleballthrow, finishaction, and finishturn 2024-05-29 19:05:53 -05:00
ShinyTillDawn
142f053d2f
Updated default.bprf0.toml. (#219)
Credit to Payst for providing the updated information.
2024-05-29 18:49:48 -05:00
ShinyTillDawn
10534d6cc0
Added missing Emerald anchors for the idle levels. (#218)
These existed for FireRed & LeafGreen, but the ones for Emerald have recently been found.
2024-05-29 18:49:02 -05:00
ShinyTillDawn
f93945a9e6
AI Script Reference Touch-Ups and Battle Script Aliases (#217)
* AI Script Reference Touch−Ups

* Battle Script Aliases

* Command C9's alias was removed.

It's because it doesn't work in HMA.
2024-05-29 18:47:57 -05: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
d4d1247290 item expansion script 2023-12-08 14:11:32 -06:00
haven1433
289d3f7e00 add newgame heal respawn location constants for FR/LG 2023-12-08 10:48:56 -06:00
haven1433
8d68e709b1 decompile comments for ldr commands that load from pc offset 2023-12-08 10:33:15 -06:00
haven1433
ed7c1760f8 fix table length for emerald overworld sprites 2023-12-07 22:11:05 -06:00
haven1433
d3d2ab7656 add constant for overworld length for R/S
with this change, it should now be safe to expand R/S/FR/LG overworld sprite tables up to 240 elements each. Emerald is already the maximum length.
2023-12-04 23:11:54 -06:00
haven1433
d6cbc68d28 fix typos 2023-12-04 06:56:52 -06:00
haven1433
c2c968920f bugfixes
parse "rX = <anchor>" correctly
2023-12-01 12:26:09 -06:00
haven1433
b7f5a3cad6 make data.battle.text expandable (FR/LG)
the constant in R/S/E has a `lsl 1` on it, so the table cannot be naturally expanded. It may be better to just remove the limiter, which is near the 2nd-to-last pointer to the table.
2023-12-01 10:44:06 -06:00
haven1433
fab59ae727 minor bugfixes
xor as an alias for eor
r1 >>= 2 should compile correctly
fix crash when writing thumb code
2023-12-01 10:43:01 -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
7dccc53e53 fixing bugs
script args should be able to handle <null>
don't add/remove runs inside the method that isn't supposed to touch the runs collection
handle race condition where UI may be aware of tab being removed before ViewModel gets a chance to notify it
fix bounds checking in map editor collision counting
better default value for newly added map script tables
fix width/height double-check when failing to import multi-sprites
fix cutoff text
fix spelling error
2023-11-27 23:29:44 -06:00
haven1433
69e03b7c08 use script variables for specials documentations 2023-11-17 22:19:39 -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
7aacb8ef27 Script compare: Prefer == over =, but make sure = still works
Also fix a bug where "abc" was preferred over "cde" if we're looking for a partial match of "c". Prefer matching the start of the text.
2023-11-17 21:48:35 -06:00