News:

As a consequence of the forum being updated and repaired, the chatbox has been lost.
However, you can still come say hi on our Discord server!

Main Menu

Party member adding/removing

Started by Atrius, 06, November, 2010, 04:49:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Atrius (He/Him)

Alright, so with the addition of the Hex editor for map code, you can do a lot of neat new stuff if you know how.  Today I'm gonna give you some info useful for changing around when/which party members are added during the game.

The function for removing party members is located at 0x080AD110 in the ROM.  One place in the game that this function is called is at 0x02009ABE in the code for map 5 (VT001)  Apparently at the very beginning of the game Felix & Jenna are both in the party, but Felix is removed at the end of the cutscene between Jenna, Kraden, and Alex.  If you look back 1 command at 0x02009ABC, this "mov r0, #0x04" is where it tells it to do it to Felix, if you switch over the hex editor, and change the 0x04 value at that location to 0x05 you can remove Jenna from the party instead.  You'll still play as Jenna, but during battles and in menus Felix will be your only party member.


As for adding party members, that is controlled by a function located at 0x080AD0F8, which is often called through a function at 0x080C8048 used to display an accompanying "so-and-so joined your party." message on screen.  If you go to map 9 (OTMP0008) you'll find several places this function is used:

Talk to Jenna, 0x0200847A
Talk to Sheba, 0x02008620
Try to leave without Jenna, 0x02008A84
Try to leave without Sheba, 0x02008CD6

Look for a command that begins with "mov r0" before the function call, that's where it sets who joins the party, by changing the value at the location of that command to something between 0-7 you can add any other party member at that time.  Anything above 7 won't work, and will likely result in glitches.


The switch between Jenna & Felix at the beginning of the game is somewhere in the code of map 0 (It happens when the title screen is displayed after Felix & Sheba wash up on the island)  It uses a slightly different method at that point, more information on it will come later.

Piers joins the party on map 111 (KBMB10) at 0x0200A03C
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Salanewt

Sweet, nice work! By the way, have you searched for Party 1's locations yet, or should we expect this later in the future?

Thanks for finding them so far Atrius, my hack will surely depend on this information!

Have a nice day.
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?

Atrius (He/Him)

map 237 (GAI_ROOM01)

I'll have to look into it more for the specific locations in the code later on.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Salanewt

Sweet, thanks. The map is good enough, since I can play with the data to see what happens. I might do some research on the scripts that make Jenna and Sheba leave on Jupiter Lighthouse, since I would imagine that they are not far away from the Party 1 code.

So it is around there? By the way, could you please tell me what the commands are that enable joining?

Have a nice day.
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?

Atrius (He/Him)

#4
It would be in the code for the map that it happens on which is 263 (JTO_M) unless if I'm mistaken.

Commands that enable joining?  It's done through a function call.  Let's look at the code for adding Jenna when you talk to her.



This code is the function call, it sets the arguments, then branches to another part of the map code where the functions location is stored, 0x0200B1C8, which if we look at:



It simply loads the location of the function (0x080C8048, though here the location of the function has 1 added to it so that the processor knows to execute it in THUMB format rather than ARM), then redirects the processor to it.



mov r1, #0x01
mov r0, #0x05
bl $0200B1C8

Is all of the code used to add Jenna to the party in the script for the cutscene with her, the function redirect later in the map code, and then the function itself takes care of the rest.  Whats put into r0, and r1 are the values the function uses to know exactly what it needs to do with r0 being the party member 0-7 to add, and r1 set to either 1 or 0 telling it if it should display the message that says "so-and-so joined your party." or not.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Daddy Poi's Oily Gorillas

QuoteBy the way, have you searched for Party 1's locations yet, or should we expect this later in the future?
Quotemap 237 (GAI_ROOM01)

I'll have to look into it more for the specific locations in the code later on.

I would also be interested in knowing where it is in the last ROOM Shoptest, for when you enter this room through the Debug Menu as Door 99.
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! :)

Atrius (He/Him)

QuoteI would also be interested in knowing where it is in the last ROOM Shoptest, for when you enter this room through the Debug Menu as Door 99.

0x020086F4, it's a separate function (0x080AD240) that doesn't appear to take any arguments.
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Griever

#7
Ok after successfully having Garet and Isaac join the party instead of Jenna and Sheba at the beginning of the game, once Echo joins the party is reset and Jenna and Sheba show up instead of Garet and Isaac. I would like to know if there is any way i can keep this from happening and have echo join at the same time.


Awec

As I seem to remember, the party is reset when you meet Echo, to prevent a case where the player somehow doesn't get the others to join the party and thus continue the game without them.
I. Am. A. Spoon.
Yes, a spoon that is awesome that is a Jupiter adept that is one of the Anemos that lives on the freaking moon.
What of it?

leaf

Yeah, they included that because of sanctum warping. IIrc, it locks you out of the idejima zoomed-in area once you leave it, so they didn't want you to be able to leave your party members behind permanently, making the game unwinnable. Come to think of it... wouldn't TLA have been rendered unwinnable if you sanctum warped and saved after beating the doom dragon? Or even if you just used retreat and saved... Unless they lock out both saving and using retreat after the doom dragon fight, you should be able to screw yourself in some form or another. Since if the teleport lapis was on another character, I don't think you could make it back to the top of mars lighthouse.
[spoiler=quotes]
[9:00:50 PM] Randel Peltier: Ok...what did I do last night?
[9:01:19 PM] Kain: Something boring, repetitive, and lasted for about sixty seconds.
---
[10:45:08 AM] Salanewt: But yeah, the elemental phalluses are being... Stroked up by Saturos and co., and the energy will go towards... Mt. Muffin, where the Golden Climax will arise.
[7:28:42 PM] Salanewt: An added bonus is that Isaac and co. were trying to stop Saturos and co. because their beliefs state that Mt. Muffin should remain a virgin.
---
[9:54:21 PM] Randel Peltier: Guess the number in my head an you get to pick what I say. Number between 1-10
[9:54:28 PM] leaf: 11
[9:54:36 PM] Randel Peltier: @#$%!
---
[8:38:13 PM] Randel Peltier: Shes like this queen up on a pedastal that I have yet to court.
[8:38:29 PM] Kain: You've tried courting her.
[8:38:43 PM] leaf: and failed spectacularly
[8:38:44 PM] Randel Peltier: Ive tried...shes the best dating game ever.
---
[12:24:35 AM] Salanewt: I need to find a picture of a naked person to put on the Christmas tree next year.
---
[2:19:06 PM] Zeadra: wait... Rief's a guy???
---
[1:09:57 PM] Zeadra: well if you want to know if its a new effect or something weird, just check GS1, if side step is there maby it is the nimble dodge thing
[1:10:35 PM] Kioll: For once, you've contributed something useful.  o.O[/spoiler]

dwkjohn

Where do I go to get to there? Is that the memory viewer? Because mine looks different.

And if its not too much trouble, what characters are what numbers 0-7.

Quote from: Atrius on 06, November, 2010, 07:22:48 PM
It would be in the code for the map that it happens on which is 263 (JTO_M) unless if I'm mistaken.

Commands that enable joining?  It's done through a function call.  Let's look at the code for adding Jenna when you talk to her.



This code is the function call, it sets the arguments, then branches to another part of the map code where the functions location is stored, 0x0200B1C8, which if we look at:



It simply loads the location of the function (0x080C8048, though here the location of the function has 1 added to it so that the processor knows to execute it in THUMB format rather than ARM), then redirects the processor to it.



mov r1, #0x01
mov r0, #0x05
bl $0200B1C8

Is all of the code used to add Jenna to the party in the script for the cutscene with her, the function redirect later in the map code, and then the function itself takes care of the rest.  Whats put into r0, and r1 are the values the function uses to know exactly what it needs to do with r0 being the party member 0-7 to add, and r1 set to either 1 or 0 telling it if it should display the message that says "so-and-so joined your party." or not.
Just sayin'.  

    ,-~~-.___.            Golden Sun
  /   |  '         \   Hacking Community
(     )           0              |
   \_/-, ,------'              /
      ===                     //                   
      /    \-'~;    /~~~(O)
    /    __/~|__/         |   
=(  _____| (_________|
All your internet entertainment.

Atrius (He/Him)

You can only edit the map code in the editor since it's compressed.  The hex editor for map code is accessed in the map viewer by clicking the button that says "Map" and selecting "Code Hex"

The characters are in the same order as in the party member editor.
0 - Isaac
1 - Garet
2 - Ivan
3 - Mia
4 - Felix
5 - Jenna
6 - Sheba
7 - Piers
[sprite=220,4,0]I'm shaking my head in general disapproval of everything[/sprite]

Salanewt

#12
Ah. I was trying to figure out how the game adds Felix, Jenna, and Sheba to your party during the Echo scene, but I have had little to no luck figuring this out so far. If someone with a bit more coding experience can figure it out, that would be great. However, I am going to take a break from this for the rest of the night. Currently, I have the following pointers:

x02000458 - Felix
x02000459 - Jenna
x0200045A - Sheba

Possibly related:

x080AFDD9
x080AFE14

Who knows, it might be right under my nose?

Edit: Wait wait!!! I somehow managed to have my team turned into two Jennas and one Mia. I shall get back to everyone on 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

You probably should have traced it back once more.

02009EB6 = This area clears all party members.
02009EE6 = Adds Party Members 4, 5, and 6.
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

So you solved it? Excellent, thanks for looking into it for, well, everyone!

Edit: So we pretty much know about all of this now, don't we? Or... um, oh - Party 1 is still a bit mysterious.
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

#15
So, exactly how many different functions are Party Member related?


080AD0F8 (080AFDD8) = Add Party Member
080AD0100 (080AFE78) = ??? (Party Member Related.)
080AD0108 (080B04BC) = ??? (No idea.)
080AD110 (080AFE1C) = Remove Party Member

080AD240 (080AE6E4) = Add Isaac's Party
080C8048 (080D23D8) = Add Party Member w/ Dialogue

Is that it? All you had to do, was place aThumb Breakpoint at 080AD0F8 and see what was at R14 (LR) Register to find where the code was that adds the party members. If there is dialogue, or if the first one fails you, you should do it at 080C8048.
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! :)

Griever

Well I found where the different numbers are ... but not exactly sure which one to change >_<

Here is a Snapshot of the Hex Editor ...



Salanewt

Ah, I have an image that might help, when it comes to highlighting.



This only shows where each character is in the script, and does not show/change who joins/leaves. However, with a bit of knowledge, one can easily change this to make the whole party join if they wish.
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

Don't you think it would be much easier to look at that in 16-bit?

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

So I've been thinking about this lately. Does anybody know how to make someone other than Felix join your party when the game cuts out to the title screen on Idejima? To be a bit more helpful, I'll contribute something myself.

x080ADEF6 - Adds Felix as a starting PC before creating a file (this stored a value into R0 from R3, but changing it to 200# should work).
x080ADEFC - Adds Jenna as a starting PC before creating a file (2005, where x05 is Jenna).

The above code executes even before a file is created, so Felix and Jenna will always the default party members when a file isn't selected. It should be noted that these characters will stay in your party when creating a new file, and that Felix' replacement will not be removed from the party at Venus Lighthouse without actually modifying the code that removed him.

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?