* Updated flash constants
* Fixed flash constant locations
I originally supplied anchor references, not locations of the constants themselves. That's been fixed. Also, I changed the field name for flash.radius, so it's hopefully clearer.
this is our first 4-byte constant, so I had to make some changes to how 4-byte constants worked.
* constref file needs to support 4-byte constants
* WordRun needs to be able to tell the difference between a constant that's matched to a table length (displayed as the table name) and a constant that is not matched to a table name (displayed as the number)
* Goto needs to be able to go to 4-byte 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.
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.
* 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
This table stores the thumb routines for the various evolution methods. But the evolution methods are unnamed, so keep the names stored in a list in the .toml.
Since the number of types is determined from code that most existing hacks don't change, that means that the length will be interpreted as the default 18 for almost all hacks.
Since hacks that expand types often customize the end of the type chart, make the match-requirement for recognizing table streams a bit less strict.
Update table-length-from-constant logic to be more fault tolerant and to take the constant multiplier into account. Also fix a bug: the ValueOffset should be subtracted off, not added on.
And most importantly: add constants and update tables involving types.
Move constants from default TOML files into the constantReference file. This makes it so that constants are condensed from 2010 lines spread between 9 files down to just 137 lines stored in a single file, but all the same information is available. This new format is much lighter on boilerplate, which makes it much faster to skim for constants.
As I add more constants, it becomes apparent that I need a more condensed format for adding these. This won't make it much easier to add, but it will make it easier to see.