11 March 2016 - Forum Rules

Main Menu

what would you use to alter values on gba?

Started by Razieldemon, March 25, 2022, 12:54:19 AM

Previous topic - Next topic


The cart is Mega Man Zero.

I want to adjust the e crystal requirements for elves leveling up to be more in line with the rest of the series.


GBA is not going to be unique in this regard -- same approaches would likely be used whether you are doing a C64 game or a modern PC game.

Still. I don't know the level system for this aspect of the game offhand and I am too bone idle to go look up a faq right now. Level systems however are generally pretty similar.

Two broad approaches to changing level gain curves.

1) You gain more (or less) experience by some means. Could be doable with cheats and might be easier whichever means you take.
2) You find the limit equation/table and tweak that accordingly.

For cheat based approaches. You find whatever experience you have, save that value somewhere in a cheat (more advanced cheat engines have this option), when it changes (this would be where you use an if less than/greater than) you take the change and double it/half it by shifting the relevant value and adding that back on. Crude but doable enough. if you needed an intro to GBA cheats.

The more conventional approach for 1) is you find out if there is a drop rate level or experience given value in the enemy stats (you can still find them with cheats, usually start by finding their health and seeing if it is nearby or after the health values for the other enemies on screen*) then easy enough to change these values. If you edit in the ROM do make sure if you are using savestates to check things with that you load outside a battle or start a new one/new screen to make sure it is not sitting in memory.

*for stats in general the two main approaches are every character/npc/whatever gets their own section of memory, and every stat of the same type (possibly different for enemies and players) gets put into a pool dealing with just that type of stat but owing to the way coding/memory works said pools are usually one after the other.

Curves wise you are pretty much going to be playing with assembly, though only just compared to some things.
I don't know if e-crystals are a consumable (presumably rare/boss only drop) or a type of experience in the more conventional sense.
Either way you want to find the value for them for a cheat to start with, annoying if it is going to be a rare drop (you can use before and after savestates and flick between them) or battle (give yourself infinite health/ammo/all the advantages you can to speed it up). You then want to set breakpoints on this so when it next changes you can do various things to it. One of those will presumably be to set it to just below the threshold for a new level so you can watch things change**. Part of that will include a check to see what things are (could be an equation like experience * 4 + 50 = level count, could be a big table the devs left in the ROM somewhere for what they thought was good/playtesting said worked) and thus you get to edit things there -- equations are just that (make it less of a multiplier, subtract a bunch , add a bunch... that is your equation to figure out for your hack and desired outcome), lookup tables are just that and should be like editing a very crude spreadsheet/list.
As it is a rockman/megaman game someone might have gone there before you, deals a lot of the megaman battle network/rockman exe franchise which is mostly associated with the GBA but might be a springboard to somewhere, and someone might also be able to help you if you turn up with all the cheat stuff mentioned above already found and get you over the last little hump with the equations (finding cheats can be tedious, if you know some assembly then most equations used in games like this are very basic -- if you wanted something somewhat interesting there, albeit for pokemon).

**some games will check every frame or whatever and calculate accordingly, some will only be at the end of battle, some will only be when more experience gets added.

I have a more involved guide to GBA and DS hacking but I am not sure how much it will help for this as stats editing is fairly minimal in that. Some of the assembly/tracing/debugging stuff might do something though.


Thank you very much for your reply. Ive got alot to look through but this has been the most helpful information so far.

Just cuz you mentioned it, e crystals appear to act more like currency. There is only one type of currency in Zero and it is used to "buy" the new levels for the companion creatures to upgrade zero with.