What are HMA Scripts? - haven1433/HexManiacAdvance GitHub Wiki

This is a repository of information about the .hma scripts supported by HMA.

What is an HMA Script?

HMA scripts are text files that include instructions for making specific, commonly desired changes using HMA. The extension .hma stands for "Hex Maniac Automation", but the content is just the standard text format that you can open with notepad, VS Code, or any other text editor.

Think of .HMA files as smart patches that can be applied to your game. Simple ones are basically just IPS files that you can read, while more complex ones can insert code into your game at arbitrary offsets or even using python to do different things depending on the state of your rom.

You can see all the official scripts HMA supports by choosing Utilities -> Scripts from the menu. Additional scripts are available through the HMA Discord server. You can apply a script to your game by opening your game in HexManiacAdvance, and then dragging the .hma file over HexManiacAdvance.

Writing your own HMA Scripts

Since HMA scripts are just text files with addresses, anchors, and edits, you can write your own to share changes with the community. Click Here to learn how.

All games:

Add Fairy Type

Adds Fairy as the 18th type to your game. Updates the type chart based on the Gen 6 type chart and changes pokemon/moves from Gen1 through Gen3 to use the Fairy type.

callasm battlescript command

Adds an additional command for battlescripts that lets you call arbitrary ASM. This makes writing battle scripts more flexible, but doesn't change anything on its own.

Edit Battle Odds

This script adds a table to the game that lets you set the odds of different wild pokemon appearing. You still have the same odds for all maps, but you can skew the odds to favor the top pokemon in the list, or make the odds completely even, etc.

Fast New Game

This script is mostly for testing. When you apply it to your game, it'll make you skip naming your character / rival, and skip the professor's introduction. In R/S/E, "New Game" brings you directly to the truck, while in FR/LG, it'll bring you directly to your room.

Ability Type Swaps

This introduces a new table that lets you create abilities such as Pixilate and Normalize that can change the types and power of moves that pokemon use.

Type Items

This lets you create hold items that change the second type of pokemon that hold them. Similar to the Arceus Plate items, but they work for any pokemon. It doesn't actually add the items, it just adds an item effect and the related code, so that you can add whichever of the items you want with whatever sprites you want.

Ruby / Sapphire Only

TODO

FireRed / LeafGreen Only

TODO

Emerald Only:

TODO