Users browsing this thread: 1 Guest(s)
Changing Who Learns What...

#21
Posts: 264
Threads: 12
Thanks Received: 4
Thanks Given: 2
Joined: Oct 2009
Reputation: 6
Status
Lucky-Girl
Is it possible to have multiple characters set to learn the same thing, i.e. SwdTech?


"The doom and gloom is justified.
A couple of people are going to die.
Even though you can turn back the time,
you're always a moment too late!"
  Find
Quote  

#22
Posts: 69
Threads: 9
Thanks Received: 0
Thanks Given: 0
Joined: Apr 2010
Reputation: 0
Status
None
What is the exact offset I need to search for to find the information dealing with Lores?
  Find
Quote  

#23
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 156
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
238E2


We are born, live, die and then do the same thing over again.
Quote  

#24
Posts: 341
Threads: 12
Thanks Received: 0
Thanks Given: 2
Joined: Sep 2010
Reputation: 5
Status
None
(10-17-2010, 01:39 PM)Satoascorpion Wrote: Is it possible to have multiple characters set to learn the same thing, i.e. SwdTech?

I haven't tested it, but I suspect you -can-, just not in the way you're probably hoping.

If you set two different PCs to learn SwdTech, it probably means that anytime one of them joins, the SwdTech list will be rewritten. So if Terra has 3 SwdTechs, and then Cyan joins at a low level, suddenly both of them would only know 2 SwdTechs. I suspect that if you then level Terra up to the point where she would learn the 4th SwdTech, the game would either crash or automatically enable all 4 SwdTechs.

Simply put, it's easier if you just give the learning routine to the PC who joins first. They will share the same SwdTech list regardless. The only thing making them both into learners will accomplish is crashing the game or causing them to fight over which Swdtechs are available.
Quote  

#25
Posts: 264
Threads: 12
Thanks Received: 4
Thanks Given: 2
Joined: Oct 2009
Reputation: 6
Status
Lucky-Girl
Okay, now what about two characters set to learn Terra's natural magic?

I imagine this would only affect the individual characters, since everyone can learn magic, and all it would really do is just create another avenue for which that magic is achieved.


"The doom and gloom is justified.
A couple of people are going to die.
Even though you can turn back the time,
you're always a moment too late!"
  Find
Quote  

#26
Posts: 2,768
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
natural magic is kinda different seeing as how there is a huge ass list of spells

the only thing is, if u heavily tweak that sort of thing, a lot of the hex info gets reorganized and is not viewable in usme and several other editors


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  

#27
Posts: 69
Threads: 9
Thanks Received: 0
Thanks Given: 0
Joined: Apr 2010
Reputation: 0
Status
None
My problem has been solved. Thanks DjinnandTonic, Gi Nattack, and Poco Loco! ^_^
  Find
Quote  

#28
Posts: 341
Threads: 12
Thanks Received: 0
Thanks Given: 2
Joined: Sep 2010
Reputation: 5
Status
None
(10-17-2010, 07:32 PM)Satoascorpion Wrote: Okay, now what about two characters set to learn Terra's natural magic?

I imagine this would only affect the individual characters, since everyone can learn magic, and all it would really do is just create another avenue for which that magic is achieved.

sonotoori~!

Exactly right! If you want both Terra and Cyan to learn the same set of spells naturally, you can have both branches point to Terra's Natural Spelllist subroutine.

That's slightly more difficult due to how branching works, but it is possible!

Since it's a cool idea, I'll try to walk you through it. (If you don't want to learn anything, just ignore this and steal the addresses.)

Branching works by basically counting a number of bytes to move forwards or backwards instead of simply jumping to a new offset (that's what a JMP/JSR is).

In our first example, we have a bunch of BEQs (Branch if Equal to value loaded by the CMP preceeding it). These BEQs point to the 4 PCs' different learning subrountines. If you want more than one PC to learn from the same subroutine, you'll have to point their BEQ command to -that- subroutine.

Teach Natural Abilities learned via Automatic Level-Up
C0/A17F: B90016 LDA $1600,Y (character ID)
C0/A182: C900 CMP #$00 (is character Terra? note there's no need for this CMP here)
C0/A184: F010 BEQ $A196 (branch if so)
C0/A186: C906 CMP #$06 (is character Celes?)
C0/A188: F02E BEQ $A1B8 (branch if so)
C0/A18A: C902 CMP #$02 (is character Cyan?)
C0/A18C: F04C BEQ $A1DA (branch if so)
C0/A18E: C905 CMP #$05 (is character Sabin?)
C0/A190: D003 BNE $A195 (branch if not)
C0/A192: 4C01A2 JMP $A201
C0/A195: 60 RTS

So Terra's natural subroutine starts at C0/A196 (000A396 raw), and Celes' starts at C0/A1B8 (000A396 raw). I'm not gonna bother with SwdTech and Blitz because only one person can -learn- those without causing problems (though anyone can -use- them at least!)

Notice that while the commentation notes that Terra's subroutine branches at $A196, the command actually says F0 10. The F0 is the BEQ command. The $10 (16 in regular decimal numbers) is how many bytes to branch forward if the value is equal.

So if you look at where the BEQ points to, it's literally just 16 bytes forward from where it started!
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16
C9 06 F0 2E C9 02 F0 4C C9 05 D0 03 4C 01 A2 60 XX-where the subroutine starts

However, let's say you wanted Cyan (or whoever you want learning things at offset $A18A) to learn Terra's magic skillset. If you just copied Terra's BEQ code into Cyan's space, it would -still- move 16 bytes forward, even though Cyan's branchpoint is further along in the code.

00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16
C9 05 D0 03 4C 01 A2 60 XX YY YY YY YY YY YY YY ZZ - middle of Terra's subrountine, world explodes, game crashes

Do you see the problem? Can you figure out how to fix it?

Clearly we don't want Cyan's branch to go 16 bytes, so we have to tell it to only go 8 bytes to start in the same XX location as Terra's.

So the new BEQ command should be $F0 08.

Using Terra's list:
Terra: $F0 10
Celes: $F0 0C
Cyan: $F0 08
Sabin: $4C 96 A1 (Sabin just jumps to this list since he's last in line~)

Using Celes's list:
Terra: $F0 2A
Celes: $F0 2E
Cyan: $F0 32
Sabin: $4C B8 A1 ($4C is the JMP command, B8 A1 is the offset backwards)

Warning: Don't do this for SwdTech and Blitz, you don't want more than one person learning those at a time anyway. (Generally, unless you really know what you're doing - in which case you probably aren't reading this.)

Part 2:
Same basic idea, but this time for the 'learn a new spell at level up' routine instead of 'at recruitment'.

C2/61B6: A2 00 00 LDX #$0000 (point to start of Terra's magic learned at
level up block)
C2/61B9: C9 00 CMP #$00 (is it character #0, Terra?)
C2/61BB: F0 3F BEQ $61FC (if yes, branch to see if she learns any spells)
C2/61BD: A2 20 00 LDX #$0020 (point to start of Celes' magic learned at
level up block)
C2/61C0: C9 06 CMP #$06 (is it character #6, Celes?)
C2/61C2: F0 38 BEQ $61FC (if yes, branch to see if she learns any spells)
C2/61C4: A2 00 00 LDX #$0000 (point to start of Cyan's SwdTechs learned
at level up block)
C2/61C7: C9 02 CMP #$02 (if it character #2, Cyan?)
C2/61C9: D0 15 BNE $61E0 (if not, check for Sabin)
C2/61CB: 20 22 62 JSR $6222 (are any SwdTechs learned at the current level?)
C2/61CE: F0 51 BEQ $6221 (if not, exit)
~
C2/61E0: A2 08 00 LDX #$0008 (point to start of Sabin's Blitzes learned
at level up block)
C2/61E3: C9 05 CMP #$05 (is it character #5, Sabin?)
C2/61E5: D0 3A BNE $6221 (if not, exit)
C2/61E7: 20 22 62 JSR $6222 (are any Blitzes learned at the current level?)
C2/61EA: F0 35 BEQ $6221 (if not, exit)

You'll notice this time that both Terra and Celes branch to same spot (bolded). This is because the value before the CMP prompt is telling the rom where to look for the spell tables: LDX #$0000 for Terra and LDX #$0020 for Celes. The learning subroutine for innate magic is obviously the same otherwise.

So how to rebranch things? Well, for Terra and Celes's slots, it's easy. Just change the LDX # to $00 00 or $00 20 (note that its backwards in the rom as $20 00).

For Cyan, change his preceeding LDX # to whichever spell list you want (default is $0000 because SwdTechs are listed just before Blitzes on Cyan/Sabin's table). But -then- you have repoint his JSR from the SwdTech learning routine to the magic learning routine. This doesn't even require math. You -know- the Magic learning routine starts at $61FC, so just change that JSR to a JMP $61FC (4C FC 61)!

Warning: This breaks the SwdTech learning routine, so no one can learn SwdTechs (until you beat Cyan's Dream, which auto-enables all SwdTechs). I would only suggest doing this if you're not using SwdTech at all in your hack, as there may be more things related to SwdTech that will try to call this subroutine and then crash your game. (But give it a try if you're brave and don't mind that you need to beat Cyan's Dream for a PC to learn their skillset... it might just work?)

Sabin: His branchpoint is a litte later in the code, but works on the same principle as Cyan's (Change his JSR to JMP $61FC (4C FC 61)). Note that if you make these changes, you -will- break the Blitz-learning routine and if you give a character Blitz, then they will have to meet Duncan before getting any of their skills (or the game will just crash).

Note that these two parts should match. If you have Celes learning Terra's magic at recruitment, you should have her learning Terra's list during the level-up check. I doubt the rom is stable enough to handle having a character learning different skills at recruitment than from level-ups.

For the brave: It -might- work. You're welcome to try on a copy of your rom. Could make for something interesting to have say, Sabin start with a few of Terra's early spells, but then he learns his later Blitzes upon levelling up. Note that anytime level averaging would occur (such as re-recruiting him in the WoR), he'll lose all his learned Blitzes and get more of Terra's spells. Of course, you can always get the Blitzes back by doing the Duncan scene. It's notable that this would only work with Natual Magic lists and something else (can't have both SwdTech and Blitz doing this), since there's actually a stable protocol in place for all PCs to learn Spells due to how Espers work.

Try it out, if you did what I said -should- work and something crashes upon level-up learning, you probably (mistyped something, or) need to add an RTS ($60) command after Cyan's or Sabin's JMP commands in part 2.

I hope that all made sense. It should if you're actually looking at it in a hex editor?
Quote  

#29
Posts: 264
Threads: 12
Thanks Received: 4
Thanks Given: 2
Joined: Oct 2009
Reputation: 6
Status
Lucky-Girl
Okay, new question. Cyan gains all his SwdTech moves when you complete his dream sequence. Is there a way to make the Duncan scene similarly teach Sabin ALL his Blitzes, instead of JUST Bum Rush?


"The doom and gloom is justified.
A couple of people are going to die.
Even though you can turn back the time,
you're always a moment too late!"
  Find
Quote  

#30
Posts: 341
Threads: 12
Thanks Received: 0
Thanks Given: 2
Joined: Sep 2010
Reputation: 5
Status
None
I thought it did?

I admittedly haven't looked at the code for that, I just assumed it from casually playing the game.
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite