Commit Graph

687 Commits

Author SHA1 Message Date
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