MarkyJoe1990's Sack of ASM

WARNING: Some codes might not function properly! Let me know if this is the case!


Check If All Ally Units Dead

Source

How It Works: Returns true if there are no more Ally Units fielded.
How To Use: Insert it into a location in your ROM, then, in your events, add ASME [EventID] [Event Triggered] [Offset of ASM+1]

Check If More Than 3 Ally Units Dead
Source

How It Works: Returns true if more than three ally units have died.
How To Use: Insert it into a location in your ROM, then, in your events, add ASME [EventID] [Event Triggered] [Offset of ASM+1]


Set Default Options
Source

How it works - Sets the following options when the ASM is called in your custom events:
Animation - 2 (Display backgrounds)
Game Speed - Fast
Text Speed - Max
Terrain - On
Unit - Panel
Combat - Strat
Show Objective - On
Subtitle Help - Off
Auto Cursor - Off
Autoend Turns - On
Music - On
Sound Effects - On
Window Color - 3

How to Use: If you like the current options, skip to Step 9.
 
If you don’t like these options, you can change them. Here’s how:

  1. Open your ROM in Visual Boy Advance.
  2. Start a chapter.
  3. Go into the options menu.
  4. Set your desired options.
  5. Go to Tools -> Memory Viewer
  6. Go to 0x0202BC38. The first three bytes show the values for your current options.
  7. Open up my ASM dump that you downloaded on this thread.
  8. Change the following bytes. Shown here

Red is the first byte. Blue is the second. Green is the third.
9) Insert the DMP into the desired location of your ROM using a Hex Editor
10) Call the ASM code in your custom events using “ASMC [Offset of inserted ASM]+1”
 
I made this ASM with guidance from Nintenlord’s hacking notes.

1 Like