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

biospark

The editor is here!

Download
1.4.0 - 2023-01-21
  - Added file screen text for Fusion
  - Fixed bug when saving shifted tile tables
  - Fixed Zero Mission beam damages
  - Fixed palette importing/exporting to not rely on filename
  - Testing a ROM uses a manually set emulator path instead of using the system default
  - ROMs can be opened directly with MAGE (via command line or drag and drop)

Source code: https://github.com/biosp4rk/mage-old

The download includes help files, which can also be accessed online here. If there's something you don't understand and the documentation doesn't help, please ask about it here.

Note: MAGE is used primarily for editing data, not code. If you have a question about changing the way something works, this is not the place to ask. You can ask in one of the general help threads:
Fusion: http://forum.metroidconstruction.com/index.php/topic,4140.0.html
Zero Mission: http://forum.metroidconstruction.com/index.php/topic,4141.0.html

Happy hacking!

Jiffy

This looks really promising. I'm gonna try this out when I get back to my PC tomorrow!!

thedopefish

Ooh, nifty.  Especially since it runs nicely with Mono.

Antidote


Golden Warrior

Wow, just today I was considering whether or not I should start my hack idea before you release this editor, or just work with DH. Looks like I don't have to choose anymore! Just based on the livestream, this has a lot of promise. Looking forward to seeing where this goes.

Quietus

Woohoo! I'll give this a spin tomorrow. :^_^:

interdpth

Lemme know if you need any data, fam. Gonna give it a spin tonight, fine to report bugs in this thread?

biospark


interdpth

Ayyy, you might want them in a github, or e-mail or some other thing.
The spriteset text seems weird, if 0 is default, 1 is "first". Can you just make it "First", "Second", "Third" and get rid of 
Is Sprite transparency supposed to be a thing?
Can you not edit clipdata until you've selected a tile? I'm having trouble just fixing some clipdata in an area I messed. Can you setup a clipdata viewer? Also shoutouts to DH were nice.
(Docking windows would be cool)

Will have more later.

biospark

QuoteThe spriteset text seems weird, if 0 is default, 1 is "first". Can you just make it "First", "Second", "Third"
That's what P.JBoy used. Think of it as "first extra" and "second extra".

QuoteIs Sprite transparency supposed to be a thing?
Semi-transparent sprites represent sprites that only form from X parasites (did you read the sprites section in the documentation?)

QuoteCan you not edit clipdata until you've selected a tile?
If you're using a clipdata value from the drop down list, you have to select a tile from the tileset first, even if you're only editing clipdata (did you read the backgrounds section in the documentation?)

QuoteCan you setup a clipdata viewer?
Look under "view".

Cpt.Glitch

So far I've tested just about everything in Zero Mission, and it works wonderfully. Only issue is, as I mentioned to you in IRC, that due to 'testroom' mode giving samus every item, you cant test things like Major Item text changes and whatnot. (because you cant collect it. (because you already have it)). Not that big of a deal but would make beta-ing a would-be hack more difficult. Have not come across any bugs so far.
Will test out these rad features in Fusion later.

biospark

Quote from: Cpt.Glitch on June 21, 2016, 10:12:12 PM
Only issue is, as I mentioned to you in IRC, that due to 'testroom' mode giving samus every item, you cant test things like Major Item text changes and whatnot.
You can always edit the RAM values for your current equipment. For reference:
[spoiler]
3001530 Health capacity
3001532 Missile capacity
3001534 Super capacity
3001535 Power capacity
3001536 Current health
3001538 Current missiles
300153A Current supers
300153B Current powers
300153C Beam+bomb
   01 Long beam
   02 Ice beam
   04 Wave beam
   08 Plasma beam
   10 Charge beam
   20
   40
   80 Bombs
300153D Beam+bomb activation
300153E Suit+misc
   01 Hi-jump
   02 Speed booster
   04 Space jump
   08 Screw attack
   10 Varia suit
   20 Gravity suit
   40 Morph ball
   80 Power grip
300153F Suit+misc activation
[/spoiler]

I might add a feature to let you pick your equipment, but I'll wait an see if I can hack the debug menu into ZM.

jaysee87

I can't access connection editor anymore.
[spoiler]
Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.

Index was outside the bounds of the array.

Under details.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at mage.FormConnection.FillDoorEvents()
   at mage.FormConnection..ctor(FormMain main, Int32 tab)
   at mage.FormMain.menuItem_connectionEditor_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8669 (QFE.050727-8600)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
mage
    Assembly Version: 0.5.6016.417
    Win32 Version: 0.5.0.0
    CodeBase: file:///D:/mage/mage.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8662 (QFE.050727-8600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8690 (QFE.050727-8600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8681 (QFE.050727-8600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8662 (QFE.050727-8600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8679 (QFE.050727-8600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
mwfoddjc
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8690 (QFE.050727-8600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Accessibility
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8662 (QFE.050727-8600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.



[/spoiler]

I can open up everything else fine.

Xenesis

Ooh fun.

Congrats on getting this out. It's diversion time!

I'll try it with mono (as it was said to work up in the thread) but if that fails I have a Windows VM to use.

biospark

Quote from: jaysee87 on June 22, 2016, 01:00:35 AM
I can't access connection editor anymore.
But it was working before? What were you doing before it happened?

Dark-SA-X

Sweet work, I'm glad you succeeded with your tool, I know dpths will be happy and have many many questions for you after he  looks at it and uses it.  :twisted:

By the way, I started a metroid zero mission hack 3 years ago, if double helix didn't lock it, will it work on your tool ?
If it did lock my rom to it only, will you editor fix that error or should I start over again ?

biospark

Quote from: Dark-SA-X on June 22, 2016, 04:21:58 AM
By the way, I started a metroid zero mission hack 3 years ago, if double helix didn't lock it, will it work on your tool ?
If it did lock my rom to it only, will you editor fix that error or should I start over again ?
What do you mean by lock? Why don't you just try opening the ROM?

Dark-SA-X

Quote from: biospark on June 22, 2016, 04:43:16 AM

What do you mean by lock? Why don't you just try opening the ROM?

Double helix has a problem of opening new roms, and when you save it, it is hard to open back up or with any other gba metroid related tools.

Anyway though I gave it a quick test and as you can see its looking good, hopefully I can start back on this gba hack in the near future.

http://i1112.photobucket.com/albums/k481/MaikuGekidouken/Mage%20preview_zpsquxozys0.png

DSO

Congrats on getting your editor released. Right now I'm six feet under in Superland, but I'll probably toy with it at some point.

Looking forward to brave new spikehells!

Lin

#19
This is awesome! It looks like the clean editor the GBA games have needed for a long time. While playing around, I did get a crash attempting to open up the spriteset editor. The error happens for all rooms where there are no sprites, and re-opening the program/ROM/room does not fix it. Program continues just fine if I click continue but the spriteset editor doesn't show up.

Screenshot:
[spoiler][/spoiler]

Stack trace/exception info:
[spoiler]
QuoteSystem.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at mage.FormSpriteset.DrawGraphics()
   at mage.FormSpriteset.comboBox_spriteset_SelectedIndexChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
   at mage.FormSpriteset.Initialize()
   at mage.FormMain.menuItem_spritesetEditor_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
mage
    Assembly Version: 0.5.6016.417
    Win32 Version: 0.5.0.0
    CodeBase: file:///C:/Users/Lin/AppData/Local/Temp/Rar$EXa0.455/mage.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
f6ei0rnh
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
[/spoiler]

EDIT: This is more of a minor complaint that most editors have, but if you up-scale the window by double-clicking on the title bar, if your cursor is placed over the map, the mouse down event will fire and you'll place a tile when that was most likely not intended. I don't know of any "proper" fixes but if you add a really tiny cooldown post-form resize it should work fine. Other small things that would be nice is the option to hide tool windows from the task bar and pressing Esc to close them.

EDIT 2: Scroll editing has a couple issues. If you drag a corner past the opposite boundaries, the mouse offset still changes and causes the drag point to stop lining up with the cursor. For example, if you drag the upper left corner 10 tiles past the right edge of the scroll, the left edge moves even when you move the cursor left one tile so it's offset by 9 tiles. It also sometimes causes some visual issues and the scroll to disappear entirely if you drag it past the room. I can't describe it so here's a video: https://gfycat.com/LeafyHopefulHoki (The scroll doesn't actually come back; it's just the video looping).

interdpth

Quote
If you're using a clipdata value from the drop down list, you have to select a tile from the tileset first, even if you're only editing clipdata (did you read the backgrounds section in the documentation?)

Yeah, can you at least change that functionality if the clip viewer is open?  :D

biospark

QuoteI did get a crash attempting to open up the spriteset editor.
Fixed.

QuoteScroll editing has a couple issues.
I was actually aware of the scroll moving issues, but I haven't come up with a good way to fix it. Also the scroll disappearing is really weird, my only guess it that it happens from the scroll moving too fast. I can try to fix it, but I kinda want to overhaul the gui at some point, so I might wait until then.

QuoteYeah, can you at least change that functionality if the clip viewer is open?  :D
It works the way it does because if your last selection was made in the room, then it will just use the clipdata values of those blocks. I suppose I could put in an override options, so that you choose which clipdata to use.

passarbye

This editor is amazing!
though there's a bit of an issue whenever I edit the BG1 or BG2 of a room. (check bg0 and bg3 as well, I haven't played with those yet)
For example, I'll right click a tile to copy it, left click to paste it. If I then copy any air tile and paste over the tile I just placed it doesn't seem to update the GFX within the room. It will either A: darken the tile a bit, almost like a silhouette of the tile or B: not update the GFX at all.
This is fixed when unchecking/rechecking any of the views (BG0, 1, 2, or 3), or when refreshing the room, but it is quite annoying when doing a layout to constantly refresh for this little bug.

biospark

Quote from: passarbye on June 22, 2016, 12:55:14 PM
though there's a bit of an issue whenever I edit the BG1 or BG2 of a room.
Can you give me a specific example? Preferably a specific room and the blocks you copied.

passarbye

Quote from: biospark on June 22, 2016, 01:03:03 PM
Quote from: passarbye on June 22, 2016, 12:55:14 PM
though there's a bit of an issue whenever I edit the BG1 or BG2 of a room.
Can you give me a specific example? Preferably a specific room and the blocks you copied.
It was in the Main Deck rooms 3 and 6 (mostly just the floor/wall/ceiling tiles though). Honestly it was doing the silhouette yesterday, and today it just didn't update it, but it appears to work after testing a room or just fiddling with the editor. I'm not sure what caused it, but it worked itself out somehow..

How do I make Data download rooms just give me items when I walk in the room? They're connected to the current event bit, but can I bypass that and have it always give the player an item unless they already have it?