News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Metroid Advance Game Editor (MAGE) Thread

Started by biospark, June 21, 2016, 06:19:47 PM

Previous topic - Next topic

alexman25

Quote from: DamienInnit on January 18, 2021, 05:28:19 AM
How do I make a new room. I'm new to making rom hacks and I'm just wondering.

Click this green plus-sign circle in the toolbar (circled in red). This is where you add new data and stuff. The room options presented should be self explanatory.

DamienInnit

Quote from: alexman25 on January 18, 2021, 06:46:20 AM
Quote from: DamienInnit on January 18, 2021, 05:28:19 AM
How do I make a new room. I'm new to making rom hacks and I'm just wondering.

Click this green plus-sign circle in the toolbar (circled in red). This is where you add new data and stuff. The room options presented should be self explanatory.

Thank you very much!

DamienInnit

Hi, I have a couple more questions. First, how do I make doors work correctly. I'm trying to move the location of the morph ball to a different room that I made. And another one, how do I get the morph ball to appear correctly. And last but not least, how do I move the location of new rooms? Thanks in advance!

FelixWright

#478
Welcome to gbatroid romhacking!

[spoiler=How do I make doors work correctly?]
To begin, go from BG Editing mode (the speed booster icon) to Object editing mode (the morph ball icon).
BG editing mode is used for editing tiles, while object editing mode is used for editing sprites, doors, and scrolls.


Next, right-click somewhere and select Add Door. The default door dimensions are 4 blocks tall and 1 block wide.


Right-click the door and select Edit Door. a new window will open. See the Info section? Note on YOUR SCREEN the number of the door you just placed.
If you enter your new door from the left, change the X exit distance to E0. If you enter your new door from the right, change the exit distance to 20.
Hit Apply and keep the window open.


Find your destination door, or add it. You can hover your cursor over the new door to see its number.


Back in the Edit Door window, tick the box that says Auto connect destination door and type the destination door's number into the Connected door box.
Hit Apply. The Destination part of the Info Section should update. (Shown in green.)
You may close the Edit Door window.


Go back to BG Editing mode.
Under the Edit section of the main window, make sure that BG 1 and Clipdata are checked.
BG 0, 1, and 2 are the placements of block graphics. BG 0 is in front of samus and usually transparent. BG 1 is solid and in front of samus. BG 2 is solid and behind samus. The Clipdata is the programmed behavior of the block. Clipdata 0 is Air, and clipdata 10 is Solid block for example.


Under the Tileset section of the main window, open the Clipdata dropdown menu. Select 20 - Door Transition Block.


Click and drag over hatch blocks in the top left of the tileset, and then click the top block of the door to place the new clipdata and blocks.


It has no hatch (cap) yet, but as long as both doors have clipdata 20 over them, you should be able to walk to and from them. Now let's take care of those caps.
Open the Tileset dropdown menu again.
For gray doors, select 30 - Gray door.
For blue doors, select 36 - Regular door.
For red doors, select 40 - Missile door.
For green doors, select 46 - Super Missile door.
For yellow doors, select 4C - Power bomb door.


Click and drag over the respective orientation and color of hatch in the tileset you wish to place. I will place a blue door.
This time, place the cap next to the door.


Congrats! You have put together your first set of doors!

[/spoiler]
[spoiler=How do I get the morph ball to appear correctly?]
Morph ball won't appear when you use the test room function in MAGE because it loads a state where Samus has every ability.
Not all sprites can be used in the same room -- This is where spritesets come in. Spritesets are a couple sprites assigned to a group, which is then assigned to the header of a room to use.

To move the morph ball to your new room, open the Header editor. A new window appears.
In the Spriteset Data section, change the Default Set to 1 and then press Apply.



Now, change to Object editing mode. Right click the desired morph ball location in the room, and select Add Sprite.


A Geemer will be placed. That's because the Geemer is in sprite slot 0, which is the default slot for when a sprite is added.
Right click the Geemer, and select Edit Sprite. A new window appears.


Under the Edit section of the Edit Sprite window, change Slot to 1 and then select Apply.
You have successfully placed morph ball!


[/spoiler]
[spoiler=And last but not least, how do I move the location of new rooms?]
In the main window, Go to your new room and select Room options. A new window appears.
Note the Width and Height of your new room. (measured in screens)



Open the Minimap editor. A new window appears.
See the numbers at the bottom left? That is the current X and Y position your mouse cursor is hovering over on the minimap. To change your room's location on the minimap, find the desired location for the top left of your room.



Open the Header editor. A new window appears.
Under the Miscellaneous section, change the Map X and Map Y coordinates to the new top left position on the minimap.
Hit Apply. Congrats, you've changed the position of a room on the map!


[/spoiler]

Enjoy!

DamienInnit

Quote from: Cosmic on January 18, 2021, 04:55:28 PM
Welcome to gbatroid romhacking!

[spoiler=How do I make doors work correctly?]
To begin, go from BG Editing mode (the speed booster icon) to Object editing mode (the morph ball icon).
BG editing mode is used for editing tiles, while object editing mode is used for editing sprites, doors, and scrolls.


Next, right-click somewhere and select Add Door. The default door dimensions are 4 blocks tall and 1 block wide.


Right-click the door and select Edit Door. a new window will open. See the Info section? Note on YOUR SCREEN the number of the door you just placed.
If you enter your new door from the left, change the X exit distance to E0. If you enter your new door from the right, change the exit distance to 20.
Hit Apply and keep the window open.


Find your destination door, or add it. You can hover your cursor over the new door to see its number.


Back in the Edit Door window, tick the box that says Auto connect destination door and type the destination door's number into the Connected door box.
Hit Apply. The Destination part of the Info Section should update. (Shown in green.)
You may close the Edit Door window.


Go back to BG Editing mode.
Under the Edit section of the main window, make sure that BG 1 and Clipdata are checked.
BG 0, 1, and 2 are the placements of block graphics. BG 0 is in front of samus and usually transparent. BG 1 is solid and in front of samus. BG 2 is solid and behind samus. The Clipdata is the programmed behavior of the block. Clipdata 0 is Air, and clipdata 10 is Solid block for example.


Under the Tileset section of the main window, open the Clipdata dropdown menu. Select 20 - Door Transition Block.


Click and drag over hatch blocks in the top left of the tileset, and then click the top block of the door to place the new clipdata and blocks.


It has no hatch (cap) yet, but as long as both doors have clipdata 20 over them, you should be able to walk to and from them. Now let's take care of those caps.
Open the Tileset dropdown menu again.
For gray doors, select 30 - Gray door.
For blue doors, select 36 - Regular door.
For red doors, select 40 - Missile door.
For green doors, select 46 - Super Missile door.
For yellow doors, select 4C - Power bomb door.


Click and drag over the respective orientation and color of hatch in the tileset you wish to place. I will place a blue door.
This time, place the cap next to the door.


Congrats! You have put together your first set of doors!

[/spoiler]
[spoiler=How do I get the morph ball to appear correctly?]
Morph ball won't appear when you use the test room function in MAGE because it loads a state where Samus has every ability.
Not all sprites can be used in the same room -- This is where spritesets come in. Spritesets are a couple sprites assigned to a group, which is then assigned to the header of a room to use.

To move the morph ball to your new room, open the Header editor. A new window appears.
In the Spriteset Data section, change the Default Set to 1 and then press Apply.



Now, change to Object editing mode. Right click the desired morph ball location in the room, and select Add Sprite.


A Geemer will be placed. That's because the Geemer is in sprite slot 0, which is the default slot for when a sprite is added.
Right click the Geemer, and select Edit Sprite. A new window appears.


Under the Edit section of the Edit Sprite window, change Slot to 1 and then select Apply.
You have successfully placed morph ball!


[/spoiler]
[spoiler=And last but not least, how do I move the location of new rooms?]
In the main window, Go to your new room and select Room options. A new window appears.
Note the Width and Height of your new room. (measured in screens)



Open the Minimap editor. A new window appears.
See the numbers at the bottom left? That is the current X and Y position your mouse cursor is hovering over on the minimap. To change your room's location on the minimap, find the desired location for the top left of your room.



Open the Header editor. A new window appears.
Under the Miscellaneous section, change the Map X and Map Y coordinates to the new top left position on the minimap.
Hit Apply. Congrats, you've changed the position of a room on the map!


[/spoiler]

Enjoy!

Thank you so very much, but I have one last question that I forgot to ask. How do I change the starting position. Once again, thanks in advance

FelixWright

#480
Quote from: DamienInnit on January 18, 2021, 07:43:00 PM
Thank you so very much, but I have one last question that I forgot to ask. How do I change the starting position. Once again, thanks in advance

To start with, make sure you place a door in MAGE using the Object editing mode at the spot you want samus to spawn. Have its dimensions set to 1 Width x 1 Height (edit the door to do this) and save.

Now to use this door, you will have to use the Starting Room ASM. (Link)

To run ASM you need to get ARMIPS, (Link) which is an arm compiler.

Open the Starting Room ASM file in a text editor.

On Line 9, you will see     mov     r1,5 ; new area
Change 5 to whatever you would like. Below is a list of each area.

0 = Brinstar
1 = Kraid
2 = Norfair
3 = Ridley
4 = Tourian
5 = Crateria
6 = Chozodia


And on Line 11, you will see     mov     r1,0x1A ; new door
Change 0x1A to whatever the new door is. If the new door is 62 for example, you'll replace 0x1A with 0x62.

Optionally, on Line 18, you will see mov     r0,0xE ; music track
This is the music track that gets set when you are first in the room. If it's different from the room normally, it will change back to what the room has assigned when you leave and re-enter.
You can use this list of tracks on the wiki (Link) to change it.
Change 0xE to something else. For example, 0x1 for the Brinstar theme.

Put the ASM and a copy of your ROM in the same folder as ARMIPS, rename your ROM to ZM_U.gba, and then drag the starting room ASM over ARMIPS. If it is successful, ZM_U_startingRoom.gba should spit out.

You can use the ASM patched rom for testing, but continue to edit with the ROM before the ASM patches. ASM patches tend to write to the same locations unless you apply them all at once. It's a LOT harder to add ASM to or remove ASM from a rom that already has ASM, compared to a ROM without ASM. To save yourself and everyone else headaches, save ASM for testing/last, and continue to edit the ROM before ASM.

If you have a Discord account you ought to join MAGConst (Metroid Advance Game Construction), a subcommunity of Metroid Construction. MAGConst has you covered on all the tools you need, and plenty of people available to help you out with your gbatroid hacking endeavours!

DramaticMarquinh0svi

I have a problem that i never found a awnser to.
When I press T it says error no application is associated with specified file, how do I fix this?

FelixWright

Quote from: DramaticMarquinh0svi on February 07, 2021, 02:42:03 PM
I have a problem that i never found a awnser to.
When I press T it says error no application is associated with specified file, how do I fix this?

You need to assign a GBA emulator as the default for opening dot GBA files to use the test room feature.

Meculus

How would I create security doors and security stations for Fusion?

Meculus

Also, is it possible to create new weapons for the game? (for example, port the diffusion missiles to ZM).

biospark

Quote from: Meculus on February 19, 2021, 03:20:58 PM
Also, is it possible to create new weapons for the game? (for example, port the diffusion missiles to ZM).

Not with MAGE. MAGE is intended for editing data, not code. You'd need to write a lot of custom asm to add new weapons.

Meculus

#486
I posted something, then figured it out on my own.

Meculus


Tomycase

Hello there, I just downloaded MAGE and attempted to open it, only for it to immediatly stop working, I tried to open it as admin but nothing works, does MAGE require particular spec or specific programs installed to be opened? Thanks in advance!

FelixWright

Quote from: Tomycase on April 28, 2021, 09:10:10 AM
Hello there, I just downloaded MAGE and attempted to open it, only for it to immediatly stop working, I tried to open it as admin but nothing works, does MAGE require particular spec or specific programs installed to be opened? Thanks in advance!

Welcome to Metroid Construction!

My apologies for this very late response, but MAGE requires .NET Framework 3.5. If you are on Windows 10, you should be prompted to install it. However on legacy OS you may have to do it yourself.

Hope this helps!

Tower

I want to put a door in middle of the room like you see in a lot of super metroid hacks but for some unknown reason the door doesnt open. Can someone tell me how to do it?

caauyjdp

You need two things. Door clipdata, and a door "object" next to that clipdata.
Optionally also transition tiles, bg1 door tiles to make it look like a door initially, and a configuring door destination but that is not required to just make an openable door.

sammy erinn

I've been trying out the editor and I can't for the life of me figure out how to control which tiles the bomb chains place when they're destroyed. I was hoping to figure it out on my own but I'm really lost.

sammy erinn

#493
For anyone in my position in the future: it just increments the tile index for BG 1, so whichever tile you place, if you blow up a bomb chain on that tile, it'll place the next tile on the sheet on BG 1 at the same location (at least in Fusion).

FelixWright

Quote from: sammy erinn on July 03, 2021, 08:12:47 PM
I've been trying out the editor and I can't for the life of me figure out how to control which tiles the bomb chains place when they're destroyed. I was hoping to figure it out on my own but I'm really lost.
Quote from: sammy erinn on July 03, 2021, 11:26:29 PM
For anyone in my position in the future: it just increments the tile index for BG 1, so whichever tile you place, if you blow up a bomb chain on that tile, it'll place the next tile on the sheet on BG 1 at the same location (at least in Fusion).

What do you mean by this?

sammy erinn

Quote from: Cosmic on July 04, 2021, 11:23:37 AMWhat do you mean by this?
I'm working on Fusion in MAGE rn and I haven't tried it with Zero Mission, so this may not apply to ZM. Clipdata 70-77, the bomb chain blocks, sometimes reveal ladders when they are destroyed (for instance, in the Tourian looking bit of sector 1, room 15 in the upper two screens on the right, pic for illustration), and sometimes just leave open air. I didn't know how the game selects which tile to place in BG 1 when a bomb chain block is destroyed, and when I was placing them, they replaced the old BG 1 tile (in my case, a black square) with something unexpected from the tileset (a bit of floor, in my case).

A couple hours later I figured out that when a bomb chain block is destroyed, the game takes the tile that was there and replaces it with the next tile over to the right, so if the tile you put down is at row 4 col 0, it'll place the one in row 4 col 1. Problem solved.

Sorry if I'm not using terms right, I'm pretty new to this.


FelixWright

Quote from: sammy erinn on July 04, 2021, 01:19:10 PM
[spoiler]I'm working on Fusion in MAGE rn and I haven't tried it with Zero Mission, so this may not apply to ZM. Clipdata 70-77, the bomb chain blocks, sometimes reveal ladders when they are destroyed (for instance, in the Tourian looking bit of sector 1, room 15 in the upper two screens on the right, pic for illustration), and sometimes just leave open air. I didn't know how the game selects which tile to place in BG 1 when a bomb chain block is destroyed, and when I was placing them, they replaced the old BG 1 tile (in my case, a black square) with something unexpected from the tileset (a bit of floor, in my case).

A couple hours later I figured out that when a bomb chain block is destroyed, the game takes the tile that was there and replaces it with the next tile over to the right, so if the tile you put down is at row 4 col 0, it'll place the one in row 4 col 1. Problem solved.

Sorry if I'm not using terms right, I'm pretty new to this.

[/spoiler]

Oh wow, that's really cool. TIL

sammy erinn

#497
Another question that may or may not be Fusion-specific, so I'm posting it here. How does the event-based connection table work, and is it possible for MAGE to corrupt it? In the thread I (very prematurely) created for the thing I'm working on I explained that my patch does not connect the observation deck's elevator room to the SA-X's boss room during her event (more technically, door 8B in room 3C on the main deck is supposed to connect to door CC in room 55 from event 63, displayed as 99 in the debug menu). This makes the game unbeatable.

The rest of this is context/details/reproduction. It's a pain to control when it does/doesn't happen so this runs a bit long.

It is the only event-conditional connection that seems to properly break like this. All the others behaved in expected ways. It does this with Kazuto's event system hack (any completion order) as well as without. What's worse is initially when this happened, I hadn't touched the event-based connection table at all, and trying to reproduce the issue, I found it was extremely finnicky. Exporting rooms from my map that I believed might be the cause and then importing them into vanilla (these were, on the main deck, 42, 4D, 11, 49, and sector 1 0 and 35, the only places where I added doors and/or area connections) importing caused the door 8B not to lead to CC sometimes, but mostly not (using the same save data on every attempt). I tried to repeat the sequence of imports and table edits that appeared to cause the issue, but it worked fine.

I then tried adding a duplicate event-based connection in the map edit (where the issue occurred), adding a duplicate that triggers on event 64 (100 decimal), and deleting and re-adding the connection. This fixed nothing. Then I tried adding a new door with identical properties to 8B and then deleting 8B (also removing its event based connection). To my surprise, this actually worked (in that order; in the opposite order, it did not work, I imagine because the new door was named 8B). Because I didn't want to increase the number of doors further, I decided to delete the one in room 4D (it's door CE in my patch), then add a new door to room 3C that copies 8B, including the event-based connection. Then I deleted 8B and its event-based connection. This appeared to work; the SA-X boss room loaded.


In this image I'm on event 0x64/100

Then I created a door in room 4D to replace the one I deleted, and connected it with room 42. The game broke again. And here's the real doozie: I undid my modifications and saved the ROM in the configuration that had worked before, and the game was still broken. This leads me to believe that the issue is nondeterministic with respect to the interpretable state of the game. It may be something MAGE is doing, or on the other hand I may have overlooked something.

But I appear to have a repeatable sequence of edits that causes this issue. Download the patch, patch vanilla with it, locked game (you can tell by entering the observation deck after event 63, the door will not lock and the SA-X will not spawn, because you weren't sent to the boss room). Delete door CE, add a door to room 3C that copies 8B exactly. Delete 8B, and the game should now no longer be locked. Add another door (it will be numbered 8B) to room 4D that connects to CF in room 42, and an event-based connection on 5F connecting CF to D0 in room 11. The game locks again. Undo that change and the game should remain locked. I will try this again tomorrow to make sure it always happens. Tonight, I am tired.

caauyjdp

Mage currently(v1.3.2) has a "bug"(?)(fusion only) which changes how even based connections are processed by the game if you ever visit that tab of connections editor(even without changing anything).
If you know how to apply asm patches, there's a workaround patch by Kazuto in magconst discord.
Direct download link: https://cdn.discordapp.com/attachments/280756187522400257/819578660028678154/Fix_MAGE_Event_Connections.asm

biospark

This is because event connections are hard-coded in the game. To get around this, when you load the event connections tab for the first time, MAGE applies a patch that converts event connections to a table, and modifies the function that checks for event connections.

I won't be updating the existing version of MAGE anymore (which may have been obvious already), but I'm slowly working on a rewrite of MAGE, which shouldn't have issues like this.