Commit Graph

857 Commits

Author SHA1 Message Date
haven1433
f21f3c0e0e auto pointers should get syntax highlighting 2023-03-18 21:47:44 -05:00
haven1433
6ef8253e02 fix cursor when resolving ?????? addresses
doing <??????> auto-included a new {} block, which is cool. But that block needs to not be included when calculating the new cursor position, because the cursor position should remain _before_ the new {}, so it's still on the same line in case you're writing `trainerbattle` or something with multiple pointers in the line.
2023-03-18 21:47:00 -05:00
ShinyTillDawn
b14baacd73
Changed which NPC facing option we shouldn't use. (#133)
* Changed which NPC facing option we shouldn't use.

The movement behavior right below "FaceRight" is actually the one that confuses people as it used to be called "Look Down" in AdvanceMap. That one causes weird stuff to happen after a battle while the first movement option is now correctly labeled "No Movement."

* Reverted the CausesGlitches change.
2023-03-18 11:31:34 -05:00
haven1433
2bef8d62f0 write updated run after deserializing 2023-03-17 22:04:30 -05:00
haven1433
d547f88ebc insert end token when writing a movement stream
note that this could be dangerous, since we're writing an end token to an arbitrary address that is still being decided on. A couple things mitigate this problem:
* the user can use <auto> pointers in scripts
* addresses won't be checked/used unless the user has both an open < and a close >.
2023-03-17 15:06:21 -05:00
haven1433
542ac1ca86 auto-include closing } after inserting a { 2023-03-17 14:27:23 -05:00
ShinyTillDawn
80b4b17bc8
Added rematch tables for Emerald and RS (#132)
They're separate because Ruby and Sapphire have fewer rematchable trainers than Emerald.
2023-03-16 20:57:16 -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
ShinyTillDawn
6d3cd3aef9
Added a [[List]] for move particle names. (#130)
* Added a [[List]] for move particle names.

I indicated which ones are unused.

* Added a missing apostrophe

silly me
2023-03-13 15:36:37 -05:00
ShinyTillDawn
1d232469e1
Incorporating an animations options table for back sprites causes some compromises. (Attempt 2) (#129)
* Adjusted Pokémon animation options.

- Renamed "...animations.options" to "...animations.options.front" (even though those animation codes are not exclusive to front sprite animations)
- Added "...animations.options.back" since there's a smaller table for Pokémon's back sprite animations.

The words "extreme," "medium," and "mild" are used (in this context) to describe the differences in animations used for each back animation sprite slot. The Pokémon's nature determines which of the three to use.

* Added the nature mod table for Pokémon back anims.

I also updated the formatting for "graphics.pokemon.animations.back."
2023-03-13 13:46:06 -05:00
ShinyTillDawn
9428cd5778
Fixed numbers misplacement for OW Table Constant (#125)
Sorry for breaking the OW sprites table ;-;

I genuinely didn't see that mixup!
2023-03-12 12:50:21 -05:00
ShinyTillDawn
e4daf4c234
Table Reference typos got corrected. (#126)
I think the second typo would only get fixed if loading a new ROM for the first time.
2023-03-12 11:02:07 -05:00
ShinyTillDawn
78faf673b4
Added aliases for the three buffer half-words: \\02, \\03, and \\04. (#124)
* Added buffer macros

These can be used instead of \\02, \\03, and \\04 in the Text tool.

* Buffers now don't have spaces in them.

* Fixed an alignment error.
2023-03-11 19:55:40 -06:00
ShinyTillDawn
49d207985a
Fixed preparemsg isotopes; added a desc to warp8 (#123)
Somehow, I did not catch these before the new version came out.
2023-03-11 19:39:02 -06:00
haven1433
0e518c4c37
Get all tests passing (#122)
* submit failing tests

* Grab failing trainer test from remote branch (#121)

* 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.

* Fixed some other pointer issues with RAM addresses in script commands

RAM addresses can't be encased in <> nicely. Some commands still needed their RAM-address pointers to have the ::|h formatting instead.

* Fixing some parameter formats in the script reference file.

There were a few other commands that needed RAM-address parameters set to their correct format so that typing "2024284" doesn't auto format to 0xA024284, etc.

* update script reference (again)

* Added a failing test for duplicating trainer data

Bug report in query: https://discord.com/channels/538022037718040588/538022038376415234/1083215729177931877

---------

Co-authored-by: ShinyTillDawn <80070404+ShinyTillDawn@users.noreply.github.com>

* Fix test

ExportTilesetWithPalette2_EditTileset_ImportTilesetWithPalette2_DataMatches
-> fix formatting in LzSpriteRun
-> fix overflow error in SpriteRun
-> fix default palette detection in SpriteTool
-> improve test so it gives better failure info

* fix trainer duplication assert

fix test name / remove unneeded comments
handle Trainer team runs specially
update assertion error message

* Improve pointer error logic

Pointers are allowed to point into the middle of an existing run. Such a pointer is an error, but is not a metadata inconsistency. Update metadata checking for new logic. Update pointer logic to display pointer as an error.

* improve handling of `auto`

allow <auto> to be used if there's a one-byte gap

* improve interruptingSourceRun logic

an interrupting table is not always valid.
It's only valid if the source is at an index that would make it a pointer.

* don't clear bytes, clear anchors

If you have a custom anchor name in the middle of a script and then edit the script, that custom anchor name will be lost. But anything pointing to it will still point to it.

---------

Co-authored-by: ShinyTillDawn <80070404+ShinyTillDawn@users.noreply.github.com>
2023-03-10 21:40:55 -06:00
ShinyTillDawn
32ae955c3b
Added the constant related to OW table limiters. (#119)
* Added the constant related to OW table limiters.

By default, it's 151 (0x97) in the Kanto games.

* Updated the OW table for FRLG.

The length is now controlled by a newly added constant.
2023-03-10 18:08:30 -06:00
ShinyTillDawn
543a57ec25
Updated more scriptReference.txt parameters (#120)
I primarily focused on D2 setcatchlocation so that its location parameter allowed the user to type in map names. I found more commands that needed similar treatments.
2023-03-09 21:57:52 -06:00
ShinyTillDawn
c36d89e0f2
Updated the move field for 2 commands (#118)
You can use move names for the move field in both 'bufferattack' and 'checkattack' now.
2023-03-08 22:33:02 -06:00
haven1433
1c4f842dbf Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-07 19:54:07 -06:00
ShinyTillDawn
2b4866b9f5
Another scriptReference edit (#114)
* Another scriptReference edit

Updated some incorrect/missing commands in script reference, adjusted the Address width, and implemented the directions macro for the spriteface command.

* Marked lines 270 and 273 as [BPEE].
2023-03-07 16:08:36 -06:00
haven1433
420f0dd1f9 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-07 08:42:13 -06:00
haven1433
4959d8f8ca don't auto-format script pointers in edge cases
* points to itself? Don't add the format
* points into existing data? Don't add the format
2023-03-07 07:29:37 -06:00
ShinyTillDawn
93395800eb
Added calculated Base Stat Total ''field'' (#115)
Similar to the prize money field in the trainer table, I added a field to the Pokémon stats table for a Pokémon's base stat total.
(Requested by Dweebio The Rom Hacker)
2023-03-07 02:23:22 -06:00
haven1433
36706bc740 remove bad default hashes 2023-03-05 22:40:28 -06:00
haven1433
c9ec9d3379 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-05 22:39:00 -06: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
ShinyTillDawn
a31ec6b0a8
Update scriptReference.txt (#112) 2023-03-05 22:31:03 -06:00
haven1433
ccbdca51f3 support |z suffix for arguments in script reference files 2023-03-05 21:39:41 -06:00
haven1433
10f177154c fix broken tests 2023-03-04 22:00:44 -06:00
haven1433
43542dcf17 don't create orphans while no-edit formatting a script
When scripts get merged together, some inner-scripts no longer appear to be real scripts. These were showing up as orphans when the scripts get formatted, since that causes scripts to get merged. But the pointers are still there, so they're not actually orphans.

Fix the orphan-naming logic so that it won't name things as orphans if they're inner scripts that still have pointers
2023-03-04 21:33:49 -06:00
haven1433
3fdb3a8028 improve caching for improved performance
don't re-calculate the length of scripts if nothing has changed
2023-03-03 22:46:17 -06:00
haven1433
8896946db2 ai script performance updates
ai script children should appear as ai scripts
editing an AI script shouldn't make a bunch of orphans
introduce a light caching system for noticing when scripts don't need to be loaded again.
script edits that don't change any compiled bytes should be capable of skipping the metadata update in situations where the metadata is already correct
2023-03-03 22:10:49 -06:00
haven1433
944806e2ad fixing R/S 1.1 addresses for data.pokemon.natures.stats 2023-03-02 19:58:29 -06:00
haven1433
715c163de6 nature stats for all the games 2023-03-02 19:52:15 -06:00
haven1433
dd9cf7070d improve if macros / trainer flags
* replace cleartrainerflag/settrainerflag with defeatedtrainer/readytrainer
* update `if` macros to include both goto and call forms, and both positive checks and negative checks for trainers/flags
2023-03-02 19:48:52 -06:00
haven1433
7e6dc34302 use decorations instead of mart for pokemart2
And fix name to decorationmart
2023-03-02 19:48:30 -06:00
haven1433
a679a006db setfarbyte uses RAM addresses 2023-03-01 22:25:34 -06:00
haven1433
4a3cbe15e2 loadbytefrompointer uses RAM addresses 2023-03-01 22:25:23 -06:00
haven1433
acb3629541 copybyte should use 4-byte hex, not pointers 2023-03-01 22:05:14 -06:00
haven1433
f3d986882e Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2023-03-01 06:54:56 -06:00
haven1433
07608b0f9c allow record segments to be pointers
Allow record segment formats to be pointers depending on the source value
2023-02-24 22:02:34 -06:00
ShinyTillDawn
55ccabe22e
Updated flash constants (#109)
* 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.
2023-02-24 10:56:52 -06:00
haven1433
198cc42859 fix writebyteoffset parameters 2023-02-11 22:44:21 -06:00
haven1433
800aee0361 fix crash in script editor 2023-02-02 07:44:56 -06:00
haven1433
820173f3f1 settrainerflag needs to use trainer names 2023-02-02 07:44:46 -06:00
haven1433
4badfe06b9 ai scripts can end with more commands 2023-02-01 21:35:24 -06:00
haven1433
9205f7b360 give.item is better than take.item
* take.item may be confusing, making the user think an item is being removed
* give.item is closer to the XSE name
2023-02-01 21:35:10 -06:00
haven1433
649a4f5f6d replace give.item with take.item and npc.item
npc's also want to give items, but without making the NPC disappear.
2023-02-01 21:26:38 -06:00
haven1433
79503e37a2 fix scripts.newgame.start constants for R/S/E 2023-01-31 06:59:10 -06:00
haven1433
44d841ad6c checktrainerflag / cleartrainerflag argument update 2023-01-30 23:09:23 -06:00
haven1433
98e78bed77 enum map connection directions 2023-01-26 22:59:06 -06:00
haven1433
303bb131a3 <auto> improvements
* Selecting brock's script should select the _whole_ script
* Get correct number of code sections when scripts point to freespace
* Make sure script concatenation works correctly for `goto` followed by `end` (vanilla games do this a lot)
* multiple if statements / gotos all get compiled into one script, so long as it's all contiginous script data
* make sure `trainerbattle 01` works correctly with labels
* include blank line separators between labels when decompiling scripts
2023-01-24 20:26:46 -06:00
haven1433
6ac5c89dfb add if.flagset macro 2023-01-24 20:16:37 -06:00
haven1433
1ee5e2f659 combine nature power list 2023-01-24 20:16:03 -06:00
haven1433
3ef258a81c more macros 2023-01-22 21:25:39 -06:00
haven1433
2b8c35c1d5 <auto> improvements
if the last thing is a label, make sure to include an end command for it
if the last thing isn't an end command (or goto, etc) make sure to include an end command for it
2023-01-22 21:25:31 -06:00
haven1433
9622784b1c Adding lots of niche tables
Thanks Shiny and Soup :)
2023-01-22 20:21:08 -06:00
haven1433
f74c1abd45 include unused labels at end of script 2023-01-22 20:20:16 -06:00
haven1433
0ae5726551 table update (data.menus.text.pc) 2023-01-21 22:10:50 -06:00
haven1433
7d1e6065d5 ScriptParser updates
* add a basic limiter so that parsing scripts will 'give up' if they get the same 0-arg command 20 times
* fix crash that could happen sometimes when trying to check a pointer for sources during script decoding
* don't try to decode streams as scripts (misuse of the destinations collection)
2023-01-21 21:29:49 -06:00
haven1433
e55ef5c8a3 Include sub-scripts from scripts that were combined with the current script
Since scripts don't always end at an `end` or `goto` anymore (if there's a label from within the script to directly after the script), we need to make sure that these appended scripts still get a chance to add more scripts into the UI.
2023-01-21 20:41:42 -06:00
haven1433
8b3f29cf6d update animation script reference 2023-01-16 22:17:05 -06:00
haven1433
1d4749b41f misc feature updates from pins
* add anchor for misc animations
* flags should be seen as hex in the script editor
* various table updates
* update text in empty block selection case
2023-01-15 23:03:48 -06:00
Smig0l
cc7b67fff2
Create default.bpei0.toml (#104)
* Create default.bpei.toml

Added the toml file with addresses valid for BPEI (Pokemon Emerald Italian Version).
Some are sourced from https://github.com/Gamer2020/PokemonGameEditor/blob/master/roms.ini

* Update default.bpei.toml

added maps addresses

* Update default.bpei.toml

updated and reordered

* Update HardcodeTablesModel.cs

* Rename default.bpei.toml to default.bpei0.toml

* Update default.bpei0.toml

fixed exception error in 0.5.0.2

* Update default.bpei0.toml

deleted commented lines

* Update HexManiac.Core.csproj

* Update HexManiac.Core.csproj

Indented correctly
2023-01-15 12:12:48 -06:00
haven1433
216dece90b scripts.callstd should only have 10 elements in firered 2023-01-12 22:21:01 -06:00
haven1433
bf4e766b6b allow tabs in thumb editor
we need to copy both newlines _and_ tabs for the text editor viewmodel, or the spacing won't line up right between colors
2023-01-06 20:55:18 -06:00
haven1433
47388d5f3e map editor bug fixes
* creating a new map should be considered an autonomous operation for undo purposes
* support connection-objects for FireRed
* crash less when reading invalid map / layout data
* show correct hover square when hovering over neighbor maps with borders
* fix elevation names / map permissions
* don't update tile render info for the block editor if the x/y change is a no-op
*
2023-01-05 22:53:35 -06:00
haven1433
65e534a46d map editor fixes
* say width/height correctly in the tooltips of the map size handles
* less flickering during undo
* include default OW sprite instead of blank (for example, tutorial catch man in viridian city)
* speed up the initial script-check process that looks for default trainer sprites for each OW by not caring about the length of child scripts
* use proper thread locking during block cache invalidation and renewal so that undo doesn't mess up the number of blocks shown in the block panel
2023-01-04 23:06:51 -06:00
haven1433
fe07a3e458 <auto> pointer bugfix 2022-12-22 17:26:56 -06:00
haven1433
c4dba402cb battlescript bugfixes 2022-12-22 17:26:35 -06:00
haven1433
5ab843d3b2 implement game-specific macros 2022-12-21 22:47:41 -06:00
haven1433
2c52358396 Compile / Decompile improvements
* when docompiling, don't include a box that contains a partial script that's already in the main box
* when compiling, require arg counting for getting macro length
2022-12-21 08:33:53 -06:00
haven1433
3e16f8ee20 add stream content recursively for scripts
This should make <auto> able to work even when there are scripts that point to scripts, as the content will appear after the last attached script.
2022-12-20 22:34:26 -06:00
haven1433
3b6a18072f improving auto support
for mart, movement, and if statements
2022-12-20 14:29:20 -06:00
haven1433
5371397475 first part of <auto> support 2022-12-18 10:26:02 -06:00
haven1433
6874768ffc additional macros
support for out-of-order macro commands
also allows for arguments to be applied multiple times
2022-12-15 08:06:26 -06:00
haven1433
8a5e5c793c implement additional UBL features
universal branchlink can now handle selection/cut/paste in cases involving pointers and anchors
2022-12-09 08:40:49 -06:00
haven1433
30026eea8d first pass at universal-branch-link feature
this allows us to select/cut/paste thumb routines safely
2022-12-09 00:09:42 -06:00
haven1433
b53baace97 fix trainer back animation labels 2022-12-08 20:40:27 -06:00
haven1433
66f3bd9006 syntax highlighting for multiline comments 2022-12-06 21:40:45 -06:00
haven1433
0285808eb0 bufferPokemon species should allow pokemon names as input 2022-12-06 21:40:08 -06:00
haven1433
f9848fa85c add callstd routines
They can be expanded to make more 'standard' routines to call in scripts
2022-12-06 21:39:03 -06:00
haven1433
f96a3ada92 thumb macro fixes 2022-12-06 07:08:25 -06:00
haven1433
7d8ae74a00 script bugfixes
add enum types for fanfare / bufferitem
allow script constants to contain underscores
allow autocomplete for constants that are the last argument
allow 'find usages -> scripts' to find usages from macros (and fix crash)
2022-12-04 22:38:04 -06:00
haven1433
4a5f351d6f final fixes for 0.5
givePokemon, use item constants
fix crashes/errors in hover-tip logic for trainerbattle commands
* tested that macros and array args still work right
2022-12-03 22:50:33 -06:00
haven1433
88e90f980c fix completion tips for array-arg and 0-arg commands 2022-12-03 21:24:05 -06:00
haven1433
380738609b draft of auto-complete for script tool 2022-12-03 19:09:31 -06:00
haven1433
bf1d30fe7d more macros
also clear constant cache when refreshing ViewPort
2022-12-02 23:28:56 -06:00
haven1433
d6d6a6c54f initial macro support 2022-12-02 22:41:39 -06:00
haven1433
830740ad34 script editor is now colored 2022-12-02 20:44:59 -06:00
haven1433
4e7148a5f6 thumb editor is now colored 2022-12-02 11:35:24 -06:00
haven1433
c0f3ade883 allow script lines to have multiple stream sections 2022-12-02 10:22:00 -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
TheDiamondMiner
bcea3d6768
Updated TOML based on Shiny's Changes (#102)
* Added shiny's changes.

* Fixed typo
2022-11-29 06:47:14 -06:00
haven1433
c355f07993 fix toml upgrade issue (tuples) 2022-11-28 22:42:21 -06:00
haven1433
acf55f0101 improve animationScriptReference
thanks `AGSMG?`!
2022-11-28 21:07:14 -06:00
haven1433
a7b1734404 add data.items.stats format for item-related script commands 2022-11-28 20:22:55 -06:00
haven1433
8ad4298809 fix number of thumb routines in specials table 2022-11-26 22:50:04 -06:00
haven1433
8f3da7f04e bugfixes 2022-11-25 13:17:21 -06:00
haven1433
4c2089196b usability feedback
label stuff
center new connections
berry shortcuts
fix goto shortcuts
2022-11-24 11:24:56 -06:00
haven1433
d66a02d518 fix trainer backsprite palettes for R/S 2022-11-23 11:04:00 -06:00
haven1433
1728e73143 include field item enums for non-pokeball items 2022-11-23 10:59:14 -06:00
haven1433
e285eaaf7b add 'scripts' option to 'show uses' button
Unlike the other ones, this one doesn't pre-calculate, and may end up being empty when you click on it.
2022-11-23 08:26:46 -06:00
haven1433
2ce867a955 update trainertower format 2022-11-22 15:14:53 -06:00
haven1433
d350c6bfa9 fix ai scripts for emerald 2022-11-22 08:52:52 -06:00
haven1433
6a703c1fae call UpdateFromParent when updating TableStream via textbox 2022-11-18 09:10:31 -06:00
haven1433
aaf559d7a6 bugfixes
trying to improve compatibility with edited games
2022-11-11 09:42:33 -06:00
haven1433
7d0022d6a3 template progress 2022-11-08 22:29:37 -06:00
haven1433
d09b3c32c7 finish more templates 2022-11-07 21:56:39 -06:00
haven1433
d23575cdb9 usability updates from wet blanket 2022-11-06 20:44:57 -06:00
haven1433
679e1067fa update names from low/high to lowLevel/highLevel
make it a bit more clear for people reading the data
2022-11-04 08:52:31 -05:00
haven1433
fcf80c907d add type hold effects table
some items can effect the power of specific types. This lets us tap into the mapping of effects-to-type so we can play with it.
2022-11-02 22:48:09 -05:00
haven1433
2428ba8231 thumb tool should allow +1's on words 2022-11-02 08:43:08 -05:00
haven1433
9fcbb6a89d remove expired warning 2022-11-02 00:04:15 -05:00
haven1433
10579058b3 add song names for playsong command 2022-10-29 22:52:58 -05:00
haven1433
ffaf42a7b5 add stm and ! support in thumb scripts 2022-10-29 22:52:42 -05:00
haven1433
cab4966c8a fix bug with single-line multi-line comments
if the start and end of a multi-line comment were on the same line, it wasn't parsed correctly, leading to a memory overflow
2022-10-25 20:05:17 -05:00
haven1433
7483568a97 add battletower prizes table (FR/LG) 2022-10-23 20:42:05 -05:00
haven1433
0824afb1a8 add emoji support
F9 needed to be handled like other escapes
2022-10-23 20:40:25 -05:00
haven1433
a966a18831 fix ruby music naming bug 2022-10-20 22:51:05 -05:00
haven1433
953fe52fb6 improve tuple model
* add fly spots to event list
* allow moving/deleting fly spots
* remove Elevation from base event interface
* improve header UI
2022-10-20 21:48:29 -05:00
haven1433
d80680270a header improvements
also fix a weird bug that can happen when pasting characters at the end of a text stream that needs to be repointed
2022-10-19 20:36:58 -05:00
haven1433
afe1dc59b9 add alias instruction so that add rX, rX, #Y maps to add rX, #Y 2022-10-16 00:52:42 -05:00
haven1433
2992d55de0 add substitute front/back/palette data for R/S/LG and 1.1 games 2022-10-13 20:01:17 -05:00
haven1433
aafe651e0f code cleanup
initial pass at the data buttons. Maybe it'll end up just being a menu with a bunch of items, but I feel like with so many operations, they need to be a bit more organized than just a simple hierarchy.
2022-10-11 23:12:04 -05:00
haven1433
ac20599845 add scripts.money.cap for emerald
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
2022-10-09 22:44:52 -05:00
haven1433
cea8cfba01 tile panel improvements 2022-10-07 22:54:45 -05:00
haven1433
1fcd04d74d progress 2022-10-07 06:44:04 -05:00
haven1433
b4f4e86277 don't clear the newgame pokemon tables
These were being cleared because they existed within scripts. Make the script ClearFormat logic smarter so it skips tables that align to single arguments.
2022-10-04 23:05:32 -05:00
haven1433
4317864b64 fix disappearing script section bug 2022-10-04 16:58:45 -05:00
haven1433
abdf4eaa1c add new table
also, `GetIndexOfNearestAddress` shouldn't ever find a table with distance 0, because that's not what we're wanting to find: we want the table with the nearest values so we can do a cross-reference, and anything with this exact address is likely missing the other games we're looking for.
2022-09-29 21:29:15 -05:00
haven1433
898d6b586b add new table 2022-09-29 21:16:08 -05:00
haven1433
7a6ba78d94 fix {} creation after <??????>
Only add the {} if there isn't one already
2022-09-28 22:19:06 -05:00
haven1433
7d74e66ef7 update map name table (R/S/E)
thanks Shiny!
2022-09-22 21:19:06 -05:00
haven1433
5e9e5b944f update name from feedback 2022-09-22 07:41:38 -05:00
haven1433
7a6ce76b23 serialize null list items as numbers
also fix width on script tooltip
2022-09-22 07:36:26 -05:00
haven1433
69ad7c6bb8 Applying patch marks the tab as needing a save
also fix issue with IPS patches
2022-09-21 16:40:13 -05:00
haven1433
b6cf8b58ab ascii run improvements 2022-09-20 17:22:44 -05:00
haven1433
53d10d2f35 fix patching bug 2022-09-20 08:27:15 -05:00
haven1433
47d3642bdf face correct way
- fix undo/redo bug for model element
- update event UI
- fix hover selection bug
2022-09-19 18:24:57 -05:00
haven1433
8027842299 goto shortcut 2022-09-18 17:36:56 -05:00
haven1433
5855ac38ab name trainer ai scripts 2022-09-18 12:58:51 -05:00
Haven1433
a2d4c66a33 items
and R/S/E support
2022-09-17 10:04:48 -05:00
Haven1433
29092415a6 multi-select
and some flag-based utilities
and hide layoutID
2022-09-16 21:27:55 -05:00
Haven1433
b25a480f52 wild editing
also improve goto menu
* hide shortcuts when using the buttons, to make more room
* remember text when switching tabs
2022-09-15 19:45:11 -05:00
Haven1433
ee28bc8a02 initial ai script support 2022-09-12 20:23:40 -05:00
Haven1433
610171b59a fix broken behavior
New rule: when clearing format and the run starts _before_ what we're clearing, leave the pointers and a NoInfoRun. Before this rule, we would clear out the anchor as well, which could cause some confusion if that anchor/format was re-added later, since it wouldn't know about tables that point to it.

Fix bug in script parser: next text runs should know about pointers to them
2022-09-11 20:59:35 -05:00
Haven1433
1aaf079f8d updating shiny odds for French FireRed 2022-09-11 08:04:19 -05:00
Haven1433
29dd2bc9cf emerald publisher logo tileset/palette 2022-09-10 20:56:10 -05:00
Haven1433
f94eeb38df Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2022-09-09 22:40:35 -05:00
Haven1433
201ecae9be thumb compiler improvements
support multiline comments /**/
support .equ directives
support .hword and .byte directives
2022-09-09 22:40:12 -05:00
TheDiamondMiner
99ce6175de
Fixed Typo (#98) 2022-09-09 21:14:33 -05:00
Haven1433
7c82d38d96 add new runtype / fix undo
also add some drag interactions
2022-09-07 19:51:59 -05:00
Haven1433
1649b35603 connection editing first pass 2022-09-06 19:19:00 -05:00
Haven1433
2427daf76f render OWs 2022-09-05 23:02:36 -05:00
Haven1433
d24e150eff add names for specials in FR/LG 2022-09-04 22:21:34 -05:00
Haven1433
be3b053d12 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2022-09-04 21:26:06 -05:00
TheDiamondMiner
7f86f06817
Updated description for setmaptile command (#97)
* Added list varmacros on the defaut .toml and updates script reference as per shiny's request

* changed description

* Made your changes
2022-09-04 19:01:59 -05:00
Haven1433
21eb4fc006 add down arrow graphics for menus/text 2022-09-03 21:16:20 -05:00
Haven1433
ed5a9eb47c fix D5 in scripts for R/S/E
R/S don't seem to have this commmand. Emerald does. In FR it's a nop.
2022-09-03 20:12:48 -05:00
Haven1433
ddf14d3837 Code cleanup 2022-09-03 00:07:36 -05:00
Haven1433
aad0f4e48c fixes 2022-09-01 12:48:12 -05:00
Haven1433
52880278ea update battleScriptReference
thanks to AGSMG for helping to fill out some of these missing details
2022-09-01 12:45:33 -05:00
Haven1433
cd78b16f69 revert owtextcolor change
This doesn't apply in vanilla
2022-09-01 11:19:53 -05:00
Haven1433
6a761d9d23 Merge branch 'master' of https://github.com/haven1433/HexManiacAdvance 2022-09-01 10:55:06 -05:00
TheDiamondMiner
55958724a0
Added a new value to default toml which is the owtextcolor for the unused value in overworld sprite (#95) 2022-09-01 10:54:45 -05:00
Haven1433
c1651807d6 fix issues from tests
thanks tests
2022-09-01 08:01:21 -05:00
Haven1433
587dada550 update script commands 2022-09-01 07:24:44 -05:00
Haven1433
a2b01ca309 enum for trainer double battles 2022-08-31 22:28:54 -05:00
Haven1433
b7cd14f2c6 add emerald pc text table 2022-08-31 22:26:35 -05:00
Haven1433
967cec0d85 add pokeball catchrates 2022-08-31 22:26:08 -05:00
Haven1433
68b4bc520d add macro support for gray as well as grey 2022-08-31 20:29:05 -05:00
Haven1433
7994bbc78d add logic for offsetting the sprite based on the elevation 2022-08-29 22:00:46 -05:00
Haven1433
49fae5db0b allow tilemaps to include image switcher in the image tool 2022-08-26 21:31:38 -05:00
Haven1433
810f8c7a65 ScriptParser needs to know which game it is.
The 'showmoney' and 'updatemoney' commands are different from game to game. It has 2 parameters in R/S, but 3 parameters in FR/LG/E.

Update the scriptReference to specify that these commands have different versions for the different games.

Update ScriptParser to be able to read this new addition to the script reference format.

Add tests to show that the new commands are read correctly between games.
2022-08-25 06:51:51 -05:00
Haven1433
76ae4efee1 clean up map banks 2022-08-19 20:12:46 -05:00
Haven1433
5405aa3daa add final fantasy text decoding
further edits are needed to make this useful, but I'm committing this so we don't lose track of it
2022-08-04 20:27:22 -05:00
Haven1433
2b6bcab364 allow both <anchor>+1 and <anchor+1> to work in thumb code 2022-07-02 12:16:14 -05:00
Haven1433
cd6ea07d45 add support for expanding emerald starters 2022-06-28 08:12:10 -05:00
Haven1433
59ed8f7c11 fix palette discovery for Vega 2022-06-28 07:27:48 -05:00
Haven1433
c119107bbd thumb code should not clear pointers to start+1 2022-06-24 23:07:14 -05:00
Haven1433
0f0f2a0260 add pokemon shadow sprite 2022-06-23 21:13:25 -05:00
Haven1433
8b90b98994 fix parser bug 2022-06-23 21:12:10 -05:00
Haven1433
4f9b9bc9c1 add titlescreen music constant 2022-06-19 22:27:17 -05:00
Haven1433
d768ed883a add list for item types
This list isn't actually used yet, since it doesn't work for pokeball items
2022-06-19 21:30:05 -05:00
Haven1433
c23819edb9 add protect success rate table
This table isn't terminated, which means it just _happens_ to drop to almost zero, since the metronome table is directly after it. But if the metronome table gets moved, then the rate grows back to full if the bytes after the table are FFFF. Adding this table makes it possible to fix the bug by expanding the table and adding `00 00` as the last entry, to make sure that Protect 'always fails on the 5th attempt' or however many entries you want to add.
2022-06-19 19:51:01 -05:00
Haven1433
99c4eb1b2e update effect animations names for FR/LG
FR/LG's table is longer
2022-06-19 18:58:42 -05:00
Haven1433
61dbbb72ff add rival nameselection graphics
This looks like an OW, but is actually stored as separate graphics in the rom
2022-06-19 18:56:53 -05:00
Haven1433
276293fc8a fix yOffset of front sprites 2022-06-16 23:25:57 -05:00
Haven1433
8e48443170 add battle script compare options 2022-06-09 07:59:56 -05:00
Haven1433
1b8e03fecf fix bug compiling thumb code 2022-06-08 22:14:49 -05:00
Haven1433
b104d0153a update map bank fields 2022-06-07 23:30:28 -05:00
Haven1433
8dd5a1baff fix palette pages for pokemon box backgrounds 2022-06-05 21:24:03 -05:00
Haven1433
fd80fe8b14 add newgame constants for R/S/E 2022-06-02 23:09:56 -05:00
Haven1433
65765e695f Allow Text Macros
* Replace the static PCSString.Convert method with an instance method on a TextConverter that's owned by the Model. The TextConverter can know about different macros depending on which rom is being edited.
* Add macros to pcsReference.txt
2022-06-02 20:53:39 -05:00
Haven1433
93f8cce753 add hp-aware move effects tables
the trainer ai hp-aware flag makes the trainers less likely to use certain moves based on their own HP or the target's HP. For example, effects like
```
SelfKOAndAttack
HealHalfSelf
Rest
Endure
```
are all discouraged when the pokemon's health are high, while
```
RaiseAttack1Primary
RaiseSpAttack1Primary
OHKO
```
are discouraged when the opponent HP is low.
2022-05-29 21:36:17 -05:00
Haven1433
de7554f307 fix script reference typo 2022-05-27 23:33:49 -05:00
Haven1433
d98ba556d2 add fanfares for R/S/FR/LG 2022-05-25 23:31:33 -05:00
Haven1433
bb1948d339 Introduce pcsReference.txt
Other programs let you edit the way text is interpreted using .ini files. Add a new pcsReference.txt file that lets users see the interpretation of bytes-to-text, the number of arguments used for different control codes, and allow them to change it.
2022-05-25 23:31:20 -05:00
Haven1433
9615ad44b0 add new fanfare table 2022-05-25 22:13:36 -05:00