Commit Graph

446 Commits

Author SHA1 Message Date
Haven1433
cd904b27f5 XSE was wrong, command 0x7B is for setting moves, not setting pp 2022-03-05 22:46:13 -06:00
Haven1433
cc0406a06d Read 0x prefix as hex when compiling multi-args
Also read 0X and $ as hex.
2022-02-19 20:53:57 -06:00
Haven1433
285d9ffc79 add missing palette page for summaryscreen 2022-02-19 20:06:09 -06:00
Haven1433
b1d599098b call points to the next script 2022-02-18 21:51:18 -06:00
Haven1433
f5f16166bd Use 0x prefix for hex values in group arguments 2022-02-18 21:51:03 -06:00
Haven1433
c4ac09a5a9 createsoundtask arguments were wrong 2022-02-18 21:50:34 -06:00
Haven1433
734bc11f49 animation scripts call param is a pointer 2022-02-18 21:50:17 -06:00
Haven1433
a25a2e0ce6 Update playsong parameters
The second parameter makes the song play once or continuously
2022-02-08 07:27:16 -06:00
Haven1433
71c8d1ce6f Update exp boost constants
Change the names based on a suggestion from Egg Lemon Soup, and fix the fact that the Ruby constants were mislabeled. Add the trainer-battle exp boost (pokemon get more exp from trainer battles compared to wild battles.
2022-01-29 20:51:40 -06:00
Haven1433
d8f7ca296e fix emerald map field
emerald doesn't have a width/height field for the border block
2022-01-24 21:46:50 -06:00
Haven1433
ecfb990fb0 Verify that scripts can parse negative word values 2022-01-08 19:53:32 -06:00
TheDiamondMiner
45c6a96a69
Feature Request: Male and Female values for Trainer Gender (#83)
* Added MALE and FEMALE values for trainergender.
* Added Male and Female options for  trainer gender
2021-12-26 12:16:23 -06:00
Haven1433
bd9cc28777 Link pokedex/sound tables to other tables
Make it so that we only need to extend the pokemon and pokedex, everything else comes for free.
2021-12-18 20:24:00 -06:00
Benjamin Popp
d1b22e8d08 update boxes menu palettes
Research shows that the addresses and dimensions graphics.menu.boxes.picker.tilemap  _are_ correct. However, HMA is unable to display the tilemap corrrectly, because the tilemap assumes that the tileset in question starts at tile 0x100 instead of tile 0x00. This is similar to how palettes can start at page 3 or 4 instead of having to start at page 0, and should probably be handled in a similar fashion, with the tileset being aware of its own offset.

HMA cannot handle this right now, so the tilemap is commented and untested.
2021-12-18 20:23:59 -06:00
Benjamin Popp
a8831e1df5 FireRed Pokemon Expansion now works right for pokemon/pokedex, but not flags
Current test process:
* Run utility
* Increase pokemon by 10.
* Increase pokedex.stats by 10.
* sound.pokemon.cry.growl and sound.pokemon.cry.normal -> expand by 10
* update pokemon name, import a sprite, change catch rate to 255, set a new pokedex description
* reorder pokedex and change wild/87 to see new wild pokemon
* expand one of the habitats (example, data.pokedex.habitat.pages/"Grassland POKéMON"/data/2/pokemon)
-> check data.pokemon.count and data.pokedex.count -> are they updated automatically?
-> test:
-> can catch the pokemon, shows right entry on capture.
-> shows up right in the dex
2021-12-18 20:23:59 -06:00
Benjamin Popp
5c75592f21 First pass at pokedex expansion
This still doesn't work right, but this changes all of my current notes into code, as well as adding some more TODOs about things I need to care about.
2021-12-18 20:23:58 -06:00
Benjamin Popp
0ba51d5b00 first pass at pokemon expansion (FireRed only)
only includes what addresses need to be update to remove pokemon count limiters. Does not update Hall of Fame, or Pokedex, or ram bits.
2021-12-18 20:23:57 -06:00
Haven1433
f78b59837c add new terrain-move related tables from AGSMG 2021-12-18 20:15:59 -06:00
Haven1433
c9aaa8b4ba Improve script decompile hex logic
* Allow a value to be shown in hex if it's an out-of-range enum value
* Have values default to hex if they're >= 0x4000
2021-12-14 07:40:42 -06:00
Haven1433
c1d56fdfa4 Allow register/number <<= operation in thumb
Create a command that is an alias, so the user only has to write one register if they're doing a <<=
2021-12-10 11:09:46 -06:00
Haven1433
6964471f77 add more fonts 2021-12-09 20:54:16 -06:00
Haven1433
c3ad9d3927 Expand a += b to a = a + b for low register instructions
The behavior of the += version of `add` is undefined if both registers are low registers. In this case, we need to patch the instruction to replace it with the more traditional 3 register version: a = a + b.
2021-12-07 20:01:12 -06:00
Haven1433
907a3c3b15 priority can be negative 2021-11-30 22:02:04 -06:00
Benjamin Popp
cf8da71e5b Use base 10 for scripts
base-16 values can be entered by prefixing with 0x or $.
base-16 values will be output by the script parser if the argument is suffixed with |h
All other values will now naturally decompile to base-10.
2021-11-29 07:30:32 -06:00
Benjamin Popp
ed60df5566 fix issue with french firered 2021-11-18 14:41:33 -06:00
Benjamin Popp
80d377017c Use pokeball icon for Ruby/Sapphire item shortcut, rather than shopkeeper sprite. 2021-11-15 08:40:25 -06:00
Benjamin Popp
8a01ad4a4d add palettes for elite 4 before-battle mugshots
It also includes the palette for the background (boy vs girl)
Thanks to Scyrous for these.
2021-10-31 22:15:14 -05:00
Benjamin Popp
cbbb7c1551 add emerald trainer badges 2021-10-25 19:54:37 -05:00
Benjamin Popp
7ecf61ccd5 add list for growth rates 2021-10-19 21:07:47 -05:00
Benjamin Popp
1972361c2b Notify OW width/height changing when changed from stream
Notification previously worked when changing via the main view or when changing via an element in the table tool. But notification didn't work right for stream deserialization, since the stream wasn't aware of what was changing.

Now, all write-data-to-model methods return a flag expressing whether or not they actually wrote any data. This makes it possible for streams to know which elements of the stream were changed, which means notification now works correctly.

Note that we are not notifying for compressed data changes or whenever a new stream is created from scratch.
2021-10-18 22:50:42 -05:00
Benjamin Popp
73d44cd729 Add trainer throw sprites for R/S 2021-10-12 16:31:39 -05:00
Benjamin Popp
e99f6f0a04 Get goto shortcuts from toml 2021-10-10 20:51:55 -05:00
Benjamin Popp
d52c8a7819 Correctly parse delay-load values with offsets 2021-10-04 16:22:52 -05:00
Benjamin Popp
ec027fb05c Fix assembler bug: multiple labels to the same address
When adjusting addresses based on 4-byte word alignment, make sure to adjust all the labels, not just the first one found for that address.
2021-10-04 16:02:56 -05:00
Benjamin Popp
7b82a2de9d Use the right palette for badges
Thanks to Rosasau100
2021-10-04 15:06:23 -05:00
Benjamin Popp
a3acc6554b Allow inner-anchors for pokemon sprite/palette
This is used in the oak intro, when he shows the nidoran sprite
2021-10-04 07:41:02 -05:00
Benjamin Popp
f16bcfa56f Add FR/LG offset anchors for steps2hatch 2021-10-04 07:39:46 -05:00
Benjamin Popp
80c642f24f Add ability to automatically repoint thumb code
* When given 4 instructions, that's enough space to replace it with a load, a branch, and an address.
* If the 4 instructions are such that they don't have any external dependencies (they don't contain a branch or a load), they can be safely moved to a new address.

These two points together mean that we can arbitrarily (and safely) expand almost any function. This should be very useful for both users and prototyping.
2021-09-23 21:57:05 -05:00
Benjamin Popp
ead600690b Improve Add-Fairy-Type script to allow for Fairy-Type TMs
In FR/LG, TMs get two images: one for shops and the PC etc, and one for the TM case. The TM case uses one sprite for all the TMs, but then uses a palette that's set based on the TMs type. These palettes need to be expanded to allow for a new Fairy-Type palette.
2021-09-14 20:27:07 -05:00
Benjamin Popp
9c64d27ba5 add Emerald scrolling multichoice table 2021-09-04 23:01:45 -05:00
Benjamin Popp
b1a6faa439 add constants for ev caps
fixed a bug in R/S v1: when adding a constant, clear the existing format before adding it. This matters in case the constant was found in a location that contained auto-discovered text or sprite data that is in error.

Using ClearFormat can change the count of runs in an unexpected way, which makes the index we found unusable. So we need to use ObserveRunWritten like the other sections of this method do... which means we need to add a special "am I allowed to make changes" check into the ModelDelta code that handles tracking MatchedWord changes.
2021-09-04 23:01:27 -05:00
Benjamin Popp
e2e8f89e17 Add anchors from AGSMG
Found a bunch of Emerald anchors that were missing
Found the TM sprite/palettes used by the TM Case
2021-09-04 21:41:20 -05:00
Benjamin Popp
b83ccc4f06 Make pocketid different for R/S/E 2021-08-26 19:43:50 -05:00
Benjamin Popp
7fc335cadd add alias for and 2021-08-23 20:23:10 -05:00
Benjamin Popp
6f61ac4d91 Updates from nature research
* Add draft of nature-count constant and expansion automation script. It's incomplete: more research has to be done into pokeblocks and emerald.
* Fix item effects table length
2021-08-21 22:11:53 -05:00
Benjamin Popp
75221ea332 New integration test: verify tilemap/palette combos
* Tilemaps specify which palette pages they use. Palettes specify which palette pages they provide. These should match in the default anchors. Add a test that verifies that they do match.

graphics.bag.inside2.palette and graphics.gamecorner.game.palette were totally using the wrong palette!
2021-08-19 22:23:31 -05:00
Benjamin Popp
12e232ff0f label pokenav tilemaps by town 2021-08-19 15:31:54 -05:00
Benjamin Popp
fe399a00bc add more anchors 2021-08-18 20:05:54 -05:00
Benjamin Popp
8a062cb3bd additional tables/constants from Scyrous 2021-08-11 20:06:58 -05:00
Benjamin Popp
26a417e30c fix bufferpartypokemon argument bug 2021-08-02 10:30:15 -05:00