News: 11 March 2016 - Forum Rules, Mobile Version
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia

Author Topic: MegaED X, the Megaman X hacking tool (Now with MMX2 support)  (Read 133971 times)

pianohombre

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #300 on: November 26, 2017, 06:24:33 pm »
I'm trying to modify a level in X3 by basically altering a Camera Event. I've noticed that it looks like these camera locking events have a certain 'block' that they attach to to designate some scrolling stuff (Or so it appears?) Is there any actual way to move those blocks?

I'm not exactly sure what you're trying to do. Are you using the checkpoint editor, or the event editor? Are you working with a type=1 event, or since you mentioned sprite spawning I'm assuming type=3? Looks like you were able to work around it.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

justin3009

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 1546
  • Welp
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #301 on: November 26, 2017, 06:40:47 pm »
Each camera event looks like it's locked into a certain area of each level. They're all shared so modifying one will modify the other of another level. So their coordinates and such are designated into that slot. The issue is that the camera events NEED to be on the same spawn lines where you want them, as for anything else actually. MegaED X doesn't allow modifying the spawn lines or their locations so it makes it impossible to edit normally.

The Japanese MMX3 level editor lets you modify the spawn lines but doesn't let you modify the camera data itself so both editors had to be used. I had to drop the entire idea anyway that I had since I realized after the fact that you can't draw a text box underwater due to how the HDMA is handled.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

Hart-Hunt

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #302 on: November 29, 2017, 11:07:40 am »
Iirc, expanding the rom allows you to have independent camera events per stage. The event in X1 was type 2, id 0, and then you specify the subID you want.

justin3009

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 1546
  • Welp
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #303 on: November 29, 2017, 11:51:55 am »
Expanding seemed to break X3 quite badly. Even then though, not being able to move, add or remove stuff on the spawn lines makes it super hard to modify the level. Unless I'm missing something.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

Hart-Hunt

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #304 on: November 29, 2017, 01:33:31 pm »
Here's some feedback!

About the changes that I've noticed.
1) The emulator doesn't allow for save or load stating.
  a) When configuring the controller for the emu, the save and load state don't recognize any keys
  b) When pressing F2 to save and F4 to load (defualt keys in 1.2), MegaED X crashes.
2) Having the individual editors (Layout editor, Scene editor, Block editor, Tile editor, etc.) as separate windows from the main MegaED X window is actually a lot less comfortable to work with, because in 1.2 I'd be able to look at all of those editors at once and make sense of what I'm doing. I'd be a lot more comfortable to work with if it was reverted to 1.2.

Asides from that, at least in X1, the changes didn't really help me at all. I'm using 1.2 because those changes either made the editor crash or made it more uncomfortable to work with.

For features that'd actually help a ton, I'd suggest looking up the events in Megaman X, and adding a field to change all of the routines that are not included in the editor. For example, changing the event that's in the editor that makes each Dr. Light capsule appear doesn't do anything unless you also change the spawn location of the capsule, which is located in another table. There's many things like that. There's the falling floor in the intro stage that has another table, there's the gas tubes in Storm Eagle's stage, the platforms in Sigma Stage 1. Then there's also the tiles that change in custom events. All of those one has to debug their locations as well. Examples of this are the glass breaking in Storm Eagle, the ship breaking and the platforms it leaves after that, the floor that changes in Flame Mammoth's fight.

Another feature to add would be to replace the archaic event editor, with something that actually names the events by name. Right now, to add a spikey, you need to add a type 3, ID 15, subID 0 enemy. I only know this by memory because I've done it so much, but there's no way I could remember each single one. I need to help myself with an Enemy ID list.

Similar example comes with the event editor as well, with the 2, 15, X events, the ones that are a purple line that allow you to change which graphics are loaded. I have to be listing the vram memory each one takes, and the palette memory eac one takes, along with each's palette and gfx id. It's archaic to say the least. Changing that is a pain.

Hope the feedback helps! I constantly use the editor (I had a bit of a hiatus because of school, but I'm actually streaming at my twitch channel the development of my mod, so people can check that out anytime). So if you make any changes, I'll be happy to test them and report back to you.

pianohombre

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #305 on: November 30, 2017, 08:13:50 pm »
Hi thanks for testing the program. As far as the error you got in VS 2017 I'll have to ask the MSDN forums, because you said VS 2015 doesn't give any issues.

The reason I added the minimize buttons is because they were not set as child windows, so many times when using the editor I'd have the main window minimized and I'd be in a web browser with all these dialog boxes on top of the browser in the way with no way to move them, except closing.

I've taken your notes on the event editor, and those are definitely some good suggestions for making it more user-friendly. Here is a mock-up I made this afternoon below. (I also plan to add a similar drop-list for switching items, and the buttons will be grayed out when not in the correct Type to prevent errors).



I wish I understood how to calculate the VRAM in this program better (which may or may not differ from true VRAM in an emulator). Right now I have switched enemies and got it to properly work in an emulator, but it took a lot of tweaking from the VRAM slot to get the enemy to properly show up in an emulator. I assume it has to do with the size of the sprite (8x8, 16x16, or 32x32). However I'm not going to be able to correctly change those values until I understand it better (right now it's trial&error). Yes, the palette offset is important too. I may be able to override the values in the editor window, but typically it's set during a previous event (the purple line where graphics are loaded).

As for special routines/sprites such as gas tank in Storm Eagle. That will have to wait also. I don't fully understand how to separate these into separate stages, and have not tested it myself yet.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Hart-Hunt

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #306 on: December 01, 2017, 08:41:17 am »
Yeah, if you ever need my specs let me know. Basically, 1.3 didn't work with W10, VS Community 2017. I was "forced" by W10 to downgrade to W7 (same PC), and I was able to find the same version of VS2015 you had. I installed that version and 1.3 ran fine.

Yeah, the "always on top" 'feature' of 1.2 (as they're not child windows as you correctly describe), is actually helfpul and even necessary when designing stages, because one needs to constantly compare the tiles between the editors, and if you are running some other program at the same time, then the child windows will minimize and you'll have to manually click on them in the task bar everytime. This happened to me a lot when streaming. Also, there was something that happens with my computer, I'm not sure if it's because of the resolution (1980x1080), but basically the location of the texts and boxes in the editors get all messed up. So the text that goes next to each box gets offset and it becomes a pain, even unusable unless you know what each box does from before like my case.

Here's a picture. Happened with W10, happens in W7, in both 1.2 and 1.3. https://i.imgur.com/1m9YVat.png

The mock up is kind of getting close to it. I'd have three boxes:
- First one for the type of event: Enemy, Item, "Level Specific Events" (including Camera Locks, Graphic Loads, Palette Loads), Items and Upgrades, and Misc.
- Second one for the actual event: For enemies, Gun Volt, Spikey, Flamminger, Spark Mandrill, Vile, etc. For Items, 1-Up, HP, Ammo, etc.  For Level Specific Events, Camera Locks, Graphic Loads, Palette Loads, Background changes, etc. For Items and Upgrades, you have items, like 1-Ups, HP, Ammo, and upgrades, like SubTanks, Heart Tanks, Capsules. For Misc, you have other events, like Boss doors, floor falling in the intro stage of X1, explosion from gas tubes in Storm Eagle, Igloos from Chill Penguin, hopefully you see what I mean with that.

If you need any help with the VRAM, I know how to load enemies with trial and error. Basically, each enemy needs a certain amount of VRAM, and you need to set a portion of the memory to it, all specified in GfxID in the editor. I don't have the values right now, but some enemies might need 200 bytes, while others like bosses need a lot more, which is why bosses for example can't spawn with many other enemies without messing things up.

If you need help with figuring out how some things work, I have a lot of knowledge, mostly from trial and error, and I know where many tables are located, because I changed them for Hard Type.

Also, to note, I'm simply writing down all that I can think of, but yeah, you already even considering doing one of the above changes is great, and I really, really appreciate it. And you'd do well to do what you say, take things slow and do one concrete change at a time.
« Last Edit: December 01, 2017, 06:46:37 pm by Hart-Hunt »

pianohombre

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #307 on: December 01, 2017, 07:02:15 pm »
You may not need to downgrade to run the program. There's a redistributable package that installs the run-time components of programs made in C++ from VS 2015. (Just a small 1mb file). That way you won't need to install VS 2015. (if you'd like to test plz let me know if it works).
https://www.microsoft.com/en-US/download/details.aspx?id=48145

Yea if you could give me some insight into how VRAM works I could better understand how to allocate memory correctly to load in the graphics, that would help a lot with switching enemies throughout the program. I'm assuming that there's two sizes for enemies- large and small. For example, when swapping in Hoganmer on the first stage I set the VRAM to 1000. I had to change the VRAM slot for the next enemy from 1600 to 1650, otherwise Hoganmer didn't load correctly. So Hoganmer's graphics needed between 600-650 units to assemble. Yet, the sprite I swapped him with only needed 600 units or less. Sub-bosses and bosses are going to be excluded. Gigantic Mechaniloid CF-0 and Utoborus would be tedious to program their special routines. (I just spent the last few days figuring out how to move Chill Penguin to another stage. His ice shots are a separate graphic, not included when you pre-load C.P.).

For Misc. (Boss doors, floor falling in the intro stage of X1, explosion from gas tubes in Storm Eagle, Igloos from Chill Penguin) did you say you have to edit these events more than just changing the event Id, gfx Id, and palette? I have not worked with these, but some are labeled.

"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Hart-Hunt

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #308 on: December 01, 2017, 07:49:52 pm »
You may not need to downgrade to run the program. There's a redistributable package that installs the run-time components of programs made in C++ from VS 2015. (Just a small 1mb file). That way you won't need to install VS 2015. (if you'd like to test plz let me know if it works).
https://www.microsoft.com/en-US/download/details.aspx?id=48145

Yea if you could give me some insight into how VRAM works I could better understand how to allocate memory correctly to load in the graphics, that would help a lot with switching enemies throughout the program. I'm assuming that there's two sizes for enemies- large and small. For example, when swapping in Hoganmer on the first stage I set the VRAM to 1000. I had to change the VRAM slot for the next enemy from 1600 to 1650, otherwise Hoganmer didn't load correctly. So Hoganmer's graphics needed between 600-650 units to assemble. Yet, the sprite I swapped him with only needed 600 units or less. Sub-bosses and bosses are going to be excluded. Gigantic Mechaniloid CF-0 and Utoborus would be tedious to program their special routines. (I just spent the last few days figuring out how to move Chill Penguin to another stage. His ice shots are a separate graphic, not included when you pre-load C.P.).

For Misc. (Boss doors, floor falling in the intro stage of X1, explosion from gas tubes in Storm Eagle, Igloos from Chill Penguin) did you say you have to edit these events more than just changing the event Id, gfx Id, and palette? I have not worked with these, but some are labeled.
I already installed VS 2015 in my freshly installed W7, so no worries. And so I won't be able to test that download as well. :P

Well, what I've figured is that each enemy needs a certain amount of VRAM, placed within $1000 and 1FFF, and the way one can tell how much it's used is by going to the next enemy loaded in vanilla and subtracting the numbers. That way, Hoganmer takes 700 VRAM, Flamminger takes 700 VRAM, and then there are enemies with lighter graphics: Turn Cannon takes 200 VRAM, Bats take 300 VRAM, Mets take 300 VRAM. One can easily pick a combination of enemies that add up to $1000 VRAM, and add put them all in. That's what I did in New Hard Type, and it works really well. The VRAM addresses below 1000 do other things like store X's graphics and whatnot, but somehow, vanilla will use address 400 in some ocasions. I haven't been able to figure out how or why.

About the misc events, it highly depends on the event. Many of them will load from a table that will set the location of the tiles that will be changed, and from another table that will set which tiles are getting inserted in the tile map. Doors for example have like 4 sets of tiles that need to be specified. Gas Tubes have the tiles that go after they get destroyed, and so on. I can find the replacing tiles with a debugger, but actually documenting the code is beyond my capabilities, which is why an editor would simplify this so much for me and other users.

About the VRAM, gfx, I document each enemy ID with those whenever I use them. So it's not complete: https://pastebin.com/WxBGLzhQ

justin3009

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 1546
  • Welp
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #309 on: December 01, 2017, 08:23:09 pm »
X1 and X2 will sometimes use 400 for very small enemies or effects. X3 will never store there as it's reserved entirely between X and Zero.

As for the tile replacement on some destructible objects, yeah that's very hard coded. It'd be a lot easier if there was some way to automatically designate where the tiles would appear based on the X/Y coordinates of the destructible object itself rather than using a hard table. It'd make it a lot more customizable, but that's probably not possible without some hefty calculations.
« Last Edit: December 03, 2017, 03:43:49 pm by justin3009 »
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

pianohombre

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #310 on: December 03, 2017, 07:52:35 pm »
Yes, for example, the ice shots for Chill Penguin are set at VRAM slot 400 during gameplay. I wonder if there's a place in the rom where VRAM size is stored. In the graphics pointer table the size of Hoganmer, for example, is 00 20 (2000 bytes). Yet in-game it's 0x700. Maybe the size is stored as decimal, but later read as hex? 2000 in decimal is 0x7D0, but I know in hex the size is actually closer to 0x650. Most important values already have variables so it will be easy to make a struct, or vector array.

Megaman Fanga:
On their 30th anniversary livestream Capcom Unity announced MM11 will be released late 2018, and the X collection will be ported over to the Switch along with the classics collection.
« Last Edit: December 04, 2017, 03:17:26 pm by pianohombre »
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

SOPHIA

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #311 on: December 10, 2017, 07:02:56 am »
Nice to meet you
I am Hack Rom creator of Rockman X
I made a work called Rockman X Generation
I am using this editor well, so I am looking forward to the update

justin3009

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 1546
  • Welp
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #312 on: December 10, 2017, 10:01:02 am »
For any time there's graphics stored, the location in VRAM is 'RIGHT' next to it in data. It's all in one giant table. Uncompressed and compressed graphics both have their own set of stuff but their VRAM storage location, ROM graphic location and what not are always side by side. The game will call it when it's needed based on the 'spawn lines' from what I've seen.

Though, the actual 'slot' usage (I think mainly for 8x8 or 16x16 sprites) are preset in the first event of any actual sprite object. The byte itself can be modified in RAM since it's always stored into the object/enemy/projectile's RAM location for easy testing.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

pianohombre

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #313 on: December 10, 2017, 02:32:34 pm »
The next update will be released before the end of the year, but it's not going to be a public release. Only paid subscribers will be able to test out the new features in-game. So I'm going to try and work with Luciano C. to get some donations.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

Hart-Hunt

  • Jr. Member
  • **
  • Posts: 22
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #314 on: December 11, 2017, 11:46:10 am »
I hope you're joking. No one should charge a dime for an editor of a game you didn't even make. The features you added so far aren't even stable. And I'm the one who's used the editor the most (in fact, me and the MMX: Generation dev are the only two people I know who use MegaEd X). So I don't see that working out well for you.

pianohombre

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #315 on: December 15, 2017, 10:02:13 pm »
Hart-Hunt,
I flagged your latest video on YouTube because it wasn't HD, and kept skipping. Listen, if editors want these updates then there's no reason why they can't make small donations to the staff (i.e. me,myself, and I). I'd be a lot more likely to program these changes to completion with an extra $20-50 per project (for 50 hours, which is less than the minimum wage btw). I already have bills paid, but there's no reason why I shouldn't expect payment for programming. The world isn't free, nor is entertainment and dining, or whatever I'd like to spend the money on (it's nobodies business).

In regards to Luciano. I tweeted him. He is busy with other projects and lost interest entirely in this program.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds

justin3009

  • RHDN Patreon Supporter!
  • Hero Member
  • *****
  • Posts: 1546
  • Welp
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #316 on: December 16, 2017, 03:49:38 am »
It doesn't make sense to expect money out of people either when there's people on here trying to help you understand the data beneath the game. It's like a slap to the face. We help you but you expect payment.

Yes, the world isn't free but this is not your program by source and it's been modified already by someone other than yourself and Xeeynamo.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

Midna

  • Hero Member
  • *****
  • Posts: 659
  • Resident Panel de Pon Nut
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #317 on: December 16, 2017, 07:30:40 am »
What possessed you to think locking a reverse-engineered fan-made modding tool for a game you don't own behind a paywall was a good idea? It's not. Capcom has every right to sue you into next decade for this.

slidelljohn

  • Full Member
  • ***
  • Posts: 159
    • View Profile
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #318 on: December 16, 2017, 10:57:46 am »
Listen, if editors want these updates then there's no reason why they can't make small donations to the staff (i.e. me,myself, and I). I'd be a lot more likely to program these changes to completion with an extra $20-50 per project (for 50 hours, which is less than the minimum wage btw). I already have bills paid, but there's no reason why I shouldn't expect payment for programming. The world isn't free, nor is entertainment and dining, or whatever I'd like to spend the money on (it's nobodies business).

You should really think about what your doing by charging people for this. I highly doubt you get any more help from the rom hacking community. It's one thing if you did everything on your own and you want to charge people. How do you think all of the people that helped with this project feel about you charging people. You should be ashamed. You would get a lot more support if you set up some type of option for people to donate to you instead of forcing people to pay to test out new features in-game.

I really hope nobody pays for this. Just use the free version.
I'm almost out of this hole that I have been for the past 6-7 years and I will finally have the time to put my mmx editor together. It will be free of charge, open source, have a lot more features, and a lot less bugs.
« Last Edit: December 16, 2017, 02:59:54 pm by slidelljohn »

pianohombre

  • Sr. Member
  • ****
  • Posts: 252
    • View Profile
    • My personal website of short stories and comics
Re: MegaED X, the Megaman X hacking tool (Now with MMX2 support)
« Reply #319 on: December 17, 2017, 03:04:41 pm »
Capcom has every right to sue you into next decade for this.

I wouldn't be charging to use the program. It would still be open-source. I would be charging for my time as a programmer, either hourly, or as agreed in a negotiation, as an independent contractor. For payments under $2,000 it's not even required to be reported to the government on a 1099 form.

I would also not be asking for other's help on this website. I could look towards many of the resources online to find answers, or if I'm stumped, I could subcontract one, or more, to work on bugs, since some programmers here are practically magicians I can't explain it.
"Programming in itself is beauty,
whether or not the operating system actually functions." - Linus Torvalds