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

sammy erinn

#500
Quote from: caauyjdp on July 06, 2021, 04:18:14 AM
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

Thank you so much I thought I was losing my mind. What does this patch do to work around the issue? I'd like to understand it better before I use it just so that I don't break things again by mistake later on.

Quote from: biospark on July 06, 2021, 02:21:47 PM
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.

Thanks, I understand this a lot better now. I think for now I'll just change my map edit so that it doesn't need to add any event-based connections and then just never open that tab. I imagine that patch will be useful in the future though.

sammy erinn

#501
Also, this is just out of curiosity (if you're willing to answer, biospark), how does the modification to the function that checks for connections introduce errors? It seems odd to me that just that particular event-based connection was apparently affected, and that, after shuffling the doors and table around so that a different connection achieved the same purpose, and then adding another connection, the connection I previously added, the one doing the same thing as the one that was replaced, was the one that broke (although I guess several may have broken). Never mind, a whole bunch of connections are acting up in my working version.

Really what this means to me is I need to start learning how to dig into the game code or else I'm gonna wind up pretty stumped with this stuff.

caauyjdp

Quote from: sammy erinn on July 06, 2021, 02:33:22 PM
Thank you so much I thought I was losing my mind. What does this patch do to work around the issue? I'd like to understand it better before I use it just so that I don't break things again by mistake later on.
Been a few months, but iirc.

Vanilla has connection table sorted from low to high event number, and code goes through it from high to low, triggering first connection found that matches area/door and has same or lower event number, so you can have higher event number connections overriding lower ones.

Mage changes that code, to go through the table low to high, returning first match, making it so that higher event connection can't override lower ones. In addition, it doesn't sort the table, new connections are appended at the end, which means that new added connections can't override older ones, even if new ones have lower number.

Patch needs to be applied to a rom that already has mage's code change. It changes to code, making it go through the whole table, and returns connection with highest event number that's applicable, regardless of it's place in the table.

Iirc/afaik(tm)

sammy erinn

Quote from: caauyjdp on July 06, 2021, 04:17:37 PM
Quote from: sammy erinn on July 06, 2021, 02:33:22 PM
Thank you so much I thought I was losing my mind. What does this patch do to work around the issue? I'd like to understand it better before I use it just so that I don't break things again by mistake later on.
Been a few months, but iirc.

Vanilla has connection table sorted from low to high event number, and code goes through it from high to low, triggering first connection found that matches area/door and has same or lower event number, so you can have higher event number connections overriding lower ones.

Mage changes that code, to go through the table low to high, returning first match, making it so that higher event connection can't override lower ones. In addition, it doesn't sort the table, new connections are appended at the end, which means that new added connections can't override older ones, even if new ones have lower number.

Patch needs to be applied to a rom that already has mage's code change. It changes to code, making it go through the whole table, and returns connection with highest event number that's applicable, regardless of it's place in the table.

Iirc/afaik(tm)

Thanks, I will keep that in mind when I eventually come back to messing with that.

Paulinho

Does anyone know if is it possible with MAGE to replace our playable samus sprite for the SA-X sprite?

Conner


OneOf99

Quote from: Paulinho on July 31, 2021, 09:02:55 PM
Does anyone know if is it possible with MAGE to replace our playable samus sprite for the SA-X sprite?

no



rx_streams

Hello! How to turn an sprite into a tile? Specifically the debris that falls on the B.O.X. fight. I though about using it's spriteset on the room I wanted but there's already enemies there and the B.O.X. spriteset (where the falling debris is) takes all the 8 rows... So I though about ripping the debris sprite from it and turn it into a fixed tile since where I'll use it doesn't need to fall from the ceiling like in the fight. But I'm having a hard time finding how to do so through the forum search. If anyone can point me the direction, I thank you ahead!

alexman25

#510
Quote from: rx_streams on August 18, 2021, 10:58:02 PM
Hello! How to turn an sprite into a tile? Specifically the debris that falls on the B.O.X. fight. I though about using it's spriteset on the room I wanted but there's already enemies there and the B.O.X. spriteset (where the falling debris is) takes all the 8 rows... So I though about ripping the debris sprite from it and turn it into a fixed tile since where I'll use it doesn't need to fall from the ceiling like in the fight. But I'm having a hard time finding how to do so through the forum search. If anyone can point me the direction, I thank you ahead!

Unless I'm misinterpreting, I think you'd need to write new custom code from the ground up to accomplish that. I feel like you may have jumped to the most difficult possible solution first.

EDIT: Ignore me; I'm stupid.

rx_streams

#511
Quote from: alexman25 on August 19, 2021, 12:25:45 AM
Unless I'm misinterpreting, I think you'd need to write new custom code from the ground up to accomplish that. I feel like you may have jumped to the most difficult possible solution first.

EDIT: Ignore me; I'm stupid.

Hey, thanks for the reply! Why are you stupid, I'm stupid lol I have little to no experience in coding and hex editing & such and maybe it's because I dunno how things work internally but I feel like it's not that hard to achieve what I want. Like, I saw some other hacks with completely different tiles and textures, which means it's possible to at least add new textures. So, in the most basic way to think, I could screenshot the debris, remove/make an transparent/make a matching background on it on Paint or such, then insert it on the tiletable. I saw there was an import/export tiletable but I don't know how to edit and add tiles to it then import back (if that's even possible), unless it really needs coding then I'll have no other way around but learning how to -or remove the enemies to use B.O.B. spriteset for the debris lol- Once the debris becomes a tile, I can use normal clip data for it's physics since it already have fallen down on the room I wanted to use it.

Thanks again for the reply!

FelixWright

#512
Lot of terminology being misused here. You can export the tileset you want to change as an image, open it in paint/GIMP/aseprite/etc, then you can screenshot these graphics and paste them in. Some edits here and there, import your edited tileset image, and you get what you want.

Paulinho

i think that's a dumb question but how can i change, for example, a speedbooster block to a normal missile block? i've clicked every possible option on mage but I didn't find it
Also, when i play test room mage says

''test rom could not be launched''
it says right after (on portuguese, my main language and my pc language) there are no specified program to open that function, something like that. I've downloaded last version of MAGE here on forum

FelixWright

Quote from: Paulinho on August 23, 2021, 05:52:39 PM
i think that's a dumb question but how can i change, for example, a speedbooster block to a normal missile block? i've clicked every possible option on mage but I didn't find it

block behaviors in zm are clipdata read the doccccccccc. what you see at the top of the tileset is just graphics

Quote from: Paulinho on August 23, 2021, 05:52:39 PM
''test rom could not be launched''

make sure you have an emulator set to open dot gba (.gba) files by default

Paulinho

Quote from: Cosmic on August 23, 2021, 06:43:18 PM

block behaviors in zm are clipdata read the doccccccccc. what you see at the top of the tileset is just graphics


Thank you Cosmic now is working :)

I have two more questions

1) Is it possible to change major event order from zero mission? Starting the game with zero suit samus going to acquire the fully powered suit from the chozo test and then going through the entire game, ending on mother brain? (and triggering the final escape sequence, the one with the space pirate ship)

2) Is it possible to prevent mecha ridley from triggering the timer and the end game?

I'd like to make a hack rom where you start as zero suit samus, goes through chozodia to get your power suit then beat the bosses in order to make final boss the mother brain, i'd like to put mecha ridley somewhere in mid game or forget him at all

make sure you have an emulator set to open dot gba (.gba) files by default

FelixWright

Quote from: Paulinho on August 24, 2021, 02:45:56 AM

1) Is it possible to change major event order from zero mission? Starting the game with zero suit samus going to acquire the fully powered suit from the chozo test and then going through the entire game, ending on mother brain? (and triggering the final escape sequence, the one with the space pirate ship)

Metroid zero mission's order of events is not linear like fusion's, you can do it any way you like. There's probably a hex tweak somewhere to start with the zero suit, I would ask interdpth about that.

Quote from: Paulinho on August 24, 2021, 02:45:56 AM
2) Is it possible to prevent mecha ridley from triggering the timer and the end game? I'd like to make a hack rom where you start as zero suit samus, goes through chozodia to get your power suit then beat the bosses in order to make final boss the mother brain, i'd like to put mecha ridley somewhere in mid game or forget him at all

This might be documented on the wiki but you can change who starts the escape timers. Otherwise, consider joining the MAGConst discord server and looking around if you haven't already

Tower

is it possible to mod the rom so that game ends after reaching a certain room?
Like if you there is an escape sequence and you shinespark into a space?

biospark

#518
New version!

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)

I don't plan on adding any new features after this, since I'm working on MAGE 2 in WPF instead. However, I've made it open source, so feel free to submit your own changes: https://github.com/biosp4rk/mage-old

Consumedgrub2

Hello Biospark, do you plan on open sourcing MAGE 2? I am a profound C# developer and have started to sink my teeth into windows form development and WPF development. It would be amazing if I could contribute to MAGE 2. Unfortunately for the low level asm code, I would be of no use since I have no clue what I'm doing there with the game assembly, but I am happy to help in any way. Metroid Fusion is my favorite game of all-time to this day and I would be so happy if I could see the next generation of tools and attention be directed towards Fusion!

Conner

MAGE 2 Will be open source.
In the mean time you can also work on the MAGE 1 source

Tower

how do i get pirate ship to open so i can end game without timer? Like in desolation. Or do i need to get it patched?
Is there like an event list for zero mission? Also i want to make doors in the middle of the room, kinda like in yfaster in first area to get spring ball but when i put them there they dont open even with missile

caauyjdp

Quote from: Tower on November 01, 2023, 06:13:21 AM
how do i get pirate ship to open so i can end game without timer? Like in desolation. Or do i need to get it patched?
You need to edit the code of the game to allow that. One way of doing it, if you have a hex editor, open your rom, go to file offset 4AFEC. Values there should be 00 28 in vanilla, change them to 01 E0.
Quote from: Tower on November 01, 2023, 06:13:21 AM
Is there like an event list for zero mission?
http://labk.org/maps/app/?game=zm&region=u&map=enums&filter=event
Quote from: Tower on November 01, 2023, 06:13:21 AM
Also i want to make doors in the middle of the room, kinda like in yfaster in first area to get spring ball but when i put them there they dont open even with missile
You have to be more clear, since not everyone plays/remembers every hack.
I'm guessing it's just shootable doorcaps without transitions.
Zm can approximate that somewhat with missile door clipdata over doorcap gfx and door object(doesn't have to be "valid" since there's no transition) next to it. From minimal experimentation, right facing doorcaps can be stacked without space in between, left facing would need space in order to open in correct direction. Hatch limit per room is 16(decimal) iirc.
Also, imo, in this case, since it's not a common usecase so you should be the one experimenting.

Tower

Quote from: caauyjdp on November 01, 2023, 10:53:20 AM
You have to be more clear, since not everyone plays/remembers every hack.
I'm guessing it's just shootable doorcaps without transitions.
Zm can approximate that somewhat with missile door clipdata over doorcap gfx and door object(doesn't have to be "valid" since there's no transition) next to it. From minimal experimentation, right facing doorcaps can be stacked without space in between, left facing would need space in order to open in correct direction. Hatch limit per room is 16(decimal) iirc.
Also, imo, in this case, since it's not a common usecase so you should be the one experimenting.

Yes i mean doorcaps that for example would open if you would kill a boss or all enemies in a room. When i put them they dont open. How to fix that.

caauyjdp

Unlike sm, vanilla zm doesn't have a concept of kill x enemies doors.

I wrote some asm a while back that I didn't get around to testing much, that should work(tm), but it's not exactly userfriendly.

By default replaces unused sprite 6C. Putting that sprite in a room with a property 1-7,9-F will
check if event (36h + propery) is set, and if yes, does nothing. If event is not set yet, it'll lock all doors and wait untill enemies are killed, then set event and unlock doors. Properties 0 and 8 are used by the game engine for a special thing so can't be used here. Event 37h is 1st metroid room, so it uses those events by default on low property values(code has no sanity checks iirc), tho base event is configurable in the asm, same as sprite id it replaces.
Code is year and a half old at this point so I could be misremembering above.

There's ancient FAQ linked on the wiki that explains how to apply asm patches: https://drive.google.com/open?id=1X4Szh5fKXE4y-UDNp3d9pF1KSs11jj_wghiVWE8MQA0