Golden Sun Hacking Community

Golden Sun Resources => The Classic GS Editor => Topic started by: Salanewt on 31, October, 2010, 10:32:55 AM

Title: Separation Patch Guide
Post by: Salanewt on 31, October, 2010, 10:32:55 AM
Okay, this topic is in regards to the new Separation Patch that Atrius was so kind to add for us. It is a bit confusing at first, but gets pretty simple once you know how to use it.

Step 1: Activate the patch. This should cause everyone in Party 2 to become the NPC class, unless you prepared the next steps in advance.

Step 2: Check Element levels of both parties. For now, you should keep them all at their default levels. Changing can be done later or earlier, but it makes things a bit less confusing to revert it back for now.

Step 3: Classes. You need to create more classes for Party 2 (or at least for Felix and Sheba, you can skip this step for Jenna and Piers). There is enough space under Garet's classes to duplicate the Squire set, if that is what you want to do. As a quick note, you have to fill in all of the stat modifiers and psynergy learned yourself.

(http://i856.photobucket.com/albums/ab125/Salanewt/ClassEditorGS.jpg)

Step 4: Tick the boxes. You need to tick the Party 2 box in the top right corner so that the members of the second party will be assigned that class, provided they have the element levels. You need Auto checked to be able to change the Party 2 box, as a quick little note.

(http://i856.photobucket.com/albums/ab125/Salanewt/ClassEditorGS2.jpg)

Now you may observe your work in the game as you play. Another reminder, but you still have to do Step 4 for everyone in Party 2, and you have to reassign all psynergy and stat modifiers to each class.

Have a nice day.
Title: Re: Separation Patch Guide
Post by: Thelinil on 31, October, 2010, 10:36:00 AM
/Bows in respect  :happy: Thanks
Title: Re: Separation Patch Guide
Post by: Griever on 31, October, 2010, 10:38:18 AM
Thanks Salanewt for this ... i just enabled the patch and that's it ... which makes sense since i got all NPC class
Title: Re: Separation Patch Guide
Post by: Salanewt on 31, October, 2010, 10:43:45 AM
You are welcome. I might make the post a bit more organized, but I am happy that it has been useful for you both so far.

Have a nice day.
Title: Re: Separation Patch Guide
Post by: Griever on 31, October, 2010, 10:49:45 AM
*Ivan is out ....... Ivan is out!!!!*

Sorry i hate him ... he was so useless in my party ...
Anyway, it looked pretty organized for me.
The separation patch was really a very good idea.

I also like the fact i can add new classes, psynergies and also edit the ones already in game. By edit i mean name, since i kinda want to have my fav. character as a magic user. I guess you know whom I'm talking about.
Title: Re: Separation Patch Guide
Post by: Salanewt on 31, October, 2010, 10:54:33 AM
It is awesome, isn't it? Oh yeah, I forgot to mention. While you need the Auto box checked to be able to check/uncheck the Party 2 box, you can uncheck it once you have the Party 2 box' settings the way you want. For example, I gave Jenna (now Peach) the Water Seer class, but I had to uncheck the Auto box for it to work properly.

I think I can tell who you are talking about. Good luck with that, by the way!

Have a nice day.

Edit: Or so I thought. I have run into a bug when I give Jenna/Peach a Water level of 5, and then change their class to make them a permanent NPC. In the Class Editor, I can not give the Water Seer class to Jenna anymore, since unchecking the Auto box disables the class for Jenna, who has the normal level requirement.
Title: Re: Separation Patch Guide
Post by: Atrius on 31, October, 2010, 03:04:24 PM
Checking the auto box will set the type value to the left of it automatically as you change the elemental requirements for the class (Hence why it grays out when you do so), checking the party 2 box will change the way it automatically sets that value to apply for characters 4-7.  If you have party 2 checked, but auto unchecked it does absolutely nothing (Hence why party 2 grays out at that point)  So, again, the only purpose of those check boxes is to automatically change the type value as you alter the elemental requirements for the class.


Be aware that mixed classes obtained by setting Djinn to your characters are also separated, by altering your mixing your Djinn set up you will also get the NPC class unless you create new classes to replace the mixed ones.
Title: Re: Separation Patch Guide
Post by: Rolina on 31, October, 2010, 05:52:13 PM
Just did some major testing guys.  Bad news:  The patch didn't work.  Felix is still a squire.  I'll play around a bit more, but unless I can get him to be a Conscript class like I want him to be...  Well, we're SoL here until we get a patch.
Title: Re: Separation Patch Guide
Post by: Atrius on 31, October, 2010, 05:57:17 PM
Are you remembering to get his class to reset by setting/unsetting Djinn until it changes?

Edit: Nevermind, confirmed, it works for everyone except Felix.
Title: Re: Separation Patch Guide
Post by: Rolina on 31, October, 2010, 06:03:36 PM
I started a new game.  I posted that when I got felix.  But Sheba was affected all fine and dandy!  I can't figure out what's wrong, so I'm gonna take and upload a screenie.

As you can see, Jenna's class works fine (forgive the name, it's just a placeholder).  Felix, though...
Title: Re: Separation Patch Guide
Post by: Salanewt on 31, October, 2010, 06:09:33 PM
It works well for me. You are creating new classes, right?

Have a nice day.
Title: Re: Separation Patch Guide
Post by: Rolina on 31, October, 2010, 06:59:41 PM
It only doesn't work for Felix.  Everyone else is just fine and dandy.  Atrius checked and confirmed it, it'll be an easy fix.

Although, I really, REALLY wanna use Marquis and not Markuis, but apparently the compression hates me.
Title: Re: Separation Patch Guide
Post by: Atrius on 31, October, 2010, 07:18:54 PM
Yeah... The text compression is a pain in the butt, and those compression tables are in the most convoluted format I've seen yet.
Title: Re: Separation Patch Guide
Post by: Salanewt on 31, October, 2010, 07:46:07 PM
Oh right, now it makes sense. It would seem that I forgot to use a different name plus stat modifiers, so I thought that I had a different Felix with appropriate stats. Well, whenever you can fix it, I would be most appreciative.

Luckily for me, the guide will be even more accurate when it is fixed...

Have a nice day.

Edit:

Atrius, wait? So we have to create new classes, right? This will get quite exciting.
Title: Re: Separation Patch Guide
Post by: VanishMantle on 08, May, 2012, 06:45:19 PM
This is amazing! Thank you so much for this topic I will get to work on this immediately!
Title: Re: Separation Patch Guide
Post by: Salanewt on 08, May, 2012, 07:29:39 PM
Aw,thanks!

I forgot to mention it earlier, but I'm pretty sure that item classes are exempt from the +20 rule. As long as a character can equip the item, they can access it's class.
Title: Re: Separation Patch Guide
Post by: Misery on 21, August, 2013, 11:45:25 AM
Alright, sorry for reviving an old thread (not sure if I should be sorry really, this is still pretty relevant).

Would anyone happen to know how the separation patch decides which characters are in party 1 and party 2? More specifically, I'd like to know where the data the patch changes is. The reason I'm asking is shared (symbiotic) classes, such as for example the Brute or White Mage class lines.

As the patch is currently set up, Felix will share symbiotic classes with Jenna (I assume), Ivan with Mia, etc.
I would've preferred if this was switched:
-Isaac and Jenna appear to have more focus on agilty, while Felix and Garet seem more like heavyweights
-Ivan and Piers are warrior/mage hybrids while Sheba and Mia seem more like pure mages

I guess Atrius would be the authority on this, but he's not around much nowadays...
I can look this up in the ROM myself if I have to, just checking if anyone else already knows.
Title: Re: Separation Patch Guide
Post by: Rolina on 21, August, 2013, 12:01:43 PM
So you're looking for not a party separation patch, but a character separation patch?
Title: Re: Separation Patch Guide
Post by: Daddy Poi's Oily Gorillas on 21, August, 2013, 12:05:56 PM
QuoteWould anyone happen to know how the separation patch decides which characters are in party 1 and party 2?
Yes, Atrius literally adds 20 to the type value if your character is in party 2.

Maybe you've missed it, but you can look at the image attached to this post: http://forum.goldensunhacking.net/index.php?topic=238.msg33657#msg33657 (The image only displays part of the function, but the entire function should be used for finding a class match, I think.)

Edit: The original says if Class type 2 and PC is 5 (Jenna), use class type 7 (Flame User series); and if class type is 6 and character is 7 (Piers), use class type 15, ... When you apply Atrius's patch, all that is replaced.
Title: Re: Separation Patch Guide
Post by: Misery on 21, August, 2013, 01:04:05 PM
Quote from: Teawater on 21, August, 2013, 12:05:56 PM
QuoteWould anyone happen to know how the separation patch decides which characters are in party 1 and party 2?
Yes, Atrius literally adds 20 to the type value if your character is in party 2.
I know this already. It's a hard question to formulate, but what I was asking is basically how the patch decides who gets the class with an added 20 (i.e. why does Felix get it rather than Isaac)

Quote from: Teawater on 21, August, 2013, 12:05:56 PM
Maybe you've missed it, but you can look at the image attached to this post: http://forum.goldensunhacking.net/index.php?topic=238.msg33657#msg33657 (The image only displays part of the function, but the entire function should be used for finding a class match, I think.)
Yeah, I don't remember seeing that. Thank you very much for linking, that's exactly what I was looking for.

Quote from: Rolina on 21, August, 2013, 12:01:43 PM
So you're looking for not a party separation patch, but a character separation patch?
No, I just want the ability to decide if any given character belongs to party 1 or party 2.
Title: Re: Separation Patch Guide
Post by: Daddy Poi's Oily Gorillas on 21, August, 2013, 01:09:44 PM
Because r7 is the Player Character.

0 = Isaac
1 = Garet
2 = Ivan
3 = Mia
4 = Felix
5 = Jenna
6 = Sheba
7 = Piers

In Atrius's patch, blt means Branch(code jump) if Less Than. So all PC numbers BELOW 4 skip the add 20 instruction.

And from just looking at it, you can already gather that r6 is the class type... (Later in the code, it checks for a match to this number in the class data.)

(And b is just a simple branch/jump.)
Title: Re: Separation Patch Guide
Post by: Misery on 21, August, 2013, 01:39:13 PM
That makes... a lot of sense.
It also means I'm not going to be able to do any quick fix...
Of course, it's still possible to change the character data, but it would take a bit of work.
I'll leave the subject for now.
Title: Re: Separation Patch Guide
Post by: Rolina on 23, August, 2013, 08:07:13 AM
Yeah, to get rid of symbiotic classes, there's two options available to you:

1:  Just build them like normal classes, adding a step to emulate the 6 tier class.  This only works for Dual-Element, though. 
2:  Full Character Separation.  This will require a new patch to implement.

Both, however, likely require the editor to list more space than it currently does.  Right now, using a 1 space separator to keep things easy to find, you have no space left.  Sure, you can actually bunch them all up together, but even then you may not have enough space for an FCS patch model unless you get rid of an item class, since you'll have to list every class available to every character.

Personally, I like the idea of an FCS patch, but there just isn't room to make it practical yet.  There is space, though.  We just can't access it with the editor.
Title: Re: Separation Patch Guide
Post by: Misery on 23, August, 2013, 09:34:06 AM
Once again, I only want to specify if a character belongs to party 1 or party 2.
I do not wish to get rid of symbiotic classes.
I am not trying to make a full character separation patch.
I just want to change who characters share their symbiotic classes with.
Since the separation patch only splits the party's by an "if character ID is greater than..." statement, there is no simple way to accomplish that.

This can be done without any code changes, but it would require swapping a lot of pointers (or simply replacing the graphics data, but that wouldn't solve the problem with weapon graphics). If you wanted to keep the original game but with different classes, you'd also have to change a lot of scripts and functions for which characters are used, which characters are assigned certain djinn, etc. If I were making completely custom characters, this wouldn't be a problem.

And yeah, I noticed that with the separation patch, the class slots get filled very quickly. Which is a shame since I would've preferred to add more than a few new ones... I don't understand why the full ability list must be included in every class when so many of them have the same abilities, I mean, they could've just referenced a list elsewhere.

Quote from: Rolina on 23, August, 2013, 08:07:13 AM
There is space, though.  We just can't access it with the editor.
I assume the code can address up to 255 classes, but I had a look at the data after the necromage class, and it's not empty but occupied by something that at a quick glance doesn't appear to be class data. Of course, I have no idea what it's used for, so it's not impossible that it's simply leftover or garbage data.
Title: Re: Separation Patch Guide
Post by: Rolina on 23, August, 2013, 01:27:53 PM
Oh, I guess I misunderstood... Yeah, if you're gonna have them, then you've got like, no wiggle room, sadly.  The most you can do is to literally change all the instances of the characters around.  Swap Garet and Jenna's stats, then go in and manually change each call for Jenna to be a call for Garet and visa versa.
Title: Re: Separation Patch Guide
Post by: Daddy Poi's Oily Gorillas on 25, August, 2013, 03:58:05 AM
@Misery: It's not really that difficult. just insert a table look-up code.

I think you are free to use registers r0-r4, if I'm not mistaken.

r5 is pointer for elemental stuff.
r6 is class
r7 is PC.

Plan A:

ldr r0, [08??????] (=Player Character Party 1 or Party 2 data) //Should point to var.
add r0, r7
ldrb r0, [r0, #0x0]
cmp r0, 0x0
beq $b1
add r6, #0x14
b $b1
var:(POINTER to  PC Party data)

b1: Rest of the code.


And then just fill out 8 bytes for each party member. 0 For Party 1, and 1+ for Party 2.


---


Plan B:

Ofcourse, with a bit of revision to my code, you could make it so that the new database contains values to add to the class value:

ldr r0, [08??????] (=Player Character Party 1 or Party 2 data) //Should point to var.
add r0, r7
ldrb r0, [r0, #0x0]
add r6, r0
b $b1
var:(POINTER to  PC Party data)

b1: Rest of the code.


And then just fill out 8 bytes for each party member. Basically a number of where their class numbers should start. If you decide to insert the database into this same code section, Consider swapping the first ldr instruction for an "add r0, pc, ?" one. (So that you don't have to have that pointer value.)
Title: Re: Separation Patch Guide
Post by: Misery on 25, August, 2013, 02:09:50 PM
Quote from: Teawater on 25, August, 2013, 03:58:05 AM
@Misery: It's not really that difficult. just insert a table look-up code.
You underestimate my laziness. That, and I don't have that much experience working with assembly, nor do I remember ever trying to implement any custom code... but I think I'm going to do so now that you've essentially done all the work.

Well, not all the work... I still have to convert it into hex. Not to mention I'm not sure where exactly it should be executed. But I guess I'll take a look at the class sorting code and try to figure out where to put it.

On another note, with this you've made the basis for a full character separation patch. Nice. I think I'll go ahead and actually make a patch of this.
Title: Re: Separation Patch Guide
Post by: Daddy Poi's Oily Gorillas on 25, August, 2013, 04:04:43 PM
I remember before I first learned assembly, it was mostly gibberish. The first thing I recognized were the data pointers scrabbled through the code. Ofcourse, in the end, the bulk of my learning the language came from reading GBATEK and comparing what happens in SDL-H.

QuoteNot to mention I'm not sure where exactly it should be executed.
It should replace Atrius's patch. (At 080B01BC.)

Speaking of, I could probably also create a look-up table for class items as well. (To replace those item checks beneath.) (Not sure if I will, though.)
Title: Re: Separation Patch Guide
Post by: Misery on 25, August, 2013, 04:53:11 PM
I think the same would go for anyone, assembly will look like gibberish if you don't know it. Fortunately, I can understand it somewhat. I didn't understand your code at first though since I didn't realize ldrb would load a byte from the address in r0 (rather than the actual value stored there), but I believe I do understand it now (at the very least, it all makes sense).

I'm only going to use the second piece of code ("plan B") for the patch, since it gives a lot more flexibility.

Quote from: Teawater on 25, August, 2013, 04:04:43 PM
QuoteNot to mention I'm not sure where exactly it should be executed.
It should replace Atrius's patch. (At 080B01BC.)
Well thanks, that saved me another bit of work.
Title: Re: Separation Patch Guide
Post by: Daddy Poi's Oily Gorillas on 25, August, 2013, 05:04:18 PM
Okay, by the way, I forgot that the ldrb one could replace a number for a variable as well, so here's the updated code.


???? ldr r0, [08??????] (=address of bank)
5DC0 ldrb r0, [r0, r7]
???? add r6, r0
???? b $b1
Title: Re: Separation Patch Guide
Post by: Luca100 on 09, October, 2020, 06:21:15 PM
Hi, I was wondering if there is any way to use the patch to separate the classes in the Spanish ROM. I don't know much about Hacking and there is no information on the internet about roms in Spanish, so the patch simplifying things would help me a lot. Thanks!  :happy: