News:

The forum has been updated to SMF (2.1.3)!
Please be patient as we work to polish up the place and update features as we can.

Main Menu

Battle system tweaking questions

Started by goldensun35035, 21, January, 2021, 08:01:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

goldensun35035

Hey everyone I am new to golden sun hacking.

I randomly had a funny idea which I think would be cool to have as a mod.
What if every single enemy in the game would be modded to not use the predefined attack patterns and assigned spells, but instead...
Each enemy picks a random spell from the entire spell table for every turn.

I had a few questions about how to go about doing this:

1) Is there a decompressed rom somewhere?
2) Can I load such a rom to Ida Pro for example and decompile to C code? it would be a million times easier not working with raw assembler
3) Is any of this even necessary? maybe someone already did such a thing before with a few memory edits?
4) How would you make such a mod?

Thanks all

Salanewt

Heya, welcome!

We can't really give specifics on how to find ROMs, but it probably wouldn't be too hard to do what you're asking. We have documented where the AI is located in both GBA games (the documentation is far more extensive for GS2), so it would only be a mater of changing how ability IDs are grabbed. The AI is not compressed either; in fact, most of the ROM isn't compressed (you mainly have graphics, text, and map assets that are). I can't give a definitive "yes" to whether Ida Pro would work, but you can try it. We have notes on where the AI is located.

Usually, the game uses attack patterns to grab an ID from an enemy's data table entry. The best way to make this change would be to set up an RNG-based formula that can generate a number, making it loop if the generated number either does not correspond to an ID (i.e. greater than the limit) or else matches an unprogrammed or invalid ability; that way it can pick any ability from the list while skipping abilities that either don't do anything or else have limited use.

You could run into a minor issue with items not being randomized, since the AI's item use routine taps into the same item use routine that player characters use (it's global) and enemies can only have a set number of items. If you want items randomized, then you'll have to change that routine too (maybe add an character ID check; if ID > 7, then ID = enemy and item = random).


I hope this helps provide some insight!
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?