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

Djinn Editing

Started by Daddy Poi's Oily Gorillas, 21, July, 2011, 09:22:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Daddy Poi's Oily Gorillas

080AE8D4 = Give Flint to Isaac.
080AE8DE = Give Fizz to Mia.

080B0B78 = Add Djinni
080AE834 = Add Djinni / Raise flag in Storybook flags. (02000046)
r0 = Party Member (0-7)
r1 = Djinni type (0-3)
r2 = Djinni (0-19; or in hex: 0h-13h)

Notes: For r2, you can do up to 31/1Fh, but it would be pointless. Any higher doesn't modify djinn flags (bit out of range.)



Fun tip: Did you know Party Members 80h – 85h are for enemies in battle? It links to this pointer: 030000D8. I doubt you can actually give a monster a djinni, though. Chances are, the fields in the enemy data might be somewhat different. But seeing how all this is related, it makes sense why you were able to have up to 11 characters in a Player Character.

a
Further in the function that adds Flint and Fizz, there is some advanced stuff that will add the other djinn randomly. (I was looking at 080AE96E.. function call to some random number thing.. and the next function call is at 080AE98E.. with the arguments being r0 for element, and r1 being for djinni.)

080B1290 = This is the percents database that tells you how likely you will get the djinn. Each group of 7 are for the first 7 djinn in each elemental category.


After making the changes you may have to start a new file.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Salanewt

Hey cool, so I was right about the code that allows for adding djinn.

For Mia's Fizz, 080AE8DE is the offset, right? I think you left out a character at the end.
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?

Salanewt

Sorry for the double post, but is there a way to disable the distribution of random djinn? I tried setting all of the percentages to 0, but the game doesn't continue unless a certain number of djinn have percentages higher than 0. Even then, it seems like there always has to be five different djinn on each person.
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?

Daddy Poi's Oily Gorillas

#3
Quite easily, you can go in and delete the code that is involved with randomly giving you djinn.

080AE8F6 = This contains the number of random djinn to give. (16) If you change this to mov r2, #0x0, that might work as well.

Edit: This number should be in the range of how many djinn are left to add.. so with Flint and Fizz already added, then 0x1A would add all the rest. (And any higher would keep the game from continuing.)

Edit again: So? Want to help fill in the section between Flint/Fizz to the Color coded section below?

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Salanewt

Great work, and thanks for that offset. Unfortunately, I don't think we can have that number at 0. The lowest that I can have it without preventing the game from continuing is 01. There is probably a segment of code to make sure that djinn are randomly given; else it might keep looping until it does. That is my guess anyway.
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?

Daddy Poi's Oily Gorillas

You can't have it as 0? That is strange, because I can.

Are you absolutely sure? If you are, then you can still remove the code block that deals with randomly adding djinn.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Salanewt

It works for me at first, but resetting the game stops it from working when at 0. I will probably work on deleting that code later, thanks.
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?

Salanewt

Hey, I think I'm having a minor problem. I tweaked the code so Isaac's slot would gain two djinn, made it so only one djinni would be distributed, and also changed the random number generation so only 0 or 1 would generate (while also changing all of the djinn percentages to 1 as well). However, I have tried starting a new file at least four or five times now, and Garet's slot always seems to end up with the Torch djinni. Might it be possible that this code also has something that gives Torch to Garet/djinn to characters if none are distributed? Isaac's slot never seems to have any problems with this.
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?

Daddy Poi's Oily Gorillas

QuoteMight it be possible that this code also has something that gives Torch to Garet/djinn to characters if none are distributed?
Given the information from the code, I strongly doubt it.




You know that assembly tutorial above? Well, I think only Flint and Fizz are the only ones specifically given to Isaac and Mia.

Anyway, for the part of the code I didn't do a tutorial on.


More notes on random stuff:
080AE8FC: Generate random number for djinn type (0-3)
080AE904: Generate random number for djinn. (0-6)
080AE91A: Check if we have this djinn, if so we'll loop again to 080AE8FC.


As you can see, the way this works is we select a random djinni. This gives all djinn an equal chance of being added. But since we want our djinn to have varying chances, we also generate a random number to compare with the djinn's chance.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)