Mass Sprite Sheet Expansion Battle & NPC
#27
Haha, I would like a document on the battle intros would be a nice to have. You can reuse the scripts by setting the same pointer twice with no problems.

I also scanned the C2 bank for sprite checks while figuring this out. So I'll post what I noticed but they only concern parts that are skipped for guest characters. Such as desperation attacks and magic learning.

The sprite index for an in-battle entity/character is stored at: $3ED8, X (X is the index)

Code:
Desperation attack:

C2/15F8: B9 D8 3E     LDA $3ED8,Y (Which character it is)
C2/15FB: C9 0C        CMP #$0C
C2/15FD: F0 05        BEQ $1604   (branch if Gogo)
C2/15FF: C9 0B        CMP #$0B
C2/1601: B0 0D        BCS $1610   (branch if Character 11 or above: Gau, Umaro, or
                                   special character.  none of these characters have DAs)


Magic related:

C2/5589: BD D8 3E     LDA $3ED8,X
C2/558C: C9 0C        CMP #$0C
C2/558E: B0 1E        BCS $55AE


Magic learning related:

C2/56C9: BD D8 3E     LDA $3ED8,X
C2/56CC: C9 0C        CMP #$0C
C2/56CE: F0 15        BEQ $56E5    (branch if the character is Gogo)
C2/56D0: C8           INY
C2/56D1: C8           INY          (Y = 2)
C2/56D2: B0 11        BCS $56E5    (branch if Umaro)


Post battle rewards:

C2/5E59: B9 D8 3E     LDA $3ED8,Y (Which character it is)
C2/5E5C: C9 0C        CMP #$0C
C2/5E5E: B0 13        BCS $5E73   (Branch if Gogo or Umaro)
...
C2/5E9A: B9 D8 3E     LDA $3ED8,Y
C2/5E9D: 20 83 62     JSR $6283    (Stores address for spells known by character in $F4)
...
C2/5EAF: B9 D8 3E     LDA $3ED8,Y
C2/5EB2: C9 0C        CMP #$0C
C2/5EB4: B0 03        BCS $5EB9

These are parts of four routines that do checks for sprites above #$0C or #$0D and branch if so. So they target all guest characters as such. There are more checks for sprites in the C2 bank that directly check for certain sprites. But they don't target above #$0D so I guess they don't need changing.

This is a nice project, I hope you get it all up and running smoothly Smile
Reply


Messages In This Thread
RE: Mass Sprite Sheet Expansion Battle & NPC - by m06 - 04-06-2015, 07:43 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  NPC Sprite Sheet Expansion (m06 version) m06 19 26,856 01-17-2020, 01:19 PM
Last Post: Catone

Forum Jump:


Users browsing this thread: 2 Guest(s)