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

Separation Patch Guide

Started by Salanewt, 31, October, 2010, 10:32:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Daddy Poi's Oily Gorillas

#20
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.)
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! :)

Misery

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.

Rolina

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.

Misery

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.

Rolina

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.

Daddy Poi's Oily Gorillas

#25
@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.)
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! :)

Misery

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.

Daddy Poi's Oily Gorillas

#27
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.)
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! :)

Misery

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.

Daddy Poi's Oily Gorillas

#29
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
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! :)

Luca100

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:
Golden Sun The Lost Age, Fire Emblem Genealogy of the Holy War, Pokemon Cristal, Inazuma Eleven, Dragon Quest IX ... What else does someone need to be happy?