News: 11 March 2016 - Forum Rules

Author Topic: Help: Mega Man X Level Editing  (Read 2475 times)

korius

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
Help: Mega Man X Level Editing
« on: October 10, 2021, 07:25:26 pm »
I'm new to romhacking and recently started using the MegaEdX tool to create a level edit hack. In doing so, I changed some of the tiles in Sting Chameleon's stage only to find that the Axe Max enemies had gone completely invisible. Also, changing tiles in Flame Mammoth's stage resulted in the Buster capsule loading the wrong textures. Any help on why this happened and what I can do to fix it?

Update: The buster capsule loading incorrectly was simply due to the game having loaded the Heart Tank in the next room. I changed the tiles once more and was able to fix the issue. As for the invisible enemies on Sting Chameleon's stage, still having trouble with that if anyone has any advice.

Update 2: I believe power cycling the console solved the issue, as the Axe Max enemies now display properly. Huzzah!
« Last Edit: October 11, 2021, 02:38:31 am by korius »

MysticLord

  • Full Member
  • ***
  • Posts: 234
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #1 on: October 11, 2021, 01:33:03 am »
I couldn't even begin to understand how to use that tool, there's no instruction manual, and no one replied to my post requesting help to learn how, so don't hold your breath.

korius

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #2 on: October 11, 2021, 02:36:56 am »
That's unfortunate. I could probably write up a small tutorial for the stuff I've learned so far, but the majority of the utility remains a mystery to me.

NiO

  • Full Member
  • ***
  • Posts: 138
  • Let's bring order to chaos
    • View Profile
    • https://www.facebook.com/groups/retrogamersmx/
Re: Help: Mega Man X Level Editing
« Reply #3 on: October 11, 2021, 05:14:29 pm »
I never learned to use the program so a small tutorial of findings would be appreciated.

I edited the sprites of Megaman and make a Protoman instead, sadly it was keep private, but I wanted to edit stages and wasnt able to do much.

PowerPanda

  • Sr. Member
  • ****
  • Posts: 274
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #4 on: October 11, 2021, 08:26:08 pm »
I used it to make Megaman X - Capsule Remix, a hack that korius should definitely check out, as we had the same idea, and there are some transferrable patches that could be used here too, such as an asm hack that allows you to skip Zero's buster, or one that gives you a dash from the start of the game.

MegaEdX is a beast of a tool to use... one of the hardest that I've come across. I'll see if I can poke around in the next few days to remember how I used it, and post a few notes here.

MysticLord

  • Full Member
  • ***
  • Posts: 234
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #5 on: October 12, 2021, 01:10:21 am »
Thank you all, I appreciate it.

PowerPanda

  • Sr. Member
  • ****
  • Posts: 274
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #6 on: October 14, 2021, 05:55:39 pm »
Okay, here are a few tips

1. When you open the rom, you'll be on the highway stage. You can use PageUp and PageDown to cycle through the different levels.
2. You can't edit anything from the general level. You must make your stage edits in the "Scenes Editor" found under the "Editors" menu. It's also the last icon on the icon bar.
3. In the scene editor, you have to click on a block and type in the block number of what you want to put there.
4. The best way to find which block to use is in the "Block Structure Editor", which is the 2nd to last icon.
5. The editor is very limited. It cannot edit any of the following:
   a. Item or Capsule placement
   b. Enemy Placement
   c. Camera shifts (ie, free roaming, veritcal only, horizontal only). These transitions happen on specific blocks.

I asked the person who made the editor about point #5, and he said that MMX (and by extension, MMX2 and MMX3 since they're on the same engine) is a pretty obtuse game. Rather than place enemies/items by coordinates, it does them by scanlines. There is a randomizer out there that has figured out how to change some of these things, but I haven't figured out how they do it yet.

One other thing to note is that v1.0 and v1.1 of the rom differ quite a bit. This makes the SA1 hack incompatible with anything that goes through the editor, since they require different rom versions. I've been able to port several of my "Capsule Remix" changes to the SA-1 hack, but not any of Justin3009's air dash/wall jump code.

MysticLord

  • Full Member
  • ***
  • Posts: 234
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #7 on: October 14, 2021, 06:06:01 pm »
Okay, here are a few tips

1. When you open the rom, you'll be on the highway stage. You can use PageUp and PageDown to cycle through the different levels.
2. You can't edit anything from the general level. You must make your stage edits in the "Scenes Editor" found under the "Editors" menu. It's also the last icon on the icon bar.
3. In the scene editor, you have to click on a block and type in the block number of what you want to put there.
4. The best way to find which block to use is in the "Block Structure Editor", which is the 2nd to last icon.
5. The editor is very limited. It cannot edit any of the following:
   a. Item or Capsule placement
   b. Enemy Placement
   c. Camera shifts (ie, free roaming, veritcal only, horizontal only). These transitions happen on specific blocks.

I asked the person who made the editor about point #5, and he said that MMX (and by extension, MMX2 and MMX3 since they're on the same engine) is a pretty obtuse game. Rather than place enemies/items by coordinates, it does them by scanlines. There is a randomizer out there that has figured out how to change some of these things, but I haven't figured out how they do it yet.

One other thing to note is that v1.0 and v1.1 of the rom differ quite a bit. This makes the SA1 hack incompatible with anything that goes through the editor, since they require different rom versions. I've been able to port several of my "Capsule Remix" changes to the SA-1 hack, but not any of Justin3009's air dash/wall jump code.
Thanks for the guide. The bolded portion is nuts.

Hart-Hunt

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #8 on: November 02, 2021, 07:00:45 pm »
Hey there. Here's a link to all that I've gathered about MMX in these years.
https://drive.google.com/drive/folders/1oeMNH2-uvaZUGKEqZ-lAcHjW5JFPvpuS?usp=sharing

One thing you'll find is a lot of documentation I've made (files can be opened with Sublime Text 3). There's a lot of files, most being notations and RAM MAPs, Lista with IDs, and some AI documentation that I've been working to someday make custom bosses.

Most importantly, it has a modified version of MegaEDX, version 1.3 made by redguy. It doesn't have a tutorial sadly, but it is inmensely powerful, and it opens up a lot of posibilities.
  • Includes Event editor (camera, graphics loading, items, enemies)
  • Includes Checkpoint editor
  • Includes ROM expansion
  • Includes Layout Editor (requires ROM expansion)
  • Includes in-editor emulator

I'll try my best to explain the features, but keep in mind a) I don't know a lot of things about MMX's code, and b) I haven't used the editor in quite a few years. Also c) I didn't make it, so I can't really support it in any way.

Event Editor: Go to Editor --> Event Editor. Allows you to modify, delete, move different events. It's obtuse because the code is obtuse, but it is extremely powerful. To explain it, I'll be pointing to different events in the intro stage.
  • Block: we call "Block" to each X-position where the spawning objects routine occurs. There's one of these per 32|$20 pixels.
  • Event: if the current block has events, Event will list them as 00, 01, 02, etc.
  • Prev Event, Next Event: Use these two buttons to scroll through the stage's events (following the order Block, Event --> Next Block). you can also click the event, try it to get familiarized with it.
  • LockType, LockID, LockSubID: Check these if you want to prefilter the Prev Event, Next Event button. For example, if the Event Editor is standing in an Event with Type = 3, ID = F (i.e. a Crusher), check LockID and click on Next Event to scroll to the next Crusher enemy Event.
  • Match: I honestly don't remember.
  • Type: This alongside ID and SubID determines which Event is selected. 01 = Misc Objects, a lot of times stage-specific. Example, in Block 90, Event 0: Event 0, 9, 5 (meaning type 0, ID 9, SubID 5) is the floor cracking and falling.
  • X-Pos: X-coordinate where the event will spawn. An important point is, X-Pos only determines where it will appear after it has spawned, meaning it shouldn't be too far off from the Block's x-pos or it will appear either too far from the edge of the screen (and despawning), or it will appear in the middle of the screen. Only exception would be in a vertical section with the camera locked.
  • Y-Pos: Y-coordinate where the event will spawn, AND where the spawn event will trigger. Move the object vertically in areas with vertical movement to trigger where they spawn.
  • EventID: Determines with event will spawn (see: Type)
  • EventSubID: SubID is usually used as a parameter (for example, this enemy attacking left or right), but sometimes it also acts as an ID alongside EventID.
  • Flag1, Flag2: Never figured these out.
  • Left, Right, Top, Bottom: Used for Camera Lock events (Type 2, ID 0). SubId for these events is used for each of the camera lock events in the stage (for example, in the Intro Stage, Events (2,0,0), (2,0,1), (2,0,2), (2,0,3) are the four Camera Lock Events in the stage). Left, Right, Top, Bottom determines the green rectangle you'll see on the screen. If Mega Man enters said rectangle, the camera's border will change.
  • LockNum: Don't remember.
  • LockOffset: Don't remember, but it was pretty important (sorry).
  • Lock--> Direction: Direction of the Camera that the event will change. Use the Lock check alongside LockType and LockEvent to scroll through different camera events with the same direction.
  • Position: position (absolute) of the camera border after the change. Shown as the length of the yellow line.
  • GfxNum: The following are used in Graphics Loading events, usually Type 2, ID 15. In the intro stage, check Block E, event 1 for a good example. Each of these events hold a certain number of enemy graphics.  Scroll through them with this button (for example, this certain event loads the graphics for Crusher and Gun Volt. I highly recommend checking in my documentation, the file called EnemyDataID.
  • GfxID: Change this ID for a different enemy graphic to load.
  • Vram Slot: Asign this correctly according to how much VRAM each enemy takes. Basically, you have to "fit" the graphics in a limited space, and some enemies take more Vram slot space than others. I made a list in my EnemyDataID file but they're estimates, tried by practice. This is an important part to master, to be able to spawn plenty different enemies in areas abusing this, specially with enemies that take little vram slot.
  • Palette Offset: Similar to vram, change this ID to load this certain graphic with a different palette.
  • Palette Slot: Same as above.
  • Remaining Byte Count: The events are read from a certain section of the ROM. each stage has a limited amount of bytes where events are written. Expanding the ROM will allow you to add a lot more events (File --> Expand ROM, use at your own risk).
  • Add Event: Add an event in the current Block (provided you have the amount of free bytes in memory).
  • Delete Event: Deleted the current event (frees up space)
  • Move Event: Move the event to a certain block.

Also, with the ROM expanded (use at your own risk), you can use the Layout Editor, to change the size of the stage and make bigger stages.

If you want to see examples of what this can do, check my New Hard Type Project I dropped some time ago. It has 2 stages using all of these features:
http://ngplus.net/index.php?/files/file/17-mega-man-x-new-hard-type-wip-alpha-release/

Well, I hope this tutorial helps. Big shoutouts to redguy for modding MegaEdX 1.3.
I love MMX and I've always felt it has a lot of potential for modding. I hope someone makes an even better editor, and loads and loads of romhacks.

pianohombre

  • Sr. Member
  • ****
  • Posts: 357
    • View Profile
    • My personal website of short stories and comics
Re: Help: Mega Man X Level Editing
« Reply #9 on: November 03, 2021, 04:27:47 am »
I made some small changes to the editor after Redguyyy's version. All the icons display correctly in the editor now for MMX1-3 (heart tanks, subtanks, weapon tanks, and ride armor icons). Also, the enemy name is displayed when you click on the enemy in the window. (For a complete list of changes check out my github). In MMX2, you have to expand the ROM if you work on the Overdrive Ostrich stage. I hacked the editor to be able to save correctly, but this only works correctly for the first save on this stage and will crash again if you continue to edit and save again.

I was going to make a video series on how to use this editor, since I never really saw much documentation on hacking for this series. MegaMaker is a great program to hack the classic series. Editing the VRAM is one of the most annoying aspects of the editor, and overcoming this hurdle will greatly help this editor to become as user-friendly as Lunar Magic or SMILE. There's also some notes in the Readme file on my github.

https://github.com/rbrummett/megaedx_v1.3 (source code. You'll need Visual Studio to compile this)
https://www.dropbox.com/s/rd06kokb7r0kyzr/megaedxv1.3.zip?dl=0 (binary/executable. ready to go just need a copy of the rom)
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Hart-Hunt

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #10 on: November 06, 2021, 08:55:23 am »
That's awesome pianohombre. Any video would really help, if anything for those little QoL features you've surely added, and also for any insights on how different things work.

Also for you pianohombre, I'm sure you'll find good use of thise notes I shared in the previous post. Any help on documenting and or modding tje enemies / bosses qould be appreciated, because it's a huge amount of labour and I'm not a really good programmer to document it thoroughly.

PowerPanda

  • Sr. Member
  • ****
  • Posts: 274
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #11 on: November 06, 2021, 07:50:00 pm »
Hi Pianohombre and Hart-Hunt.

I am really interested in version 1.3, as I think it will allow me to finally do with Capsule Remix what I originally wanted to do, which is to actually change around where the upgrades are found. I can open up MegaEdX v1.2, but when I try to open 1.3, it says it is missing the following DLLs:
MSVCP140D.dll
ucrtbased.dll
VCRUNTIME140D.dll

These appear to be the debug versions of the standard Visual C++ Redistributable Library, and are not available with the normal package. I don't have Visual Studio, so I can't recompile from source code. Are one of you able to re-compile using the non-debug versions of the same DLLs (MSVCP140.dll, ucrtbase.dll, & VCRUNTIME140.dll)?

Hart-Hunt

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Help: Mega Man X Level Editing
« Reply #12 on: November 10, 2021, 05:13:27 am »
Hey, sorry. I know absolutely zero when it comed to visual studio and compiling. If I did know, I'd have tried impeoving the GUI and adding more things as well. That's what I was saying earlier about not being able to support it.

pianohombre

  • Sr. Member
  • ****
  • Posts: 357
    • View Profile
    • My personal website of short stories and comics
Re: Help: Mega Man X Level Editing
« Reply #13 on: November 16, 2021, 01:40:37 am »
Hi Pianohombre and Hart-Hunt.

I am really interested in version 1.3, as I think it will allow me to finally do with Capsule Remix what I originally wanted to do, which is to actually change around where the upgrades are found. I can open up MegaEdX v1.2, but when I try to open 1.3, it says it is missing the following DLLs:
MSVCP140D.dll
ucrtbased.dll
VCRUNTIME140D.dll

These appear to be the debug versions of the standard Visual C++ Redistributable Library, and are not available with the normal package. I don't have Visual Studio, so I can't recompile from source code. Are one of you able to re-compile using the non-debug versions of the same DLLs (MSVCP140.dll, ucrtbase.dll, & VCRUNTIME140.dll)?

The version 1.3 (from me not Redguyyy) seems to run just fine with the retro.dll in the folder. I even got a separate laptop and got the source code to compile in VS 2019. I just got a small error that the program needed to install a small file since the program was originally written in VS 2015. The Visual Studio 2019 was the free version from Microsoft. The GUI was written in VS so the EXE relies heavily on Microsoft's dependencies and libraries, etc. I'd highly recommend using Visual Studio compared to another compiler. I had seen this reply earlier and was going to try to get MegaEdX1.3.exe to run on a separate computer, that doesn't have Visual Studio installed, but when I was around the computer over the weekend I forgot about it.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds