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

MBT808

noticing some issues with the mini map in ZM after editing a few rooms, it seems to not like when rooms change direction or the doors to certain rooms move a square. this just an normal result of editing or a problem with mage?

biospark

Quote from: MBT808 on January 04, 2017, 10:55:08 PM
noticing some issues with the mini map in ZM after editing a few rooms, it seems to not like when rooms change direction or the doors to certain rooms move a square. this just an normal result of editing or a problem with mage?

You have to manually edit the minimap yourself when you change the layout of your rooms.

Cpt.Glitch

Got an unhandled exception when editing a tileset palette. This is on an unchanged ROM.


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

************** Exception Text **************
System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
   at mage.VRAM.GetBGtiles()
   at mage.VRAM..ctor(ROMFile rom, Tileset tileset, Boolean draw)
   at mage.FormMain.RedrawTileset()
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.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.8745 (WinRel.050727-8700)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
mage
    Assembly Version: 0.8.1.0
    Win32 Version: 0.8.1.0
    CodeBase: file:///C:/Users/gamed/Desktop/mage/mage.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8745 (WinRel.050727-8700)
    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.8750 (QFE.050727-8700)
    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.8745 (WinRel.050727-8700)
    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.8745 (WinRel.050727-8700)
    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.8745 (WinRel.050727-8700)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
jpak33ac
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8750 (QFE.050727-8700)
    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.



biospark

Quote from: Cpt.Glitch on January 27, 2017, 03:52:03 PM
Got an unhandled exception when editing a tileset palette. This is on an unchanged ROM.

Can you give me the exact steps to reproduce it? I can't find anything wrong with my code.

Cpt.Glitch

Sure thing.

1.Went to tileset editor
2.Clicked "edit" on Level GFX.
3.Imported a image for the tileset.
4.Editing the palette afterwards in any window that changes the palette give the error.
Doesnt do it for importing a Raw file. Just an image. May be something I am neglecting to do?

biospark

Quote from: Cpt.Glitch on January 27, 2017, 10:48:40 PM
3.Imported a image for the tileset.

How large is the image? I'm assuming that's causing the problem somehow.


FelixWright

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

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at mage.FormSpriteset.button_apply_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.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.8745 (WinRel.050727-8700)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
mage
    Assembly Version: 0.6.6024.16590
    Win32 Version: 0.6.0.0
    CodeBase: file:///H:/Games%20N%20stuff/Metroid/GBA/Hacking%20Devices/mage%200.6.1/mage.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8745 (WinRel.050727-8700)
    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.8750 (QFE.050727-8700)
    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.8745 (WinRel.050727-8700)
    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.8745 (WinRel.050727-8700)
    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.8745 (WinRel.050727-8700)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
xfcrnl8c
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.8750 (QFE.050727-8700)
    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.




Got this by hitting "Apply" while rearranging some sprites.



EDIT: I reread the error details and saw I posted an error message from mage 0.6.1. I can assure you, as well as verify that this can and did happen to me on 0.8.1 as well.

EDIT EDIT: I RTFM and realised i wasn't spriteset editing correctly. There are no issues here!

biospark

Quote from: Cpt.Glitch on January 28, 2017, 09:43:04 AM
400 x 288

@Cpt.Glitch Well there's your problem. VRAM only has 0xC000 bytes for tile data, but a 400 x 288 image would be 0xE100 bytes. Furthermore, there's only 0x8000 bytes available for level graphics.

Also, what kind of image are you trying to import? If you're trying to import a tileset image (one that looks like the image you see on the left side of MAGE), you should use Tools > Import > Tileset from Image


@FelixWright Thanks for catching that. Turns out using sprites less than 0x10 cause that to happen. I think I'll just prevent people from adding sprites from 0-F. You shouldn't ever need those sprites in ZM, and in Fusion you get sprites 0-F by modifying the sprite's property and slot, not by adding them to the spriteset.

Cpt.Glitch

I resized the image to get rid of unused space and imported as you suggested. Works great now. Thanks for helping me with my silliness.

Miepee

Is there currently a way to edit the generic BG graphics? I wanted to change the doors from Zero Mission to those of Fusion.

biospark

Quote from: Miepee on January 31, 2017, 04:17:06 PM
Is there currently a way to edit the generic BG graphics? I wanted to change the doors from Zero Mission to those of Fusion.

The technical document has the offsets to all the generic graphics/palettes. Just find the palette offset you need and put it into the palette editor.

FelixWright

Quote from: biospark on January 31, 2017, 04:55:37 PM
Quote from: Miepee on January 31, 2017, 04:17:06 PM
Is there currently a way to edit the generic BG graphics? I wanted to change the doors from Zero Mission to those of Fusion.

The technical document has the offsets to all the generic graphics/palettes. Just find the palette offset you need and put it into the palette editor.

He was asking about changing the graphics of the doors, rather than only their palettes.

Quote from: Miepee on January 31, 2017, 04:17:06 PM
Is there currently a way to edit the generic BG graphics? I wanted to change the doors from Zero Mission to those of Fusion.

I recommend you look through this.

graphics: 005D940C (6132748 in decimal)
palette: 005DFE20 (6159904 in decimal)

biospark

Quote from: FelixWright on January 31, 2017, 09:01:02 PM
He was asking about changing the graphics of the doors, rather than only their palettes.
Whoops, somehow read that as palette. Anyway the process really similar. Find the offset in the technical guide, and put the offset in the graphics editor.

Unfortunately the graphics editor in 0.8.1 has some bugs related to importing and exporting images, but if you use the raw format you should be fine.

Miepee

Besides the fact that MAGE can't import it correctly, it worked! Thanks for that! :^_^:

Also I don't know if this is a bug in MAGE or the MZM engine, but slopes are a bit weird: If you place one, (it doesn't matter which kind or direction) walk towards it and keep holding the run button, you will begin walking on air and when running long enough you will be able to crouch, fall and then shinespark to the direction you came, allowing you to walk on the slope and shinespark again. Interestingly this doesn't work in Fusion, well except that shinesparking against the back of the slope will still gain you the shinespark, but you can't walk past it.

I'm sorry if this wasn't understandable, I'll try to get footage of that and post it here as soon as I can.

biospark

Quote from: Miepee on February 02, 2017, 12:50:41 PM
Also I don't know if this is a bug in MAGE or the MZM engine, but slopes are a bit weird

You have to place a solid block on both sides of the slope so that they line up with the top and bottom. They have odd behavior if you don't.

Miepee

Quote from: biospark on February 02, 2017, 01:30:24 PM

You have to place a solid block on both sides of the slope so that they line up with the top and bottom. They have odd behavior if you don't.
Any idea, why this is only in Zero Mission?

FelixWright

#292
I'll admit I get impatient working with the tile table editor. Do you think you can add a click + drag feature, up to a 16*16 pixel square?

[spoiler=example][/spoiler]

something like this.

biospark

Quote from: FelixWright on February 04, 2017, 07:13:29 PM
I'll admit I get impatient working with the tile table editor. Do you think you can add a click + drag feature, up to a 16*16 pixel square?

I'll probably improve all the editors in the future, but right now I'm prioritizing other features. I'd like to add all the tools you need for a full, comprehensive hack.

Also I've been working on a ZM randomizer instead of MAGE.

NathanTech

Having an interesting problem when trying to import a tileset from image - I added 5 new tiles from another room's tileset - made sure it was the same pallete - made sure the image was 32bit and had the same dimensions - still though when finally importing I get this error "Index was outside the bounds of the array" what am I doing wrong?

biospark

Quote from: NathanTech on February 23, 2017, 11:40:29 AM
Having an interesting problem when trying to import a tileset from image - I added 5 new tiles from another room's tileset - made sure it was the same pallete - made sure the image was 32bit and had the same dimensions - still though when finally importing I get this error "Index was outside the bounds of the array" what am I doing wrong?

It's a problem with MAGE. I suspect the problem is fixed in the new version I'm working on, so if you send me the image I can find out.

NathanTech

The new tileset is on the right - this is the error I'm getting when trying to import
sorry if the image doesn't show up in the post i'm new to this
image: https://postimg.org/image/85xt8jv71

biospark

Quote from: NathanTech on February 23, 2017, 09:10:47 PM
The new tileset is on the right - this is the error I'm getting when trying to import
sorry if the image doesn't show up in the post i'm new to this
image: https://postimg.org/image/85xt8jv71

I need the actual image you were trying to import. Otherwise I can't find out what went wrong.


biospark

Quote from: NathanTech on February 24, 2017, 01:28:53 PM
here it is

Thanks, I found the problem. Unfortunately, the version I'm working on is not in a releasable state, so it may be a few weeks before I release it. For now, you could probably use the graphics editor and tile table editor to do what you want.